diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 5312d77..0000000 --- a/.dockerignore +++ /dev/null @@ -1,11 +0,0 @@ -node_modules -*.log* -.nuxt -.nitro -.cache -.output -.env -.idea -.vscode -content/.obsidian -.DS_Store diff --git a/.drone.docker.yml b/.drone.docker.yml deleted file mode 100644 index ffe0147..0000000 --- a/.drone.docker.yml +++ /dev/null @@ -1,28 +0,0 @@ -kind: pipeline -name: build -type: docker - -platform: - os: linux - arch: amd64 - -steps: - - name: build-master - image: plugins/docker - when: - branch: - - master - settings: - dockerfile: docker/Dockerfile - tag: - - ${DRONE_BRANCH} - custom_labels: - - "commit=${DRONE_COMMIT_SHA}" - username: - from_secret: global_docker_login - password: - from_secret: global_docker_password - registry: - from_secret: global_docker_registry - repo: - from_secret: docker_repo diff --git a/.drone.gh-pages.yml b/.drone.gh-pages.yml deleted file mode 100644 index ff7fd84..0000000 --- a/.drone.gh-pages.yml +++ /dev/null @@ -1,29 +0,0 @@ -kind: pipeline -name: build -type: docker - -platform: - os: linux - arch: amd64 - -steps: - - name: build - image: node:16 - commands: - - yarn - - yarn generate - - rm -rf ./docs - - mv ./.output/public ./docs - - touch ./docs/.nojekyll - - name: publish - image: plugins/gh-pages - settings: - target_branch: gh-pages - ssh_key: - from_secret: global_ssh_key - username: - from_secret: github_username - password: - from_secret: global_github_token - ssh_key: - from_secret: global_ssh_key diff --git a/.gitignore b/.gitignore deleted file mode 100644 index f20e33d..0000000 --- a/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -node_modules -*.log* -.nuxt -.nitro -.cache -.output -.env -dist -.idea -.vscode -content/.obsidian -.DS_Store -.obsidian \ No newline at end of file diff --git a/200.html b/200.html new file mode 100644 index 0000000..bcb6266 --- /dev/null +++ b/200.html @@ -0,0 +1,6 @@ + + + +
+ \ No newline at end of file diff --git a/404.html b/404.html new file mode 100644 index 0000000..bcb6266 --- /dev/null +++ b/404.html @@ -0,0 +1,6 @@ + + + +
+ \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 4955aa7..0000000 --- a/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Self-hosted Obsidian Vault - -Use [Obsidian](https://obsidian.md) for content editing at `./content` folder. Made with -[NuxtJS](https://v3.nuxtjs.org) and [Nuxt Content Plugin](https://content.nuxtjs.org/). - -## Running - -```shell -yarn -yarn dev -``` - -## Publishing - -```shell -yarn generate -cp -a ./.outputs/public ./somewhere -``` - -- Dockerfile included in `./docker` -- Sample `drone-ci` configurations for gh-pages (`./.drone.gh-pages.yml`) and docker registry - (`./.drone.docker.yml`). - -## Supported Obsidian features - -- WikiLinks (should be set up to relative in order to work) -- Highlight -- Code blocks -- Nested pages - -## Other feature - -- Adaptive layout -- SEO Optimized -- Day / Night theme switching diff --git a/_payload.js b/_payload.js new file mode 100644 index 0000000..92006d6 --- /dev/null +++ b/_payload.js @@ -0,0 +1 @@ +export default {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}]},prerenderedAt:1667450784524} \ No newline at end of file diff --git a/api/_content/cache.json b/api/_content/cache.json new file mode 100644 index 0000000..62adfea --- /dev/null +++ b/api/_content/cache.json @@ -0,0 +1 @@ +{"generatedAt":1667450790175,"generateTime":66,"contents":[{"_path":"/blockchain/common-typescript-examples","_dir":"blockchain","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Common Typescript Examples","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Simple #dapp example for tests: "},{"type":"element","tag":"a","props":{"href":"https://metamask.github.io/test-dapp/","rel":["nofollow"]},"children":[{"type":"text","value":"https://metamask.github.io/test-dapp/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Interaction with smart contracts described in "},{"type":"element","tag":"a","props":{"href":"Smart%20contracts"},"children":[{"type":"text","value":"Smart contracts"}]}]}]},{"type":"element","tag":"h2","props":{"id":"connecting-to-node"},"children":[{"type":"text","value":"Connecting to node"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If #Metamask extension installed, "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Web3.givenProvider"}]},{"type":"text","value":" is available in global window. You can use "},{"type":"element","tag":"a","props":{"href":"https://infura.io","rel":["nofollow"]},"children":[{"type":"text","value":"Infura"}]},{"type":"text","value":" or your node instead:"}]},{"type":"element","tag":"code","props":{"code":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-balance"},"children":[{"type":"text","value":"Getting wallet balance"}]},{"type":"element","tag":"code","props":{"code":"const getBalance = async (address: string) => {\n return await web3.eth.getBalance(address);\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const getBalance = async (address: string) => {\n return await web3.eth.getBalance(address);\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-address"},"children":[{"type":"text","value":"Getting wallet address"}]},{"type":"element","tag":"code","props":{"code":"// first we need to authorize\nconst authorize = async () => {\n await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n return web3.currentProvider.selectedAddress;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// first we need to authorize\nconst authorize = async () => {\n await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n return web3.currentProvider.selectedAddress;\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"sending-transaction"},"children":[{"type":"text","value":"Sending transaction"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sending "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"value"}]},{"type":"text","value":" tokens with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"memo"}]},{"type":"text","value":" as value:"}]},{"type":"element","tag":"code","props":{"code":"\nconst transfer = async ({ \n from, \n to, \n value, \n memo, \n privateKey, \n gasLimit = 44000 \n}) => {\n const nonce = await web3.eth.getTransactionCount(from);\n const gasPrice = await web3.eth.getGasPrice();\n \n const rawTx = {\n from,\n to,\n value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n gasLimit: web3.utils.toHex(gasLimit),\n gasPrice: web3.utils.toHex(gasPrice),\n nonce: web3.utils.toHex(nonce),\n data: memo,\n };\n \n const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n \n const tx = new Transaction(rawTx);\n \n tx.sign(privateKeyBuffer);\n const serializedTx = tx.serialize();\n \n return this.web3.eth.sendSignedTransaction(\n `0x${serializedTx.toString('hex')}`\n );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"\nconst transfer = async ({ \n from, \n to, \n value, \n memo, \n privateKey, \n gasLimit = 44000 \n}) => {\n const nonce = await web3.eth.getTransactionCount(from);\n const gasPrice = await web3.eth.getGasPrice();\n \n const rawTx = {\n from,\n to,\n value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n gasLimit: web3.utils.toHex(gasLimit),\n gasPrice: web3.utils.toHex(gasPrice),\n nonce: web3.utils.toHex(nonce),\n data: memo,\n };\n \n const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n \n const tx = new Transaction(rawTx);\n \n tx.sign(privateKeyBuffer);\n const serializedTx = tx.serialize();\n \n return this.web3.eth.sendSignedTransaction(\n `0x${serializedTx.toString('hex')}`\n );\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"estimating-transaction-fee"},"children":[{"type":"text","value":"Estimating transaction FEE"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful to get fixed amount of tokens from user with pre-estimated fee."}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nconst estimateFee = async ({\n from,\n to,\n value,\n memo,\n}) => {\n const gasPrice = await web3.eth.getGasPrice();\n const gasLimit = await web3.eth.estimateGas({\n from,\n to,\n value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n data: web3.utils.asciiToHex(memo),\n }).call();\n \n return web3.utils.fromWei(\n BigInt(gasPrice.toString())\n .multiply(BigInt(gasLimit.toString()))\n .toString()\n );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { web3 } from '.';\n\nconst estimateFee = async ({\n from,\n to,\n value,\n memo,\n}) => {\n const gasPrice = await web3.eth.getGasPrice();\n const gasLimit = await web3.eth.estimateGas({\n from,\n to,\n value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n data: web3.utils.asciiToHex(memo),\n }).call();\n \n return web3.utils.fromWei(\n BigInt(gasPrice.toString())\n .multiply(BigInt(gasLimit.toString()))\n .toString()\n );\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-wallet-address-change"},"children":[{"type":"text","value":"Subscribing to wallet address change"}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"watching-network-change"},"children":[{"type":"text","value":"Watching network change"}]},{"type":"element","tag":"code","props":{"code":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"adding-custom-token-to-wallet"},"children":[{"type":"text","value":"Adding custom token to wallet"}]},{"type":"element","tag":"code","props":{"code":"window.ethereum\n .request({\n method: 'wallet_watchAsset',\n params: {\n type: 'ERC20',\n options: {\n address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n symbol: 'FOO',\n decimals: 18,\n image: 'https://foo.io/token-image.svg',\n },\n },\n })\n .then((success) => {\n if (success) {\n console.log('FOO successfully added to wallet!')\n } else {\n throw new Error('Something went wrong.')\n }\n })\n .catch(console.error)\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"window.ethereum\n .request({\n method: 'wallet_watchAsset',\n params: {\n type: 'ERC20',\n options: {\n address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n symbol: 'FOO',\n decimals: 18,\n image: 'https://foo.io/token-image.svg',\n },\n },\n })\n .then((success) => {\n if (success) {\n console.log('FOO successfully added to wallet!')\n } else {\n throw new Error('Something went wrong.')\n }\n })\n .catch(console.error)\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"changing-network-to-custom"},"children":[{"type":"text","value":"Changing network to custom"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Checking current chainId:"}]},{"type":"element","tag":"code","props":{"code":"const getChainID = async () => {\n return ethereum.request({ method: 'eth_chainId' })\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const getChainID = async () => {\n return ethereum.request({ method: 'eth_chainId' })\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Asking wallet to change current network:"}]},{"type":"element","tag":"code","props":{"code":"try {\n await window.ethereum.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n });\n} catch (switchError) {\n // This error code indicates that the chain has not been added to MetaMask.\n if (error.code === 4902) {\n try {\n await window.ethereum.request({\n method: 'wallet_addEthereumChain',\n params: [{ \n chainId: '0x03', // ropsten chainID (3) in hex\n chainName: 'Ropsten Test Network', \n nativeCurrency: { \n name: 'ETH',\n symbol: 'ETH',\n decimals: 18\n }, \n rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n blockExplorerUrls: ['https://ropsten.etherscan.io'] \n }] ,\n });\n } catch (addError) {\n // handle \"add\" error\n }\n }\n // handle other \"switch\" errors\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"try {\n await window.ethereum.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n });\n} catch (switchError) {\n // This error code indicates that the chain has not been added to MetaMask.\n if (error.code === 4902) {\n try {\n await window.ethereum.request({\n method: 'wallet_addEthereumChain',\n params: [{ \n chainId: '0x03', // ropsten chainID (3) in hex\n chainName: 'Ropsten Test Network', \n nativeCurrency: { \n name: 'ETH',\n symbol: 'ETH',\n decimals: 18\n }, \n rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n blockExplorerUrls: ['https://ropsten.etherscan.io'] \n }] ,\n });\n } catch (addError) {\n // handle \"add\" error\n }\n }\n // handle other \"switch\" errors\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Simple #dapp example for tests: "},{"type":"element","tag":"a","props":{"href":"https://metamask.github.io/test-dapp/","rel":["nofollow"]},"children":[{"type":"text","value":"https://metamask.github.io/test-dapp/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Interaction with smart contracts described in "},{"type":"element","tag":"a","props":{"href":"Smart%20contracts"},"children":[{"type":"text","value":"Smart contracts"}]}]}]},{"type":"element","tag":"h2","props":{"id":"connecting-to-node"},"children":[{"type":"text","value":"Connecting to node"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If #Metamask extension installed, "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Web3.givenProvider"}]},{"type":"text","value":" is available in global window. You can use "},{"type":"element","tag":"a","props":{"href":"https://infura.io","rel":["nofollow"]},"children":[{"type":"text","value":"Infura"}]},{"type":"text","value":" or your node instead:"}]},{"type":"element","tag":"code","props":{"code":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'web3'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// URL of your node"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'https://...'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"givenProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-balance"},"children":[{"type":"text","value":"Getting wallet balance"}]},{"type":"element","tag":"code","props":{"code":"const getBalance = async (address: string) => {\n return await web3.eth.getBalance(address);\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6b924a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-214987"},"children":[{"type":"text","value":"getBalance"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-43ccc9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6b924a"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-20a880"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-43ccc9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-258e6e"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-6b924a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"getBalance"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-address"},"children":[{"type":"text","value":"Getting wallet address"}]},{"type":"element","tag":"code","props":{"code":"// first we need to authorize\nconst authorize = async () => {\n await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n return web3.currentProvider.selectedAddress;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// first we need to authorize"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'eth_requestAccounts'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// then we can get wallet address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"getCurrentAddressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"selectedAddress"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"sending-transaction"},"children":[{"type":"text","value":"Sending transaction"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sending "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"value"}]},{"type":"text","value":" tokens with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"memo"}]},{"type":"text","value":" as value:"}]},{"type":"element","tag":"code","props":{"code":"\nconst transfer = async ({ \n from, \n to, \n value, \n memo, \n privateKey, \n gasLimit = 44000 \n}) => {\n const nonce = await web3.eth.getTransactionCount(from);\n const gasPrice = await web3.eth.getGasPrice();\n \n const rawTx = {\n from,\n to,\n value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n gasLimit: web3.utils.toHex(gasLimit),\n gasPrice: web3.utils.toHex(gasPrice),\n nonce: web3.utils.toHex(nonce),\n data: memo,\n };\n \n const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n \n const tx = new Transaction(rawTx);\n \n tx.sign(privateKeyBuffer);\n const serializedTx = tx.serialize();\n \n return this.web3.eth.sendSignedTransaction(\n `0x${serializedTx.toString('hex')}`\n );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"transfer"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ({ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"nonce"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"getTransactionCount"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"rawTx"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" value: "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toWei"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'ether'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":")),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" gasLimit: "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" gasPrice: "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" nonce: "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"nonce"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" data: "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"privateKeyBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"EthUtil"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"Transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"rawTx"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"sign"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"privateKeyBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"serializedTx"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"serialize"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"this"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"sendSignedTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"`0x${"}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"serializedTx"}]},{"type":"element","tag":"span","props":{"class":"ct-4cf26c"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-4cf26c"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'hex'"}]},{"type":"element","tag":"span","props":{"class":"ct-4cf26c"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"}`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"estimating-transaction-fee"},"children":[{"type":"text","value":"Estimating transaction FEE"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful to get fixed amount of tokens from user with pre-estimated fee."}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nconst estimateFee = async ({\n from,\n to,\n value,\n memo,\n}) => {\n const gasPrice = await web3.eth.getGasPrice();\n const gasLimit = await web3.eth.estimateGas({\n from,\n to,\n value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n data: web3.utils.asciiToHex(memo),\n }).call();\n \n return web3.utils.fromWei(\n BigInt(gasPrice.toString())\n .multiply(BigInt(gasLimit.toString()))\n .toString()\n );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"estimateFee"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"estimateGas"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" value: "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toWei"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'ether'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":")),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" data: "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"asciiToHex"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" })."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"fromWei"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca7e41"},"children":[{"type":"text","value":"BigInt"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"())"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"multiply"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-ca7e41"},"children":[{"type":"text","value":"BigInt"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"()))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-wallet-address-change"},"children":[{"type":"text","value":"Subscribing to wallet address change"}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'accountsChanged'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"callback"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"watching-network-change"},"children":[{"type":"text","value":"Watching network change"}]},{"type":"element","tag":"code","props":{"code":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'chainChanged'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"handler"}]},{"type":"element","tag":"span","props":{"class":"ct-e10a08"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"adding-custom-token-to-wallet"},"children":[{"type":"text","value":"Adding custom token to wallet"}]},{"type":"element","tag":"code","props":{"code":"window.ethereum\n .request({\n method: 'wallet_watchAsset',\n params: {\n type: 'ERC20',\n options: {\n address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n symbol: 'FOO',\n decimals: 18,\n image: 'https://foo.io/token-image.svg',\n },\n },\n })\n .then((success) => {\n if (success) {\n console.log('FOO successfully added to wallet!')\n } else {\n throw new Error('Something went wrong.')\n }\n })\n .catch(console.error)\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"ethereum"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" method: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'wallet_watchAsset'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" params: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" type: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'ERC20'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" options: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" address: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'0xb60e8dd61c5d32be8058bb8eb970870f07233155'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" symbol: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'FOO'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" decimals: "}]},{"type":"element","tag":"span","props":{"class":"ct-9ace98"},"children":[{"type":"text","value":"18"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" image: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'https://foo.io/token-image.svg'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-214987"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-20a880"},"children":[{"type":"text","value":"success"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-6b924a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"success"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'FOO successfully added to wallet!'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca7e41"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'Something went wrong.'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":")"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"changing-network-to-custom"},"children":[{"type":"text","value":"Changing network to custom"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Checking current chainId:"}]},{"type":"element","tag":"code","props":{"code":"const getChainID = async () => {\n return ethereum.request({ method: 'eth_chainId' })\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"getChainID"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'eth_chainId'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Asking wallet to change current network:"}]},{"type":"element","tag":"code","props":{"code":"try {\n await window.ethereum.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n });\n} catch (switchError) {\n // This error code indicates that the chain has not been added to MetaMask.\n if (error.code === 4902) {\n try {\n await window.ethereum.request({\n method: 'wallet_addEthereumChain',\n params: [{ \n chainId: '0x03', // ropsten chainID (3) in hex\n chainName: 'Ropsten Test Network', \n nativeCurrency: { \n name: 'ETH',\n symbol: 'ETH',\n decimals: 18\n }, \n rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n blockExplorerUrls: ['https://ropsten.etherscan.io'] \n }] ,\n });\n } catch (addError) {\n // handle \"add\" error\n }\n }\n // handle other \"switch\" errors\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" method: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'wallet_switchEthereumChain'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" params: [{ chainId: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'0x03'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" }], "}]},{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// ropsten chainID (3) in hex"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"switchError"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// This error code indicates that the chain has not been added to MetaMask."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"code"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9ace98"},"children":[{"type":"text","value":"4902"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" method: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'wallet_addEthereumChain'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" params: [{ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" chainId: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'0x03'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// ropsten chainID (3) in hex"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" chainName: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'Ropsten Test Network'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" nativeCurrency: { "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" name: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'ETH'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" symbol: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'ETH'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" decimals: "}]},{"type":"element","tag":"span","props":{"class":"ct-9ace98"},"children":[{"type":"text","value":"18"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" }, "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" rpcUrls: ["}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"], "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" blockExplorerUrls: ["}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'https://ropsten.etherscan.io'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"] "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" }] ,"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"addError"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// handle \"add\" error"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// handle other \"switch\" errors"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-9ace98{color:#79C0FF}.ct-e10a08{color:#C9D1D9}.ct-ca7e41{color:#79C0FF}.ct-4cf26c{color:#A5D6FF}.ct-258e6e{color:#79C0FF}.ct-20a880{color:#FFA657}.ct-43ccc9{color:#FF7B72}.ct-214987{color:#D2A8FF}.ct-e39819{color:#C9D1D9}.ct-6b924a{color:#FF7B72}.ct-0d36f8{color:#D2A8FF}.ct-4450c1{color:#79C0FF}.ct-38e07a{color:#FF7B72}.ct-caa1f8{color:#8B949E}.ct-b27b08{color:#A5D6FF}.ct-6452fd{color:#C9D1D9}.ct-cd469a{color:#C9D1D9}.ct-7b29aa{color:#FF7B72}.light .ct-7b29aa{color:#859900}.light .ct-cd469a{color:#657B83}.light .ct-6452fd{color:#268BD2}.light .ct-b27b08{color:#2AA198}.light .ct-caa1f8{color:#93A1A1}.light .ct-38e07a{color:#073642}.light .ct-4450c1{color:#268BD2}.light .ct-0d36f8{color:#268BD2}.light .ct-6b924a{color:#073642}.light .ct-e39819{color:#657B83}.light .ct-214987{color:#268BD2}.light .ct-43ccc9{color:#859900}.light .ct-20a880{color:#657B83}.light .ct-258e6e{color:#859900}.light .ct-4cf26c{color:#657B83}.light .ct-ca7e41{color:#859900}.light .ct-e10a08{color:#859900}.light .ct-9ace98{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"connecting-to-node","depth":2,"text":"Connecting to node"},{"id":"getting-wallet-balance","depth":2,"text":"Getting wallet balance"},{"id":"getting-wallet-address","depth":2,"text":"Getting wallet address"},{"id":"sending-transaction","depth":2,"text":"Sending transaction"},{"id":"estimating-transaction-fee","depth":2,"text":"Estimating transaction FEE"},{"id":"subscribing-to-wallet-address-change","depth":2,"text":"Subscribing to wallet address change"},{"id":"watching-network-change","depth":2,"text":"Watching network change"},{"id":"adding-custom-token-to-wallet","depth":2,"text":"Adding custom token to wallet"},{"id":"changing-network-to-custom","depth":2,"text":"Changing network to custom"}]}},"_type":"markdown","_id":"content:Blockchain:Common typescript examples.md","_source":"content","_file":"Blockchain/Common typescript examples.md","_extension":"md"},{"_path":"/blockchain/smart-contracts","_dir":"blockchain","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Smart Contracts","description":"For common functions see Common typescript examples.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For common functions see "},{"type":"element","tag":"a","props":{"href":"Common%20typescript%20examples"},"children":[{"type":"text","value":"Common typescript examples"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"getting-smart-contract-instance"},"children":[{"type":"text","value":"Getting smart contract instance"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for calling smart contract methods:"}]},{"type":"element","tag":"code","props":{"code":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n const abiFromJson = JSON.parse(JSON.stringify(abi));\n return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n const abiFromJson = JSON.parse(JSON.stringify(abi));\n return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"executing-contract-method"},"children":[{"type":"text","value":"Executing contract method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Contract has "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"read"}]},{"type":"text","value":" and "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"write"}]},{"type":"text","value":" methods. To get a list of methods, you can paste contract address on "},{"type":"element","tag":"a","props":{"href":"https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract","rel":["nofollow"]},"children":[{"type":"text","value":"https://etherscan.io/ ETH"}]},{"type":"text","value":" or any other service."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Read"}]},{"type":"text","value":" methods doesn't require spending "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":". "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Write"}]},{"type":"text","value":" methods cost some amount of "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":", hence they will be executed with confirmation from user."}]},{"type":"element","tag":"h3","props":{"id":"example-for-metamask-without-private-key"},"children":[{"type":"text","value":"Example for #Metamask without private key"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n // getting contract\n const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n \n // Calling write method\n try {\n // authorizing with Metamask\n await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n // getting wallet address\n const addressUser = web3.currentProvider.selectedAddress;\n // calling \"store\" store method for contract\n // payload should include `from` address, that matches\n // current user's wallet\n await contract.methods.store(0, 'Parameter').send({\n from: addressUser,\n });\n } catch (e) {\n throw new Error(e);\n }\n \n // calling read method\n try {\n // this method can return data\n const result = await contract.methods.retrieve().call();\n } catch (e) {\n throw new Error(e);\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n // getting contract\n const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n \n // Calling write method\n try {\n // authorizing with Metamask\n await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n // getting wallet address\n const addressUser = web3.currentProvider.selectedAddress;\n // calling \"store\" store method for contract\n // payload should include `from` address, that matches\n // current user's wallet\n await contract.methods.store(0, 'Parameter').send({\n from: addressUser,\n });\n } catch (e) {\n throw new Error(e);\n }\n \n // calling read method\n try {\n // this method can return data\n const result = await contract.methods.retrieve().call();\n } catch (e) {\n throw new Error(e);\n }\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"nodejs-and-react-native-example"},"children":[{"type":"text","value":"Node.js and React Native example"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n const transaction = contract.methods.store(val);\n const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n const options = {\n to: CONTRACT_ADDRESS,\n data: transaction.encodeABI(),\n gas: await transaction.estimateGas({ from: account.address }),\n gasPrice: await web3.eth.getGasPrice(),\n };\n const signed = await web3.eth.accounts.signTransaction(\n options,\n privateKey,\n );\n await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n const transaction = contract.methods.store(val);\n const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n const options = {\n to: CONTRACT_ADDRESS,\n data: transaction.encodeABI(),\n gas: await transaction.estimateGas({ from: account.address }),\n gasPrice: await web3.eth.getGasPrice(),\n };\n const signed = await web3.eth.accounts.signTransaction(\n options,\n privateKey,\n );\n await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"calling-a-batch-of-contracts-methods"},"children":[{"type":"text","value":"Calling a batch of contract's methods"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Function calls batch of requests, returning array of results. For example:"}]},{"type":"element","tag":"code","props":{"code":" const requests = [\n contract.method.balanceOf().call,\n contract.method.getStaked().call\n ]\n\n const result = await makeBatchRequest(request);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":" const requests = [\n contract.method.balanceOf().call,\n contract.method.getStaked().call\n ]\n\n const result = await makeBatchRequest(request);\n"}]}]}]},{"type":"element","tag":"code","props":{"code":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n try {\n const web3 = getWeb3NoAccount();\n const batch = new web3.BatchRequest();\n\n const promises = calls.map((call) => {\n return new Promise((resolve, reject) => {\n batch.add(\n call.request({}, (err, result) => {\n if (err) {\n reject(err);\n } else {\n resolve(result);\n }\n })\n );\n });\n });\n\n batch.execute();\n\n return Promise.all(promises);\n } catch {\n return null;\n }\n};\n\nexport default makeBatchRequest;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n try {\n const web3 = getWeb3NoAccount();\n const batch = new web3.BatchRequest();\n\n const promises = calls.map((call) => {\n return new Promise((resolve, reject) => {\n batch.add(\n call.request({}, (err, result) => {\n if (err) {\n reject(err);\n } else {\n resolve(result);\n }\n })\n );\n });\n });\n\n batch.execute();\n\n return Promise.all(promises);\n } catch {\n return null;\n }\n};\n\nexport default makeBatchRequest;\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-smart-contract-events"},"children":[{"type":"text","value":"Subscribing to smart contract events"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"There're different ways to subscribe for contract events. For all of them you will need following variables:"}]},{"type":"element","tag":"code","props":{"code":" import Web3 from 'web3';\n const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n const ABI = 'YOUR ABI HERE';\n const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":" import Web3 from 'web3';\n const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n const ABI = 'YOUR ABI HERE';\n const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"by-accessing-contractevents"},"children":[{"type":"text","value":"By accessing contract.events"}]},{"type":"element","tag":"code","props":{"code":"referralProgramContract.events\n .RegisterUser()\n .on('connected', (subscriptionId: string) => {\n console.log(`| UserRegistered | events | ${subscriptionId}`);\n })\n .on(\n 'data',\n async (event: {\n removed: boolean;\n returnValues: RegisterUserResponseInterface;\n }) => {\n try {\n if (event.removed) {\n return;\n }\n const { user, referrer } = event.returnValues;\n console.log(user, referrer);\n } catch (e) {\n console.log(`| ONCE | ${e}`);\n }\n },\n )\n .on('error', (error: ErrnoException) => {\n console.log(error);\n });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"referralProgramContract.events\n .RegisterUser()\n .on('connected', (subscriptionId: string) => {\n console.log(`| UserRegistered | events | ${subscriptionId}`);\n })\n .on(\n 'data',\n async (event: {\n removed: boolean;\n returnValues: RegisterUserResponseInterface;\n }) => {\n try {\n if (event.removed) {\n return;\n }\n const { user, referrer } = event.returnValues;\n console.log(user, referrer);\n } catch (e) {\n console.log(`| ONCE | ${e}`);\n }\n },\n )\n .on('error', (error: ErrnoException) => {\n console.log(error);\n });\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"with-filtering"},"children":[{"type":"text","value":"With filtering"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We're listening to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" event here:"}]},{"type":"element","tag":"code","props":{"code":" let options = {\n filter: {\n value: [],\n },\n fromBlock: 0\n };\n\n myContract.events.Transfer(options)\n .on('data', event => console.log(event))\n .on('changed', changed => console.log(changed))\n .on('error', err => throw err)\n .on('connected', str => console.log(str))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":" let options = {\n filter: {\n value: [],\n },\n fromBlock: 0\n };\n\n myContract.events.Transfer(options)\n .on('data', event => console.log(event))\n .on('changed', changed => console.log(changed))\n .on('error', err => throw err)\n .on('connected', str => console.log(str))\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"common-subscribe-method"},"children":[{"type":"text","value":"Common Subscribe method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Filtering options can also be specified:"}]},{"type":"element","tag":"code","props":{"code":" let options = {\n fromBlock: 0,\n address: ['address-1', 'address-2'], //Only get events from specific addresses\n topics: [] //What topics to subscribe to\n };\n\n let subscription = ('logs', options, (err,event) => {\n if (!err)\n console.log(event)\n });\n\n subscription.on('data', event => console.log(event))\n subscription.on('changed', changed => console.log(changed))\n subscription.on('error', err => { throw err })\n subscription.on('connected', nr => console.log(nr))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":" let options = {\n fromBlock: 0,\n address: ['address-1', 'address-2'], //Only get events from specific addresses\n topics: [] //What topics to subscribe to\n };\n\n let subscription = ('logs', options, (err,event) => {\n if (!err)\n console.log(event)\n });\n\n subscription.on('data', event => console.log(event))\n subscription.on('changed', changed => console.log(changed))\n subscription.on('error', err => { throw err })\n subscription.on('connected', nr => console.log(nr))\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"getting-event-history"},"children":[{"type":"text","value":"Getting event history"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Getting history for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" events for specific values. More info can be found "},{"type":"element","tag":"a","props":{"href":"https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"code","props":{"code":" //example options(optional)\n let options = {\n filter: {\n // only get events where transfer value was 1000 or 1337\n value: ['1000', '1337'] \n },\n // number | \"earliest\" | \"pending\" | \"latest\"\n fromBlock: 0, \n toBlock: 'latest'\n };\n\n myContract.getPastEvents('Transfer', options)\n .then(results => console.log(results))\n .catch(err => throw err);\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":" //example options(optional)\n let options = {\n filter: {\n // only get events where transfer value was 1000 or 1337\n value: ['1000', '1337'] \n },\n // number | \"earliest\" | \"pending\" | \"latest\"\n fromBlock: 0, \n toBlock: 'latest'\n };\n\n myContract.getPastEvents('Transfer', options)\n .then(results => console.log(results))\n .catch(err => throw err);\n\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For common functions see "},{"type":"element","tag":"a","props":{"href":"Common%20typescript%20examples"},"children":[{"type":"text","value":"Common typescript examples"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"getting-smart-contract-instance"},"children":[{"type":"text","value":"Getting smart contract instance"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for calling smart contract methods:"}]},{"type":"element","tag":"code","props":{"code":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n const abiFromJson = JSON.parse(JSON.stringify(abi));\n return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'web3-eth-contract'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cf891f"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"abi"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7da052"},"children":[{"type":"text","value":"object"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7da052"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-95f676"},"children":[{"type":"text","value":"abiFromJson"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cc0932"},"children":[{"type":"text","value":"JSON"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-95f676"},"children":[{"type":"text","value":"parse"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"abiFromJson"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-cebc24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-cebc24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"executing-contract-method"},"children":[{"type":"text","value":"Executing contract method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Contract has "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"read"}]},{"type":"text","value":" and "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"write"}]},{"type":"text","value":" methods. To get a list of methods, you can paste contract address on "},{"type":"element","tag":"a","props":{"href":"https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract","rel":["nofollow"]},"children":[{"type":"text","value":"https://etherscan.io/ ETH"}]},{"type":"text","value":" or any other service."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Read"}]},{"type":"text","value":" methods doesn't require spending "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":". "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Write"}]},{"type":"text","value":" methods cost some amount of "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":", hence they will be executed with confirmation from user."}]},{"type":"element","tag":"h3","props":{"id":"example-for-metamask-without-private-key"},"children":[{"type":"text","value":"Example for #Metamask without private key"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n // getting contract\n const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n \n // Calling write method\n try {\n // authorizing with Metamask\n await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n // getting wallet address\n const addressUser = web3.currentProvider.selectedAddress;\n // calling \"store\" store method for contract\n // payload should include `from` address, that matches\n // current user's wallet\n await contract.methods.store(0, 'Parameter').send({\n from: addressUser,\n });\n } catch (e) {\n throw new Error(e);\n }\n \n // calling read method\n try {\n // this method can return data\n const result = await contract.methods.retrieve().call();\n } catch (e) {\n throw new Error(e);\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// see example below"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// ABI of contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"/* ... */"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// address for contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'0xdea164f67df4dbfe675d5271c9d404e0260f33bb'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"executeContractMethod"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ({}) "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// getting contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// Calling write method"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// authorizing with Metamask"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'eth_requestAccounts'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// getting wallet address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"addressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"selectedAddress"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// calling \"store\" store method for contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// payload should include `from` address, that matches"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// current user's wallet"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"store"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-adbb26"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'Parameter'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"send"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" from: "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"addressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a68b75"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// calling read method"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// this method can return data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"retrieve"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a68b75"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"nodejs-and-react-native-example"},"children":[{"type":"text","value":"Node.js and React Native example"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n const transaction = contract.methods.store(val);\n const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n const options = {\n to: CONTRACT_ADDRESS,\n data: transaction.encodeABI(),\n gas: await transaction.estimateGas({ from: account.address }),\n gasPrice: await web3.eth.getGasPrice(),\n };\n const signed = await web3.eth.accounts.signTransaction(\n options,\n privateKey,\n );\n await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// see example below"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// ABI контракта"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"/* ... */"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// contract address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'0xdea164f67df4dbfe675d5271c9d404e0260f33bb'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// getting contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// account's private key"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// write-methods requires private key"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cf891f"},"children":[{"type":"text","value":"executeContractMethod"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"val"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7da052"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"store"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"val"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"account"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"accounts"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"privateKeyToAccount"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" to: "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" data: "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"encodeABI"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" gas: "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"estimateGas"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"({ from: "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"account"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" gasPrice: "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"signed"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"accounts"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"signTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"sendSignedTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"signed"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"rawTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"};"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"calling-a-batch-of-contracts-methods"},"children":[{"type":"text","value":"Calling a batch of contract's methods"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Function calls batch of requests, returning array of results. For example:"}]},{"type":"element","tag":"code","props":{"code":" const requests = [\n contract.method.balanceOf().call,\n contract.method.getStaked().call\n ]\n\n const result = await makeBatchRequest(request);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"requests"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"method"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"balanceOf"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"method"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"getStaked"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"call"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"code","props":{"code":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n try {\n const web3 = getWeb3NoAccount();\n const batch = new web3.BatchRequest();\n\n const promises = calls.map((call) => {\n return new Promise((resolve, reject) => {\n batch.add(\n call.request({}, (err, result) => {\n if (err) {\n reject(err);\n } else {\n resolve(result);\n }\n })\n );\n });\n });\n\n batch.execute();\n\n return Promise.all(promises);\n } catch {\n return null;\n }\n};\n\nexport default makeBatchRequest;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"givenProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cf891f"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"calls"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7da052"},"children":[{"type":"text","value":"any"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":"[]) "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"getWeb3NoAccount"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"BatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"promises"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"calls"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"map"}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7da052"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"add"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"execute"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a68b75"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"all"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"promises"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7fefb"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-cebc24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-cebc24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-smart-contract-events"},"children":[{"type":"text","value":"Subscribing to smart contract events"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"There're different ways to subscribe for contract events. For all of them you will need following variables:"}]},{"type":"element","tag":"code","props":{"code":" import Web3 from 'web3';\n const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n const ABI = 'YOUR ABI HERE';\n const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'web3'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'YOUR_RPC_ENDPOINT_HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'YOUR ABI HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'YOUR CONTRACT ADDRESS HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"by-accessing-contractevents"},"children":[{"type":"text","value":"By accessing contract.events"}]},{"type":"element","tag":"code","props":{"code":"referralProgramContract.events\n .RegisterUser()\n .on('connected', (subscriptionId: string) => {\n console.log(`| UserRegistered | events | ${subscriptionId}`);\n })\n .on(\n 'data',\n async (event: {\n removed: boolean;\n returnValues: RegisterUserResponseInterface;\n }) => {\n try {\n if (event.removed) {\n return;\n }\n const { user, referrer } = event.returnValues;\n console.log(user, referrer);\n } catch (e) {\n console.log(`| ONCE | ${e}`);\n }\n },\n )\n .on('error', (error: ErrnoException) => {\n console.log(error);\n });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"referralProgramContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"events"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"RegisterUser"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-cf891f"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-ab4b45"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":", ("}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"subscriptionId"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7da052"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"`| UserRegistered | events | ${"}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"subscriptionId"}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"removed"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7da052"},"children":[{"type":"text","value":"boolean"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"returnValues"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94ff29"},"children":[{"type":"text","value":"RegisterUserResponseInterface"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"removed"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"user"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"referrer"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"returnValues"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"user"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"referrer"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"`| ONCE | ${"}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" )"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-cf891f"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-ab4b45"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":", ("}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94ff29"},"children":[{"type":"text","value":"ErrnoException"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" });"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"with-filtering"},"children":[{"type":"text","value":"With filtering"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We're listening to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" event here:"}]},{"type":"element","tag":"code","props":{"code":" let options = {\n filter: {\n value: [],\n },\n fromBlock: 0\n };\n\n myContract.events.Transfer(options)\n .on('data', event => console.log(event))\n .on('changed', changed => console.log(changed))\n .on('error', err => throw err)\n .on('connected', str => console.log(str))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" filter: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" value: [],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-adbb26"},"children":[{"type":"text","value":"0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"events"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"Transfer"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'changed'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"changed"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"str"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"))"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"common-subscribe-method"},"children":[{"type":"text","value":"Common Subscribe method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Filtering options can also be specified:"}]},{"type":"element","tag":"code","props":{"code":" let options = {\n fromBlock: 0,\n address: ['address-1', 'address-2'], //Only get events from specific addresses\n topics: [] //What topics to subscribe to\n };\n\n let subscription = ('logs', options, (err,event) => {\n if (!err)\n console.log(event)\n });\n\n subscription.on('data', event => console.log(event))\n subscription.on('changed', changed => console.log(changed))\n subscription.on('error', err => { throw err })\n subscription.on('connected', nr => console.log(nr))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-adbb26"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" address: ["}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'address-1'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'address-2'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"], "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"//Only get events from specific addresses"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" topics: [] "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"//What topics to subscribe to"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'logs'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'changed'"}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"changed"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"nr"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"))"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"getting-event-history"},"children":[{"type":"text","value":"Getting event history"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Getting history for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" events for specific values. More info can be found "},{"type":"element","tag":"a","props":{"href":"https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"code","props":{"code":" //example options(optional)\n let options = {\n filter: {\n // only get events where transfer value was 1000 or 1337\n value: ['1000', '1337'] \n },\n // number | \"earliest\" | \"pending\" | \"latest\"\n fromBlock: 0, \n toBlock: 'latest'\n };\n\n myContract.getPastEvents('Transfer', options)\n .then(results => console.log(results))\n .catch(err => throw err);\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"//example options(optional)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" filter: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// only get events where transfer value was 1000 or 1337"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" value: ["}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'1000'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'1337'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"] "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// number | \"earliest\" | \"pending\" | \"latest\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-adbb26"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" toBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'latest'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"getPastEvents"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'Transfer'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"results"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-94ff29{color:#FFA657}.ct-ab4b45{color:#A5D6FF}.ct-a7fefb{color:#79C0FF}.ct-a68b75{color:#79C0FF}.ct-adbb26{color:#79C0FF}.ct-85544b{color:#79C0FF}.ct-5db75f{color:#FF7B72}.ct-3ba34d{color:#8B949E}.ct-cebc24{color:#FFA657}.ct-62706a{color:#D2A8FF}.ct-cc0932{color:#79C0FF}.ct-95f676{color:#79C0FF}.ct-7da052{color:#79C0FF}.ct-b0cc89{color:#FFA657}.ct-aa91ad{color:#FF7B72}.ct-cf891f{color:#D2A8FF}.ct-8c132e{color:#C9D1D9}.ct-c8130a{color:#FF7B72}.ct-1e061f{color:#A5D6FF}.ct-94cfb8{color:#C9D1D9}.ct-04815e{color:#C9D1D9}.ct-d9eda9{color:#FF7B72}.light .ct-d9eda9{color:#859900}.light .ct-04815e{color:#657B83}.light .ct-94cfb8{color:#268BD2}.light .ct-1e061f{color:#2AA198}.light .ct-c8130a{color:#073642}.light .ct-8c132e{color:#657B83}.light .ct-cf891f{color:#268BD2}.light .ct-aa91ad{color:#859900}.light .ct-b0cc89{color:#657B83}.light .ct-7da052{color:#859900}.light .ct-95f676{color:#268BD2}.light .ct-cc0932{color:#657B83}.light .ct-62706a{color:#268BD2}.light .ct-cebc24{color:#657B83}.light .ct-3ba34d{color:#93A1A1}.light .ct-5db75f{color:#073642}.light .ct-85544b{color:#268BD2}.light .ct-adbb26{color:#D33682}.light .ct-a68b75{color:#859900}.light .ct-a7fefb{color:#B58900}.light .ct-ab4b45{color:#2AA198}.light .ct-94ff29{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"getting-smart-contract-instance","depth":2,"text":"Getting smart contract instance"},{"id":"executing-contract-method","depth":2,"text":"Executing contract method","children":[{"id":"example-for-metamask-without-private-key","depth":3,"text":"Example for #Metamask without private key"},{"id":"nodejs-and-react-native-example","depth":3,"text":"Node.js and React Native example"},{"id":"calling-a-batch-of-contracts-methods","depth":3,"text":"Calling a batch of contract's methods"}]},{"id":"subscribing-to-smart-contract-events","depth":2,"text":"Subscribing to smart contract events","children":[{"id":"by-accessing-contractevents","depth":3,"text":"By accessing contract.events"},{"id":"with-filtering","depth":3,"text":"With filtering"},{"id":"common-subscribe-method","depth":3,"text":"Common Subscribe method"},{"id":"getting-event-history","depth":3,"text":"Getting event history"}]}]}},"_type":"markdown","_id":"content:Blockchain:Smart contracts.md","_source":"content","_file":"Blockchain/Smart contracts.md","_extension":"md"},{"_path":"/css/automatic-grid-like-masonry-with-pure-css","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Automatic Grid Like Masonry With Pure CSS","description":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns."}]},{"type":"element","tag":"code","props":{"code":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n grid-auto-rows: 256px;\n grid-auto-flow: row dense;\n grid-column-gap: $gap;\n grid-row-gap: $gap;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n grid-auto-rows: 256px;\n grid-auto-flow: row dense;\n grid-column-gap: $gap;\n grid-row-gap: $gap;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"basic-elements-with-double-height-or-width"},"children":[{"type":"text","value":"Basic elements with double height or width"}]},{"type":"element","tag":"code","props":{"code":".h-2 { // takes 2 columns\n grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n grid-row-end: span 2;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".h-2 { // takes 2 columns\n grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n grid-row-end: span 2;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"header-that-fills-all-columns"},"children":[{"type":"text","value":"Header, that fills all columns"}]},{"type":"element","tag":"code","props":{"code":".full-width {\n grid-row: 1 / 2; // height: 1 row\n grid-column: 1 / -1;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".full-width {\n grid-row: 1 / 2; // height: 1 row\n grid-column: 1 / -1;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner"},"children":[{"type":"text","value":"Stamp element, that takes 3 rows in the top right corner"}]},{"type":"element","tag":"code","props":{"code":".top-right {\n grid-row: 1 / 3; // height here\n grid-column: -2 / -1; // width here\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".top-right {\n grid-row: 1 / 3; // height here\n grid-column: -2 / -1; // width here\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns."}]},{"type":"element","tag":"code","props":{"code":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n grid-auto-rows: 256px;\n grid-auto-flow: row dense;\n grid-column-gap: $gap;\n grid-row-gap: $gap;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eb1f40"},"children":[{"type":"text","value":"$cell: "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"250"}]},{"type":"element","tag":"span","props":{"class":"ct-fe2762"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eb1f40"},"children":[{"type":"text","value":"$gap: "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"20"}]},{"type":"element","tag":"span","props":{"class":"ct-fe2762"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-14ca3a"},"children":[{"type":"text","value":".grid"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bb41bd"},"children":[{"type":"text","value":"display"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ffa706"},"children":[{"type":"text","value":"grid"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bb41bd"},"children":[{"type":"text","value":"grid-template-columns"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-6497b4"},"children":[{"type":"text","value":"repeat"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-5ceb9b"},"children":[{"type":"text","value":"auto-fit"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-6497b4"},"children":[{"type":"text","value":"minmax"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-5ceb9b"},"children":[{"type":"text","value":"$cell"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-5efdf0"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-7d7f24"},"children":[{"type":"text","value":"fr"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":"));"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"grid-auto-rows"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"256"}]},{"type":"element","tag":"span","props":{"class":"ct-fe2762"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bb41bd"},"children":[{"type":"text","value":"grid-auto-flow"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ffa706"},"children":[{"type":"text","value":"row"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ffa706"},"children":[{"type":"text","value":"dense"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bb41bd"},"children":[{"type":"text","value":"grid-column-gap"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-5ceb9b"},"children":[{"type":"text","value":"$gap"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bb41bd"},"children":[{"type":"text","value":"grid-row-gap"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-5ceb9b"},"children":[{"type":"text","value":"$gap"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"basic-elements-with-double-height-or-width"},"children":[{"type":"text","value":"Basic elements with double height or width"}]},{"type":"element","tag":"code","props":{"code":".h-2 { // takes 2 columns\n grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n grid-row-end: span 2;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-14ca3a"},"children":[{"type":"text","value":".h-2"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-be4ab6"},"children":[{"type":"text","value":"// takes 2 columns"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"grid-column-end"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"span"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-14ca3a"},"children":[{"type":"text","value":".v-2"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-be4ab6"},"children":[{"type":"text","value":"// takes 2 rows"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"grid-row-end"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"span"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"header-that-fills-all-columns"},"children":[{"type":"text","value":"Header, that fills all columns"}]},{"type":"element","tag":"code","props":{"code":".full-width {\n grid-row: 1 / 2; // height: 1 row\n grid-column: 1 / -1;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-14ca3a"},"children":[{"type":"text","value":".full-width"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"grid-row"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fe2762"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-be4ab6"},"children":[{"type":"text","value":"// height: 1 row"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"grid-column"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" / "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"-1"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner"},"children":[{"type":"text","value":"Stamp element, that takes 3 rows in the top right corner"}]},{"type":"element","tag":"code","props":{"code":".top-right {\n grid-row: 1 / 3; // height here\n grid-column: -2 / -1; // width here\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-14ca3a"},"children":[{"type":"text","value":".top-right"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"grid-row"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fe2762"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"3"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-be4ab6"},"children":[{"type":"text","value":"// height here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"grid-column"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"-2"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" / "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"-1"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-be4ab6"},"children":[{"type":"text","value":"// width here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-be4ab6{color:#8B949E}.ct-e2d197{color:#79C0FF}.ct-7d7f24{color:#FF7B72}.ct-5efdf0{color:#79C0FF}.ct-5ceb9b{color:#FFA657}.ct-6497b4{color:#79C0FF}.ct-ffa706{color:#79C0FF}.ct-bb41bd{color:#79C0FF}.ct-6d1ecb{color:#C9D1D9}.ct-14ca3a{color:#79C0FF}.ct-fca03a{color:#C9D1D9}.ct-fe2762{color:#FF7B72}.ct-45c47a{color:#79C0FF}.ct-eb1f40{color:#FFA657}.light .ct-eb1f40{color:#657B83}.light .ct-45c47a{color:#D33682}.light .ct-fe2762{color:#859900}.light .ct-fca03a{color:#657B83}.light .ct-14ca3a{color:#93A1A1}.light .ct-6d1ecb{color:#657B83}.light .ct-bb41bd{color:#859900}.light .ct-ffa706{color:#657B83}.light .ct-6497b4{color:#268BD2}.light .ct-5ceb9b{color:#657B83}.light .ct-5efdf0{color:#D33682}.light .ct-7d7f24{color:#859900}.light .ct-e2d197{color:#859900}.light .ct-be4ab6{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"basic-elements-with-double-height-or-width","depth":3,"text":"Basic elements with double height or width"},{"id":"header-that-fills-all-columns","depth":3,"text":"Header, that fills all columns"},{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner","depth":3,"text":"Stamp element, that takes 3 rows in the top right corner"}]}},"_type":"markdown","_id":"content:CSS:Automatic Grid like Masonry with pure CSS.md","_source":"content","_file":"CSS/Automatic Grid like Masonry with pure CSS.md","_extension":"md"},{"_path":"/css/sass-nth-child-iterate-mixin","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Sass Nth Child Iterate Mixin","description":"Say, we need to color n items by specific colors, which depend on its position. #SCSS supports iteration over lists for that purposes:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we need to color "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" items by specific colors, which depend on its position. #SCSS supports "},{"type":"element","tag":"a","props":{"href":"https://sass-lang.com/documentation/at-rules/control/each","rel":["nofollow"]},"children":[{"type":"text","value":"iteration over lists"}]},{"type":"text","value":" for that purposes:"}]},{"type":"element","tag":"code","props":{"code":"@mixin color-per-child($colors) {\n @each $color in $colors {\n &:nth-child(#{index(($colors), ($color))}) {\n color: $color;\n }\n }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@mixin color-per-child($colors) {\n @each $color in $colors {\n &:nth-child(#{index(($colors), ($color))}) {\n color: $color;\n }\n }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage is simple:"}]},{"type":"element","tag":"code","props":{"code":".item {\n @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".item {\n @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we need to color "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" items by specific colors, which depend on its position. #SCSS supports "},{"type":"element","tag":"a","props":{"href":"https://sass-lang.com/documentation/at-rules/control/each","rel":["nofollow"]},"children":[{"type":"text","value":"iteration over lists"}]},{"type":"text","value":" for that purposes:"}]},{"type":"element","tag":"code","props":{"code":"@mixin color-per-child($colors) {\n @each $color in $colors {\n &:nth-child(#{index(($colors), ($color))}) {\n color: $color;\n }\n }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-908659"},"children":[{"type":"text","value":"@mixin"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14e41c"},"children":[{"type":"text","value":"color-per-child"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-20fa53"},"children":[{"type":"text","value":"$colors"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908659"},"children":[{"type":"text","value":"@each"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-20fa53"},"children":[{"type":"text","value":"$color"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908659"},"children":[{"type":"text","value":"in"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-20fa53"},"children":[{"type":"text","value":"$colors"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-776cce"},"children":[{"type":"text","value":"&"}]},{"type":"element","tag":"span","props":{"class":"ct-59c2b0"},"children":[{"type":"text","value":":nth-child"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-20fa53"},"children":[{"type":"text","value":"#{"}]},{"type":"element","tag":"span","props":{"class":"ct-2fe314"},"children":[{"type":"text","value":"index"}]},{"type":"element","tag":"span","props":{"class":"ct-20fa53"},"children":[{"type":"text","value":"(($colors), ($color))}"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-845dc7"},"children":[{"type":"text","value":"color"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-20fa53"},"children":[{"type":"text","value":"$color"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage is simple:"}]},{"type":"element","tag":"code","props":{"code":".item {\n @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-803228"},"children":[{"type":"text","value":".item"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-360621"},"children":[{"type":"text","value":"@include"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f63cee"},"children":[{"type":"text","value":"color_per_child"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-26bba9"},"children":[{"type":"text","value":"#ded187"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-26bba9"},"children":[{"type":"text","value":"#dbde87"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-26bba9"},"children":[{"type":"text","value":"#bade87"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-26bba9"},"children":[{"type":"text","value":"#9cde87"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-26bba9"},"children":[{"type":"text","value":"#87deaa"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":"));"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-26bba9{color:#79C0FF}.ct-f63cee{color:#D2A8FF}.ct-360621{color:#FF7B72}.ct-803228{color:#79C0FF}.ct-431b9d{color:#C9D1D9}.ct-845dc7{color:#79C0FF}.ct-2fe314{color:#79C0FF}.ct-59c2b0{color:#79C0FF}.ct-776cce{color:#7EE787}.ct-20fa53{color:#FFA657}.ct-14e41c{color:#D2A8FF}.ct-eed04f{color:#C9D1D9}.ct-908659{color:#FF7B72}.light .ct-908659{color:#859900}.light .ct-eed04f{color:#657B83}.light .ct-14e41c{color:#268BD2}.light .ct-20fa53{color:#657B83}.light .ct-776cce{color:#268BD2}.light .ct-59c2b0{color:#93A1A1}.light .ct-2fe314{color:#268BD2}.light .ct-845dc7{color:#859900}.light .ct-431b9d{color:#657B83}.light .ct-803228{color:#93A1A1}.light .ct-360621{color:#859900}.light .ct-f63cee{color:#268BD2}.light .ct-26bba9{color:#CB4B16}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:CSS:Sass nth-child iterate mixin.md","_source":"content","_file":"CSS/Sass nth-child iterate mixin.md","_extension":"md"},{"_path":"/css/test-if-browser-supports-css-rules","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Test If Browser Supports CSS Rules","description":"To test if browser supports some #CSS rules, do following:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To test if browser supports some #CSS rules, do following:"}]},{"type":"element","tag":"code","props":{"code":"@supports (backdrop-filter: blur(5px)) {\n backdrop-filter: blur(5px);\n}\n","language":"css"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@supports (backdrop-filter: blur(5px)) {\n backdrop-filter: blur(5px);\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"@mixin"}]},{"type":"text","value":" will only apply rule if browser support backdrop filtering:"}]},{"type":"element","tag":"code","props":{"code":"@mixin can_backdrop {\n @supports (\n (-webkit-backdrop-filter: blur(5px)) or \n (backdrop-filter: blur(5px))\n ) {\n @content;\n }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@mixin can_backdrop {\n @supports (\n (-webkit-backdrop-filter: blur(5px)) or \n (backdrop-filter: blur(5px))\n ) {\n @content;\n }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To test if browser supports some #CSS rules, do following:"}]},{"type":"element","tag":"code","props":{"code":"@supports (backdrop-filter: blur(5px)) {\n backdrop-filter: blur(5px);\n}\n","language":"css"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-10cca1"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-eb47e8"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffdf0"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-96a3e4"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-10cca1"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-59177d"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":": blur(5px);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"@mixin"}]},{"type":"text","value":" will only apply rule if browser support backdrop filtering:"}]},{"type":"element","tag":"code","props":{"code":"@mixin can_backdrop {\n @supports (\n (-webkit-backdrop-filter: blur(5px)) or \n (backdrop-filter: blur(5px))\n ) {\n @content;\n }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-10cca1"},"children":[{"type":"text","value":"@mixin"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-93e3d0"},"children":[{"type":"text","value":"can_backdrop"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-10cca1"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ef0360"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-62510a"},"children":[{"type":"text","value":"-webkit-backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-ef0360"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b8b910"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-ef0360"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-daadee"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-0b9e02"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-ef0360"},"children":[{"type":"text","value":")) "}]},{"type":"element","tag":"span","props":{"class":"ct-8b6902"},"children":[{"type":"text","value":"or"}]},{"type":"element","tag":"span","props":{"class":"ct-ef0360"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-eb47e8"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffdf0"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-96a3e4"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-10cca1"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-10cca1"},"children":[{"type":"text","value":"@content"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-8b6902{color:#79C0FF}.ct-0b9e02{color:#FF7B72}.ct-daadee{color:#79C0FF}.ct-b8b910{color:#79C0FF}.ct-62510a{color:#79C0FF}.ct-ef0360{color:#C9D1D9}.ct-93e3d0{color:#D2A8FF}.ct-59177d{color:#7EE787}.ct-96a3e4{color:#79C0FF}.ct-4ffdf0{color:#79C0FF}.ct-eb47e8{color:#79C0FF}.ct-d28d13{color:#C9D1D9}.ct-10cca1{color:#FF7B72}.light .ct-10cca1{color:#859900}.light .ct-d28d13{color:#657B83}.light .ct-eb47e8{color:#859900}.light .ct-4ffdf0{color:#268BD2}.light .ct-96a3e4{color:#D33682}.light .ct-59177d{color:#268BD2}.light .ct-93e3d0{color:#268BD2}.light .ct-ef0360{color:#657B83}.light .ct-62510a{color:#859900}.light .ct-b8b910{color:#268BD2}.light .ct-daadee{color:#D33682}.light .ct-0b9e02{color:#859900}.light .ct-8b6902{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:CSS:Test if browser supports CSS rules.md","_source":"content","_file":"CSS/Test if browser supports CSS rules.md","_extension":"md"},{"_path":"/docker/building-static-pages-with-docker","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Building Static Pages With Docker","description":"Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:"}]},{"type":"element","tag":"code","props":{"code":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html\n","language":"Dockerfile"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:"}]},{"type":"element","tag":"code","props":{"code":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html\n","language":"Dockerfile"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html"}]}]}]}]}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Building static pages with Docker.md","_source":"content","_file":"Docker/Building static pages with Docker.md","_extension":"md"},{"_path":"/docker/drone-ci","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Drone Ci","description":"Can be used with Private docker registry to deploy things using #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" to deploy things using #docker."}]},{"type":"element","tag":"h2","props":{"id":"pushing-to-private-docker_registry"},"children":[{"type":"text","value":"Pushing to private docker_registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_login"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_password"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_registry"}]},{"type":"text","value":" organizations variables in your "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":". And "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker_repo"}]},{"type":"text","value":" variable for your repo as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker.yourdomain.com/your-image"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is example of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".droneci"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"private docker registry"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n os: linux\n arch: amd64\n\nsteps:\n - name: build-master\n image: plugins/docker\n when:\n branch:\n - master\n settings:\n dockerfile: Dockerfile\n tag:\n - ${DRONE_BRANCH}\n username:\n from_secret: global_docker_login\n password:\n from_secret: global_docker_password\n registry:\n from_secret: global_docker_registry\n repo:\n from_secret: docker_repo\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n os: linux\n arch: amd64\n\nsteps:\n - name: build-master\n image: plugins/docker\n when:\n branch:\n - master\n settings:\n dockerfile: Dockerfile\n tag:\n - ${DRONE_BRANCH}\n username:\n from_secret: global_docker_login\n password:\n from_secret: global_docker_password\n registry:\n from_secret: global_docker_registry\n repo:\n from_secret: docker_repo\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-for-drone-ci"},"children":[{"type":"text","value":"Docker-compose file for drone-ci"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":" service is ui itself and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone-agent"}]},{"type":"text","value":" is runner for builds, that can be started on different machine (or machines)."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"secret_id"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"rpc_secret"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone.url"}]},{"type":"text","value":" to something you like."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n drone:\n container_name: drone\n image: drone/drone:latest\n environment:\n - DRONE_GITHUB_CLIENT_ID=secret_id\n - DRONE_GITHUB_CLIENT_SECRET=client_secret\n - DRONE_RPC_SECRET=rpc_secret\n - DRONE_SERVER_HOST=drone.url\n - DRONE_USER_CREATE=\"username:user,admin:true\"\n - DRONE_SERVER_PROTO=https\n - DRONE_TLS_AUTOCERT=false\n - DRONE_GIT_ALWAYS_AUTH=false\n - DRONE_LOGS_DEBUG=true\n - DRONE_LOGS_TRACE=true\n restart: always\n volumes:\n - ./data:/data\n ports:\n - 8090:80\n drone-agent:\n container_name: drone__agent\n image: drone/agent:latest\n command: agent\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock\n environment:\n - DRONE_RPC_SERVER=https://drone.url\n - DRONE_RPC_SECRET=rpc_secret\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nservices:\n drone:\n container_name: drone\n image: drone/drone:latest\n environment:\n - DRONE_GITHUB_CLIENT_ID=secret_id\n - DRONE_GITHUB_CLIENT_SECRET=client_secret\n - DRONE_RPC_SECRET=rpc_secret\n - DRONE_SERVER_HOST=drone.url\n - DRONE_USER_CREATE=\"username:user,admin:true\"\n - DRONE_SERVER_PROTO=https\n - DRONE_TLS_AUTOCERT=false\n - DRONE_GIT_ALWAYS_AUTH=false\n - DRONE_LOGS_DEBUG=true\n - DRONE_LOGS_TRACE=true\n restart: always\n volumes:\n - ./data:/data\n ports:\n - 8090:80\n drone-agent:\n container_name: drone__agent\n image: drone/agent:latest\n command: agent\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock\n environment:\n - DRONE_RPC_SERVER=https://drone.url\n - DRONE_RPC_SECRET=rpc_secret\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"caching-builds"},"children":[{"type":"text","value":"Caching builds"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Haven't checked that yet, but there's a "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/the-ultimate-droneci-caching-guide","rel":["nofollow"]},"children":[{"type":"text","value":"manual"}]},{"type":"text","value":" from "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/","rel":["nofollow"]},"children":[{"type":"text","value":"Laszlo Fogas"}]},{"type":"text","value":" about that."}]},{"type":"element","tag":"h2","props":{"id":"get-user-info"},"children":[{"type":"text","value":"Get user info"}]},{"type":"element","tag":"code","props":{"code":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"mark-user-as-trusted"},"children":[{"type":"text","value":"Mark user as trusted"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"drone repo update $1 --trusted=true && drone repo info $1\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"drone repo update $1 --trusted=true && drone repo info $1\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" to deploy things using #docker."}]},{"type":"element","tag":"h2","props":{"id":"pushing-to-private-docker_registry"},"children":[{"type":"text","value":"Pushing to private docker_registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_login"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_password"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_registry"}]},{"type":"text","value":" organizations variables in your "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":". And "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker_repo"}]},{"type":"text","value":" variable for your repo as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker.yourdomain.com/your-image"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is example of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".droneci"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"private docker registry"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n os: linux\n arch: amd64\n\nsteps:\n - name: build-master\n image: plugins/docker\n when:\n branch:\n - master\n settings:\n dockerfile: Dockerfile\n tag:\n - ${DRONE_BRANCH}\n username:\n from_secret: global_docker_login\n password:\n from_secret: global_docker_password\n registry:\n from_secret: global_docker_registry\n repo:\n from_secret: docker_repo\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"kind"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"pipeline"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"platform"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"os"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"linux"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"arch"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"amd64"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"steps"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"build-master"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"plugins/docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"when"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"branch"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"master"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"settings"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"dockerfile"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"Dockerfile"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"tag"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"${DRONE_BRANCH}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"username"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"global_docker_login"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"password"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"global_docker_password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"registry"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"global_docker_registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"repo"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"docker_repo"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-for-drone-ci"},"children":[{"type":"text","value":"Docker-compose file for drone-ci"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":" service is ui itself and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone-agent"}]},{"type":"text","value":" is runner for builds, that can be started on different machine (or machines)."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"secret_id"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"rpc_secret"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone.url"}]},{"type":"text","value":" to something you like."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n drone:\n container_name: drone\n image: drone/drone:latest\n environment:\n - DRONE_GITHUB_CLIENT_ID=secret_id\n - DRONE_GITHUB_CLIENT_SECRET=client_secret\n - DRONE_RPC_SECRET=rpc_secret\n - DRONE_SERVER_HOST=drone.url\n - DRONE_USER_CREATE=\"username:user,admin:true\"\n - DRONE_SERVER_PROTO=https\n - DRONE_TLS_AUTOCERT=false\n - DRONE_GIT_ALWAYS_AUTH=false\n - DRONE_LOGS_DEBUG=true\n - DRONE_LOGS_TRACE=true\n restart: always\n volumes:\n - ./data:/data\n ports:\n - 8090:80\n drone-agent:\n container_name: drone__agent\n image: drone/agent:latest\n command: agent\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock\n environment:\n - DRONE_RPC_SERVER=https://drone.url\n - DRONE_RPC_SECRET=rpc_secret\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"drone"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"drone"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"drone/drone:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_GITHUB_CLIENT_ID=secret_id"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_GITHUB_CLIENT_SECRET=client_secret"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_RPC_SECRET=rpc_secret"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_SERVER_HOST=drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_USER_CREATE=\"username:user,admin:true\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_SERVER_PROTO=https"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_TLS_AUTOCERT=false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_GIT_ALWAYS_AUTH=false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_LOGS_DEBUG=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_LOGS_TRACE=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"./data:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"8090:80"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"drone-agent"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"drone__agent"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"drone/agent:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"agent"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"/var/run/docker.sock:/var/run/docker.sock"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_RPC_SERVER=https://drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_RPC_SECRET=rpc_secret"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"caching-builds"},"children":[{"type":"text","value":"Caching builds"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Haven't checked that yet, but there's a "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/the-ultimate-droneci-caching-guide","rel":["nofollow"]},"children":[{"type":"text","value":"manual"}]},{"type":"text","value":" from "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/","rel":["nofollow"]},"children":[{"type":"text","value":"Laszlo Fogas"}]},{"type":"text","value":" about that."}]},{"type":"element","tag":"h2","props":{"id":"get-user-info"},"children":[{"type":"text","value":"Get user info"}]},{"type":"element","tag":"code","props":{"code":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6679c7"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" DRONE_SERVER=https://drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6679c7"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" DRONE_TOKEN=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":"drone info"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"mark-user-as-trusted"},"children":[{"type":"text","value":"Mark user as trusted"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"drone repo update $1 --trusted=true && drone repo info $1\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":"drone repo update "}]},{"type":"element","tag":"span","props":{"class":"ct-05aea5"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-9be66d"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" --trusted=true "}]},{"type":"element","tag":"span","props":{"class":"ct-6c3775"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" drone repo info "}]},{"type":"element","tag":"span","props":{"class":"ct-05aea5"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-9be66d"},"children":[{"type":"text","value":"1"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-6c3775{color:#FF7B72}.ct-9be66d{color:#C9D1D9}.ct-05aea5{color:#C9D1D9}.ct-6679c7{color:#FF7B72}.ct-82031d{color:#A5D6FF}.ct-259684{color:#C9D1D9}.ct-236dc9{color:#7EE787}.light .ct-236dc9{color:#268BD2}.light .ct-259684{color:#657B83}.light .ct-82031d{color:#2AA198}.light .ct-6679c7{color:#073642}.light .ct-05aea5{color:#859900}.light .ct-9be66d{color:#268BD2}.light .ct-6c3775{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"pushing-to-private-docker_registry","depth":2,"text":"Pushing to private docker_registry"},{"id":"docker-compose-file-for-drone-ci","depth":2,"text":"Docker-compose file for drone-ci"},{"id":"caching-builds","depth":2,"text":"Caching builds"},{"id":"get-user-info","depth":2,"text":"Get user info"},{"id":"mark-user-as-trusted","depth":2,"text":"Mark user as trusted"}]}},"_type":"markdown","_id":"content:Docker:Drone-ci.md","_source":"content","_file":"Docker/Drone-ci.md","_extension":"md"},{"_path":"/docker/github-pages-with-drone-ci","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Github Pages With Drone Ci","description":"To deploy github pages with Drone-ci you will need .drone.yml as specified below. You also should define secrets github_username and github_token (get it here) in your drone's repository setup.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To deploy github pages with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" you will need "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".drone.yml"}]},{"type":"text","value":" as specified below. You also should define secrets "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_username"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_token"}]},{"type":"text","value":" (get it "},{"type":"element","tag":"a","props":{"href":"https://github.com/settings/tokens","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]},{"type":"text","value":") in your drone's repository setup."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Github repository should be named as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"yourname.github.io"}]},{"type":"text","value":" and it could be accessed at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/"}]},{"type":"text","value":". Otherwise it'll be available at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/repo-name/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/repo-name/"}]},{"type":"text","value":", what you might not like."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should create branch named "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" in that repo and setup GH Pages at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https://github.com//.github.io/settings/pages"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This config will update "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins."}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n os: linux\n arch: amd64\n\nsteps:\n - name: build\n image: node:16\n commands:\n - yarn\n - yarn generate\n - rm -rf ./docs\n - mv ./.output/public ./docs\n - touch ./docs/.nojekyll\n - name: publish\n image: plugins/gh-pages\n settings:\n target_branch: gh-pages\n username:\n from_secret: github_username\n password:\n from_secret: github_token\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n os: linux\n arch: amd64\n\nsteps:\n - name: build\n image: node:16\n commands:\n - yarn\n - yarn generate\n - rm -rf ./docs\n - mv ./.output/public ./docs\n - touch ./docs/.nojekyll\n - name: publish\n image: plugins/gh-pages\n settings:\n target_branch: gh-pages\n username:\n from_secret: github_username\n password:\n from_secret: github_token\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Here we're moving "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./.output/public"}]},{"type":"text","value":" to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./docs"}]},{"type":"text","value":", because #nuxt creates symlink for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docs"}]},{"type":"text","value":" and git can't work with that."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Also we create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".nojekyll"}]},{"type":"text","value":" at the root of repo, so github's internal engine won't "},{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"ignore files that start with underscore"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"additional-reading"},"children":[{"type":"text","value":"Additional reading"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://plugins.drone.io/plugins/gh-pages","rel":["nofollow"]},"children":[{"type":"text","value":"Drone Github Pages Documentation"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"Bypassing Jekyll on GitHub Pages"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To deploy github pages with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" you will need "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".drone.yml"}]},{"type":"text","value":" as specified below. You also should define secrets "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_username"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_token"}]},{"type":"text","value":" (get it "},{"type":"element","tag":"a","props":{"href":"https://github.com/settings/tokens","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]},{"type":"text","value":") in your drone's repository setup."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Github repository should be named as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"yourname.github.io"}]},{"type":"text","value":" and it could be accessed at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/"}]},{"type":"text","value":". Otherwise it'll be available at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/repo-name/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/repo-name/"}]},{"type":"text","value":", what you might not like."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should create branch named "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" in that repo and setup GH Pages at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https://github.com//.github.io/settings/pages"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This config will update "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins."}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n os: linux\n arch: amd64\n\nsteps:\n - name: build\n image: node:16\n commands:\n - yarn\n - yarn generate\n - rm -rf ./docs\n - mv ./.output/public ./docs\n - touch ./docs/.nojekyll\n - name: publish\n image: plugins/gh-pages\n settings:\n target_branch: gh-pages\n username:\n from_secret: github_username\n password:\n from_secret: github_token\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"kind"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"pipeline"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"platform"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"os"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"linux"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"arch"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"amd64"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"steps"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"node:16"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"commands"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"yarn"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"yarn generate"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"rm -rf ./docs"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"mv ./.output/public ./docs"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"touch ./docs/.nojekyll"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"publish"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"plugins/gh-pages"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"settings"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"target_branch"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"gh-pages"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"username"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"github_username"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"password"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"github_token"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Here we're moving "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./.output/public"}]},{"type":"text","value":" to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./docs"}]},{"type":"text","value":", because #nuxt creates symlink for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docs"}]},{"type":"text","value":" and git can't work with that."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Also we create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".nojekyll"}]},{"type":"text","value":" at the root of repo, so github's internal engine won't "},{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"ignore files that start with underscore"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"additional-reading"},"children":[{"type":"text","value":"Additional reading"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://plugins.drone.io/plugins/gh-pages","rel":["nofollow"]},"children":[{"type":"text","value":"Drone Github Pages Documentation"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"Bypassing Jekyll on GitHub Pages"}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-27659a{color:#A5D6FF}.ct-987c19{color:#C9D1D9}.ct-d3cd64{color:#7EE787}.light .ct-d3cd64{color:#268BD2}.light .ct-987c19{color:#657B83}.light .ct-27659a{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"additional-reading","depth":2,"text":"Additional reading"}]}},"_type":"markdown","_id":"content:Docker:Github pages with drone-ci.md","_source":"content","_file":"Docker/Github pages with drone-ci.md","_extension":"md"},{"_path":"/docker/private-docker-registry","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Private Docker Registry","description":"Suitable to work with Drone-ci for hosting private #docker images.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Suitable to work with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" for hosting private #docker images."}]},{"type":"element","tag":"h2","props":{"id":"sample-docker-compose-for-custom-docker-registry"},"children":[{"type":"text","value":"Sample docker-compose for custom docker registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This one brings up private docker registry with ui. First you'll need to generate password for it:"}]},{"type":"element","tag":"code","props":{"code":"docker run \\\n --entrypoint htpasswd registry:2 \\\n -Bbn user mypassword > auth/registry.password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"docker run \\\n --entrypoint htpasswd registry:2 \\\n -Bbn user mypassword > auth/registry.password\n"}]}]}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\nservices:\n registry:\n container_name: docker__registry\n image: registry:2\n ports:\n - 5000:5000\n restart: always\n environment:\n - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n - REGISTRY_AUTH=htpasswd\n - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n - REGISTRY_HTTP_SECRET=password\n - REGISTRY_STORAGE_DELETE_ENABLED=true\n volumes:\n - ./registry/auth:/auth\n - ./registry/data:/data\n ui:\n container_name: docker__ui\n image: parabuzzle/craneoperator:latest\n ports:\n - 80:80\n restart: always\n environment:\n - REGISTRY_HOST=registry\n - REGISTRY_PORT=5000\n - REGISTRY_PROTOCOL=http\n - ALLOW_REGISTRY_LOGIN=true\n - REGISTRY_ALLOW_DELETE=true\n - USERNAME=registry\n - PASSWORD=password\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\nservices:\n registry:\n container_name: docker__registry\n image: registry:2\n ports:\n - 5000:5000\n restart: always\n environment:\n - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n - REGISTRY_AUTH=htpasswd\n - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n - REGISTRY_HTTP_SECRET=password\n - REGISTRY_STORAGE_DELETE_ENABLED=true\n volumes:\n - ./registry/auth:/auth\n - ./registry/data:/data\n ui:\n container_name: docker__ui\n image: parabuzzle/craneoperator:latest\n ports:\n - 80:80\n restart: always\n environment:\n - REGISTRY_HOST=registry\n - REGISTRY_PORT=5000\n - REGISTRY_PROTOCOL=http\n - ALLOW_REGISTRY_LOGIN=true\n - REGISTRY_ALLOW_DELETE=true\n - USERNAME=registry\n - PASSWORD=password\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"squash-layers-on-registry"},"children":[{"type":"text","value":"Squash layers on registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to squash all layers in docker registry to free up disk space."}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Run this command to mark oldest layers"}]}]},{"type":"element","tag":"code","props":{"code":"# Try this first\ndocker run \\\n --rm anoxis/registry-cli \\\n -r https://registry.url \\\n -l user:password \\\n --delete \\\n --num 2\n\n# Then this \ndocker run -it \\\n -v /path/to/registry/data:/registry \\\n -e REGISTRY_URL=https://registry.url \\\n -e DRY_RUN=\"false\" \\\n -e REGISTRY_AUTH=\"user:password\" \\\n mortensrasmussen/docker-registry-manifest-cleanup\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Try this first\ndocker run \\\n --rm anoxis/registry-cli \\\n -r https://registry.url \\\n -l user:password \\\n --delete \\\n --num 2\n\n# Then this \ndocker run -it \\\n -v /path/to/registry/data:/registry \\\n -e REGISTRY_URL=https://registry.url \\\n -e DRY_RUN=\"false\" \\\n -e REGISTRY_AUTH=\"user:password\" \\\n mortensrasmussen/docker-registry-manifest-cleanup\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Suitable to work with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" for hosting private #docker images."}]},{"type":"element","tag":"h2","props":{"id":"sample-docker-compose-for-custom-docker-registry"},"children":[{"type":"text","value":"Sample docker-compose for custom docker registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This one brings up private docker registry with ui. First you'll need to generate password for it:"}]},{"type":"element","tag":"code","props":{"code":"docker run \\\n --entrypoint htpasswd registry:2 \\\n -Bbn user mypassword > auth/registry.password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":"docker run \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" --entrypoint htpasswd registry:2 \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" -Bbn user mypassword "}]},{"type":"element","tag":"span","props":{"class":"ct-4db34e"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" auth/registry.password"}]}]}]}]}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\nservices:\n registry:\n container_name: docker__registry\n image: registry:2\n ports:\n - 5000:5000\n restart: always\n environment:\n - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n - REGISTRY_AUTH=htpasswd\n - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n - REGISTRY_HTTP_SECRET=password\n - REGISTRY_STORAGE_DELETE_ENABLED=true\n volumes:\n - ./registry/auth:/auth\n - ./registry/data:/data\n ui:\n container_name: docker__ui\n image: parabuzzle/craneoperator:latest\n ports:\n - 80:80\n restart: always\n environment:\n - REGISTRY_HOST=registry\n - REGISTRY_PORT=5000\n - REGISTRY_PROTOCOL=http\n - ALLOW_REGISTRY_LOGIN=true\n - REGISTRY_ALLOW_DELETE=true\n - USERNAME=registry\n - PASSWORD=password\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"registry"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"docker__registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"registry:2"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"5000:5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_AUTH=htpasswd"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_AUTH_HTPASSWD_REALM=Registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_HTTP_SECRET=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_STORAGE_DELETE_ENABLED=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"./registry/auth:/auth"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"./registry/data:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"ui"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"docker__ui"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"parabuzzle/craneoperator:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"80:80"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_HOST=registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_PORT=5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_PROTOCOL=http"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"ALLOW_REGISTRY_LOGIN=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_ALLOW_DELETE=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"USERNAME=registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"PASSWORD=password"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"squash-layers-on-registry"},"children":[{"type":"text","value":"Squash layers on registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to squash all layers in docker registry to free up disk space."}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Run this command to mark oldest layers"}]}]},{"type":"element","tag":"code","props":{"code":"# Try this first\ndocker run \\\n --rm anoxis/registry-cli \\\n -r https://registry.url \\\n -l user:password \\\n --delete \\\n --num 2\n\n# Then this \ndocker run -it \\\n -v /path/to/registry/data:/registry \\\n -e REGISTRY_URL=https://registry.url \\\n -e DRY_RUN=\"false\" \\\n -e REGISTRY_AUTH=\"user:password\" \\\n mortensrasmussen/docker-registry-manifest-cleanup\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-94dce8"},"children":[{"type":"text","value":"# Try this first"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":"docker run \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" --rm anoxis/registry-cli \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" -r https://registry.url \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" -l user:password \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" --delete \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" --num 2"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-94dce8"},"children":[{"type":"text","value":"# Then this "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":"docker run -it \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" -v /path/to/registry/data:/registry \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" -e REGISTRY_URL=https://registry.url \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" -e DRY_RUN="}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" -e REGISTRY_AUTH="}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"\"user:password\""}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" mortensrasmussen/docker-registry-manifest-cleanup"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-94dce8{color:#8B949E}.ct-ab8ffd{color:#A5D6FF}.ct-540e92{color:#7EE787}.ct-4db34e{color:#FF7B72}.ct-6431bf{color:#C9D1D9}.light .ct-6431bf{color:#657B83}.light .ct-4db34e{color:#859900}.light .ct-540e92{color:#268BD2}.light .ct-ab8ffd{color:#2AA198}.light .ct-94dce8{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"sample-docker-compose-for-custom-docker-registry","depth":2,"text":"Sample docker-compose for custom docker registry"},{"id":"squash-layers-on-registry","depth":2,"text":"Squash layers on registry"}]}},"_type":"markdown","_id":"content:Docker:Private docker registry.md","_source":"content","_file":"Docker/Private docker registry.md","_extension":"md"},{"_path":"/docker/refresh-containers-on-pull","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Refresh Containers On Pull","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"setting-up-watchtower"},"children":[{"type":"text","value":"Setting up watchtower"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://containrrr.dev/watchtower/","rel":["nofollow"]},"children":[{"type":"text","value":"Watchtower"}]},{"type":"text","value":" will automatically pull updated #docker containers. Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" and "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n watchtower:\n container_name: docker__watchtower\n image: v2tec/watchtower\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock\n - /home/user/.docker/config.json:/config.json\n command: --interval 60 image_1 image_2\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nservices:\n watchtower:\n container_name: docker__watchtower\n image: v2tec/watchtower\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock\n - /home/user/.docker/config.json:/config.json\n command: --interval 60 image_1 image_2\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"setting-up-watchtower"},"children":[{"type":"text","value":"Setting up watchtower"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://containrrr.dev/watchtower/","rel":["nofollow"]},"children":[{"type":"text","value":"Watchtower"}]},{"type":"text","value":" will automatically pull updated #docker containers. Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" and "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n watchtower:\n container_name: docker__watchtower\n image: v2tec/watchtower\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock\n - /home/user/.docker/config.json:/config.json\n command: --interval 60 image_1 image_2\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-2bd4b1"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"watchtower"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-2bd4b1"},"children":[{"type":"text","value":"docker__watchtower"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-2bd4b1"},"children":[{"type":"text","value":"v2tec/watchtower"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-2bd4b1"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-2bd4b1"},"children":[{"type":"text","value":"/var/run/docker.sock:/var/run/docker.sock"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-2bd4b1"},"children":[{"type":"text","value":"/home/user/.docker/config.json:/config.json"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-2bd4b1"},"children":[{"type":"text","value":"--interval 60 image_1 image_2"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-2bd4b1{color:#A5D6FF}.ct-3b812b{color:#C9D1D9}.ct-b7ea0d{color:#7EE787}.light .ct-b7ea0d{color:#268BD2}.light .ct-3b812b{color:#657B83}.light .ct-2bd4b1{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"setting-up-watchtower","depth":2,"text":"Setting up watchtower"}]}},"_type":"markdown","_id":"content:Docker:Refresh containers on pull.md","_source":"content","_file":"Docker/Refresh containers on pull.md","_extension":"md"},{"_path":"/docker/seed-dump-inside-docker","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Seed Dump Inside Docker","description":"If you need to seed .sql dump in #docker container, just run this command. Also you can try to rsync file with SSH to get it from remote host.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to seed "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".sql"}]},{"type":"text","value":" dump in #docker container, just run this command. Also you can try to "},{"type":"element","tag":"a","props":{"href":"/linux/Rsync%20file%20with%20SSH"},"children":[{"type":"text","value":"rsync file with SSH"}]},{"type":"text","value":" to get it from remote host."}]},{"type":"element","tag":"code","props":{"code":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to seed "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".sql"}]},{"type":"text","value":" dump in #docker container, just run this command. Also you can try to "},{"type":"element","tag":"a","props":{"href":"/linux/Rsync%20file%20with%20SSH"},"children":[{"type":"text","value":"rsync file with SSH"}]},{"type":"text","value":" to get it from remote host."}]},{"type":"element","tag":"code","props":{"code":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f99778"},"children":[{"type":"text","value":"#####"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f99778"},"children":[{"type":"text","value":"# usage: ./script.sh \"/path/to/dump.sql\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f99778"},"children":[{"type":"text","value":"#####"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":"DUMP_PATH="}]},{"type":"element","tag":"span","props":{"class":"ct-b9da81"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-833fcb"},"children":[{"type":"text","value":"1"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":"CONTAINER="}]},{"type":"element","tag":"span","props":{"class":"ct-56be54"},"children":[{"type":"text","value":"\"db\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":"USER=root"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":"PASSWORD=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":"DB=database"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":"cat "}]},{"type":"element","tag":"span","props":{"class":"ct-56be54"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-b9da81"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-833fcb"},"children":[{"type":"text","value":"DUMP_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-56be54"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9072b0"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-6ff593"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":" -i "}]},{"type":"element","tag":"span","props":{"class":"ct-b9da81"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-833fcb"},"children":[{"type":"text","value":"CONTAINER"}]},{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":" mysql -u"}]},{"type":"element","tag":"span","props":{"class":"ct-b9da81"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-833fcb"},"children":[{"type":"text","value":"USER"}]},{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":" -p"}]},{"type":"element","tag":"span","props":{"class":"ct-b9da81"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-833fcb"},"children":[{"type":"text","value":"PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b9da81"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-833fcb"},"children":[{"type":"text","value":"DB"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-6ff593{color:#79C0FF}.ct-9072b0{color:#FF7B72}.ct-56be54{color:#A5D6FF}.ct-833fcb{color:#C9D1D9}.ct-b9da81{color:#C9D1D9}.ct-ced384{color:#C9D1D9}.ct-f99778{color:#8B949E}.light .ct-f99778{color:#93A1A1}.light .ct-ced384{color:#657B83}.light .ct-b9da81{color:#859900}.light .ct-833fcb{color:#268BD2}.light .ct-56be54{color:#2AA198}.light .ct-9072b0{color:#859900}.light .ct-6ff593{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Seed dump inside docker.md","_source":"content","_file":"Docker/Seed dump inside docker.md","_extension":"md"},{"_path":"/docker/wait-for-mysql","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Wait For Mysql","description":"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful query from database or exits with non-zero status after timeout."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Don't forget to change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$query"}]},{"type":"text","value":" for the actually working one."}]},{"type":"element","tag":"code","props":{"code":"# Waits for mysql to become actually available\nwait_for_mysql() {\n query=\"SELECT count(*) FROM users\"\n \n timeout=180 # 3 minutes limit\n i=0\n \n while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n sleep 1;\n\n i=$(($i+1))\n if [[ ${i} -ge ${timeout} ]]; then\n echo \"[Error] can't properly query MySQL after ${i} secs\"\n exit 1;\n fi\n done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Waits for mysql to become actually available\nwait_for_mysql() {\n query=\"SELECT count(*) FROM users\"\n \n timeout=180 # 3 minutes limit\n i=0\n \n while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n sleep 1;\n\n i=$(($i+1))\n if [[ ${i} -ge ${timeout} ]]; then\n echo \"[Error] can't properly query MySQL after ${i} secs\"\n exit 1;\n fi\n done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20redis"},"children":[{"type":"text","value":"Wait for redis"}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful query from database or exits with non-zero status after timeout."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Don't forget to change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$query"}]},{"type":"text","value":" for the actually working one."}]},{"type":"element","tag":"code","props":{"code":"# Waits for mysql to become actually available\nwait_for_mysql() {\n query=\"SELECT count(*) FROM users\"\n \n timeout=180 # 3 minutes limit\n i=0\n \n while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n sleep 1;\n\n i=$(($i+1))\n if [[ ${i} -ge ${timeout} ]]; then\n echo \"[Error] can't properly query MySQL after ${i} secs\"\n exit 1;\n fi\n done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dd550d"},"children":[{"type":"text","value":"# Waits for mysql to become actually available"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e9e727"},"children":[{"type":"text","value":"wait_for_mysql"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":"() {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" query="}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\"SELECT count(*) FROM users\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" timeout=180 "}]},{"type":"element","tag":"span","props":{"class":"ct-dd550d"},"children":[{"type":"text","value":"# 3 minutes limit"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" i=0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"while"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-440d95"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" -it "}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-62f297"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" mysql --user="}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-62f297"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" -e "}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-62f297"},"children":[{"type":"text","value":"query"}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"do"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" sleep 1"}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" i="}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"$(("}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-62f297"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-52c063"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" [[ "}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-62f297"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"-ge"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-62f297"},"children":[{"type":"text","value":"timeout"}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" ]]"}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":";"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-440d95"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\"[Error] can't properly query MySQL after "}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-62f297"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":" secs\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-440d95"},"children":[{"type":"text","value":"exit"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"fi"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"done"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dd550d"},"children":[{"type":"text","value":"# usage: wait_for_mysql miin-mysql-dev root password database"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20redis"},"children":[{"type":"text","value":"Wait for redis"}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-52c063{color:#79C0FF}.ct-62f297{color:#C9D1D9}.ct-cc8827{color:#C9D1D9}.ct-440d95{color:#79C0FF}.ct-741c1f{color:#FF7B72}.ct-c5795a{color:#A5D6FF}.ct-68b7cc{color:#C9D1D9}.ct-e9e727{color:#D2A8FF}.ct-dd550d{color:#8B949E}.light .ct-dd550d{color:#93A1A1}.light .ct-e9e727{color:#268BD2}.light .ct-68b7cc{color:#657B83}.light .ct-c5795a{color:#2AA198}.light .ct-741c1f{color:#859900}.light .ct-440d95{color:#268BD2}.light .ct-cc8827{color:#859900}.light .ct-62f297{color:#268BD2}.light .ct-52c063{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Wait for mysql.md","_source":"content","_file":"Docker/Wait for mysql.md","_extension":"md"},{"_path":"/docker/wait-for-redis","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Wait For Redis","description":"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful ping or exits with non-zero status after 3 minutes."}]},{"type":"element","tag":"code","props":{"code":"# Waits for redis to become actually available\nwait_for_redis() {\n timeout=180 # 3 minutes\n i=0\n while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n sleep 1;\n\n i=$(($i+1))\n if [[ ${i} -ge ${timeout} ]]; then\n echo \"[Error] can't properly ping Redis container after ${i} secs\"\n exit 1;\n fi\n done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Waits for redis to become actually available\nwait_for_redis() {\n timeout=180 # 3 minutes\n i=0\n while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n sleep 1;\n\n i=$(($i+1))\n if [[ ${i} -ge ${timeout} ]]; then\n echo \"[Error] can't properly ping Redis container after ${i} secs\"\n exit 1;\n fi\n done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20mysql"},"children":[{"type":"text","value":"Wait for mysql"}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful ping or exits with non-zero status after 3 minutes."}]},{"type":"element","tag":"code","props":{"code":"# Waits for redis to become actually available\nwait_for_redis() {\n timeout=180 # 3 minutes\n i=0\n while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n sleep 1;\n\n i=$(($i+1))\n if [[ ${i} -ge ${timeout} ]]; then\n echo \"[Error] can't properly ping Redis container after ${i} secs\"\n exit 1;\n fi\n done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7589c"},"children":[{"type":"text","value":"# Waits for redis to become actually available"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bba05c"},"children":[{"type":"text","value":"wait_for_redis"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":"() {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" timeout=180 "}]},{"type":"element","tag":"span","props":{"class":"ct-b7589c"},"children":[{"type":"text","value":"# 3 minutes"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" i=0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"while"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-be9606"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" -it "}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-c4e6a2"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" redis-cli -h localhost -p 6379 -a "}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-c4e6a2"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" ping "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" grep "}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"\"PONG\""}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":"/dev/null "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"2>&1;"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"do"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" sleep 1"}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" i="}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"$(("}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-c4e6a2"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-01c6f0"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" [[ "}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-c4e6a2"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"-ge"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-c4e6a2"},"children":[{"type":"text","value":"timeout"}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" ]]"}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":";"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-be9606"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"\"[Error] can't properly ping Redis container after "}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-c4e6a2"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":" secs\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-be9606"},"children":[{"type":"text","value":"exit"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"fi"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"done"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7589c"},"children":[{"type":"text","value":"# usage: wait_for_redis miin-redis-dev password"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20mysql"},"children":[{"type":"text","value":"Wait for mysql"}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-01c6f0{color:#79C0FF}.ct-c4e6a2{color:#C9D1D9}.ct-df5458{color:#C9D1D9}.ct-1b814a{color:#A5D6FF}.ct-be9606{color:#79C0FF}.ct-c5def4{color:#FF7B72}.ct-333854{color:#C9D1D9}.ct-bba05c{color:#D2A8FF}.ct-b7589c{color:#8B949E}.light .ct-b7589c{color:#93A1A1}.light .ct-bba05c{color:#268BD2}.light .ct-333854{color:#657B83}.light .ct-c5def4{color:#859900}.light .ct-be9606{color:#268BD2}.light .ct-1b814a{color:#2AA198}.light .ct-df5458{color:#859900}.light .ct-c4e6a2{color:#268BD2}.light .ct-01c6f0{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Wait for redis.md","_source":"content","_file":"Docker/Wait for redis.md","_extension":"md"},{"_path":"/frontend/react-native/oauth2-login","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"OAuth2 Login","description":"Use #oauth2 login with React-Native","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Use #oauth2 login with React-Native"}]},{"type":"element","tag":"h2","props":{"id":"common-oauth2-providers"},"children":[{"type":"text","value":"Common OAuth2 providers"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be handled by "},{"type":"element","tag":"a","props":{"href":"react-native-app-auth"},"children":[{"type":"text","value":"react-native-app-auth"}]},{"type":"text","value":" by redirecting to url "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"com.yourapp://oauth2provider"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"example-for-google"},"children":[{"type":"text","value":"Example for #Google"}]},{"type":"element","tag":"code","props":{"code":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n issuer: 'https://accounts.google.com',\n clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n redirectUrl: `com.yourapp:/oauth2redirect/google`,\n scopes: ['openid', 'profile'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n issuer: 'https://accounts.google.com',\n clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n redirectUrl: `com.yourapp:/oauth2redirect/google`,\n scopes: ['openid', 'profile'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"example-for-yandex"},"children":[{"type":"text","value":"Example for #Yandex"}]},{"type":"element","tag":"code","props":{"code":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n serviceConfiguration: {\n authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n // TODO: replace it with your own backend to secure client_secret:\n tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n },\n clientId: YANDEX_OAUTH_CLIENT,\n redirectUrl: `${APP_ID}:/oauth2redirect`,\n scopes: ['login:info', 'login:avatar'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n serviceConfiguration: {\n authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n // TODO: replace it with your own backend to secure client_secret:\n tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n },\n clientId: YANDEX_OAUTH_CLIENT,\n redirectUrl: `${APP_ID}:/oauth2redirect`,\n scopes: ['login:info', 'login:avatar'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"apple-id-login"},"children":[{"type":"text","value":"Apple ID login"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication","rel":["nofollow"]},"children":[{"type":"text","value":"react-native-apple-authentication"}]},{"type":"text","value":" has its own "},{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication/tree/main/docs","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":" on setting up OAuth using Apple ID."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Use #oauth2 login with React-Native"}]},{"type":"element","tag":"h2","props":{"id":"common-oauth2-providers"},"children":[{"type":"text","value":"Common OAuth2 providers"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be handled by "},{"type":"element","tag":"a","props":{"href":"react-native-app-auth"},"children":[{"type":"text","value":"react-native-app-auth"}]},{"type":"text","value":" by redirecting to url "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"com.yourapp://oauth2provider"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"example-for-google"},"children":[{"type":"text","value":"Example for #Google"}]},{"type":"element","tag":"code","props":{"code":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n issuer: 'https://accounts.google.com',\n clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n redirectUrl: `com.yourapp:/oauth2redirect/google`,\n scopes: ['openid', 'profile'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1253"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'react-native-app-auth'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3bfb45"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"GOOGLE_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f1b659"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3bfb45"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-696c41"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" issuer: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'https://accounts.google.com'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" clientId: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"GOOGLE_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"}.apps.googleusercontent.com`"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" redirectUrl: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"`com.yourapp:/oauth2redirect/google`"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" scopes: ["}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'openid'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'profile'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" dangerouslyAllowInsecureHttpRequests: "}]},{"type":"element","tag":"span","props":{"class":"ct-18c609"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"});"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"example-for-yandex"},"children":[{"type":"text","value":"Example for #Yandex"}]},{"type":"element","tag":"code","props":{"code":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n serviceConfiguration: {\n authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n // TODO: replace it with your own backend to secure client_secret:\n tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n },\n clientId: YANDEX_OAUTH_CLIENT,\n redirectUrl: `${APP_ID}:/oauth2redirect`,\n scopes: ['login:info', 'login:avatar'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3bfb45"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3bfb45"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"YANDEX_OAUTH_SECRET"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-f1b659"},"children":[{"type":"text","value":"// better hide it somehow"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3bfb45"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'com.yourapp'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3bfb45"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-696c41"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" serviceConfiguration: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" authorizationEndpoint: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"`https://oauth.yandex.ru/authorize?response_type=code&client_id=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"}&redirect_uri=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"}:/oauth2redirect`"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f1b659"},"children":[{"type":"text","value":"// TODO: replace it with your own backend to secure client_secret:"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" tokenEndpoint: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"`https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"}&client_secret=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"YANDEX_OAUTH_SECRET"}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" clientId: "}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" redirectUrl: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"}:/oauth2redirect`"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" scopes: ["}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'login:info'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'login:avatar'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" dangerouslyAllowInsecureHttpRequests: "}]},{"type":"element","tag":"span","props":{"class":"ct-18c609"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-696c41"},"children":[{"type":"text","value":"callback"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-bd1253"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-bd1253"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"apple-id-login"},"children":[{"type":"text","value":"Apple ID login"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication","rel":["nofollow"]},"children":[{"type":"text","value":"react-native-apple-authentication"}]},{"type":"text","value":" has its own "},{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication/tree/main/docs","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":" on setting up OAuth using Apple ID."}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-18c609{color:#79C0FF}.ct-696c41{color:#D2A8FF}.ct-f1b659{color:#8B949E}.ct-7cf54e{color:#79C0FF}.ct-3bfb45{color:#FF7B72}.ct-5e7163{color:#A5D6FF}.ct-bd1253{color:#C9D1D9}.ct-268c77{color:#C9D1D9}.ct-109d53{color:#FF7B72}.light .ct-109d53{color:#859900}.light .ct-268c77{color:#657B83}.light .ct-bd1253{color:#268BD2}.light .ct-5e7163{color:#2AA198}.light .ct-3bfb45{color:#073642}.light .ct-7cf54e{color:#268BD2}.light .ct-f1b659{color:#93A1A1}.light .ct-696c41{color:#268BD2}.light .ct-18c609{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"common-oauth2-providers","depth":2,"text":"Common OAuth2 providers","children":[{"id":"example-for-google","depth":3,"text":"Example for #Google"},{"id":"example-for-yandex","depth":3,"text":"Example for #Yandex"}]},{"id":"apple-id-login","depth":2,"text":"Apple ID login"}]}},"_type":"markdown","_id":"content:Frontend:React Native:OAuth2 login.md","_source":"content","_file":"Frontend/React Native/OAuth2 login.md","_extension":"md"},{"_path":"/frontend/react-native/preserve-flatlist-scroll-position-in-react-native","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Preserve FlatList Scroll Position In React Native","description":"Sometimes you need to keep scroll position of FlatList in React Native after some user interactions.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to keep scroll position of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"FlatList"}]},{"type":"text","value":" in React Native after some user interactions."}]},{"type":"element","tag":"code","props":{"code":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC = ({ interact }) => {\n const scrollPosition = useRef(0);\n const scrollHeight = useRef(0);\n \n // set it to `true` before interaction and back to `false` right after\n const shouldKeepScrollPosition = useRef(false);\n\n const onScroll = useCallback(\n (event: NativeSyntheticEvent) => {\n scrollPosition.current = event.nativeEvent.contentOffset.y;\n },\n [],\n );\n\n const onContentSizeChange = useCallback((_: number, h: number) => {\n if (!shouldKeepScrollPosition.current) {\n scrollHeight.current = h;\n return;\n }\n\n ref.current?.scrollToOffset({\n offset: scrollPosition.current + (h - scrollHeight.current),\n animated: false,\n });\n\n scrollHeight.current = h;\n }, []);\n\n // onInteraction wraps interaction to preserve scroll position\n const onInteraction = useCallback(\n () => {\n shouldKeepScrollPosition.current = true;\n\n setTimeout(() => {\n interact();\n }, 0);\n\n setTimeout(() => {\n shouldKeepScrollPosition.current = false;\n }, 500);\n },\n [setSelectedSubThemes],\n );\n \n return (\n \n )\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC = ({ interact }) => {\n const scrollPosition = useRef(0);\n const scrollHeight = useRef(0);\n \n // set it to `true` before interaction and back to `false` right after\n const shouldKeepScrollPosition = useRef(false);\n\n const onScroll = useCallback(\n (event: NativeSyntheticEvent) => {\n scrollPosition.current = event.nativeEvent.contentOffset.y;\n },\n [],\n );\n\n const onContentSizeChange = useCallback((_: number, h: number) => {\n if (!shouldKeepScrollPosition.current) {\n scrollHeight.current = h;\n return;\n }\n\n ref.current?.scrollToOffset({\n offset: scrollPosition.current + (h - scrollHeight.current),\n animated: false,\n });\n\n scrollHeight.current = h;\n }, []);\n\n // onInteraction wraps interaction to preserve scroll position\n const onInteraction = useCallback(\n () => {\n shouldKeepScrollPosition.current = true;\n\n setTimeout(() => {\n interact();\n }, 0);\n\n setTimeout(() => {\n shouldKeepScrollPosition.current = false;\n }, 500);\n },\n [setSelectedSubThemes],\n );\n \n return (\n \n )\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to keep scroll position of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"FlatList"}]},{"type":"text","value":" in React Native after some user interactions."}]},{"type":"element","tag":"code","props":{"code":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC = ({ interact }) => {\n const scrollPosition = useRef(0);\n const scrollHeight = useRef(0);\n \n // set it to `true` before interaction and back to `false` right after\n const shouldKeepScrollPosition = useRef(false);\n\n const onScroll = useCallback(\n (event: NativeSyntheticEvent) => {\n scrollPosition.current = event.nativeEvent.contentOffset.y;\n },\n [],\n );\n\n const onContentSizeChange = useCallback((_: number, h: number) => {\n if (!shouldKeepScrollPosition.current) {\n scrollHeight.current = h;\n return;\n }\n\n ref.current?.scrollToOffset({\n offset: scrollPosition.current + (h - scrollHeight.current),\n animated: false,\n });\n\n scrollHeight.current = h;\n }, []);\n\n // onInteraction wraps interaction to preserve scroll position\n const onInteraction = useCallback(\n () => {\n shouldKeepScrollPosition.current = true;\n\n setTimeout(() => {\n interact();\n }, 0);\n\n setTimeout(() => {\n shouldKeepScrollPosition.current = false;\n }, 500);\n },\n [setSelectedSubThemes],\n );\n \n return (\n \n )\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-23639f"},"children":[{"type":"text","value":"// interact() is doing some stuff, that changes FlatList scroll size"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-143e9a"},"children":[{"type":"text","value":"Props"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1c1580"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"; }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-37c6e0"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7e17fd"},"children":[{"type":"text","value":"SomeList"}]},{"type":"element","tag":"span","props":{"class":"ct-b249b4"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-72292b"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-72292b"},"children":[{"type":"text","value":"Props"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-b249b4"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" ({ "}]},{"type":"element","tag":"span","props":{"class":"ct-194cdd"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-37c6e0"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2ed460"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-3a6b54"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2ed460"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-3a6b54"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-23639f"},"children":[{"type":"text","value":"// set it to `true` before interaction and back to `false` right after"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2ed460"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-8fcdb5"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2ed460"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-194cdd"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-b249b4"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-72292b"},"children":[{"type":"text","value":"NativeSyntheticEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-72292b"},"children":[{"type":"text","value":"NativeScrollEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":">) "}]},{"type":"element","tag":"span","props":{"class":"ct-37c6e0"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"nativeEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"contentOffset"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"y"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" [],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-37c6e0"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c6e208"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b249b4"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7e17fd"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-194cdd"},"children":[{"type":"text","value":"_"}]},{"type":"element","tag":"span","props":{"class":"ct-b249b4"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-169751"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-194cdd"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-b249b4"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-169751"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-37c6e0"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"scrollToOffset"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" offset: "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" animated: "}]},{"type":"element","tag":"span","props":{"class":"ct-8fcdb5"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-23639f"},"children":[{"type":"text","value":"// onInteraction wraps interaction to preserve scroll position"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2ed460"},"children":[{"type":"text","value":"onInteraction"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8fcdb5"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2ed460"},"children":[{"type":"text","value":"setTimeout"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" }, "}]},{"type":"element","tag":"span","props":{"class":"ct-3a6b54"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2ed460"},"children":[{"type":"text","value":"setTimeout"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8fcdb5"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" }, "}]},{"type":"element","tag":"span","props":{"class":"ct-3a6b54"},"children":[{"type":"text","value":"500"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"setSelectedSubThemes"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-d12798"},"children":[{"type":"text","value":"FlatList"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-23639f"},"children":[{"type":"text","value":"// ...required FlatList options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"onRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"onRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"/>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" )"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-d12798{color:#FFA657}.ct-169751{color:#79C0FF}.ct-c6e208{color:#79C0FF}.ct-34bf83{color:#C9D1D9}.ct-8fcdb5{color:#79C0FF}.ct-3a6b54{color:#79C0FF}.ct-2ed460{color:#79C0FF}.ct-194cdd{color:#FFA657}.ct-72292b{color:#FFA657}.ct-b249b4{color:#FF7B72}.ct-7e17fd{color:#D2A8FF}.ct-e44bc7{color:#C9D1D9}.ct-37c6e0{color:#FF7B72}.ct-1c1580{color:#79C0FF}.ct-089a5a{color:#D2A8FF}.ct-04d162{color:#FF7B72}.ct-143e9a{color:#FFA657}.ct-4643a0{color:#C9D1D9}.ct-74ea31{color:#FF7B72}.ct-23639f{color:#8B949E}.light .ct-23639f{color:#93A1A1}.light .ct-74ea31{color:#073642}.light .ct-4643a0{color:#657B83}.light .ct-143e9a{color:#268BD2}.light .ct-04d162{color:#859900}.light .ct-089a5a{color:#268BD2}.light .ct-1c1580{color:#859900}.light .ct-37c6e0{color:#073642}.light .ct-e44bc7{color:#657B83}.light .ct-7e17fd{color:#268BD2}.light .ct-b249b4{color:#859900}.light .ct-72292b{color:#268BD2}.light .ct-194cdd{color:#657B83}.light .ct-2ed460{color:#268BD2}.light .ct-3a6b54{color:#D33682}.light .ct-8fcdb5{color:#B58900}.light .ct-34bf83{color:#268BD2}.light .ct-c6e208{color:#268BD2}.light .ct-169751{color:#859900}.light .ct-d12798{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React Native:Preserve FlatList scroll position in React Native.md","_source":"content","_file":"Frontend/React Native/Preserve FlatList scroll position in React Native.md","_extension":"md"},{"_path":"/frontend/react-native/useful-comands","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Useful Comands","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"show-android-logcat"},"children":[{"type":"text","value":"Show android logcat"}]},{"type":"element","tag":"code","props":{"code":"adb logcat com.application:I \"*:S\"\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"adb logcat com.application:I \"*:S\"\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"get-apks-sha-256"},"children":[{"type":"text","value":"Get .apk's SHA-256"}]},{"type":"element","tag":"code","props":{"code":"keytool -printcert -jarfile \"$1\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"keytool -printcert -jarfile \"$1\"\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"assemble-debug-release-on-android"},"children":[{"type":"text","value":"Assemble debug release on Android"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Packages release with bundled resources."}]},{"type":"element","tag":"code","props":{"code":"npx react-native bundle \\\n --platform android \\\n --dev false \\\n --entry-file index.js \\\n --bundle-output android/app/src/main/assets/index.android.bundle \\\n --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"npx react-native bundle \\\n --platform android \\\n --dev false \\\n --entry-file index.js \\\n --bundle-output android/app/src/main/assets/index.android.bundle \\\n --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"send-release-to-android-device"},"children":[{"type":"text","value":"Send release to Android device"}]},{"type":"element","tag":"code","props":{"code":"cd ./android \\\n && ./gradlew assembleRelease \\\n && adb install ./app/build/outputs/apk/release/app-release.apk\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"cd ./android \\\n && ./gradlew assembleRelease \\\n && adb install ./app/build/outputs/apk/release/app-release.apk\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"deep-links"},"children":[{"type":"text","value":"Deep links"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://zarah.dev/2022/02/08/android12-deeplinks.html","rel":["nofollow"]},"children":[{"type":"text","value":"https://zarah.dev/2022/02/08/android12-deeplinks.html"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification","rel":["nofollow"]},"children":[{"type":"text","value":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls","rel":["nofollow"]},"children":[{"type":"text","value":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls"}]}]}]},{"type":"element","tag":"h3","props":{"id":"open-deep-links"},"children":[{"type":"text","value":"Open deep links"}]},{"type":"element","tag":"code","props":{"code":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"reverify-links-on-android"},"children":[{"type":"text","value":"Reverify links on Android"}]},{"type":"element","tag":"code","props":{"code":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n adb shell pm verify-app-links --re-verify $PACKAGE\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n adb shell pm verify-app-links --re-verify $PACKAGE\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"show-android-logcat"},"children":[{"type":"text","value":"Show android logcat"}]},{"type":"element","tag":"code","props":{"code":"adb logcat com.application:I \"*:S\"\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"adb logcat com.application:I "}]},{"type":"element","tag":"span","props":{"class":"ct-8c8ca9"},"children":[{"type":"text","value":"\"*:S\""}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"get-apks-sha-256"},"children":[{"type":"text","value":"Get .apk's SHA-256"}]},{"type":"element","tag":"code","props":{"code":"keytool -printcert -jarfile \"$1\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"keytool -printcert -jarfile "}]},{"type":"element","tag":"span","props":{"class":"ct-8c8ca9"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-d5cc7b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a5dd1b"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-8c8ca9"},"children":[{"type":"text","value":"\""}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"assemble-debug-release-on-android"},"children":[{"type":"text","value":"Assemble debug release on Android"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Packages release with bundled resources."}]},{"type":"element","tag":"code","props":{"code":"npx react-native bundle \\\n --platform android \\\n --dev false \\\n --entry-file index.js \\\n --bundle-output android/app/src/main/assets/index.android.bundle \\\n --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"npx react-native bundle \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" --platform android \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" --dev "}]},{"type":"element","tag":"span","props":{"class":"ct-75854a"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" --entry-file index.js \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" --bundle-output android/app/src/main/assets/index.android.bundle \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" --assets-dest android/app/src/main/res/"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75854a"},"children":[{"type":"text","value":"cd"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" android "}]},{"type":"element","tag":"span","props":{"class":"ct-5f27d7"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" ./gradlew assembleDebug"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-662dda"},"children":[{"type":"text","value":"# do your stuff"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"./gradlew clean"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"send-release-to-android-device"},"children":[{"type":"text","value":"Send release to Android device"}]},{"type":"element","tag":"code","props":{"code":"cd ./android \\\n && ./gradlew assembleRelease \\\n && adb install ./app/build/outputs/apk/release/app-release.apk\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75854a"},"children":[{"type":"text","value":"cd"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" ./android \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5f27d7"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" ./gradlew assembleRelease \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5f27d7"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" adb install ./app/build/outputs/apk/release/app-release.apk"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"deep-links"},"children":[{"type":"text","value":"Deep links"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://zarah.dev/2022/02/08/android12-deeplinks.html","rel":["nofollow"]},"children":[{"type":"text","value":"https://zarah.dev/2022/02/08/android12-deeplinks.html"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification","rel":["nofollow"]},"children":[{"type":"text","value":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls","rel":["nofollow"]},"children":[{"type":"text","value":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls"}]}]}]},{"type":"element","tag":"h3","props":{"id":"open-deep-links"},"children":[{"type":"text","value":"Open deep links"}]},{"type":"element","tag":"code","props":{"code":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-662dda"},"children":[{"type":"text","value":"# ios "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"xcrun simctl openurl booted "}]},{"type":"element","tag":"span","props":{"class":"ct-d5cc7b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a5dd1b"},"children":[{"type":"text","value":"1"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-662dda"},"children":[{"type":"text","value":"# android"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"adb shell am start -W -a android.intent.action.VIEW -d "}]},{"type":"element","tag":"span","props":{"class":"ct-d5cc7b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a5dd1b"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"com.application"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"reverify-links-on-android"},"children":[{"type":"text","value":"Reverify links on Android"}]},{"type":"element","tag":"code","props":{"code":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n adb shell pm verify-app-links --re-verify $PACKAGE\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"PACKAGE="}]},{"type":"element","tag":"span","props":{"class":"ct-8c8ca9"},"children":[{"type":"text","value":"\"com.application\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"adb shell pm set-app-links --package "}]},{"type":"element","tag":"span","props":{"class":"ct-d5cc7b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a5dd1b"},"children":[{"type":"text","value":"PACKAGE"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" 0 all "}]},{"type":"element","tag":"span","props":{"class":"ct-5f27d7"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" adb shell pm verify-app-links --re-verify "}]},{"type":"element","tag":"span","props":{"class":"ct-d5cc7b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a5dd1b"},"children":[{"type":"text","value":"PACKAGE"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-662dda{color:#8B949E}.ct-5f27d7{color:#FF7B72}.ct-75854a{color:#79C0FF}.ct-a5dd1b{color:#C9D1D9}.ct-d5cc7b{color:#C9D1D9}.ct-8c8ca9{color:#A5D6FF}.ct-a1e55a{color:#C9D1D9}.light .ct-a1e55a{color:#657B83}.light .ct-8c8ca9{color:#2AA198}.light .ct-d5cc7b{color:#859900}.light .ct-a5dd1b{color:#268BD2}.light .ct-75854a{color:#268BD2}.light .ct-5f27d7{color:#859900}.light .ct-662dda{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"show-android-logcat","depth":2,"text":"Show android logcat"},{"id":"get-apks-sha-256","depth":2,"text":"Get .apk's SHA-256"},{"id":"assemble-debug-release-on-android","depth":2,"text":"Assemble debug release on Android"},{"id":"send-release-to-android-device","depth":2,"text":"Send release to Android device"},{"id":"deep-links","depth":2,"text":"Deep links","children":[{"id":"open-deep-links","depth":3,"text":"Open deep links"},{"id":"reverify-links-on-android","depth":3,"text":"Reverify links on Android"}]}]}},"_type":"markdown","_id":"content:Frontend:React Native:Useful comands.md","_source":"content","_file":"Frontend/React Native/Useful comands.md","_extension":"md"},{"_path":"/frontend/react/axios-refresh-token-on-react","_dir":"react","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Axios Refresh Token On React","description":" component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":""}]},{"type":"text","value":" component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props."}]},{"type":"element","tag":"code","props":{"code":"import axios from \"axios\";\nimport React, {\n createContext,\n FC,\n PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n tokens: {\n access: string;\n refresh: string;\n };\n logout: () => void;\n}\n\nconst APIContext = createContext({\n client: axios.create({\n baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n }),\n});\n\nconst APIProvider: FC = ({ \n tokens, \n logout, \n children,\n}) => {\n const client = useRef(\n axios.create({\n baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n })\n ).current;\n\n const refreshTokens = useCallback<() => string>(() => {\n // TODO: implement me\n throw new Error(\"not implemented\");\n }, []);\n\n useEffect(() => {\n if (!tokens.access) {\n return;\n }\n\n // append `access` token to all requests\n const req = client.interceptors.request.use(\n async (config) => {\n config.headers = {\n Authorization: `Bearer ${tokens.access}`,\n };\n return config;\n },\n (error) => {\n Promise.reject(error);\n }\n );\n\n // refreshing interceptor\n const resp = client.interceptors.response.use(\n (response) => {\n return response;\n },\n async function (error) {\n const originalRequest = error.config;\n\n if (error.response.status === 401 && !originalRequest._retry) {\n originalRequest._retry = true;\n\n const newToken = refreshTokens;\n\n return axios({\n ...originalRequest,\n headers: {\n ...originalRequest.headers,\n Authorization: \"Bearer \" + newToken,\n },\n });\n }\n\n logout();\n return Promise.reject(error);\n }\n );\n\n return () => {\n axios.interceptors.request.eject(req);\n axios.interceptors.request.eject(resp);\n };\n }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import axios from \"axios\";\nimport React, {\n createContext,\n FC,\n PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n tokens: {\n access: string;\n refresh: string;\n };\n logout: () => void;\n}\n\nconst APIContext = createContext({\n client: axios.create({\n baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n }),\n});\n\nconst APIProvider: FC = ({ \n tokens, \n logout, \n children,\n}) => {\n const client = useRef(\n axios.create({\n baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n })\n ).current;\n\n const refreshTokens = useCallback<() => string>(() => {\n // TODO: implement me\n throw new Error(\"not implemented\");\n }, []);\n\n useEffect(() => {\n if (!tokens.access) {\n return;\n }\n\n // append `access` token to all requests\n const req = client.interceptors.request.use(\n async (config) => {\n config.headers = {\n Authorization: `Bearer ${tokens.access}`,\n };\n return config;\n },\n (error) => {\n Promise.reject(error);\n }\n );\n\n // refreshing interceptor\n const resp = client.interceptors.response.use(\n (response) => {\n return response;\n },\n async function (error) {\n const originalRequest = error.config;\n\n if (error.response.status === 401 && !originalRequest._retry) {\n originalRequest._retry = true;\n\n const newToken = refreshTokens;\n\n return axios({\n ...originalRequest,\n headers: {\n ...originalRequest.headers,\n Authorization: \"Bearer \" + newToken,\n },\n });\n }\n\n logout();\n return Promise.reject(error);\n }\n );\n\n return () => {\n axios.interceptors.request.eject(req);\n axios.interceptors.request.eject(resp);\n };\n }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":""}]},{"type":"text","value":" component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props."}]},{"type":"element","tag":"code","props":{"code":"import axios from \"axios\";\nimport React, {\n createContext,\n FC,\n PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n tokens: {\n access: string;\n refresh: string;\n };\n logout: () => void;\n}\n\nconst APIContext = createContext({\n client: axios.create({\n baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n }),\n});\n\nconst APIProvider: FC = ({ \n tokens, \n logout, \n children,\n}) => {\n const client = useRef(\n axios.create({\n baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n })\n ).current;\n\n const refreshTokens = useCallback<() => string>(() => {\n // TODO: implement me\n throw new Error(\"not implemented\");\n }, []);\n\n useEffect(() => {\n if (!tokens.access) {\n return;\n }\n\n // append `access` token to all requests\n const req = client.interceptors.request.use(\n async (config) => {\n config.headers = {\n Authorization: `Bearer ${tokens.access}`,\n };\n return config;\n },\n (error) => {\n Promise.reject(error);\n }\n );\n\n // refreshing interceptor\n const resp = client.interceptors.response.use(\n (response) => {\n return response;\n },\n async function (error) {\n const originalRequest = error.config;\n\n if (error.response.status === 401 && !originalRequest._retry) {\n originalRequest._retry = true;\n\n const newToken = refreshTokens;\n\n return axios({\n ...originalRequest,\n headers: {\n ...originalRequest.headers,\n Authorization: \"Bearer \" + newToken,\n },\n });\n }\n\n logout();\n return Promise.reject(error);\n }\n );\n\n return () => {\n axios.interceptors.request.eject(req);\n axios.interceptors.request.eject(resp);\n };\n }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cdcb1e"},"children":[{"type":"text","value":"\"axios\""}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"React"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"createContext"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"PropsWithChildren"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"useContext"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"useEffect"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cdcb1e"},"children":[{"type":"text","value":"\"react\""}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-005a6c"},"children":[{"type":"text","value":"APIProviderProps"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cb2db9"},"children":[{"type":"text","value":"PropsWithChildren"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-afc73c"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-afc73c"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f0eff0"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"refresh"}]},{"type":"element","tag":"span","props":{"class":"ct-afc73c"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f0eff0"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f8ba82"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"createContext"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" client: "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" baseURL: "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"process"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"env"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"NEXT_PUBLIC_API_ENDPOINT"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"APIProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9af740"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-9af740"},"children":[{"type":"text","value":"APIProviderProps"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" ({ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"children"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" baseURL: "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"process"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"env"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"NEXT_PUBLIC_API_ENDPOINT"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" )."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"<() "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f8ba82"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":">(() "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8069ea"},"children":[{"type":"text","value":"// TODO: implement me"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f8ba82"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-cdcb1e"},"children":[{"type":"text","value":"\"not implemented\""}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"useEffect"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8069ea"},"children":[{"type":"text","value":"// append `access` token to all requests"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"req"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"use"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" Authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-cdcb1e"},"children":[{"type":"text","value":"`Bearer ${"}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-63ec24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-cdcb1e"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f8ba82"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8069ea"},"children":[{"type":"text","value":"// refreshing interceptor"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"resp"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"use"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"status"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ee2f"},"children":[{"type":"text","value":"401"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"_retry"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"_retry"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6fcf02"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"newToken"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" Authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-cdcb1e"},"children":[{"type":"text","value":"\"Bearer \""}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"newToken"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f8ba82"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"eject"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"req"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"eject"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"resp"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }, ["}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"refresh"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"]);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"Provider"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"{{ "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }}"}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":">"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" {"}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"children"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"useAPI"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"useContext"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"APIProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-6fcf02{color:#79C0FF}.ct-30ee2f{color:#79C0FF}.ct-63ec24{color:#A5D6FF}.ct-8069ea{color:#8B949E}.ct-9af740{color:#FFA657}.ct-62a4b7{color:#79C0FF}.ct-f8ba82{color:#79C0FF}.ct-35cf76{color:#FF7B72}.ct-fddbd1{color:#D2A8FF}.ct-f0eff0{color:#79C0FF}.ct-afc73c{color:#FF7B72}.ct-74e615{color:#FFA657}.ct-cb2db9{color:#79C0FF}.ct-005a6c{color:#FFA657}.ct-70c1b9{color:#C9D1D9}.ct-4ea82c{color:#FF7B72}.ct-cdcb1e{color:#A5D6FF}.ct-a0bdfd{color:#C9D1D9}.ct-59620a{color:#C9D1D9}.ct-7a9050{color:#FF7B72}.light .ct-7a9050{color:#859900}.light .ct-59620a{color:#657B83}.light .ct-a0bdfd{color:#268BD2}.light .ct-cdcb1e{color:#2AA198}.light .ct-4ea82c{color:#073642}.light .ct-70c1b9{color:#657B83}.light .ct-005a6c{color:#268BD2}.light .ct-cb2db9{color:#657B83}.light .ct-74e615{color:#657B83}.light .ct-afc73c{color:#859900}.light .ct-f0eff0{color:#859900}.light .ct-fddbd1{color:#268BD2}.light .ct-35cf76{color:#073642}.light .ct-f8ba82{color:#859900}.light .ct-62a4b7{color:#268BD2}.light .ct-9af740{color:#268BD2}.light .ct-8069ea{color:#93A1A1}.light .ct-63ec24{color:#657B83}.light .ct-30ee2f{color:#D33682}.light .ct-6fcf02{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React:Axios refresh token on React.md","_source":"content","_file":"Frontend/React/Axios refresh token on React.md","_extension":"md"},{"_path":"/frontend/react/axios-with-abortcontroller","_dir":"react","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Axios With AbortController","description":"If you need to cancel some request, use axios with AbortController. Previously axios used cancellation token, but now it's deprecated.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to cancel some request, use "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/cancellation","rel":["nofollow"]},"children":[{"type":"text","value":"axios with AbortController"}]},{"type":"text","value":". Previously axios used cancellation token, but now it's deprecated."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"AbortController"}]},{"type":"text","value":" can be used with a multiple requests to cancel them at once."}]},{"type":"element","tag":"code","props":{"code":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n const controller = useRef(new AbortController());\n \n const get = useCallback(async () => {\n const result = await client.get(\"/\", {\n // params and props here\n signal: controller.current.signal,\n });\n\n return result.data;\n }, []);\n\n const cancel = useCallback(() => {\n controller.current.abort();\n \n // controller should be rewritten or all requests will fail\n controller.current = new AbortController();\n }, [controller]);\n\n return { get, cancel };\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n const controller = useRef(new AbortController());\n \n const get = useCallback(async () => {\n const result = await client.get(\"/\", {\n // params and props here\n signal: controller.current.signal,\n });\n\n return result.data;\n }, []);\n\n const cancel = useCallback(() => {\n controller.current.abort();\n \n // controller should be rewritten or all requests will fail\n controller.current = new AbortController();\n }, [controller]);\n\n return { get, cancel };\n};\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to cancel some request, use "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/cancellation","rel":["nofollow"]},"children":[{"type":"text","value":"axios with AbortController"}]},{"type":"text","value":". Previously axios used cancellation token, but now it's deprecated."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"AbortController"}]},{"type":"text","value":" can be used with a multiple requests to cancel them at once."}]},{"type":"element","tag":"code","props":{"code":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n const controller = useRef(new AbortController());\n \n const get = useCallback(async () => {\n const result = await client.get(\"/\", {\n // params and props here\n signal: controller.current.signal,\n });\n\n return result.data;\n }, []);\n\n const cancel = useCallback(() => {\n controller.current.abort();\n \n // controller should be rewritten or all requests will fail\n controller.current = new AbortController();\n }, [controller]);\n\n return { get, cancel };\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c6e561"},"children":[{"type":"text","value":"\"react\""}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c6e561"},"children":[{"type":"text","value":"'axios'"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ffae3f"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"useGetUsers"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ffae3f"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"AbortController"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"());"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ffae3f"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ffae3f"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-c6e561"},"children":[{"type":"text","value":"\"/\""}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-90eb0e"},"children":[{"type":"text","value":"// params and props here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" signal: "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"signal"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"data"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ffae3f"},"children":[{"type":"text","value":"cancel"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"abort"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-90eb0e"},"children":[{"type":"text","value":"// controller should be rewritten or all requests will fail"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"AbortController"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" }, ["}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"]);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"cancel"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"};"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-90eb0e{color:#8B949E}.ct-24254f{color:#D2A8FF}.ct-ffae3f{color:#79C0FF}.ct-e623bb{color:#FF7B72}.ct-c6e561{color:#A5D6FF}.ct-c8d839{color:#C9D1D9}.ct-f54e97{color:#C9D1D9}.ct-ca69a5{color:#FF7B72}.light .ct-ca69a5{color:#859900}.light .ct-f54e97{color:#657B83}.light .ct-c8d839{color:#268BD2}.light .ct-c6e561{color:#2AA198}.light .ct-e623bb{color:#073642}.light .ct-ffae3f{color:#268BD2}.light .ct-24254f{color:#268BD2}.light .ct-90eb0e{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React:Axios with AbortController.md","_source":"content","_file":"Frontend/React/Axios with AbortController.md","_extension":"md"},{"_path":"/frontend/vue/adding-global-properties-to-component","_dir":"vue","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Adding Global Properties To Component","description":"The topic's fully covered in the official documentation and in Add global variable to window.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The topic's fully covered in the "},{"type":"element","tag":"a","props":{"href":"https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]},{"type":"text","value":" and in "},{"type":"element","tag":"a","props":{"href":"Add%20global%20variable%20to%20window"},"children":[{"type":"text","value":"Add global variable to window"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you want to add global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$http"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$translate"}]},{"type":"text","value":" services to all of project's components:"}]},{"type":"element","tag":"code","props":{"code":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n interface ComponentCustomProperties {\n $http: typeof axios\n $translate: (key: string) => string\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n interface ComponentCustomProperties {\n $http: typeof axios\n $translate: (key: string) => string\n }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The topic's fully covered in the "},{"type":"element","tag":"a","props":{"href":"https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]},{"type":"text","value":" and in "},{"type":"element","tag":"a","props":{"href":"Add%20global%20variable%20to%20window"},"children":[{"type":"text","value":"Add global variable to window"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you want to add global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$http"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$translate"}]},{"type":"text","value":" services to all of project's components:"}]},{"type":"element","tag":"code","props":{"code":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n interface ComponentCustomProperties {\n $http: typeof axios\n $translate: (key: string) => string\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ba2647"},"children":[{"type":"text","value":"// ~/index.d.ts or ~/custom.d.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b38898"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1ce920"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b38898"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03d1bd"},"children":[{"type":"text","value":"'axios'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4fa168"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4fa168"},"children":[{"type":"text","value":"module"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03d1bd"},"children":[{"type":"text","value":"'vue'"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4fa168"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8d69f"},"children":[{"type":"text","value":"ComponentCustomProperties"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-08507f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5cb2bd"},"children":[{"type":"text","value":"$translate"}]},{"type":"element","tag":"span","props":{"class":"ct-e04799"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-08507f"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-71e141"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-e04799"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-08507f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2c3ffd"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-08507f"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-242aba"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-08507f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2c3ffd"},"children":[{"type":"text","value":"string"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-242aba{color:#FF7B72}.ct-2c3ffd{color:#79C0FF}.ct-71e141{color:#FFA657}.ct-e04799{color:#FF7B72}.ct-5cb2bd{color:#D2A8FF}.ct-08507f{color:#C9D1D9}.ct-a8d69f{color:#FFA657}.ct-4fa168{color:#FF7B72}.ct-03d1bd{color:#A5D6FF}.ct-1ce920{color:#C9D1D9}.ct-ce3805{color:#C9D1D9}.ct-b38898{color:#FF7B72}.ct-ba2647{color:#8B949E}.light .ct-ba2647{color:#93A1A1}.light .ct-b38898{color:#859900}.light .ct-ce3805{color:#657B83}.light .ct-1ce920{color:#268BD2}.light .ct-03d1bd{color:#2AA198}.light .ct-4fa168{color:#073642}.light .ct-a8d69f{color:#268BD2}.light .ct-08507f{color:#657B83}.light .ct-5cb2bd{color:#268BD2}.light .ct-e04799{color:#859900}.light .ct-71e141{color:#657B83}.light .ct-2c3ffd{color:#859900}.light .ct-242aba{color:#073642}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:Vue:Adding global properties to component.md","_source":"content","_file":"Frontend/Vue/Adding global properties to component.md","_extension":"md"},{"_path":"/frontend/vue/make-nuxt-handle-obsidian-highlights","_dir":"vue","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Make Nuxt Handle Obsidian Highlights","description":"By default Nuxt Content Plugin not handling highlight links. To fix that we will create Nitro plugin:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"By default "},{"type":"element","tag":"a","props":{"href":"https://content.nuxtjs.org","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content Plugin"}]},{"type":"text","value":" not handling "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"highlight"}]},{"type":"text","value":" links. To fix that we will create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Nitro"}]},{"type":"text","value":" plugin:"}]},{"type":"element","tag":"code","props":{"code":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n if (file._id.endsWith(\".md\")) {\n file.body = file.body.replace(\n /==([^=]+)==/gs,\n `$1`\n );\n }\n });\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n if (file._id.endsWith(\".md\")) {\n file.body = file.body.replace(\n /==([^=]+)==/gs,\n `$1`\n );\n }\n });\n});\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"By default "},{"type":"element","tag":"a","props":{"href":"https://content.nuxtjs.org","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content Plugin"}]},{"type":"text","value":" not handling "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"highlight"}]},{"type":"text","value":" links. To fix that we will create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Nitro"}]},{"type":"text","value":" plugin:"}]},{"type":"element","tag":"code","props":{"code":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n if (file._id.endsWith(\".md\")) {\n file.body = file.body.replace(\n /==([^=]+)==/gs,\n `$1`\n );\n }\n });\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d44533"},"children":[{"type":"text","value":"// ~/server/plugins/highlight.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-009f14"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-0aa45e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-009f14"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-0aa45e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-587ef2"},"children":[{"type":"text","value":"defineNitroPlugin"}]},{"type":"element","tag":"span","props":{"class":"ct-0aa45e"},"children":[{"type":"text","value":"((nitroApp) "}]},{"type":"element","tag":"span","props":{"class":"ct-fe84d3"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-0aa45e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aaf06c"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"nitroApp"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"hooks"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1e6537"},"children":[{"type":"text","value":"hook"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-a56f94"},"children":[{"type":"text","value":"\"content:file:beforeParse\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ad76ea"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"_id"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1e6537"},"children":[{"type":"text","value":"endsWith"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-a56f94"},"children":[{"type":"text","value":"\".md\""}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ad76ea"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1e6537"},"children":[{"type":"text","value":"replace"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-709a0e"},"children":[{"type":"text","value":"/==("}]},{"type":"element","tag":"span","props":{"class":"ct-d418a6"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-ad76ea"},"children":[{"type":"text","value":"^"}]},{"type":"element","tag":"span","props":{"class":"ct-d418a6"},"children":[{"type":"text","value":"=]"}]},{"type":"element","tag":"span","props":{"class":"ct-ad76ea"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-709a0e"},"children":[{"type":"text","value":")==/"}]},{"type":"element","tag":"span","props":{"class":"ct-ad76ea"},"children":[{"type":"text","value":"gs"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a56f94"},"children":[{"type":"text","value":"`$1`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-aaf06c"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-0aa45e"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-aaf06c"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-d418a6{color:#79C0FF}.ct-709a0e{color:#A5D6FF}.ct-ad76ea{color:#FF7B72}.ct-a56f94{color:#A5D6FF}.ct-1e6537{color:#D2A8FF}.ct-98eece{color:#C9D1D9}.ct-356b04{color:#C9D1D9}.ct-aaf06c{color:#C9D1D9}.ct-fe84d3{color:#FF7B72}.ct-587ef2{color:#D2A8FF}.ct-0aa45e{color:#FFA657}.ct-009f14{color:#FF7B72}.ct-d44533{color:#8B949E}.light .ct-d44533{color:#93A1A1}.light .ct-009f14{color:#859900}.light .ct-0aa45e{color:#657B83}.light .ct-587ef2{color:#268BD2}.light .ct-fe84d3{color:#073642}.light .ct-aaf06c{color:#657B83}.light .ct-356b04{color:#657B83}.light .ct-98eece{color:#268BD2}.light .ct-1e6537{color:#268BD2}.light .ct-a56f94{color:#2AA198}.light .ct-ad76ea{color:#859900}.light .ct-709a0e{color:#D30102}.light .ct-d418a6{color:#CB4B16}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:Vue:Make Nuxt handle Obsidian highlights.md","_source":"content","_file":"Frontend/Vue/Make Nuxt handle Obsidian highlights.md","_extension":"md"},{"_path":"/git/force-git-to-use-https","_dir":"git","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Force Git To Use HTTPS","description":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Put this inside your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"[url \"https://github.com\"]\n insteadOf = git://github.com\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[url \"https://github.com\"]\n insteadOf = git://github.com\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Put this inside your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"[url \"https://github.com\"]\n insteadOf = git://github.com\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-35ce96"},"children":[{"type":"text","value":"[url "}]},{"type":"element","tag":"span","props":{"class":"ct-528a2e"},"children":[{"type":"text","value":"\"https://github.com\""}]},{"type":"element","tag":"span","props":{"class":"ct-35ce96"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-35ce96"},"children":[{"type":"text","value":" insteadOf "}]},{"type":"element","tag":"span","props":{"class":"ct-fa8b57"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-35ce96"},"children":[{"type":"text","value":" git:"}]},{"type":"element","tag":"span","props":{"class":"ct-3930f2"},"children":[{"type":"text","value":"//github.com"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-3930f2{color:#8B949E}.ct-fa8b57{color:#FF7B72}.ct-528a2e{color:#A5D6FF}.ct-35ce96{color:#C9D1D9}.light .ct-35ce96{color:#657B83}.light .ct-528a2e{color:#2AA198}.light .ct-fa8b57{color:#859900}.light .ct-3930f2{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Git:Force git to use HTTPS.md","_source":"content","_file":"Git/Force git to use HTTPS.md","_extension":"md"},{"_path":"/git/git-aliases-and-useful-commands","_dir":"git","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Git Aliases And Useful Commands","description":"Shorthands for #git commands can be specified. Should be placed at ~/.gitconfig.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Shorthands for #git commands can be specified. Should be placed at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"[alias]\n flush = git clean-branches branch | grep -v master | xargs git branch -D\n lol = log --oneline --graph\n l = lol\n c = commit -am\n cv = commit --no-verify -am\n p = push\n pf = p --force-with-lease\n ignore-now = update-index --skip-worktree\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[alias]\n flush = git clean-branches branch | grep -v master | xargs git branch -D\n lol = log --oneline --graph\n l = lol\n c = commit -am\n cv = commit --no-verify -am\n p = push\n pf = p --force-with-lease\n ignore-now = update-index --skip-worktree\n"}]}]}]},{"type":"element","tag":"table","props":{},"children":[{"type":"element","tag":"thead","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"command"}]}]},{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"description"}]}]}]}]},{"type":"element","tag":"tbody","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git flush"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"drops all branches, except master"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git lol"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"shows log"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git c"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits with message"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git cv"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits without hooks"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git p"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"pushes"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git pf"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"push with --force and additional check"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git ignore-now"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"starts ignoring file from now on"}]}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Shorthands for #git commands can be specified. Should be placed at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"[alias]\n flush = git clean-branches branch | grep -v master | xargs git branch -D\n lol = log --oneline --graph\n l = lol\n c = commit -am\n cv = commit --no-verify -am\n p = push\n pf = p --force-with-lease\n ignore-now = update-index --skip-worktree\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"[alias]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" flush "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" git clean"}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"branches branch "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" grep "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"v master "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" xargs git branch "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"D"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" lol "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" log "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"oneline "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"graph"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" l "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" lol"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" c "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" commit "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"am"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" cv "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" commit "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"no"}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"verify "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"am"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" p "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" push"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" pf "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" p "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"force"}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"with"}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"lease"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" ignore"}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"now "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" update"}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"index "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"skip"}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"worktree"}]}]}]}]}]},{"type":"element","tag":"table","props":{},"children":[{"type":"element","tag":"thead","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"command"}]}]},{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"description"}]}]}]}]},{"type":"element","tag":"tbody","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git flush"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"drops all branches, except master"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git lol"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"shows log"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git c"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits with message"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git cv"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits without hooks"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git p"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"pushes"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git pf"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"push with --force and additional check"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git ignore-now"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"starts ignoring file from now on"}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-cc76b1{color:#FF7B72}.ct-487bf9{color:#C9D1D9}.light .ct-487bf9{color:#657B83}.light .ct-cc76b1{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Git:Git aliases and useful commands.md","_source":"content","_file":"Git/Git aliases and useful commands.md","_extension":"md"},{"_path":"/graphql/apollo-client-pagination","_dir":"graphql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Apollo Client Pagination","description":"Say, we have gql response like this and we wan't to have pagination with it. Let's merge it as it specified in official documentation","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we have "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gql"}]},{"type":"text","value":" response like this and we wan't to have pagination with it. Let's merge it as it specified in "},{"type":"element","tag":"a","props":{"href":"https://www.apollographql.com/docs/react/caching/cache-field-behavior/#the-merge-function","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]}]},{"type":"element","tag":"code","props":{"code":"query listItems(\n filter: Filter, \n sort: String,\n limit: Number,\n offset: Number,\n): ItemList!\n\ninput Filter {\n name: String!\n type: String!\n}\n\ntype ItemList {\n items: [Item!]!\n totalCount: Int!\n}\n","language":"graphql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"query listItems(\n filter: Filter, \n sort: String,\n limit: Number,\n offset: Number,\n): ItemList!\n\ninput Filter {\n name: String!\n type: String!\n}\n\ntype ItemList {\n items: [Item!]!\n totalCount: Int!\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will setup "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"text","value":" with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"typePolicies"}]},{"type":"text","value":" to merge incoming data in cache:"}]},{"type":"element","tag":"code","props":{"code":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n // ...\n cache: new InMemoryCache({ typePolicies }),\n // ...\n});\n\nexport const typePolicies: TypePolicies = {\n Query: {\n fields: {\n // query name\n listItems: {\n // apollo will serialize and use keyArgs as unique\n // identifier in cache for every query\n // consider choosing the right fields, \n // i.e. limit and offset won't work here\n keyArgs: [\n 'sort', // primitive type\n 'filter', ['name', 'type'] // nested fields of `filter`\n ],\n merge: mergeItemsWithTotalCount,\n },\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n // ...\n cache: new InMemoryCache({ typePolicies }),\n // ...\n});\n\nexport const typePolicies: TypePolicies = {\n Query: {\n fields: {\n // query name\n listItems: {\n // apollo will serialize and use keyArgs as unique\n // identifier in cache for every query\n // consider choosing the right fields, \n // i.e. limit and offset won't work here\n keyArgs: [\n 'sort', // primitive type\n 'filter', ['name', 'type'] // nested fields of `filter`\n ],\n merge: mergeItemsWithTotalCount,\n },\n }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will need merge function "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"text","value":", which will join results of query and cached data for specific key:"}]},{"type":"element","tag":"code","props":{"code":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n // no existing data\n if (!existing || !args?.offset || args.offset < existing.length) {\n return incoming || [];\n }\n\n // If hook was called multiple times\n if (existing?.items?.length && args?.offset < existing.items.length) {\n return existing || [];\n }\n\n // merge cache and incoming data\n const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n // apply latest result for totalCount\n const totalCount = incoming?.totalCount || existing?.totalCount;\n\n return {\n ...(incoming || existing || {}),\n items,\n totalCount,\n };\n };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n // no existing data\n if (!existing || !args?.offset || args.offset < existing.length) {\n return incoming || [];\n }\n\n // If hook was called multiple times\n if (existing?.items?.length && args?.offset < existing.items.length) {\n return existing || [];\n }\n\n // merge cache and incoming data\n const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n // apply latest result for totalCount\n const totalCount = incoming?.totalCount || existing?.totalCount;\n\n return {\n ...(incoming || existing || {}),\n items,\n totalCount,\n };\n };\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we have "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gql"}]},{"type":"text","value":" response like this and we wan't to have pagination with it. Let's merge it as it specified in "},{"type":"element","tag":"a","props":{"href":"https://www.apollographql.com/docs/react/caching/cache-field-behavior/#the-merge-function","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]}]},{"type":"element","tag":"code","props":{"code":"query listItems(\n filter: Filter, \n sort: String,\n limit: Number,\n offset: Number,\n): ItemList!\n\ninput Filter {\n name: String!\n type: String!\n}\n\ntype ItemList {\n items: [Item!]!\n totalCount: Int!\n}\n","language":"graphql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"query"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a704c0"},"children":[{"type":"text","value":"listItems"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"filter"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"Filter"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"sort"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"limit"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"Number"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"Number"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"): "}]},{"type":"element","tag":"span","props":{"class":"ct-a704c0"},"children":[{"type":"text","value":"ItemList"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"input"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-082859"},"children":[{"type":"text","value":"Filter"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-e81a6c"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-e81a6c"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-082859"},"children":[{"type":"text","value":"ItemList"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": ["}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"Item"}]},{"type":"element","tag":"span","props":{"class":"ct-e81a6c"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":"]"}]},{"type":"element","tag":"span","props":{"class":"ct-e81a6c"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"Int"}]},{"type":"element","tag":"span","props":{"class":"ct-e81a6c"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will setup "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"text","value":" with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"typePolicies"}]},{"type":"text","value":" to merge incoming data in cache:"}]},{"type":"element","tag":"code","props":{"code":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n // ...\n cache: new InMemoryCache({ typePolicies }),\n // ...\n});\n\nexport const typePolicies: TypePolicies = {\n Query: {\n fields: {\n // query name\n listItems: {\n // apollo will serialize and use keyArgs as unique\n // identifier in cache for every query\n // consider choosing the right fields, \n // i.e. limit and offset won't work here\n keyArgs: [\n 'sort', // primitive type\n 'filter', ['name', 'type'] // nested fields of `filter`\n ],\n merge: mergeItemsWithTotalCount,\n },\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"InMemoryCache"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14b519"},"children":[{"type":"text","value":"'@apollo/client'"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f7d317"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a79fb4"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a704c0"},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" cache: "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a704c0"},"children":[{"type":"text","value":"InMemoryCache"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"({ "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"typePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f7d317"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a79fb4"},"children":[{"type":"text","value":"typePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-65ec34"},"children":[{"type":"text","value":"TypePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" Query: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" fields: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// query name"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" listItems: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// apollo will serialize and use keyArgs as unique"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// identifier in cache for every query"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// consider choosing the right fields, "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// i.e. limit and offset won't work here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" keyArgs: ["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14b519"},"children":[{"type":"text","value":"'sort'"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// primitive type"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14b519"},"children":[{"type":"text","value":"'filter'"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":", ["}]},{"type":"element","tag":"span","props":{"class":"ct-14b519"},"children":[{"type":"text","value":"'name'"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-14b519"},"children":[{"type":"text","value":"'type'"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"] "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// nested fields of `filter`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" ],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" merge: "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will need merge function "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"text","value":", which will join results of query and cached data for specific key:"}]},{"type":"element","tag":"code","props":{"code":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n // no existing data\n if (!existing || !args?.offset || args.offset < existing.length) {\n return incoming || [];\n }\n\n // If hook was called multiple times\n if (existing?.items?.length && args?.offset < existing.items.length) {\n return existing || [];\n }\n\n // merge cache and incoming data\n const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n // apply latest result for totalCount\n const totalCount = incoming?.totalCount || existing?.totalCount;\n\n return {\n ...(incoming || existing || {}),\n items,\n totalCount,\n };\n };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"/** merges all sources with { items: unknown[], totalCount: number } */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e01c7c"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2475bf"},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e81a6c"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":", { "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-e01c7c"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// no existing data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"existing"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" [];"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// If hook was called multiple times"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"?."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" [];"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// merge cache and incoming data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f7d317"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a79fb4"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// apply latest result for totalCount"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f7d317"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a79fb4"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-2475bf{color:#D2A8FF}.ct-e01c7c{color:#FF7B72}.ct-65ec34{color:#FFA657}.ct-e7587d{color:#8B949E}.ct-a79fb4{color:#79C0FF}.ct-f7d317{color:#FF7B72}.ct-14b519{color:#A5D6FF}.ct-192d1f{color:#C9D1D9}.ct-e81a6c{color:#FF7B72}.ct-082859{color:#79C0FF}.ct-f83671{color:#79C0FF}.ct-56ec43{color:#FFA657}.ct-0a9f15{color:#C9D1D9}.ct-a704c0{color:#D2A8FF}.ct-3586e7{color:#C9D1D9}.ct-a8ff12{color:#FF7B72}.light .ct-a8ff12{color:#859900}.light .ct-3586e7{color:#657B83}.light .ct-a704c0{color:#268BD2}.light .ct-0a9f15{color:#657B83}.light .ct-56ec43{color:#657B83}.light .ct-f83671{color:#859900}.light .ct-082859{color:#859900}.light .ct-e81a6c{color:#859900}.light .ct-192d1f{color:#268BD2}.light .ct-14b519{color:#2AA198}.light .ct-f7d317{color:#073642}.light .ct-a79fb4{color:#268BD2}.light .ct-e7587d{color:#93A1A1}.light .ct-65ec34{color:#268BD2}.light .ct-e01c7c{color:#073642}.light .ct-2475bf{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:GraphQL:Apollo Client pagination.md","_source":"content","_file":"GraphQL/Apollo Client pagination.md","_extension":"md"},{"_path":"/graphql/refresh-token-in-apollo-client","_dir":"graphql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Refresh Token In Apollo Client","description":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client."}]},{"type":"element","tag":"code","props":{"code":"export const createApolloClient = (\n url: string,\n logout: () => void,\n getAuthorizationData: () => { authorization: string },\n refreshToken: () => Promise<\n { accessToken: string; refreshToken: string } | undefined\n >,\n) =>\n new ApolloClientBase({\n // ...other options\n link: ApolloLink.from([\n // ...other options\n setContext(async (_, { headers }) => {\n return {\n headers: {\n ...headers,\n ...getAuthorizationData(),\n },\n };\n }),\n new HttpLink({\n uri: url,\n fetch: fetchWithTokenRefresh(logout, refreshToken),\n }),\n ]),\n });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"export const createApolloClient = (\n url: string,\n logout: () => void,\n getAuthorizationData: () => { authorization: string },\n refreshToken: () => Promise<\n { accessToken: string; refreshToken: string } | undefined\n >,\n) =>\n new ApolloClientBase({\n // ...other options\n link: ApolloLink.from([\n // ...other options\n setContext(async (_, { headers }) => {\n return {\n headers: {\n ...headers,\n ...getAuthorizationData(),\n },\n };\n }),\n new HttpLink({\n uri: url,\n fetch: fetchWithTokenRefresh(logout, refreshToken),\n }),\n ]),\n });\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Custom fetch function for this request. You should tune "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"text","value":" and\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"text","value":" to match your api."}]},{"type":"element","tag":"code","props":{"code":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n Array.isArray(errors) &&\n errors.some(error => {\n return error.status === 401; // Distinguish unauthorized error here\n });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n try {\n const body = JSON.parse(options?.body as string);\n return body.operationName === 'RefreshToken';\n } catch (e) {\n return false;\n }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n (\n logout: () => void,\n refreshToken: () => Promise<\n { accessToken: string; refreshToken: string } | undefined\n >,\n ) =>\n async (uri: string, options: RequestInit): Promise => {\n // already refreshing token, wait for it and then use refreshed token\n // or use empty authorization if refreshing failed\n if (\n !isRefreshRequestOptions(options) &&\n refreshingPromise &&\n (options.headers as Record)?.authorization\n ) {\n const newAccessToken = await refreshingPromise\n .catch(() => {\n // refreshing token from other request failed, retry without authorization\n return '';\n });\n \n options.headers = {\n ...(options.headers || {}),\n authorization: newAccessToken,\n };\n }\n\n return fetch(uri, options).then(async response => {\n const text = await response.text();\n const json = JSON.parse(text);\n\n // check for unauthorized errors, if not present, just return result\n if (\n isRefreshRequestOptions(options) ||\n !json?.errors ||\n !Array.isArray(json.errors) ||\n !hasUnauthorizedError(json.errors)\n ) {\n return {\n ...response,\n ok: true,\n json: async () =>\n new Promise(resolve => {\n resolve(json);\n }),\n text: async () =>\n new Promise(resolve => {\n resolve(text);\n }),\n };\n }\n\n // If unauthorized, refresh token and try again\n if (!refreshingPromise) {\n refreshingPromise = refreshToken()\n .then(async (tokens): Promise => {\n refreshingPromise = null;\n\n if (!tokens?.accessToken) {\n throw new Error('Session expired');\n }\n\n return tokens?.accessToken;\n })\n .catch(() => {\n refreshingPromise = null;\n\n // can't refresh token. logging out\n logout();\n throw new Error('Session expired');\n });\n }\n\n // success or any non-auth error\n return refreshingPromise\n .then(async (newAccessToken: string) => {\n // wait for other request's refreshing query to finish, when retry\n\n return fetch(uri, {\n ...options,\n headers: {\n ...(options.headers || {}),\n authorization: newAccessToken,\n },\n });\n })\n .catch(async () => {\n // refreshing token from other request failed, retry without authorization\n\n return fetch(uri, {\n ...options,\n headers: {\n ...(options.headers || {}),\n authorization: '',\n },\n });\n });\n });\n };\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n Array.isArray(errors) &&\n errors.some(error => {\n return error.status === 401; // Distinguish unauthorized error here\n });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n try {\n const body = JSON.parse(options?.body as string);\n return body.operationName === 'RefreshToken';\n } catch (e) {\n return false;\n }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n (\n logout: () => void,\n refreshToken: () => Promise<\n { accessToken: string; refreshToken: string } | undefined\n >,\n ) =>\n async (uri: string, options: RequestInit): Promise => {\n // already refreshing token, wait for it and then use refreshed token\n // or use empty authorization if refreshing failed\n if (\n !isRefreshRequestOptions(options) &&\n refreshingPromise &&\n (options.headers as Record)?.authorization\n ) {\n const newAccessToken = await refreshingPromise\n .catch(() => {\n // refreshing token from other request failed, retry without authorization\n return '';\n });\n \n options.headers = {\n ...(options.headers || {}),\n authorization: newAccessToken,\n };\n }\n\n return fetch(uri, options).then(async response => {\n const text = await response.text();\n const json = JSON.parse(text);\n\n // check for unauthorized errors, if not present, just return result\n if (\n isRefreshRequestOptions(options) ||\n !json?.errors ||\n !Array.isArray(json.errors) ||\n !hasUnauthorizedError(json.errors)\n ) {\n return {\n ...response,\n ok: true,\n json: async () =>\n new Promise(resolve => {\n resolve(json);\n }),\n text: async () =>\n new Promise(resolve => {\n resolve(text);\n }),\n };\n }\n\n // If unauthorized, refresh token and try again\n if (!refreshingPromise) {\n refreshingPromise = refreshToken()\n .then(async (tokens): Promise => {\n refreshingPromise = null;\n\n if (!tokens?.accessToken) {\n throw new Error('Session expired');\n }\n\n return tokens?.accessToken;\n })\n .catch(() => {\n refreshingPromise = null;\n\n // can't refresh token. logging out\n logout();\n throw new Error('Session expired');\n });\n }\n\n // success or any non-auth error\n return refreshingPromise\n .then(async (newAccessToken: string) => {\n // wait for other request's refreshing query to finish, when retry\n\n return fetch(uri, {\n ...options,\n headers: {\n ...(options.headers || {}),\n authorization: newAccessToken,\n },\n });\n })\n .catch(async () => {\n // refreshing token from other request failed, retry without authorization\n\n return fetch(uri, {\n ...options,\n headers: {\n ...(options.headers || {}),\n authorization: '',\n },\n });\n });\n });\n };\n\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client."}]},{"type":"element","tag":"code","props":{"code":"export const createApolloClient = (\n url: string,\n logout: () => void,\n getAuthorizationData: () => { authorization: string },\n refreshToken: () => Promise<\n { accessToken: string; refreshToken: string } | undefined\n >,\n) =>\n new ApolloClientBase({\n // ...other options\n link: ApolloLink.from([\n // ...other options\n setContext(async (_, { headers }) => {\n return {\n headers: {\n ...headers,\n ...getAuthorizationData(),\n },\n };\n }),\n new HttpLink({\n uri: url,\n fetch: fetchWithTokenRefresh(logout, refreshToken),\n }),\n ]),\n });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"createApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"url"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6ef29e"},"children":[{"type":"text","value":"getAuthorizationData"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"authorization"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a6207a"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"<"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"undefined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" >,"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"ApolloClientBase"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// ...other options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" link: "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"ApolloLink"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"(["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// ...other options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6ef29e"},"children":[{"type":"text","value":"setContext"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"_"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":", { "}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"getAuthorizationData"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"HttpLink"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" uri: "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"url"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" fetch: "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"fetchWithTokenRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ]),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Custom fetch function for this request. You should tune "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"text","value":" and\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"text","value":" to match your api."}]},{"type":"element","tag":"code","props":{"code":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n Array.isArray(errors) &&\n errors.some(error => {\n return error.status === 401; // Distinguish unauthorized error here\n });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n try {\n const body = JSON.parse(options?.body as string);\n return body.operationName === 'RefreshToken';\n } catch (e) {\n return false;\n }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n (\n logout: () => void,\n refreshToken: () => Promise<\n { accessToken: string; refreshToken: string } | undefined\n >,\n ) =>\n async (uri: string, options: RequestInit): Promise => {\n // already refreshing token, wait for it and then use refreshed token\n // or use empty authorization if refreshing failed\n if (\n !isRefreshRequestOptions(options) &&\n refreshingPromise &&\n (options.headers as Record)?.authorization\n ) {\n const newAccessToken = await refreshingPromise\n .catch(() => {\n // refreshing token from other request failed, retry without authorization\n return '';\n });\n \n options.headers = {\n ...(options.headers || {}),\n authorization: newAccessToken,\n };\n }\n\n return fetch(uri, options).then(async response => {\n const text = await response.text();\n const json = JSON.parse(text);\n\n // check for unauthorized errors, if not present, just return result\n if (\n isRefreshRequestOptions(options) ||\n !json?.errors ||\n !Array.isArray(json.errors) ||\n !hasUnauthorizedError(json.errors)\n ) {\n return {\n ...response,\n ok: true,\n json: async () =>\n new Promise(resolve => {\n resolve(json);\n }),\n text: async () =>\n new Promise(resolve => {\n resolve(text);\n }),\n };\n }\n\n // If unauthorized, refresh token and try again\n if (!refreshingPromise) {\n refreshingPromise = refreshToken()\n .then(async (tokens): Promise => {\n refreshingPromise = null;\n\n if (!tokens?.accessToken) {\n throw new Error('Session expired');\n }\n\n return tokens?.accessToken;\n })\n .catch(() => {\n refreshingPromise = null;\n\n // can't refresh token. logging out\n logout();\n throw new Error('Session expired');\n });\n }\n\n // success or any non-auth error\n return refreshingPromise\n .then(async (newAccessToken: string) => {\n // wait for other request's refreshing query to finish, when retry\n\n return fetch(uri, {\n ...options,\n headers: {\n ...(options.headers || {}),\n authorization: newAccessToken,\n },\n });\n })\n .catch(async () => {\n // refreshing token from other request failed, retry without authorization\n\n return fetch(uri, {\n ...options,\n headers: {\n ...(options.headers || {}),\n authorization: '',\n },\n });\n });\n });\n };\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"/** Global singleton for refreshing promise */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a6207a"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db5c41"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"/** Checks if GraphQl errors has unauthenticated error */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6ef29e"},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c5470"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"<{ "}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"code"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c5470"},"children":[{"type":"text","value":"ErrorCode"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" }>)"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"isArray"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"some"}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"status"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afc978"},"children":[{"type":"text","value":"401"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// Distinguish unauthorized error here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"/** Detects if customFetch is sending refresh request */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6ef29e"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c5470"},"children":[{"type":"text","value":"RequestInit"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7561ef"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"operationName"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d171d6"},"children":[{"type":"text","value":"'RefreshToken'"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db5c41"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7561ef"},"children":[{"type":"text","value":"fetchWithTokenRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":": () "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":": () "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" { accessToken: "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db5c41"},"children":[{"type":"text","value":"undefined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ) "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c5470"},"children":[{"type":"text","value":"RequestInit"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c5470"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-7c5470"},"children":[{"type":"text","value":"Response"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// already refreshing token, wait for it and then use refreshed token"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// or use empty authorization if refreshing failed"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a6207a"},"children":[{"type":"text","value":"Record"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":">)?."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7561ef"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// refreshing token from other request failed, retry without authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d171d6"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"async"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7561ef"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7561ef"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// check for unauthorized errors, if not present, just return result"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"||"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"||"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ok: "}]},{"type":"element","tag":"span","props":{"class":"ct-db5c41"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"unknown"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":">("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":">("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// If unauthorized, refresh token and try again"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-6ef29e"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c5470"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db5c41"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-d171d6"},"children":[{"type":"text","value":"'Session expired'"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db5c41"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// can't refresh token. logging out"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-d171d6"},"children":[{"type":"text","value":"'Session expired'"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// success or any non-auth error"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-6ef29e"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// wait for other request's refreshing query to finish, when retry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// refreshing token from other request failed, retry without authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-d171d6"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-d171d6{color:#A5D6FF}.ct-7561ef{color:#79C0FF}.ct-afc978{color:#79C0FF}.ct-7c5470{color:#FFA657}.ct-db5c41{color:#79C0FF}.ct-936d89{color:#C9D1D9}.ct-8f9c91{color:#8B949E}.ct-a6207a{color:#FFA657}.ct-824036{color:#FF7B72}.ct-6ef29e{color:#D2A8FF}.ct-8aeb6e{color:#79C0FF}.ct-a7487c{color:#79C0FF}.ct-74e54e{color:#FF7B72}.ct-859173{color:#FFA657}.ct-c1c1d0{color:#C9D1D9}.ct-d62d0f{color:#D2A8FF}.ct-51f5f2{color:#FF7B72}.ct-40f337{color:#C9D1D9}.ct-633375{color:#FF7B72}.light .ct-633375{color:#859900}.light .ct-40f337{color:#657B83}.light .ct-51f5f2{color:#073642}.light .ct-d62d0f{color:#268BD2}.light .ct-c1c1d0{color:#657B83}.light .ct-859173{color:#657B83}.light .ct-74e54e{color:#859900}.light .ct-a7487c{color:#859900}.light .ct-8aeb6e{color:#859900}.light .ct-6ef29e{color:#268BD2}.light .ct-824036{color:#073642}.light .ct-a6207a{color:#268BD2}.light .ct-8f9c91{color:#93A1A1}.light .ct-936d89{color:#268BD2}.light .ct-db5c41{color:#B58900}.light .ct-7c5470{color:#268BD2}.light .ct-afc978{color:#D33682}.light .ct-7561ef{color:#268BD2}.light .ct-d171d6{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:GraphQL:Refresh token in Apollo client.md","_source":"content","_file":"GraphQL/Refresh token in Apollo client.md","_extension":"md"},{"_path":"/linux/gitea-for-git-hosting","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Gitea For Git Hosting","description":"Self-hosted #git repositories with gitea and #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Self-hosted #git repositories with "},{"type":"element","tag":"a","props":{"href":"https://gitea.io/ru-ru/","rel":["nofollow"]},"children":[{"type":"text","value":"gitea"}]},{"type":"text","value":" and #docker."}]},{"type":"element","tag":"h2","props":{"id":"setting-up-with-docker-compose"},"children":[{"type":"text","value":"Setting up with docker-compose"}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nnetworks:\n gitea:\n external: false\nservices:\n server:\n image: gitea/gitea:latest\n container_name: gitea\n environment:\n - USER_UID=1000\n - USER_GID=1000\n restart: always\n networks:\n - gitea\n volumes:\n - ./var/lib/gitea:/data\n - ./etc/gitea:/etc/gitea\n - /etc/timezone:/etc/timezone:ro\n - /etc/localtime:/etc/localtime:ro\n ports:\n - \"3000:3000\"\n - \"222:22\"\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nnetworks:\n gitea:\n external: false\nservices:\n server:\n image: gitea/gitea:latest\n container_name: gitea\n environment:\n - USER_UID=1000\n - USER_GID=1000\n restart: always\n networks:\n - gitea\n volumes:\n - ./var/lib/gitea:/data\n - ./etc/gitea:/etc/gitea\n - /etc/timezone:/etc/timezone:ro\n - /etc/localtime:/etc/localtime:ro\n ports:\n - \"3000:3000\"\n - \"222:22\"\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Self-hosted #git repositories with "},{"type":"element","tag":"a","props":{"href":"https://gitea.io/ru-ru/","rel":["nofollow"]},"children":[{"type":"text","value":"gitea"}]},{"type":"text","value":" and #docker."}]},{"type":"element","tag":"h2","props":{"id":"setting-up-with-docker-compose"},"children":[{"type":"text","value":"Setting up with docker-compose"}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nnetworks:\n gitea:\n external: false\nservices:\n server:\n image: gitea/gitea:latest\n container_name: gitea\n environment:\n - USER_UID=1000\n - USER_GID=1000\n restart: always\n networks:\n - gitea\n volumes:\n - ./var/lib/gitea:/data\n - ./etc/gitea:/etc/gitea\n - /etc/timezone:/etc/timezone:ro\n - /etc/localtime:/etc/localtime:ro\n ports:\n - \"3000:3000\"\n - \"222:22\"\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"networks"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"gitea"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"external"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b5d663"},"children":[{"type":"text","value":"false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"gitea/gitea:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"USER_UID=1000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"USER_GID=1000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"networks"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"./var/lib/gitea:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"./etc/gitea:/etc/gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"/etc/timezone:/etc/timezone:ro"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"/etc/localtime:/etc/localtime:ro"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"\"3000:3000\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"\"222:22\""}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-b5d663{color:#79C0FF}.ct-385a1d{color:#A5D6FF}.ct-1fc9a0{color:#C9D1D9}.ct-d9b4de{color:#7EE787}.light .ct-d9b4de{color:#268BD2}.light .ct-1fc9a0{color:#657B83}.light .ct-385a1d{color:#2AA198}.light .ct-b5d663{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"setting-up-with-docker-compose","depth":2,"text":"Setting up with docker-compose"}]}},"_type":"markdown","_id":"content:Linux:Gitea for git hosting.md","_source":"content","_file":"Linux/Gitea for git hosting.md","_extension":"md"},{"_path":"/linux/google-photos-alternative-with-photoprism","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Google Photos Alternative With Photoprism","description":"Photo Prism is a free alternative to Google photos, can be set up with #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://photoprism.app/","rel":["nofollow"]},"children":[{"type":"text","value":"Photo Prism"}]},{"type":"text","value":" is a free alternative to Google photos, can be set up with #docker."}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-to-run-it"},"children":[{"type":"text","value":"Docker compose file to run it"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Check out current "},{"type":"element","tag":"a","props":{"href":"https://dl.photoprism.app/docker/docker-compose.yml","rel":["nofollow"]},"children":[{"type":"text","value":"example"}]},{"type":"text","value":" at photoprism's "},{"type":"element","tag":"a","props":{"href":"https://docs.photoprism.app/getting-started/docker-compose/","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: '3.5'\n\nservices:\n photoprism:\n container_name: photoprism__app\n image: photoprism/photoprism:latest\n depends_on:\n - mariadb\n restart: unless-stopped\n security_opt:\n - seccomp:unconfined\n - apparmor:unconfined\n ports:\n - 2342:2342 # HTTP port (host:container)\n environment:\n PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n PHOTOPRISM_SITE_URL: \"https://service.url/\"\n PHOTOPRISM_ORIGINALS_LIMIT: 5000\n PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n PHOTOPRISM_DEBUG: \"false\" \n PHOTOPRISM_PUBLIC: \"false\" \n PHOTOPRISM_READONLY: \"false\" \n PHOTOPRISM_EXPERIMENTAL: \"false\"\n PHOTOPRISM_DISABLE_CHOWN: \"false\"\n PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n PHOTOPRISM_DISABLE_FACES: \"false\" \n PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n PHOTOPRISM_DARKTABLE_PRESETS: \"false\" \n PHOTOPRISM_DETECT_NSFW: \"false\" \n PHOTOPRISM_UPLOAD_NSFW: \"true\" \n PHOTOPRISM_DATABASE_DRIVER: \"mysql\" \n PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n PHOTOPRISM_DATABASE_NAME: \"photoprism\" \n PHOTOPRISM_DATABASE_USER: \"root\" \n PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: '3.5'\n\nservices:\n photoprism:\n container_name: photoprism__app\n image: photoprism/photoprism:latest\n depends_on:\n - mariadb\n restart: unless-stopped\n security_opt:\n - seccomp:unconfined\n - apparmor:unconfined\n ports:\n - 2342:2342 # HTTP port (host:container)\n environment:\n PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n PHOTOPRISM_SITE_URL: \"https://service.url/\"\n PHOTOPRISM_ORIGINALS_LIMIT: 5000\n PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n PHOTOPRISM_DEBUG: \"false\" \n PHOTOPRISM_PUBLIC: \"false\" \n PHOTOPRISM_READONLY: \"false\" \n PHOTOPRISM_EXPERIMENTAL: \"false\"\n PHOTOPRISM_DISABLE_CHOWN: \"false\"\n PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n PHOTOPRISM_DISABLE_FACES: \"false\" \n PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n PHOTOPRISM_DARKTABLE_PRESETS: \"false\" \n PHOTOPRISM_DETECT_NSFW: \"false\" \n PHOTOPRISM_UPLOAD_NSFW: \"true\" \n PHOTOPRISM_DATABASE_DRIVER: \"mysql\" \n PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n PHOTOPRISM_DATABASE_NAME: \"photoprism\" \n PHOTOPRISM_DATABASE_USER: \"root\" \n PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://photoprism.app/","rel":["nofollow"]},"children":[{"type":"text","value":"Photo Prism"}]},{"type":"text","value":" is a free alternative to Google photos, can be set up with #docker."}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-to-run-it"},"children":[{"type":"text","value":"Docker compose file to run it"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Check out current "},{"type":"element","tag":"a","props":{"href":"https://dl.photoprism.app/docker/docker-compose.yml","rel":["nofollow"]},"children":[{"type":"text","value":"example"}]},{"type":"text","value":" at photoprism's "},{"type":"element","tag":"a","props":{"href":"https://docs.photoprism.app/getting-started/docker-compose/","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: '3.5'\n\nservices:\n photoprism:\n container_name: photoprism__app\n image: photoprism/photoprism:latest\n depends_on:\n - mariadb\n restart: unless-stopped\n security_opt:\n - seccomp:unconfined\n - apparmor:unconfined\n ports:\n - 2342:2342 # HTTP port (host:container)\n environment:\n PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n PHOTOPRISM_SITE_URL: \"https://service.url/\"\n PHOTOPRISM_ORIGINALS_LIMIT: 5000\n PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n PHOTOPRISM_DEBUG: \"false\" \n PHOTOPRISM_PUBLIC: \"false\" \n PHOTOPRISM_READONLY: \"false\" \n PHOTOPRISM_EXPERIMENTAL: \"false\"\n PHOTOPRISM_DISABLE_CHOWN: \"false\"\n PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n PHOTOPRISM_DISABLE_FACES: \"false\" \n PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n PHOTOPRISM_DARKTABLE_PRESETS: \"false\" \n PHOTOPRISM_DETECT_NSFW: \"false\" \n PHOTOPRISM_UPLOAD_NSFW: \"true\" \n PHOTOPRISM_DATABASE_DRIVER: \"mysql\" \n PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n PHOTOPRISM_DATABASE_NAME: \"photoprism\" \n PHOTOPRISM_DATABASE_USER: \"root\" \n PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"'3.5'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"photoprism"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"photoprism__app"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"photoprism/photoprism:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"depends_on"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"mariadb"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"unless-stopped"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"security_opt"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"seccomp:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"apparmor:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"2342:2342"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2164ab"},"children":[{"type":"text","value":"# HTTP port (host:container)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_ADMIN_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"password\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"https://service.url/\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_ORIGINALS_LIMIT"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-981ffc"},"children":[{"type":"text","value":"5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_HTTP_COMPRESSION"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"gzip\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DEBUG"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_PUBLIC"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_READONLY"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_EXPERIMENTAL"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_CHOWN"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_WEBDAV"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_SETTINGS"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_TENSORFLOW"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_FACES"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_CLASSIFICATION"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DARKTABLE_PRESETS"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DETECT_NSFW"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_UPLOAD_NSFW"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"true\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_DRIVER"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"mysql\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_SERVER"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"mariadb:3306\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_NAME"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"photoprism\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_USER"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"root\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"insecure\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_TITLE"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"PhotoPrism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_CAPTION"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"Browse Your Life\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_DESCRIPTION"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_AUTHOR"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"HOME"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"/photoprism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"working_dir"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"/photoprism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"./data/originals:/photoprism/originals\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"./data/imports:/photoprism/import\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"./data/storage:/photoprism/storage\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"mariadb"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"photoprism__db"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"unless-stopped"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"mariadb:10.6"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"security_opt"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"seccomp:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"apparmor:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"./database:/var/lib/mysql\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2164ab"},"children":[{"type":"text","value":"# Important, don't remove"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"MYSQL_ROOT_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"insecure"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"MYSQL_DATABASE"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"photoprism"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"MYSQL_USER"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"photoprism"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"MYSQL_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"insecure"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-981ffc{color:#79C0FF}.ct-2164ab{color:#8B949E}.ct-8e1c2e{color:#A5D6FF}.ct-3b7f9c{color:#C9D1D9}.ct-dba52a{color:#7EE787}.light .ct-dba52a{color:#268BD2}.light .ct-3b7f9c{color:#657B83}.light .ct-8e1c2e{color:#2AA198}.light .ct-2164ab{color:#93A1A1}.light .ct-981ffc{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"docker-compose-file-to-run-it","depth":2,"text":"Docker compose file to run it"}]}},"_type":"markdown","_id":"content:Linux:Google photos alternative with Photoprism.md","_source":"content","_file":"Linux/Google photos alternative with Photoprism.md","_extension":"md"},{"_path":"/linux/resume-or-start-screen-session","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Resume Or Start Screen Session","description":"Running this script will enter currently running screen session or will start new one.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Running this script will enter currently running "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"screen"}]},{"type":"text","value":" session or will start new one."}]},{"type":"element","tag":"code","props":{"code":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Running this script will enter currently running "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"screen"}]},{"type":"text","value":" session or will start new one."}]},{"type":"element","tag":"code","props":{"code":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac822e"},"children":[{"type":"text","value":"( screen -r bash "}]},{"type":"element","tag":"span","props":{"class":"ct-35a9ce"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-ac822e"},"children":[{"type":"text","value":" ( screen -d bash "}]},{"type":"element","tag":"span","props":{"class":"ct-35a9ce"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-ac822e"},"children":[{"type":"text","value":" screen -r bash "}]},{"type":"element","tag":"span","props":{"class":"ct-35a9ce"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-ac822e"},"children":[{"type":"text","value":" screen -SAm bash bash ) )"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-35a9ce{color:#FF7B72}.ct-ac822e{color:#C9D1D9}.light .ct-ac822e{color:#657B83}.light .ct-35a9ce{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Linux:Resume or start screen session.md","_source":"content","_file":"Linux/Resume or start screen session.md","_extension":"md"},{"_path":"/linux/rsync-file-with-ssh","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Rsync File With SSH","description":"Downloads file from #SSH with rsync and puts it in current folder.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Downloads file from #SSH with rsync and puts it in current folder."}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n \"$DEST_PATH\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n \"$DEST_PATH\"\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Downloads file from #SSH with rsync and puts it in current folder."}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n \"$DEST_PATH\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ef439a"},"children":[{"type":"text","value":"#!/bin/bash"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":"PORT=22"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":"USER=user"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":"HOST=example.com"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":"REMOTE_PATH=/tmp"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":"REMOTE_FILE=sample.text"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":"DEST_PATH=./"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":"rsync -a -e "}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"\"ssh -p "}]},{"type":"element","tag":"span","props":{"class":"ct-f4aa73"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-604d9c"},"children":[{"type":"text","value":"PORT"}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":" -P -v \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-f4aa73"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-604d9c"},"children":[{"type":"text","value":"USER"}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"@"}]},{"type":"element","tag":"span","props":{"class":"ct-f4aa73"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-604d9c"},"children":[{"type":"text","value":"HOST"}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-f4aa73"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-604d9c"},"children":[{"type":"text","value":"REMOTE_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-f4aa73"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-604d9c"},"children":[{"type":"text","value":"REMOTE_FILE"}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-f4aa73"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-604d9c"},"children":[{"type":"text","value":"DEST_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"\""}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-604d9c{color:#C9D1D9}.ct-f4aa73{color:#C9D1D9}.ct-e38ba3{color:#A5D6FF}.ct-952492{color:#C9D1D9}.ct-ef439a{color:#8B949E}.light .ct-ef439a{color:#93A1A1}.light .ct-952492{color:#657B83}.light .ct-e38ba3{color:#2AA198}.light .ct-f4aa73{color:#859900}.light .ct-604d9c{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Linux:Rsync file with SSH.md","_source":"content","_file":"Linux/Rsync file with SSH.md","_extension":"md"},{"_path":"/linux/setting-up-nginx","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Setting Up NGINX","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"fallback-url-for-spa-s"},"children":[{"type":"text","value":"Fallback url for SPA-s"}]},{"type":"element","tag":"code","props":{"code":"server {\n # ...\n location / {\n # First attempt to serve request as file, then\n # as directory, then fall back to displaying a 404.\n try_files $uri $uri/ =404;\n }\n # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n # ...\n location / {\n # First attempt to serve request as file, then\n # as directory, then fall back to displaying a 404.\n try_files $uri $uri/ =404;\n }\n # ...\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-up-for-uploads"},"children":[{"type":"text","value":"Set up for uploads"}]},{"type":"element","tag":"code","props":{"code":"server {\n # ...\n client_max_body_size 200M;\n # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n # ...\n client_max_body_size 200M;\n # ...\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"reverse-proxy-for-https"},"children":[{"type":"text","value":"Reverse proxy for https"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Given config forwards "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https"}]},{"type":"text","value":" traffic to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"http"}]},{"type":"text","value":" on port "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"8080"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"https://next.vault48.org","rel":["nofollow"]},"children":[{"type":"text","value":"https://next.vault48.org"}]},{"type":"text","value":"\nwith http2 support if possible."}]},{"type":"element","tag":"code","props":{"code":"server {\n listen 80;\n server_name next.vault48.org;\n return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n listen 443 ssl http2;\n listen [::]:443 ssl http2;\n \n # managed by Certbot\n ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n \n server_name next.vault48.org;\n \n location / {\n proxy_redirect off;\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n \n proxy_pass http://127.0.0.1:8080;\n }\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n listen 80;\n server_name next.vault48.org;\n return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n listen 443 ssl http2;\n listen [::]:443 ssl http2;\n \n # managed by Certbot\n ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n \n server_name next.vault48.org;\n \n location / {\n proxy_redirect off;\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n \n proxy_pass http://127.0.0.1:8080;\n }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"fallback-url-for-spa-s"},"children":[{"type":"text","value":"Fallback url for SPA-s"}]},{"type":"element","tag":"code","props":{"code":"server {\n # ...\n location / {\n # First attempt to serve request as file, then\n # as directory, then fall back to displaying a 404.\n try_files $uri $uri/ =404;\n }\n # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-25ac06"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-664979"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-833e46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1d8091"},"children":[{"type":"text","value":"location"}]},{"type":"element","tag":"span","props":{"class":"ct-833e46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3285a1"},"children":[{"type":"text","value":"/ "}]},{"type":"element","tag":"span","props":{"class":"ct-833e46"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-664979"},"children":[{"type":"text","value":"# First attempt to serve request as file, then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-664979"},"children":[{"type":"text","value":"# as directory, then fall back to displaying a 404."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-98243f"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-664979"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-up-for-uploads"},"children":[{"type":"text","value":"Set up for uploads"}]},{"type":"element","tag":"code","props":{"code":"server {\n # ...\n client_max_body_size 200M;\n # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-25ac06"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-664979"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" client_max_body_size "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"200M;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-664979"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"reverse-proxy-for-https"},"children":[{"type":"text","value":"Reverse proxy for https"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Given config forwards "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https"}]},{"type":"text","value":" traffic to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"http"}]},{"type":"text","value":" on port "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"8080"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"https://next.vault48.org","rel":["nofollow"]},"children":[{"type":"text","value":"https://next.vault48.org"}]},{"type":"text","value":"\nwith http2 support if possible."}]},{"type":"element","tag":"code","props":{"code":"server {\n listen 80;\n server_name next.vault48.org;\n return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n listen 443 ssl http2;\n listen [::]:443 ssl http2;\n \n # managed by Certbot\n ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n \n server_name next.vault48.org;\n \n location / {\n proxy_redirect off;\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n \n proxy_pass http://127.0.0.1:8080;\n }\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-25ac06"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"80;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" server_name "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"next.vault48.org;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a384e4"},"children":[{"type":"text","value":"301"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" https://next.vault48.org"}]},{"type":"element","tag":"span","props":{"class":"ct-f5033a"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-b94b63"},"children":[{"type":"text","value":"request_uri"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-25ac06"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"443 ssl http2;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"[::]:443 ssl http2;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-664979"},"children":[{"type":"text","value":"# managed by Certbot"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" ssl_certificate "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/fullchain.pem; "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" ssl_certificate_key "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/privkey.pem; "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" ssl_trusted_certificate "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/chain.pem;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" server_name "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"next.vault48.org;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-833e46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1d8091"},"children":[{"type":"text","value":"location"}]},{"type":"element","tag":"span","props":{"class":"ct-833e46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3285a1"},"children":[{"type":"text","value":"/ "}]},{"type":"element","tag":"span","props":{"class":"ct-833e46"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" proxy_redirect "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"off;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"Host "}]},{"type":"element","tag":"span","props":{"class":"ct-f5033a"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-b94b63"},"children":[{"type":"text","value":"host"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"X-Real-IP "}]},{"type":"element","tag":"span","props":{"class":"ct-f5033a"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-b94b63"},"children":[{"type":"text","value":"remote_addr"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"X-Forwarded-For "}]},{"type":"element","tag":"span","props":{"class":"ct-f5033a"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-b94b63"},"children":[{"type":"text","value":"proxy_add_x_forwarded_for"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" proxy_pass "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"http://127.0.0.1:8080;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-b94b63{color:#C9D1D9}.ct-f5033a{color:#C9D1D9}.ct-a384e4{color:#79C0FF}.ct-14047d{color:#FF7B72}.ct-98243f{color:#FF7B72}.ct-3285a1{color:#FFA657}.ct-1d8091{color:#FF7B72}.ct-833e46{color:#C9D1D9}.ct-664979{color:#8B949E}.ct-ca6963{color:#C9D1D9}.ct-25ac06{color:#FF7B72}.light .ct-25ac06{color:#073642}.light .ct-ca6963{color:#657B83}.light .ct-664979{color:#93A1A1}.light .ct-833e46{color:#657B83}.light .ct-1d8091{color:#073642}.light .ct-3285a1{color:#657B83}.light .ct-98243f{color:#657B83}.light .ct-14047d{color:#859900}.light .ct-a384e4{color:#D33682}.light .ct-f5033a{color:#859900}.light .ct-b94b63{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"fallback-url-for-spa-s","depth":2,"text":"Fallback url for SPA-s"},{"id":"set-up-for-uploads","depth":2,"text":"Set up for uploads"},{"id":"reverse-proxy-for-https","depth":2,"text":"Reverse proxy for https"}]}},"_type":"markdown","_id":"content:Linux:Setting up NGINX.md","_source":"content","_file":"Linux/Setting up NGINX.md","_extension":"md"},{"_path":"/linux/ssh","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"SSH","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"config-aliases-for-ssh-hosts"},"children":[{"type":"text","value":"Config aliases for #SSH hosts"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"#SSH config can be used to made aliases for different hosts. Should be put at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.ssh/config"}]},{"type":"text","value":". To simply call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ssh router"}]},{"type":"text","value":" without parameters, use this:"}]},{"type":"element","tag":"code","props":{"code":"Host router\n HostName 192.168.0.1\n IdentityFile ~/.ssh/id_rsa\n User root\n Port 22522\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"Host router\n HostName 192.168.0.1\n IdentityFile ~/.ssh/id_rsa\n User root\n Port 22522\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"config-aliases-for-ssh-hosts"},"children":[{"type":"text","value":"Config aliases for #SSH hosts"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"#SSH config can be used to made aliases for different hosts. Should be put at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.ssh/config"}]},{"type":"text","value":". To simply call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ssh router"}]},{"type":"text","value":" without parameters, use this:"}]},{"type":"element","tag":"code","props":{"code":"Host router\n HostName 192.168.0.1\n IdentityFile ~/.ssh/id_rsa\n User root\n Port 22522\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Host router\n HostName 192.168.0.1\n IdentityFile ~/.ssh/id_rsa\n User root\n Port 22522"}]}]}]}]}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"config-aliases-for-ssh-hosts","depth":2,"text":"Config aliases for #SSH hosts"}]}},"_type":"markdown","_id":"content:Linux:SSH.md","_source":"content","_file":"Linux/SSH.md","_extension":"md"},{"_path":"/sql/mysql-and-mariadb-setup","_dir":"sql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"MySQL And MariaDB Setup","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-mariadb-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install MariaDB on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"access-database-from-outside"},"children":[{"type":"text","value":"Access Database from outside"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Open "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/mysql/mariadb.conf.d/50-server.cnf"}]},{"type":"text","value":" and change the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"bind-address"}]},{"type":"text","value":" to:"}]},{"type":"element","tag":"code","props":{"code":"...\nbind-address = 0.0.0.0\n...\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"...\nbind-address = 0.0.0.0\n...\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"create-administrative-user"},"children":[{"type":"text","value":"Create Administrative User"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Create a new user "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"newuser"}]},{"type":"text","value":" for the host "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"localhost"}]},{"type":"text","value":" with a new "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"password"}]},{"type":"text","value":":"}]}]},{"type":"element","tag":"code","props":{"code":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n"}]}]}]},{"type":"element","tag":"ol","props":{"start":2},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Grant all permissions to the new user"}]}]},{"type":"element","tag":"code","props":{"code":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n"}]}]}]},{"type":"element","tag":"ol","props":{"start":3},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Update permissions"}]}]},{"type":"element","tag":"code","props":{"code":"FLUSH PRIVILEGES;\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"FLUSH PRIVILEGES;\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-mariadb-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install MariaDB on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-39acdd"},"children":[{"type":"text","value":"sudo apt update"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-39acdd"},"children":[{"type":"text","value":"sudo apt install mariadb-server"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-39acdd"},"children":[{"type":"text","value":"sudo mysql_secure_installation"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"access-database-from-outside"},"children":[{"type":"text","value":"Access Database from outside"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Open "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/mysql/mariadb.conf.d/50-server.cnf"}]},{"type":"text","value":" and change the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"bind-address"}]},{"type":"text","value":" to:"}]},{"type":"element","tag":"code","props":{"code":"...\nbind-address = 0.0.0.0\n...\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-39acdd"},"children":[{"type":"text","value":"..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-39acdd"},"children":[{"type":"text","value":"bind-"}]},{"type":"element","tag":"span","props":{"class":"ct-18d6eb"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-39acdd"},"children":[{"type":"text","value":" = 0.0.0.0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-39acdd"},"children":[{"type":"text","value":"..."}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"create-administrative-user"},"children":[{"type":"text","value":"Create Administrative User"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Create a new user "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"newuser"}]},{"type":"text","value":" for the host "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"localhost"}]},{"type":"text","value":" with a new "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"password"}]},{"type":"text","value":":"}]}]},{"type":"element","tag":"code","props":{"code":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';"}]}]}]}]}]},{"type":"element","tag":"ol","props":{"start":2},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Grant all permissions to the new user"}]}]},{"type":"element","tag":"code","props":{"code":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';"}]}]}]}]}]},{"type":"element","tag":"ol","props":{"start":3},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Update permissions"}]}]},{"type":"element","tag":"code","props":{"code":"FLUSH PRIVILEGES;\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"FLUSH PRIVILEGES;"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-18d6eb{color:#FF7B72}.ct-39acdd{color:#C9D1D9}.light .ct-39acdd{color:#657B83}.light .ct-18d6eb{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"install-mariadb-on-ubuntu-2004-lts","depth":2,"text":"Install MariaDB on Ubuntu 20.04 LTS"},{"id":"access-database-from-outside","depth":2,"text":"Access Database from outside"},{"id":"create-administrative-user","depth":2,"text":"Create Administrative User"}]}},"_type":"markdown","_id":"content:SQL:MySQL and MariaDB setup.md","_source":"content","_file":"SQL/MySQL and MariaDB setup.md","_extension":"md"},{"_path":"/sql/postgress-setup","_dir":"sql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Postgress Setup","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-postgresql-12-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"initial-database-connection"},"children":[{"type":"text","value":"Initial database connection"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A local connection (from the database server) can be done by the following command:"}]},{"type":"element","tag":"code","props":{"code":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-password-for-postgres-database-user"},"children":[{"type":"text","value":"Set password for postgres database user"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The password for the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user can be set the the quick command "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"\\password"}]},{"type":"text","value":"\nor by "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"alter user postgres password 'Supersecret'"}]},{"type":"text","value":". A connection using the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" user\nis still not possible from the \"outside\" hence to the default settings in the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password"},"children":[{"type":"text","value":"Update pg_hba.conf to allow postgres user connections with password"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to allow connections of the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user not using OS user\nauthentication, you have to update the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":" which can be found under\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/postgresql/12/main/pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal all postgres peer\n...\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal all postgres peer\n...\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change the last section of the above line to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"md5"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"local all postgres md5\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"local all postgres md5\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A restart is required in order to apply the new configuration:"}]},{"type":"element","tag":"code","props":{"code":"sudo systemctl restart postgresql\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo systemctl restart postgresql\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now a connection from outside the database host is possible e.g."}]},{"type":"element","tag":"code","props":{"code":"psql -U postgres -d postgres -h databasehostname\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"psql -U postgres -d postgres -h databasehostname\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-database-users"},"children":[{"type":"text","value":"Creation of additional database users"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A database user can be created by the following command:"}]},{"type":"element","tag":"code","props":{"code":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n List of roles\n Role name | Attributes | Member of\n-----------+------------------------------------------------------------+-----------\n myuser | | {}\n postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n List of roles\n Role name | Attributes | Member of\n-----------+------------------------------------------------------------+-----------\n myuser | | {}\n postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-databases"},"children":[{"type":"text","value":"Creation of additional databases"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"One can create new Postgres databases within an instance. Therefore you can use the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"psql"}]},{"type":"text","value":"\ncommand to login (see above)."}]},{"type":"element","tag":"code","props":{"code":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n List of databases\n Name | Owner | Encoding | Collate | Ctype | Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname | myuser | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres\n template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n List of databases\n Name | Owner | Encoding | Collate | Ctype | Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname | myuser | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres\n template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You can leave the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"OWNER"}]},{"type":"text","value":" section of the command, when doing so, the current user will become\nowner of the newly created database."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To change the owner of an existing database later, you can use the following command:"}]},{"type":"element","tag":"code","props":{"code":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-postgresql-12-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"sudo apt update"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"sudo apt install -y postgresql postgresql-contrib postgresql-client"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"sudo systemctl status postgresql.service"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"initial-database-connection"},"children":[{"type":"text","value":"Initial database connection"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A local connection (from the database server) can be done by the following command:"}]},{"type":"element","tag":"code","props":{"code":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"sudo -u postgres psql"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"psql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"Type "}]},{"type":"element","tag":"span","props":{"class":"ct-c12bff"},"children":[{"type":"text","value":"\"help\""}]},{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5ec62d"},"children":[{"type":"text","value":"for"}]},{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":" help."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"postgres="}]},{"type":"element","tag":"span","props":{"class":"ct-0949e9"},"children":[{"type":"text","value":"#"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-password-for-postgres-database-user"},"children":[{"type":"text","value":"Set password for postgres database user"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The password for the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user can be set the the quick command "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"\\password"}]},{"type":"text","value":"\nor by "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"alter user postgres password 'Supersecret'"}]},{"type":"text","value":". A connection using the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" user\nis still not possible from the \"outside\" hence to the default settings in the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password"},"children":[{"type":"text","value":"Update pg_hba.conf to allow postgres user connections with password"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to allow connections of the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user not using OS user\nauthentication, you have to update the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":" which can be found under\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/postgresql/12/main/pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal all postgres peer\n...\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"sudo vi /etc/postgresql/12/main/pg_hba.conf"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ddaa35"},"children":[{"type":"text","value":"local"}]},{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":" all postgres peer"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"..."}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change the last section of the above line to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"md5"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"local all postgres md5\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"local all postgres md5"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A restart is required in order to apply the new configuration:"}]},{"type":"element","tag":"code","props":{"code":"sudo systemctl restart postgresql\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"sudo systemctl restart postgresql"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now a connection from outside the database host is possible e.g."}]},{"type":"element","tag":"code","props":{"code":"psql -U postgres -d postgres -h databasehostname\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"psql -U postgres -d postgres -h databasehostname"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-database-users"},"children":[{"type":"text","value":"Creation of additional database users"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A database user can be created by the following command:"}]},{"type":"element","tag":"code","props":{"code":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n List of roles\n Role name | Attributes | Member of\n-----------+------------------------------------------------------------+-----------\n myuser | | {}\n postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n List of roles\n Role name | Attributes | Member of\n-----------+------------------------------------------------------------+-----------\n myuser | | {}\n postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-databases"},"children":[{"type":"text","value":"Creation of additional databases"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"One can create new Postgres databases within an instance. Therefore you can use the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"psql"}]},{"type":"text","value":"\ncommand to login (see above)."}]},{"type":"element","tag":"code","props":{"code":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n List of databases\n Name | Owner | Encoding | Collate | Ctype | Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname | myuser | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres\n template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n List of databases\n Name | Owner | Encoding | Collate | Ctype | Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname | myuser | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres\n template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You can leave the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"OWNER"}]},{"type":"text","value":" section of the command, when doing so, the current user will become\nowner of the newly created database."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To change the owner of an existing database later, you can use the following command:"}]},{"type":"element","tag":"code","props":{"code":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-ddaa35{color:#FF7B72}.ct-0949e9{color:#8B949E}.ct-5ec62d{color:#FF7B72}.ct-c12bff{color:#A5D6FF}.ct-559254{color:#C9D1D9}.light .ct-559254{color:#657B83}.light .ct-c12bff{color:#2AA198}.light .ct-5ec62d{color:#859900}.light .ct-0949e9{color:#93A1A1}.light .ct-ddaa35{color:#073642}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"install-postgresql-12-on-ubuntu-2004-lts","depth":2,"text":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"},{"id":"initial-database-connection","depth":2,"text":"Initial database connection"},{"id":"set-password-for-postgres-database-user","depth":2,"text":"Set password for postgres database user","children":[{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password","depth":3,"text":"Update pg_hba.conf to allow postgres user connections with password"}]},{"id":"creation-of-additional-database-users","depth":2,"text":"Creation of additional database users"},{"id":"creation-of-additional-databases","depth":2,"text":"Creation of additional databases"}]}},"_type":"markdown","_id":"content:SQL:Postgress setup.md","_source":"content","_file":"SQL/Postgress setup.md","_extension":"md"},{"_path":"/typescript/add-global-variable-to-window","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Add Global Variable To Window","description":"Sometimes you want to add global variable to your window. That thing's called global module augmentation.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you want to add global variable to your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":". That thing's called "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"global module augmentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say you need to call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.doFancyThings()"}]},{"type":"text","value":". For that you should augment global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" interface in "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"*.d.ts"}]},{"type":"text","value":" file:"}]},{"type":"element","tag":"code","props":{"code":"declare global {\n interface Window {\n doFancyThings: () => void;\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"declare global {\n interface Window {\n doFancyThings: () => void;\n }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is useful for declaring global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.ethereum"}]},{"type":"text","value":" (or "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.web3"}]},{"type":"text","value":") in "},{"type":"element","tag":"a","props":{"href":"/blockchain/Common%20typescript%20examples"},"children":[{"type":"text","value":"blockchain"}]},{"type":"text","value":" projects with typescript, which use wallet browser extensions."}]},{"type":"element","tag":"h2","props":{"id":"augmenting-existing-interface"},"children":[{"type":"text","value":"Augmenting existing interface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you have class "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Sample"}]},{"type":"text","value":" without any functionality:"}]},{"type":"element","tag":"code","props":{"code":"// Sample.ts\n\nexport class Sample {\n // nothing :-)\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// Sample.ts\n\nexport class Sample {\n // nothing :-)\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then you want extend it with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"doFancyThings()"}]},{"type":"text","value":" method. That can be achieved with said "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"module augmentation"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n interface Sample {\n doFancyThings: () => void;\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n interface Sample {\n doFancyThings: () => void;\n }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now you can call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"sample.doFancyThings()"}]},{"type":"text","value":" by importing both "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".ts"}]},{"type":"text","value":" files:"}]},{"type":"element","tag":"code","props":{"code":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This example is useful for "},{"type":"element","tag":"a","props":{"href":"./Frontend/Vue/Adding%20global%20properties%20to%20component"},"children":[{"type":"text","value":"adding global properties to component"}]},{"type":"text","value":" in vue.js."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you want to add global variable to your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":". That thing's called "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"global module augmentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say you need to call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.doFancyThings()"}]},{"type":"text","value":". For that you should augment global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" interface in "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"*.d.ts"}]},{"type":"text","value":" file:"}]},{"type":"element","tag":"code","props":{"code":"declare global {\n interface Window {\n doFancyThings: () => void;\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76423f"},"children":[{"type":"text","value":"global"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aab988"},"children":[{"type":"text","value":"Window"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f0bc9a"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a1f492"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is useful for declaring global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.ethereum"}]},{"type":"text","value":" (or "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.web3"}]},{"type":"text","value":") in "},{"type":"element","tag":"a","props":{"href":"/blockchain/Common%20typescript%20examples"},"children":[{"type":"text","value":"blockchain"}]},{"type":"text","value":" projects with typescript, which use wallet browser extensions."}]},{"type":"element","tag":"h2","props":{"id":"augmenting-existing-interface"},"children":[{"type":"text","value":"Augmenting existing interface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you have class "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Sample"}]},{"type":"text","value":" without any functionality:"}]},{"type":"element","tag":"code","props":{"code":"// Sample.ts\n\nexport class Sample {\n // nothing :-)\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-46d873"},"children":[{"type":"text","value":"// Sample.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"class"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aab988"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-46d873"},"children":[{"type":"text","value":"// nothing :-)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then you want extend it with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"doFancyThings()"}]},{"type":"text","value":" method. That can be achieved with said "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"module augmentation"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n interface Sample {\n doFancyThings: () => void;\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-46d873"},"children":[{"type":"text","value":"// fancyThings.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-76423f"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-309c27"},"children":[{"type":"text","value":"\"./Sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"module"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-309c27"},"children":[{"type":"text","value":"\"./Sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aab988"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f0bc9a"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a1f492"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now you can call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"sample.doFancyThings()"}]},{"type":"text","value":" by importing both "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".ts"}]},{"type":"text","value":" files:"}]},{"type":"element","tag":"code","props":{"code":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-76423f"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-309c27"},"children":[{"type":"text","value":"\"./sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-309c27"},"children":[{"type":"text","value":"\"./fancyThings\""}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-697848"},"children":[{"type":"text","value":"sample"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f0bc9a"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-76423f"},"children":[{"type":"text","value":"sample"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f0bc9a"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":"(); "}]},{"type":"element","tag":"span","props":{"class":"ct-46d873"},"children":[{"type":"text","value":"// ok"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This example is useful for "},{"type":"element","tag":"a","props":{"href":"./Frontend/Vue/Adding%20global%20properties%20to%20component"},"children":[{"type":"text","value":"adding global properties to component"}]},{"type":"text","value":" in vue.js."}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-697848{color:#79C0FF}.ct-309c27{color:#A5D6FF}.ct-46d873{color:#8B949E}.ct-a1f492{color:#79C0FF}.ct-754e74{color:#FF7B72}.ct-f0bc9a{color:#D2A8FF}.ct-aab988{color:#FFA657}.ct-76423f{color:#C9D1D9}.ct-e6aa60{color:#C9D1D9}.ct-580441{color:#FF7B72}.light .ct-580441{color:#073642}.light .ct-e6aa60{color:#657B83}.light .ct-76423f{color:#268BD2}.light .ct-aab988{color:#268BD2}.light .ct-f0bc9a{color:#268BD2}.light .ct-754e74{color:#859900}.light .ct-a1f492{color:#859900}.light .ct-46d873{color:#93A1A1}.light .ct-309c27{color:#2AA198}.light .ct-697848{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"augmenting-existing-interface","depth":2,"text":"Augmenting existing interface"}]}},"_type":"markdown","_id":"content:Typescript:Add global variable to window.md","_source":"content","_file":"Typescript/Add global variable to window.md","_extension":"md"},{"_path":"/typescript/flatten-object-with-periods","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Flatten Object With Periods","description":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Used for typing "},{"type":"element","tag":"a","props":{"href":"https://www.npmjs.com/package/i18n-js","rel":["nofollow"]},"children":[{"type":"text","value":"i18n.js"}]},{"type":"text","value":" dictionaries;"}]},{"type":"element","tag":"code","props":{"code":"import en from './en.json';\ntype TranslationPath = Flatten;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n I18nLib.t(key, options);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import en from './en.json';\ntype TranslationPath = Flatten;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n I18nLib.t(key, options);\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Flatten type defined here:"}]},{"type":"element","tag":"code","props":{"code":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten = [D] extends [never]\n ? never\n : T extends PluralForm // plural object\n ? ''\n : T extends object\n ? { [K in keyof T]-?: Join> }[keyof T]\n : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join = K extends string | number\n ? P extends string | number\n ? `${K}${'' extends P ? '' : '.'}${P}`\n : never\n : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten = [D] extends [never]\n ? never\n : T extends PluralForm // plural object\n ? ''\n : T extends object\n ? { [K in keyof T]-?: Join> }[keyof T]\n : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join = K extends string | number\n ? P extends string | number\n ? `${K}${'' extends P ? '' : '.'}${P}`\n : never\n : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Used for typing "},{"type":"element","tag":"a","props":{"href":"https://www.npmjs.com/package/i18n-js","rel":["nofollow"]},"children":[{"type":"text","value":"i18n.js"}]},{"type":"text","value":" dictionaries;"}]},{"type":"element","tag":"code","props":{"code":"import en from './en.json';\ntype TranslationPath = Flatten;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n I18nLib.t(key, options);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8756fd"},"children":[{"type":"text","value":"en"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"'./en.json'"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"TranslationPath"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"typeof"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8756fd"},"children":[{"type":"text","value":"en"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":">;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-02aa0f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-679523"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-242dc6"},"children":[{"type":"text","value":"t"}]},{"type":"element","tag":"span","props":{"class":"ct-679523"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1dff2a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-679523"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-c56ad7"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-1dff2a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-679523"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c830d"},"children":[{"type":"text","value":"TranslationPath"}]},{"type":"element","tag":"span","props":{"class":"ct-679523"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-c56ad7"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-1dff2a"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-679523"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c830d"},"children":[{"type":"text","value":"TranslateOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-679523"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-02aa0f"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8756fd"},"children":[{"type":"text","value":"I18nLib"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b8298a"},"children":[{"type":"text","value":"t"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-8756fd"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-8756fd"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Flatten type defined here:"}]},{"type":"element","tag":"code","props":{"code":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten = [D] extends [never]\n ? never\n : T extends PluralForm // plural object\n ? ''\n : T extends object\n ? { [K in keyof T]-?: Join> }[keyof T]\n : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join = K extends string | number\n ? P extends string | number\n ? `${K}${'' extends P ? '' : '.'}${P}`\n : never\n : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f1fc48"},"children":[{"type":"text","value":"// This one based on answer from StackOverflow:"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f1fc48"},"children":[{"type":"text","value":"// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"] "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"never"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"PluralForm"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f1fc48"},"children":[{"type":"text","value":"// plural object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"''"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" { ["}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"in"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"keyof"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"]"}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"-?:"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Join"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"], "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Prev"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"]>> }["}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"keyof"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f1fc48"},"children":[{"type":"text","value":"// Fix it for you plural form"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"PluralForm"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Record"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"'one'"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"'few'"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"'many'"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":">;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Join"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"number"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"number"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"}${''"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb8cb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb8cb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb8cb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb8cb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb8cb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb8cb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"'.'}${"}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"}`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"never"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Prev"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"3"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"4"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":">];"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-ffb8cb{color:#A5D6FF}.ct-becebd{color:#79C0FF}.ct-e52d61{color:#79C0FF}.ct-f1fc48{color:#8B949E}.ct-b8298a{color:#D2A8FF}.ct-7c830d{color:#FFA657}.ct-c56ad7{color:#FFA657}.ct-1dff2a{color:#FF7B72}.ct-242dc6{color:#D2A8FF}.ct-679523{color:#C9D1D9}.ct-02aa0f{color:#FF7B72}.ct-8d3044{color:#FFA657}.ct-52c38c{color:#FF7B72}.ct-a49555{color:#A5D6FF}.ct-8756fd{color:#C9D1D9}.ct-e523ef{color:#C9D1D9}.ct-ddc9a9{color:#FF7B72}.light .ct-ddc9a9{color:#859900}.light .ct-e523ef{color:#657B83}.light .ct-8756fd{color:#268BD2}.light .ct-a49555{color:#2AA198}.light .ct-52c38c{color:#073642}.light .ct-8d3044{color:#268BD2}.light .ct-02aa0f{color:#073642}.light .ct-679523{color:#657B83}.light .ct-242dc6{color:#268BD2}.light .ct-1dff2a{color:#859900}.light .ct-c56ad7{color:#657B83}.light .ct-7c830d{color:#268BD2}.light .ct-b8298a{color:#268BD2}.light .ct-f1fc48{color:#93A1A1}.light .ct-e52d61{color:#859900}.light .ct-becebd{color:#D33682}.light .ct-ffb8cb{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Typescript:Flatten object with periods.md","_source":"content","_file":"Typescript/Flatten object with periods.md","_extension":"md"},{"_path":"/typescript/type-guards","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Type Guards","description":"Useful for type checking at compile and run time:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for type checking at compile and run time:"}]},{"type":"element","tag":"code","props":{"code":"function isFish(pet: Fish | Bird): pet is Fish {\n return (pet as Fish).swim !== undefined;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"function isFish(pet: Fish | Bird): pet is Fish {\n return (pet as Fish).swim !== undefined;\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage:"}]},{"type":"element","tag":"code","props":{"code":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n pet.swim();\n} else {\n pet.fly();\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n pet.swim();\n} else {\n pet.fly();\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for type checking at compile and run time:"}]},{"type":"element","tag":"code","props":{"code":"function isFish(pet: Fish | Bird): pet is Fish {\n return (pet as Fish).swim !== undefined;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6988d"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-68061a"},"children":[{"type":"text","value":"isFish"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b5a0e2"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-f141b4"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5d2456"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f141b4"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5d2456"},"children":[{"type":"text","value":"Bird"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-f141b4"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b5a0e2"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f141b4"},"children":[{"type":"text","value":"is"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5d2456"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-359d96"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-ba0a2b"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-359d96"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cc88bc"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-ba0a2b"},"children":[{"type":"text","value":"swim"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-359d96"},"children":[{"type":"text","value":"!=="}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dbf28d"},"children":[{"type":"text","value":"undefined"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage:"}]},{"type":"element","tag":"code","props":{"code":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n pet.swim();\n} else {\n pet.fly();\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bd6ed9"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d4f6a5"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-359d96"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e3a74f"},"children":[{"type":"text","value":"getSmallPet"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-359d96"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-e3a74f"},"children":[{"type":"text","value":"isFish"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-ba0a2b"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ba0a2b"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e3a74f"},"children":[{"type":"text","value":"swim"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-359d96"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ba0a2b"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e3a74f"},"children":[{"type":"text","value":"fly"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-e3a74f{color:#D2A8FF}.ct-d4f6a5{color:#79C0FF}.ct-bd6ed9{color:#FF7B72}.ct-dbf28d{color:#79C0FF}.ct-cc88bc{color:#FFA657}.ct-ba0a2b{color:#C9D1D9}.ct-359d96{color:#FF7B72}.ct-3d81ad{color:#C9D1D9}.ct-5d2456{color:#FFA657}.ct-f141b4{color:#FF7B72}.ct-b5a0e2{color:#FFA657}.ct-68061a{color:#D2A8FF}.ct-e1ee51{color:#C9D1D9}.ct-e6988d{color:#FF7B72}.light .ct-e6988d{color:#073642}.light .ct-e1ee51{color:#657B83}.light .ct-68061a{color:#268BD2}.light .ct-b5a0e2{color:#657B83}.light .ct-f141b4{color:#859900}.light .ct-5d2456{color:#268BD2}.light .ct-3d81ad{color:#657B83}.light .ct-359d96{color:#859900}.light .ct-ba0a2b{color:#268BD2}.light .ct-cc88bc{color:#268BD2}.light .ct-dbf28d{color:#B58900}.light .ct-bd6ed9{color:#073642}.light .ct-d4f6a5{color:#268BD2}.light .ct-e3a74f{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Typescript:Type guards.md","_source":"content","_file":"Typescript/Type guards.md","_extension":"md"}],"navigation":[{"title":"Blockchain","_path":"/blockchain","children":[{"title":"Common Typescript Examples","_path":"/blockchain/common-typescript-examples"},{"title":"Smart Contracts","_path":"/blockchain/smart-contracts"}]},{"title":"Css","_path":"/css","children":[{"title":"Automatic Grid Like Masonry With Pure CSS","_path":"/css/automatic-grid-like-masonry-with-pure-css"},{"title":"Sass Nth Child Iterate Mixin","_path":"/css/sass-nth-child-iterate-mixin"},{"title":"Test If Browser Supports CSS Rules","_path":"/css/test-if-browser-supports-css-rules"}]},{"title":"Docker","_path":"/docker","children":[{"title":"Building Static Pages With Docker","_path":"/docker/building-static-pages-with-docker"},{"title":"Drone Ci","_path":"/docker/drone-ci"},{"title":"Github Pages With Drone Ci","_path":"/docker/github-pages-with-drone-ci"},{"title":"Private Docker Registry","_path":"/docker/private-docker-registry"},{"title":"Refresh Containers On Pull","_path":"/docker/refresh-containers-on-pull"},{"title":"Seed Dump Inside Docker","_path":"/docker/seed-dump-inside-docker"},{"title":"Wait For Mysql","_path":"/docker/wait-for-mysql"},{"title":"Wait For Redis","_path":"/docker/wait-for-redis"}]},{"title":"Frontend","_path":"/frontend","children":[{"title":"React Native","_path":"/frontend/react-native","children":[{"title":"OAuth2 Login","_path":"/frontend/react-native/oauth2-login"},{"title":"Preserve FlatList Scroll Position In React Native","_path":"/frontend/react-native/preserve-flatlist-scroll-position-in-react-native"},{"title":"Useful Comands","_path":"/frontend/react-native/useful-comands"}]},{"title":"React","_path":"/frontend/react","children":[{"title":"Axios Refresh Token On React","_path":"/frontend/react/axios-refresh-token-on-react"},{"title":"Axios With AbortController","_path":"/frontend/react/axios-with-abortcontroller"}]},{"title":"Vue","_path":"/frontend/vue","children":[{"title":"Adding Global Properties To Component","_path":"/frontend/vue/adding-global-properties-to-component"},{"title":"Make Nuxt Handle Obsidian Highlights","_path":"/frontend/vue/make-nuxt-handle-obsidian-highlights"}]}]},{"title":"Git","_path":"/git","children":[{"title":"Force Git To Use HTTPS","_path":"/git/force-git-to-use-https"},{"title":"Git Aliases And Useful Commands","_path":"/git/git-aliases-and-useful-commands"}]},{"title":"Graphql","_path":"/graphql","children":[{"title":"Apollo Client Pagination","_path":"/graphql/apollo-client-pagination"},{"title":"Refresh Token In Apollo Client","_path":"/graphql/refresh-token-in-apollo-client"}]},{"title":"Linux","_path":"/linux","children":[{"title":"Gitea For Git Hosting","_path":"/linux/gitea-for-git-hosting"},{"title":"Google Photos Alternative With Photoprism","_path":"/linux/google-photos-alternative-with-photoprism"},{"title":"Resume Or Start Screen Session","_path":"/linux/resume-or-start-screen-session"},{"title":"Rsync File With SSH","_path":"/linux/rsync-file-with-ssh"},{"title":"Setting Up NGINX","_path":"/linux/setting-up-nginx"},{"title":"SSH","_path":"/linux/ssh"}]},{"title":"Sql","_path":"/sql","children":[{"title":"MySQL And MariaDB Setup","_path":"/sql/mysql-and-mariadb-setup"},{"title":"Postgress Setup","_path":"/sql/postgress-setup"}]},{"title":"Typescript","_path":"/typescript","children":[{"title":"Add Global Variable To Window","_path":"/typescript/add-global-variable-to-window"},{"title":"Flatten Object With Periods","_path":"/typescript/flatten-object-with-periods"},{"title":"Type Guards","_path":"/typescript/type-guards"}]}]} \ No newline at end of file diff --git a/api/_content/navigation b/api/_content/navigation new file mode 100644 index 0000000..71d4f20 --- /dev/null +++ b/api/_content/navigation @@ -0,0 +1 @@ +[{"title":"Blockchain","_path":"/blockchain","children":[{"title":"Common Typescript Examples","_path":"/blockchain/common-typescript-examples"},{"title":"Smart Contracts","_path":"/blockchain/smart-contracts"}]},{"title":"Css","_path":"/css","children":[{"title":"Automatic Grid Like Masonry With Pure CSS","_path":"/css/automatic-grid-like-masonry-with-pure-css"},{"title":"Sass Nth Child Iterate Mixin","_path":"/css/sass-nth-child-iterate-mixin"},{"title":"Test If Browser Supports CSS Rules","_path":"/css/test-if-browser-supports-css-rules"}]},{"title":"Docker","_path":"/docker","children":[{"title":"Building Static Pages With Docker","_path":"/docker/building-static-pages-with-docker"},{"title":"Drone Ci","_path":"/docker/drone-ci"},{"title":"Github Pages With Drone Ci","_path":"/docker/github-pages-with-drone-ci"},{"title":"Private Docker Registry","_path":"/docker/private-docker-registry"},{"title":"Refresh Containers On Pull","_path":"/docker/refresh-containers-on-pull"},{"title":"Seed Dump Inside Docker","_path":"/docker/seed-dump-inside-docker"},{"title":"Wait For Mysql","_path":"/docker/wait-for-mysql"},{"title":"Wait For Redis","_path":"/docker/wait-for-redis"}]},{"title":"Frontend","_path":"/frontend","children":[{"title":"React Native","_path":"/frontend/react-native","children":[{"title":"OAuth2 Login","_path":"/frontend/react-native/oauth2-login"},{"title":"Preserve FlatList Scroll Position In React Native","_path":"/frontend/react-native/preserve-flatlist-scroll-position-in-react-native"},{"title":"Useful Comands","_path":"/frontend/react-native/useful-comands"}]},{"title":"React","_path":"/frontend/react","children":[{"title":"Axios Refresh Token On React","_path":"/frontend/react/axios-refresh-token-on-react"},{"title":"Axios With AbortController","_path":"/frontend/react/axios-with-abortcontroller"}]},{"title":"Vue","_path":"/frontend/vue","children":[{"title":"Adding Global Properties To Component","_path":"/frontend/vue/adding-global-properties-to-component"},{"title":"Make Nuxt Handle Obsidian Highlights","_path":"/frontend/vue/make-nuxt-handle-obsidian-highlights"}]}]},{"title":"Git","_path":"/git","children":[{"title":"Force Git To Use HTTPS","_path":"/git/force-git-to-use-https"},{"title":"Git Aliases And Useful Commands","_path":"/git/git-aliases-and-useful-commands"}]},{"title":"Graphql","_path":"/graphql","children":[{"title":"Apollo Client Pagination","_path":"/graphql/apollo-client-pagination"},{"title":"Refresh Token In Apollo Client","_path":"/graphql/refresh-token-in-apollo-client"}]},{"title":"Linux","_path":"/linux","children":[{"title":"Gitea For Git Hosting","_path":"/linux/gitea-for-git-hosting"},{"title":"Google Photos Alternative With Photoprism","_path":"/linux/google-photos-alternative-with-photoprism"},{"title":"Resume Or Start Screen Session","_path":"/linux/resume-or-start-screen-session"},{"title":"Rsync File With SSH","_path":"/linux/rsync-file-with-ssh"},{"title":"Setting Up NGINX","_path":"/linux/setting-up-nginx"},{"title":"SSH","_path":"/linux/ssh"}]},{"title":"Sql","_path":"/sql","children":[{"title":"MySQL And MariaDB Setup","_path":"/sql/mysql-and-mariadb-setup"},{"title":"Postgress Setup","_path":"/sql/postgress-setup"}]},{"title":"Typescript","_path":"/typescript","children":[{"title":"Add Global Variable To Window","_path":"/typescript/add-global-variable-to-window"},{"title":"Flatten Object With Periods","_path":"/typescript/flatten-object-with-periods"},{"title":"Type Guards","_path":"/typescript/type-guards"}]}] \ No newline at end of file diff --git a/api/_content/query/068glZS8Mz.json b/api/_content/query/068glZS8Mz.json new file mode 100644 index 0000000..ff4d583 --- /dev/null +++ b/api/_content/query/068glZS8Mz.json @@ -0,0 +1 @@ +{"_path":"/css/automatic-grid-like-masonry-with-pure-css","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Automatic Grid Like Masonry With Pure CSS","description":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns."}]},{"type":"element","tag":"code","props":{"code":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n grid-auto-rows: 256px;\n grid-auto-flow: row dense;\n grid-column-gap: $gap;\n grid-row-gap: $gap;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n grid-auto-rows: 256px;\n grid-auto-flow: row dense;\n grid-column-gap: $gap;\n grid-row-gap: $gap;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"basic-elements-with-double-height-or-width"},"children":[{"type":"text","value":"Basic elements with double height or width"}]},{"type":"element","tag":"code","props":{"code":".h-2 { // takes 2 columns\n grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n grid-row-end: span 2;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".h-2 { // takes 2 columns\n grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n grid-row-end: span 2;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"header-that-fills-all-columns"},"children":[{"type":"text","value":"Header, that fills all columns"}]},{"type":"element","tag":"code","props":{"code":".full-width {\n grid-row: 1 / 2; // height: 1 row\n grid-column: 1 / -1;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".full-width {\n grid-row: 1 / 2; // height: 1 row\n grid-column: 1 / -1;\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner"},"children":[{"type":"text","value":"Stamp element, that takes 3 rows in the top right corner"}]},{"type":"element","tag":"code","props":{"code":".top-right {\n grid-row: 1 / 3; // height here\n grid-column: -2 / -1; // width here\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".top-right {\n grid-row: 1 / 3; // height here\n grid-column: -2 / -1; // width here\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns."}]},{"type":"element","tag":"code","props":{"code":"$cell: 250px;\n$gap: 20px;\n\n.grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n grid-auto-rows: 256px;\n grid-auto-flow: row dense;\n grid-column-gap: $gap;\n grid-row-gap: $gap;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eb1f40"},"children":[{"type":"text","value":"$cell: "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"250"}]},{"type":"element","tag":"span","props":{"class":"ct-fe2762"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eb1f40"},"children":[{"type":"text","value":"$gap: "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"20"}]},{"type":"element","tag":"span","props":{"class":"ct-fe2762"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-14ca3a"},"children":[{"type":"text","value":".grid"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bb41bd"},"children":[{"type":"text","value":"display"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ffa706"},"children":[{"type":"text","value":"grid"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bb41bd"},"children":[{"type":"text","value":"grid-template-columns"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-6497b4"},"children":[{"type":"text","value":"repeat"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-5ceb9b"},"children":[{"type":"text","value":"auto-fit"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-6497b4"},"children":[{"type":"text","value":"minmax"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-5ceb9b"},"children":[{"type":"text","value":"$cell"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-5efdf0"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-7d7f24"},"children":[{"type":"text","value":"fr"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":"));"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"grid-auto-rows"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"256"}]},{"type":"element","tag":"span","props":{"class":"ct-fe2762"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bb41bd"},"children":[{"type":"text","value":"grid-auto-flow"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ffa706"},"children":[{"type":"text","value":"row"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ffa706"},"children":[{"type":"text","value":"dense"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bb41bd"},"children":[{"type":"text","value":"grid-column-gap"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-5ceb9b"},"children":[{"type":"text","value":"$gap"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-bb41bd"},"children":[{"type":"text","value":"grid-row-gap"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-5ceb9b"},"children":[{"type":"text","value":"$gap"}]},{"type":"element","tag":"span","props":{"class":"ct-6d1ecb"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"basic-elements-with-double-height-or-width"},"children":[{"type":"text","value":"Basic elements with double height or width"}]},{"type":"element","tag":"code","props":{"code":".h-2 { // takes 2 columns\n grid-column-end: span 2;\n}\n\n.v-2 { // takes 2 rows\n grid-row-end: span 2;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-14ca3a"},"children":[{"type":"text","value":".h-2"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-be4ab6"},"children":[{"type":"text","value":"// takes 2 columns"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"grid-column-end"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"span"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-14ca3a"},"children":[{"type":"text","value":".v-2"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-be4ab6"},"children":[{"type":"text","value":"// takes 2 rows"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"grid-row-end"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"span"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"header-that-fills-all-columns"},"children":[{"type":"text","value":"Header, that fills all columns"}]},{"type":"element","tag":"code","props":{"code":".full-width {\n grid-row: 1 / 2; // height: 1 row\n grid-column: 1 / -1;\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-14ca3a"},"children":[{"type":"text","value":".full-width"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"grid-row"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fe2762"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-be4ab6"},"children":[{"type":"text","value":"// height: 1 row"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"grid-column"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" / "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"-1"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner"},"children":[{"type":"text","value":"Stamp element, that takes 3 rows in the top right corner"}]},{"type":"element","tag":"code","props":{"code":".top-right {\n grid-row: 1 / 3; // height here\n grid-column: -2 / -1; // width here\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-14ca3a"},"children":[{"type":"text","value":".top-right"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"grid-row"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fe2762"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"3"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-be4ab6"},"children":[{"type":"text","value":"// height here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e2d197"},"children":[{"type":"text","value":"grid-column"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"-2"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":" / "}]},{"type":"element","tag":"span","props":{"class":"ct-45c47a"},"children":[{"type":"text","value":"-1"}]},{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-be4ab6"},"children":[{"type":"text","value":"// width here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-fca03a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-be4ab6{color:#8B949E}.ct-e2d197{color:#79C0FF}.ct-7d7f24{color:#FF7B72}.ct-5efdf0{color:#79C0FF}.ct-5ceb9b{color:#FFA657}.ct-6497b4{color:#79C0FF}.ct-ffa706{color:#79C0FF}.ct-bb41bd{color:#79C0FF}.ct-6d1ecb{color:#C9D1D9}.ct-14ca3a{color:#79C0FF}.ct-fca03a{color:#C9D1D9}.ct-fe2762{color:#FF7B72}.ct-45c47a{color:#79C0FF}.ct-eb1f40{color:#FFA657}.light .ct-eb1f40{color:#657B83}.light .ct-45c47a{color:#D33682}.light .ct-fe2762{color:#859900}.light .ct-fca03a{color:#657B83}.light .ct-14ca3a{color:#93A1A1}.light .ct-6d1ecb{color:#657B83}.light .ct-bb41bd{color:#859900}.light .ct-ffa706{color:#657B83}.light .ct-6497b4{color:#268BD2}.light .ct-5ceb9b{color:#657B83}.light .ct-5efdf0{color:#D33682}.light .ct-7d7f24{color:#859900}.light .ct-e2d197{color:#859900}.light .ct-be4ab6{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"basic-elements-with-double-height-or-width","depth":3,"text":"Basic elements with double height or width"},{"id":"header-that-fills-all-columns","depth":3,"text":"Header, that fills all columns"},{"id":"stamp-element-that-takes-3-rows-in-the-top-right-corner","depth":3,"text":"Stamp element, that takes 3 rows in the top right corner"}]}},"_type":"markdown","_id":"content:CSS:Automatic Grid like Masonry with pure CSS.md","_source":"content","_file":"CSS/Automatic Grid like Masonry with pure CSS.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/2vMf3x3doM.json b/api/_content/query/2vMf3x3doM.json new file mode 100644 index 0000000..54ae729 --- /dev/null +++ b/api/_content/query/2vMf3x3doM.json @@ -0,0 +1 @@ +{"_path":"/graphql/apollo-client-pagination","_dir":"graphql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Apollo Client Pagination","description":"Say, we have gql response like this and we wan't to have pagination with it. Let's merge it as it specified in official documentation","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we have "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gql"}]},{"type":"text","value":" response like this and we wan't to have pagination with it. Let's merge it as it specified in "},{"type":"element","tag":"a","props":{"href":"https://www.apollographql.com/docs/react/caching/cache-field-behavior/#the-merge-function","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]}]},{"type":"element","tag":"code","props":{"code":"query listItems(\n filter: Filter, \n sort: String,\n limit: Number,\n offset: Number,\n): ItemList!\n\ninput Filter {\n name: String!\n type: String!\n}\n\ntype ItemList {\n items: [Item!]!\n totalCount: Int!\n}\n","language":"graphql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"query listItems(\n filter: Filter, \n sort: String,\n limit: Number,\n offset: Number,\n): ItemList!\n\ninput Filter {\n name: String!\n type: String!\n}\n\ntype ItemList {\n items: [Item!]!\n totalCount: Int!\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will setup "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"text","value":" with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"typePolicies"}]},{"type":"text","value":" to merge incoming data in cache:"}]},{"type":"element","tag":"code","props":{"code":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n // ...\n cache: new InMemoryCache({ typePolicies }),\n // ...\n});\n\nexport const typePolicies: TypePolicies = {\n Query: {\n fields: {\n // query name\n listItems: {\n // apollo will serialize and use keyArgs as unique\n // identifier in cache for every query\n // consider choosing the right fields, \n // i.e. limit and offset won't work here\n keyArgs: [\n 'sort', // primitive type\n 'filter', ['name', 'type'] // nested fields of `filter`\n ],\n merge: mergeItemsWithTotalCount,\n },\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n // ...\n cache: new InMemoryCache({ typePolicies }),\n // ...\n});\n\nexport const typePolicies: TypePolicies = {\n Query: {\n fields: {\n // query name\n listItems: {\n // apollo will serialize and use keyArgs as unique\n // identifier in cache for every query\n // consider choosing the right fields, \n // i.e. limit and offset won't work here\n keyArgs: [\n 'sort', // primitive type\n 'filter', ['name', 'type'] // nested fields of `filter`\n ],\n merge: mergeItemsWithTotalCount,\n },\n }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will need merge function "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"text","value":", which will join results of query and cached data for specific key:"}]},{"type":"element","tag":"code","props":{"code":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n // no existing data\n if (!existing || !args?.offset || args.offset < existing.length) {\n return incoming || [];\n }\n\n // If hook was called multiple times\n if (existing?.items?.length && args?.offset < existing.items.length) {\n return existing || [];\n }\n\n // merge cache and incoming data\n const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n // apply latest result for totalCount\n const totalCount = incoming?.totalCount || existing?.totalCount;\n\n return {\n ...(incoming || existing || {}),\n items,\n totalCount,\n };\n };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n // no existing data\n if (!existing || !args?.offset || args.offset < existing.length) {\n return incoming || [];\n }\n\n // If hook was called multiple times\n if (existing?.items?.length && args?.offset < existing.items.length) {\n return existing || [];\n }\n\n // merge cache and incoming data\n const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n // apply latest result for totalCount\n const totalCount = incoming?.totalCount || existing?.totalCount;\n\n return {\n ...(incoming || existing || {}),\n items,\n totalCount,\n };\n };\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we have "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gql"}]},{"type":"text","value":" response like this and we wan't to have pagination with it. Let's merge it as it specified in "},{"type":"element","tag":"a","props":{"href":"https://www.apollographql.com/docs/react/caching/cache-field-behavior/#the-merge-function","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]}]},{"type":"element","tag":"code","props":{"code":"query listItems(\n filter: Filter, \n sort: String,\n limit: Number,\n offset: Number,\n): ItemList!\n\ninput Filter {\n name: String!\n type: String!\n}\n\ntype ItemList {\n items: [Item!]!\n totalCount: Int!\n}\n","language":"graphql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"query"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a704c0"},"children":[{"type":"text","value":"listItems"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"filter"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"Filter"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"sort"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"limit"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"Number"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"Number"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"): "}]},{"type":"element","tag":"span","props":{"class":"ct-a704c0"},"children":[{"type":"text","value":"ItemList"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"input"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-082859"},"children":[{"type":"text","value":"Filter"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-e81a6c"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"String"}]},{"type":"element","tag":"span","props":{"class":"ct-e81a6c"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-082859"},"children":[{"type":"text","value":"ItemList"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": ["}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"Item"}]},{"type":"element","tag":"span","props":{"class":"ct-e81a6c"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":"]"}]},{"type":"element","tag":"span","props":{"class":"ct-e81a6c"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-f83671"},"children":[{"type":"text","value":"Int"}]},{"type":"element","tag":"span","props":{"class":"ct-e81a6c"},"children":[{"type":"text","value":"!"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will setup "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"text","value":" with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"typePolicies"}]},{"type":"text","value":" to merge incoming data in cache:"}]},{"type":"element","tag":"code","props":{"code":"import { ApolloClient, InMemoryCache } from '@apollo/client';\n\nconst client = new ApolloClient({\n // ...\n cache: new InMemoryCache({ typePolicies }),\n // ...\n});\n\nexport const typePolicies: TypePolicies = {\n Query: {\n fields: {\n // query name\n listItems: {\n // apollo will serialize and use keyArgs as unique\n // identifier in cache for every query\n // consider choosing the right fields, \n // i.e. limit and offset won't work here\n keyArgs: [\n 'sort', // primitive type\n 'filter', ['name', 'type'] // nested fields of `filter`\n ],\n merge: mergeItemsWithTotalCount,\n },\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"InMemoryCache"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14b519"},"children":[{"type":"text","value":"'@apollo/client'"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f7d317"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a79fb4"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a704c0"},"children":[{"type":"text","value":"ApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" cache: "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a704c0"},"children":[{"type":"text","value":"InMemoryCache"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"({ "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"typePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f7d317"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a79fb4"},"children":[{"type":"text","value":"typePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-65ec34"},"children":[{"type":"text","value":"TypePolicies"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" Query: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" fields: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// query name"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" listItems: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// apollo will serialize and use keyArgs as unique"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// identifier in cache for every query"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// consider choosing the right fields, "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// i.e. limit and offset won't work here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" keyArgs: ["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14b519"},"children":[{"type":"text","value":"'sort'"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// primitive type"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14b519"},"children":[{"type":"text","value":"'filter'"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":", ["}]},{"type":"element","tag":"span","props":{"class":"ct-14b519"},"children":[{"type":"text","value":"'name'"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-14b519"},"children":[{"type":"text","value":"'type'"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"] "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// nested fields of `filter`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" ],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" merge: "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We will need merge function "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"text","value":", which will join results of query and cached data for specific key:"}]},{"type":"element","tag":"code","props":{"code":"/** merges all sources with { items: unknown[], totalCount: number } */\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) => {\n // no existing data\n if (!existing || !args?.offset || args.offset < existing.length) {\n return incoming || [];\n }\n\n // If hook was called multiple times\n if (existing?.items?.length && args?.offset < existing.items.length) {\n return existing || [];\n }\n\n // merge cache and incoming data\n const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n // apply latest result for totalCount\n const totalCount = incoming?.totalCount || existing?.totalCount;\n\n return {\n ...(incoming || existing || {}),\n items,\n totalCount,\n };\n };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"/** merges all sources with { items: unknown[], totalCount: number } */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e01c7c"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2475bf"},"children":[{"type":"text","value":"mergeItemsWithTotalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e81a6c"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":", { "}]},{"type":"element","tag":"span","props":{"class":"ct-56ec43"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-e01c7c"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-0a9f15"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// no existing data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"args"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"offset"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"existing"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" [];"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// If hook was called multiple times"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"?."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" [];"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// merge cache and incoming data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f7d317"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a79fb4"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e7587d"},"children":[{"type":"text","value":"// apply latest result for totalCount"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f7d317"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a79fb4"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"existing"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"incoming"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8ff12"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"items"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-192d1f"},"children":[{"type":"text","value":"totalCount"}]},{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3586e7"},"children":[{"type":"text","value":" };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-2475bf{color:#D2A8FF}.ct-e01c7c{color:#FF7B72}.ct-65ec34{color:#FFA657}.ct-e7587d{color:#8B949E}.ct-a79fb4{color:#79C0FF}.ct-f7d317{color:#FF7B72}.ct-14b519{color:#A5D6FF}.ct-192d1f{color:#C9D1D9}.ct-e81a6c{color:#FF7B72}.ct-082859{color:#79C0FF}.ct-f83671{color:#79C0FF}.ct-56ec43{color:#FFA657}.ct-0a9f15{color:#C9D1D9}.ct-a704c0{color:#D2A8FF}.ct-3586e7{color:#C9D1D9}.ct-a8ff12{color:#FF7B72}.light .ct-a8ff12{color:#859900}.light .ct-3586e7{color:#657B83}.light .ct-a704c0{color:#268BD2}.light .ct-0a9f15{color:#657B83}.light .ct-56ec43{color:#657B83}.light .ct-f83671{color:#859900}.light .ct-082859{color:#859900}.light .ct-e81a6c{color:#859900}.light .ct-192d1f{color:#268BD2}.light .ct-14b519{color:#2AA198}.light .ct-f7d317{color:#073642}.light .ct-a79fb4{color:#268BD2}.light .ct-e7587d{color:#93A1A1}.light .ct-65ec34{color:#268BD2}.light .ct-e01c7c{color:#073642}.light .ct-2475bf{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:GraphQL:Apollo Client pagination.md","_source":"content","_file":"GraphQL/Apollo Client pagination.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/3Hb97eSb6i.json b/api/_content/query/3Hb97eSb6i.json new file mode 100644 index 0000000..64891ff --- /dev/null +++ b/api/_content/query/3Hb97eSb6i.json @@ -0,0 +1 @@ +{"_path":"/linux/ssh","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"SSH","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"config-aliases-for-ssh-hosts"},"children":[{"type":"text","value":"Config aliases for #SSH hosts"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"#SSH config can be used to made aliases for different hosts. Should be put at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.ssh/config"}]},{"type":"text","value":". To simply call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ssh router"}]},{"type":"text","value":" without parameters, use this:"}]},{"type":"element","tag":"code","props":{"code":"Host router\n HostName 192.168.0.1\n IdentityFile ~/.ssh/id_rsa\n User root\n Port 22522\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"Host router\n HostName 192.168.0.1\n IdentityFile ~/.ssh/id_rsa\n User root\n Port 22522\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"config-aliases-for-ssh-hosts"},"children":[{"type":"text","value":"Config aliases for #SSH hosts"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"#SSH config can be used to made aliases for different hosts. Should be put at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.ssh/config"}]},{"type":"text","value":". To simply call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ssh router"}]},{"type":"text","value":" without parameters, use this:"}]},{"type":"element","tag":"code","props":{"code":"Host router\n HostName 192.168.0.1\n IdentityFile ~/.ssh/id_rsa\n User root\n Port 22522\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Host router\n HostName 192.168.0.1\n IdentityFile ~/.ssh/id_rsa\n User root\n Port 22522"}]}]}]}]}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"config-aliases-for-ssh-hosts","depth":2,"text":"Config aliases for #SSH hosts"}]}},"_type":"markdown","_id":"content:Linux:SSH.md","_source":"content","_file":"Linux/SSH.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/4AUGrl0JGY.json b/api/_content/query/4AUGrl0JGY.json new file mode 100644 index 0000000..7514ec7 --- /dev/null +++ b/api/_content/query/4AUGrl0JGY.json @@ -0,0 +1 @@ +{"_path":"/docker/wait-for-redis","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Wait For Redis","description":"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful ping or exits with non-zero status after 3 minutes."}]},{"type":"element","tag":"code","props":{"code":"# Waits for redis to become actually available\nwait_for_redis() {\n timeout=180 # 3 minutes\n i=0\n while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n sleep 1;\n\n i=$(($i+1))\n if [[ ${i} -ge ${timeout} ]]; then\n echo \"[Error] can't properly ping Redis container after ${i} secs\"\n exit 1;\n fi\n done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Waits for redis to become actually available\nwait_for_redis() {\n timeout=180 # 3 minutes\n i=0\n while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n sleep 1;\n\n i=$(($i+1))\n if [[ ${i} -ge ${timeout} ]]; then\n echo \"[Error] can't properly ping Redis container after ${i} secs\"\n exit 1;\n fi\n done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20mysql"},"children":[{"type":"text","value":"Wait for mysql"}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful ping or exits with non-zero status after 3 minutes."}]},{"type":"element","tag":"code","props":{"code":"# Waits for redis to become actually available\nwait_for_redis() {\n timeout=180 # 3 minutes\n i=0\n while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" >/dev/null 2>&1; do\n sleep 1;\n\n i=$(($i+1))\n if [[ ${i} -ge ${timeout} ]]; then\n echo \"[Error] can't properly ping Redis container after ${i} secs\"\n exit 1;\n fi\n done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7589c"},"children":[{"type":"text","value":"# Waits for redis to become actually available"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bba05c"},"children":[{"type":"text","value":"wait_for_redis"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":"() {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" timeout=180 "}]},{"type":"element","tag":"span","props":{"class":"ct-b7589c"},"children":[{"type":"text","value":"# 3 minutes"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" i=0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"while"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-be9606"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" -it "}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-c4e6a2"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" redis-cli -h localhost -p 6379 -a "}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-c4e6a2"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" ping "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" grep "}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"\"PONG\""}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":"/dev/null "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"2>&1;"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"do"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" sleep 1"}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" i="}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"$(("}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-c4e6a2"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-01c6f0"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" [[ "}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-c4e6a2"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"-ge"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-c4e6a2"},"children":[{"type":"text","value":"timeout"}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" ]]"}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":";"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-be9606"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":"\"[Error] can't properly ping Redis container after "}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-c4e6a2"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-df5458"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-1b814a"},"children":[{"type":"text","value":" secs\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-be9606"},"children":[{"type":"text","value":"exit"}]},{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"fi"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5def4"},"children":[{"type":"text","value":"done"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-333854"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7589c"},"children":[{"type":"text","value":"# usage: wait_for_redis miin-redis-dev password"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20mysql"},"children":[{"type":"text","value":"Wait for mysql"}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-01c6f0{color:#79C0FF}.ct-c4e6a2{color:#C9D1D9}.ct-df5458{color:#C9D1D9}.ct-1b814a{color:#A5D6FF}.ct-be9606{color:#79C0FF}.ct-c5def4{color:#FF7B72}.ct-333854{color:#C9D1D9}.ct-bba05c{color:#D2A8FF}.ct-b7589c{color:#8B949E}.light .ct-b7589c{color:#93A1A1}.light .ct-bba05c{color:#268BD2}.light .ct-333854{color:#657B83}.light .ct-c5def4{color:#859900}.light .ct-be9606{color:#268BD2}.light .ct-1b814a{color:#2AA198}.light .ct-df5458{color:#859900}.light .ct-c4e6a2{color:#268BD2}.light .ct-01c6f0{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Wait for redis.md","_source":"content","_file":"Docker/Wait for redis.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/8cFyiEqgoq.json b/api/_content/query/8cFyiEqgoq.json new file mode 100644 index 0000000..782357d --- /dev/null +++ b/api/_content/query/8cFyiEqgoq.json @@ -0,0 +1 @@ +{"_path":"/blockchain/common-typescript-examples","_dir":"blockchain","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Common Typescript Examples","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Simple #dapp example for tests: "},{"type":"element","tag":"a","props":{"href":"https://metamask.github.io/test-dapp/","rel":["nofollow"]},"children":[{"type":"text","value":"https://metamask.github.io/test-dapp/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Interaction with smart contracts described in "},{"type":"element","tag":"a","props":{"href":"Smart%20contracts"},"children":[{"type":"text","value":"Smart contracts"}]}]}]},{"type":"element","tag":"h2","props":{"id":"connecting-to-node"},"children":[{"type":"text","value":"Connecting to node"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If #Metamask extension installed, "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Web3.givenProvider"}]},{"type":"text","value":" is available in global window. You can use "},{"type":"element","tag":"a","props":{"href":"https://infura.io","rel":["nofollow"]},"children":[{"type":"text","value":"Infura"}]},{"type":"text","value":" or your node instead:"}]},{"type":"element","tag":"code","props":{"code":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-balance"},"children":[{"type":"text","value":"Getting wallet balance"}]},{"type":"element","tag":"code","props":{"code":"const getBalance = async (address: string) => {\n return await web3.eth.getBalance(address);\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const getBalance = async (address: string) => {\n return await web3.eth.getBalance(address);\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-address"},"children":[{"type":"text","value":"Getting wallet address"}]},{"type":"element","tag":"code","props":{"code":"// first we need to authorize\nconst authorize = async () => {\n await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n return web3.currentProvider.selectedAddress;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// first we need to authorize\nconst authorize = async () => {\n await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n return web3.currentProvider.selectedAddress;\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"sending-transaction"},"children":[{"type":"text","value":"Sending transaction"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sending "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"value"}]},{"type":"text","value":" tokens with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"memo"}]},{"type":"text","value":" as value:"}]},{"type":"element","tag":"code","props":{"code":"\nconst transfer = async ({ \n from, \n to, \n value, \n memo, \n privateKey, \n gasLimit = 44000 \n}) => {\n const nonce = await web3.eth.getTransactionCount(from);\n const gasPrice = await web3.eth.getGasPrice();\n \n const rawTx = {\n from,\n to,\n value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n gasLimit: web3.utils.toHex(gasLimit),\n gasPrice: web3.utils.toHex(gasPrice),\n nonce: web3.utils.toHex(nonce),\n data: memo,\n };\n \n const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n \n const tx = new Transaction(rawTx);\n \n tx.sign(privateKeyBuffer);\n const serializedTx = tx.serialize();\n \n return this.web3.eth.sendSignedTransaction(\n `0x${serializedTx.toString('hex')}`\n );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"\nconst transfer = async ({ \n from, \n to, \n value, \n memo, \n privateKey, \n gasLimit = 44000 \n}) => {\n const nonce = await web3.eth.getTransactionCount(from);\n const gasPrice = await web3.eth.getGasPrice();\n \n const rawTx = {\n from,\n to,\n value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n gasLimit: web3.utils.toHex(gasLimit),\n gasPrice: web3.utils.toHex(gasPrice),\n nonce: web3.utils.toHex(nonce),\n data: memo,\n };\n \n const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n \n const tx = new Transaction(rawTx);\n \n tx.sign(privateKeyBuffer);\n const serializedTx = tx.serialize();\n \n return this.web3.eth.sendSignedTransaction(\n `0x${serializedTx.toString('hex')}`\n );\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"estimating-transaction-fee"},"children":[{"type":"text","value":"Estimating transaction FEE"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful to get fixed amount of tokens from user with pre-estimated fee."}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nconst estimateFee = async ({\n from,\n to,\n value,\n memo,\n}) => {\n const gasPrice = await web3.eth.getGasPrice();\n const gasLimit = await web3.eth.estimateGas({\n from,\n to,\n value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n data: web3.utils.asciiToHex(memo),\n }).call();\n \n return web3.utils.fromWei(\n BigInt(gasPrice.toString())\n .multiply(BigInt(gasLimit.toString()))\n .toString()\n );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { web3 } from '.';\n\nconst estimateFee = async ({\n from,\n to,\n value,\n memo,\n}) => {\n const gasPrice = await web3.eth.getGasPrice();\n const gasLimit = await web3.eth.estimateGas({\n from,\n to,\n value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n data: web3.utils.asciiToHex(memo),\n }).call();\n \n return web3.utils.fromWei(\n BigInt(gasPrice.toString())\n .multiply(BigInt(gasLimit.toString()))\n .toString()\n );\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-wallet-address-change"},"children":[{"type":"text","value":"Subscribing to wallet address change"}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"watching-network-change"},"children":[{"type":"text","value":"Watching network change"}]},{"type":"element","tag":"code","props":{"code":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"adding-custom-token-to-wallet"},"children":[{"type":"text","value":"Adding custom token to wallet"}]},{"type":"element","tag":"code","props":{"code":"window.ethereum\n .request({\n method: 'wallet_watchAsset',\n params: {\n type: 'ERC20',\n options: {\n address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n symbol: 'FOO',\n decimals: 18,\n image: 'https://foo.io/token-image.svg',\n },\n },\n })\n .then((success) => {\n if (success) {\n console.log('FOO successfully added to wallet!')\n } else {\n throw new Error('Something went wrong.')\n }\n })\n .catch(console.error)\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"window.ethereum\n .request({\n method: 'wallet_watchAsset',\n params: {\n type: 'ERC20',\n options: {\n address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n symbol: 'FOO',\n decimals: 18,\n image: 'https://foo.io/token-image.svg',\n },\n },\n })\n .then((success) => {\n if (success) {\n console.log('FOO successfully added to wallet!')\n } else {\n throw new Error('Something went wrong.')\n }\n })\n .catch(console.error)\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"changing-network-to-custom"},"children":[{"type":"text","value":"Changing network to custom"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Checking current chainId:"}]},{"type":"element","tag":"code","props":{"code":"const getChainID = async () => {\n return ethereum.request({ method: 'eth_chainId' })\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const getChainID = async () => {\n return ethereum.request({ method: 'eth_chainId' })\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Asking wallet to change current network:"}]},{"type":"element","tag":"code","props":{"code":"try {\n await window.ethereum.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n });\n} catch (switchError) {\n // This error code indicates that the chain has not been added to MetaMask.\n if (error.code === 4902) {\n try {\n await window.ethereum.request({\n method: 'wallet_addEthereumChain',\n params: [{ \n chainId: '0x03', // ropsten chainID (3) in hex\n chainName: 'Ropsten Test Network', \n nativeCurrency: { \n name: 'ETH',\n symbol: 'ETH',\n decimals: 18\n }, \n rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n blockExplorerUrls: ['https://ropsten.etherscan.io'] \n }] ,\n });\n } catch (addError) {\n // handle \"add\" error\n }\n }\n // handle other \"switch\" errors\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"try {\n await window.ethereum.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n });\n} catch (switchError) {\n // This error code indicates that the chain has not been added to MetaMask.\n if (error.code === 4902) {\n try {\n await window.ethereum.request({\n method: 'wallet_addEthereumChain',\n params: [{ \n chainId: '0x03', // ropsten chainID (3) in hex\n chainName: 'Ropsten Test Network', \n nativeCurrency: { \n name: 'ETH',\n symbol: 'ETH',\n decimals: 18\n }, \n rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n blockExplorerUrls: ['https://ropsten.etherscan.io'] \n }] ,\n });\n } catch (addError) {\n // handle \"add\" error\n }\n }\n // handle other \"switch\" errors\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Simple #dapp example for tests: "},{"type":"element","tag":"a","props":{"href":"https://metamask.github.io/test-dapp/","rel":["nofollow"]},"children":[{"type":"text","value":"https://metamask.github.io/test-dapp/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Interaction with smart contracts described in "},{"type":"element","tag":"a","props":{"href":"Smart%20contracts"},"children":[{"type":"text","value":"Smart contracts"}]}]}]},{"type":"element","tag":"h2","props":{"id":"connecting-to-node"},"children":[{"type":"text","value":"Connecting to node"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If #Metamask extension installed, "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Web3.givenProvider"}]},{"type":"text","value":" is available in global window. You can use "},{"type":"element","tag":"a","props":{"href":"https://infura.io","rel":["nofollow"]},"children":[{"type":"text","value":"Infura"}]},{"type":"text","value":" or your node instead:"}]},{"type":"element","tag":"code","props":{"code":"import Web3 from 'web3';\n\n// URL of your node\nconst PROVIDER_URL = 'https://...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'web3'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// URL of your node"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'https://...'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"givenProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-balance"},"children":[{"type":"text","value":"Getting wallet balance"}]},{"type":"element","tag":"code","props":{"code":"const getBalance = async (address: string) => {\n return await web3.eth.getBalance(address);\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6b924a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-214987"},"children":[{"type":"text","value":"getBalance"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-43ccc9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6b924a"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-20a880"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-43ccc9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-258e6e"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-6b924a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"getBalance"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"getting-wallet-address"},"children":[{"type":"text","value":"Getting wallet address"}]},{"type":"element","tag":"code","props":{"code":"// first we need to authorize\nconst authorize = async () => {\n await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n// then we can get wallet address\nconst getCurrentAddressUser = () => {\n return web3.currentProvider.selectedAddress;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// first we need to authorize"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'eth_requestAccounts'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// then we can get wallet address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"getCurrentAddressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"selectedAddress"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"sending-transaction"},"children":[{"type":"text","value":"Sending transaction"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sending "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"value"}]},{"type":"text","value":" tokens with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"memo"}]},{"type":"text","value":" as value:"}]},{"type":"element","tag":"code","props":{"code":"\nconst transfer = async ({ \n from, \n to, \n value, \n memo, \n privateKey, \n gasLimit = 44000 \n}) => {\n const nonce = await web3.eth.getTransactionCount(from);\n const gasPrice = await web3.eth.getGasPrice();\n \n const rawTx = {\n from,\n to,\n value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n gasLimit: web3.utils.toHex(gasLimit),\n gasPrice: web3.utils.toHex(gasPrice),\n nonce: web3.utils.toHex(nonce),\n data: memo,\n };\n \n const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n \n const tx = new Transaction(rawTx);\n \n tx.sign(privateKeyBuffer);\n const serializedTx = tx.serialize();\n \n return this.web3.eth.sendSignedTransaction(\n `0x${serializedTx.toString('hex')}`\n );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"transfer"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ({ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"nonce"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"getTransactionCount"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"rawTx"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" value: "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toWei"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'ether'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":")),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" gasLimit: "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" gasPrice: "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" nonce: "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"nonce"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" data: "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"privateKeyBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"EthUtil"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"Transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"rawTx"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"sign"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"privateKeyBuffer"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"serializedTx"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"tx"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"serialize"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"this"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"sendSignedTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"`0x${"}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"serializedTx"}]},{"type":"element","tag":"span","props":{"class":"ct-4cf26c"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-4cf26c"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'hex'"}]},{"type":"element","tag":"span","props":{"class":"ct-4cf26c"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"}`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"estimating-transaction-fee"},"children":[{"type":"text","value":"Estimating transaction FEE"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful to get fixed amount of tokens from user with pre-estimated fee."}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nconst estimateFee = async ({\n from,\n to,\n value,\n memo,\n}) => {\n const gasPrice = await web3.eth.getGasPrice();\n const gasLimit = await web3.eth.estimateGas({\n from,\n to,\n value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n data: web3.utils.asciiToHex(memo),\n }).call();\n \n return web3.utils.fromWei(\n BigInt(gasPrice.toString())\n .multiply(BigInt(gasLimit.toString()))\n .toString()\n );\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"estimateFee"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4450c1"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"estimateGas"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"to"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" value: "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toHex"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toWei"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'ether'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":")),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" data: "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"asciiToHex"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"memo"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" })."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"utils"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"fromWei"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca7e41"},"children":[{"type":"text","value":"BigInt"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"gasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"())"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"multiply"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-ca7e41"},"children":[{"type":"text","value":"BigInt"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"gasLimit"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"()))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"toString"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-wallet-address-change"},"children":[{"type":"text","value":"Subscribing to wallet address change"}]},{"type":"element","tag":"code","props":{"code":"import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'accountsChanged'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"callback"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"watching-network-change"},"children":[{"type":"text","value":"Watching network change"}]},{"type":"element","tag":"code","props":{"code":"ethereum.on('chainChanged', handler: (chainId: string) => void);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'chainChanged'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"handler"}]},{"type":"element","tag":"span","props":{"class":"ct-e10a08"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"adding-custom-token-to-wallet"},"children":[{"type":"text","value":"Adding custom token to wallet"}]},{"type":"element","tag":"code","props":{"code":"window.ethereum\n .request({\n method: 'wallet_watchAsset',\n params: {\n type: 'ERC20',\n options: {\n address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n symbol: 'FOO',\n decimals: 18,\n image: 'https://foo.io/token-image.svg',\n },\n },\n })\n .then((success) => {\n if (success) {\n console.log('FOO successfully added to wallet!')\n } else {\n throw new Error('Something went wrong.')\n }\n })\n .catch(console.error)\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"ethereum"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" method: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'wallet_watchAsset'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" params: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" type: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'ERC20'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" options: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" address: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'0xb60e8dd61c5d32be8058bb8eb970870f07233155'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" symbol: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'FOO'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" decimals: "}]},{"type":"element","tag":"span","props":{"class":"ct-9ace98"},"children":[{"type":"text","value":"18"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" image: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'https://foo.io/token-image.svg'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-214987"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-20a880"},"children":[{"type":"text","value":"success"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-6b924a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-e39819"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"success"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'FOO successfully added to wallet!'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca7e41"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'Something went wrong.'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":")"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"changing-network-to-custom"},"children":[{"type":"text","value":"Changing network to custom"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Checking current chainId:"}]},{"type":"element","tag":"code","props":{"code":"const getChainID = async () => {\n return ethereum.request({ method: 'eth_chainId' })\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"getChainID"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-38e07a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'eth_chainId'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Asking wallet to change current network:"}]},{"type":"element","tag":"code","props":{"code":"try {\n await window.ethereum.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex\n });\n} catch (switchError) {\n // This error code indicates that the chain has not been added to MetaMask.\n if (error.code === 4902) {\n try {\n await window.ethereum.request({\n method: 'wallet_addEthereumChain',\n params: [{ \n chainId: '0x03', // ropsten chainID (3) in hex\n chainName: 'Ropsten Test Network', \n nativeCurrency: { \n name: 'ETH',\n symbol: 'ETH',\n decimals: 18\n }, \n rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], \n blockExplorerUrls: ['https://ropsten.etherscan.io'] \n }] ,\n });\n } catch (addError) {\n // handle \"add\" error\n }\n }\n // handle other \"switch\" errors\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" method: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'wallet_switchEthereumChain'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" params: [{ chainId: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'0x03'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" }], "}]},{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// ropsten chainID (3) in hex"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"switchError"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// This error code indicates that the chain has not been added to MetaMask."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"code"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9ace98"},"children":[{"type":"text","value":"4902"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"window"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"ethereum"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-0d36f8"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" method: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'wallet_addEthereumChain'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" params: [{ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" chainId: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'0x03'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// ropsten chainID (3) in hex"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" chainName: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'Ropsten Test Network'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" nativeCurrency: { "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" name: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'ETH'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" symbol: "}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'ETH'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" decimals: "}]},{"type":"element","tag":"span","props":{"class":"ct-9ace98"},"children":[{"type":"text","value":"18"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" }, "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" rpcUrls: ["}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"], "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" blockExplorerUrls: ["}]},{"type":"element","tag":"span","props":{"class":"ct-b27b08"},"children":[{"type":"text","value":"'https://ropsten.etherscan.io'"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"] "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" }] ,"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-7b29aa"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-6452fd"},"children":[{"type":"text","value":"addError"}]},{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// handle \"add\" error"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-caa1f8"},"children":[{"type":"text","value":"// handle other \"switch\" errors"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-cd469a"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-9ace98{color:#79C0FF}.ct-e10a08{color:#C9D1D9}.ct-ca7e41{color:#79C0FF}.ct-4cf26c{color:#A5D6FF}.ct-258e6e{color:#79C0FF}.ct-20a880{color:#FFA657}.ct-43ccc9{color:#FF7B72}.ct-214987{color:#D2A8FF}.ct-e39819{color:#C9D1D9}.ct-6b924a{color:#FF7B72}.ct-0d36f8{color:#D2A8FF}.ct-4450c1{color:#79C0FF}.ct-38e07a{color:#FF7B72}.ct-caa1f8{color:#8B949E}.ct-b27b08{color:#A5D6FF}.ct-6452fd{color:#C9D1D9}.ct-cd469a{color:#C9D1D9}.ct-7b29aa{color:#FF7B72}.light .ct-7b29aa{color:#859900}.light .ct-cd469a{color:#657B83}.light .ct-6452fd{color:#268BD2}.light .ct-b27b08{color:#2AA198}.light .ct-caa1f8{color:#93A1A1}.light .ct-38e07a{color:#073642}.light .ct-4450c1{color:#268BD2}.light .ct-0d36f8{color:#268BD2}.light .ct-6b924a{color:#073642}.light .ct-e39819{color:#657B83}.light .ct-214987{color:#268BD2}.light .ct-43ccc9{color:#859900}.light .ct-20a880{color:#657B83}.light .ct-258e6e{color:#859900}.light .ct-4cf26c{color:#657B83}.light .ct-ca7e41{color:#859900}.light .ct-e10a08{color:#859900}.light .ct-9ace98{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"connecting-to-node","depth":2,"text":"Connecting to node"},{"id":"getting-wallet-balance","depth":2,"text":"Getting wallet balance"},{"id":"getting-wallet-address","depth":2,"text":"Getting wallet address"},{"id":"sending-transaction","depth":2,"text":"Sending transaction"},{"id":"estimating-transaction-fee","depth":2,"text":"Estimating transaction FEE"},{"id":"subscribing-to-wallet-address-change","depth":2,"text":"Subscribing to wallet address change"},{"id":"watching-network-change","depth":2,"text":"Watching network change"},{"id":"adding-custom-token-to-wallet","depth":2,"text":"Adding custom token to wallet"},{"id":"changing-network-to-custom","depth":2,"text":"Changing network to custom"}]}},"_type":"markdown","_id":"content:Blockchain:Common typescript examples.md","_source":"content","_file":"Blockchain/Common typescript examples.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/CMMQ5oxSPg.json b/api/_content/query/CMMQ5oxSPg.json new file mode 100644 index 0000000..492a82a --- /dev/null +++ b/api/_content/query/CMMQ5oxSPg.json @@ -0,0 +1 @@ +{"_path":"/frontend/react/axios-with-abortcontroller","_dir":"react","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Axios With AbortController","description":"If you need to cancel some request, use axios with AbortController. Previously axios used cancellation token, but now it's deprecated.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to cancel some request, use "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/cancellation","rel":["nofollow"]},"children":[{"type":"text","value":"axios with AbortController"}]},{"type":"text","value":". Previously axios used cancellation token, but now it's deprecated."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"AbortController"}]},{"type":"text","value":" can be used with a multiple requests to cancel them at once."}]},{"type":"element","tag":"code","props":{"code":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n const controller = useRef(new AbortController());\n \n const get = useCallback(async () => {\n const result = await client.get(\"/\", {\n // params and props here\n signal: controller.current.signal,\n });\n\n return result.data;\n }, []);\n\n const cancel = useCallback(() => {\n controller.current.abort();\n \n // controller should be rewritten or all requests will fail\n controller.current = new AbortController();\n }, [controller]);\n\n return { get, cancel };\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n const controller = useRef(new AbortController());\n \n const get = useCallback(async () => {\n const result = await client.get(\"/\", {\n // params and props here\n signal: controller.current.signal,\n });\n\n return result.data;\n }, []);\n\n const cancel = useCallback(() => {\n controller.current.abort();\n \n // controller should be rewritten or all requests will fail\n controller.current = new AbortController();\n }, [controller]);\n\n return { get, cancel };\n};\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to cancel some request, use "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/cancellation","rel":["nofollow"]},"children":[{"type":"text","value":"axios with AbortController"}]},{"type":"text","value":". Previously axios used cancellation token, but now it's deprecated."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"AbortController"}]},{"type":"text","value":" can be used with a multiple requests to cancel them at once."}]},{"type":"element","tag":"code","props":{"code":"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () => {\n const controller = useRef(new AbortController());\n \n const get = useCallback(async () => {\n const result = await client.get(\"/\", {\n // params and props here\n signal: controller.current.signal,\n });\n\n return result.data;\n }, []);\n\n const cancel = useCallback(() => {\n controller.current.abort();\n \n // controller should be rewritten or all requests will fail\n controller.current = new AbortController();\n }, [controller]);\n\n return { get, cancel };\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c6e561"},"children":[{"type":"text","value":"\"react\""}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c6e561"},"children":[{"type":"text","value":"'axios'"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ffae3f"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"useGetUsers"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ffae3f"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"AbortController"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"());"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ffae3f"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ffae3f"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-c6e561"},"children":[{"type":"text","value":"\"/\""}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-90eb0e"},"children":[{"type":"text","value":"// params and props here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" signal: "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"signal"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"data"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ffae3f"},"children":[{"type":"text","value":"cancel"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-e623bb"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"abort"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-90eb0e"},"children":[{"type":"text","value":"// controller should be rewritten or all requests will fail"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-24254f"},"children":[{"type":"text","value":"AbortController"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" }, ["}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"controller"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"]);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ca69a5"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-c8d839"},"children":[{"type":"text","value":"cancel"}]},{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f54e97"},"children":[{"type":"text","value":"};"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-90eb0e{color:#8B949E}.ct-24254f{color:#D2A8FF}.ct-ffae3f{color:#79C0FF}.ct-e623bb{color:#FF7B72}.ct-c6e561{color:#A5D6FF}.ct-c8d839{color:#C9D1D9}.ct-f54e97{color:#C9D1D9}.ct-ca69a5{color:#FF7B72}.light .ct-ca69a5{color:#859900}.light .ct-f54e97{color:#657B83}.light .ct-c8d839{color:#268BD2}.light .ct-c6e561{color:#2AA198}.light .ct-e623bb{color:#073642}.light .ct-ffae3f{color:#268BD2}.light .ct-24254f{color:#268BD2}.light .ct-90eb0e{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React:Axios with AbortController.md","_source":"content","_file":"Frontend/React/Axios with AbortController.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/DliR2N9mzp.json b/api/_content/query/DliR2N9mzp.json new file mode 100644 index 0000000..a333d15 --- /dev/null +++ b/api/_content/query/DliR2N9mzp.json @@ -0,0 +1 @@ +{"_path":"/linux/setting-up-nginx","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Setting Up NGINX","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"fallback-url-for-spa-s"},"children":[{"type":"text","value":"Fallback url for SPA-s"}]},{"type":"element","tag":"code","props":{"code":"server {\n # ...\n location / {\n # First attempt to serve request as file, then\n # as directory, then fall back to displaying a 404.\n try_files $uri $uri/ =404;\n }\n # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n # ...\n location / {\n # First attempt to serve request as file, then\n # as directory, then fall back to displaying a 404.\n try_files $uri $uri/ =404;\n }\n # ...\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-up-for-uploads"},"children":[{"type":"text","value":"Set up for uploads"}]},{"type":"element","tag":"code","props":{"code":"server {\n # ...\n client_max_body_size 200M;\n # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n # ...\n client_max_body_size 200M;\n # ...\n}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"reverse-proxy-for-https"},"children":[{"type":"text","value":"Reverse proxy for https"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Given config forwards "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https"}]},{"type":"text","value":" traffic to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"http"}]},{"type":"text","value":" on port "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"8080"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"https://next.vault48.org","rel":["nofollow"]},"children":[{"type":"text","value":"https://next.vault48.org"}]},{"type":"text","value":"\nwith http2 support if possible."}]},{"type":"element","tag":"code","props":{"code":"server {\n listen 80;\n server_name next.vault48.org;\n return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n listen 443 ssl http2;\n listen [::]:443 ssl http2;\n \n # managed by Certbot\n ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n \n server_name next.vault48.org;\n \n location / {\n proxy_redirect off;\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n \n proxy_pass http://127.0.0.1:8080;\n }\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"server {\n listen 80;\n server_name next.vault48.org;\n return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n listen 443 ssl http2;\n listen [::]:443 ssl http2;\n \n # managed by Certbot\n ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n \n server_name next.vault48.org;\n \n location / {\n proxy_redirect off;\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n \n proxy_pass http://127.0.0.1:8080;\n }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"fallback-url-for-spa-s"},"children":[{"type":"text","value":"Fallback url for SPA-s"}]},{"type":"element","tag":"code","props":{"code":"server {\n # ...\n location / {\n # First attempt to serve request as file, then\n # as directory, then fall back to displaying a 404.\n try_files $uri $uri/ =404;\n }\n # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-25ac06"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-664979"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-833e46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1d8091"},"children":[{"type":"text","value":"location"}]},{"type":"element","tag":"span","props":{"class":"ct-833e46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3285a1"},"children":[{"type":"text","value":"/ "}]},{"type":"element","tag":"span","props":{"class":"ct-833e46"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-664979"},"children":[{"type":"text","value":"# First attempt to serve request as file, then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-664979"},"children":[{"type":"text","value":"# as directory, then fall back to displaying a 404."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-98243f"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-664979"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-up-for-uploads"},"children":[{"type":"text","value":"Set up for uploads"}]},{"type":"element","tag":"code","props":{"code":"server {\n # ...\n client_max_body_size 200M;\n # ...\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-25ac06"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-664979"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" client_max_body_size "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"200M;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-664979"},"children":[{"type":"text","value":"# ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"reverse-proxy-for-https"},"children":[{"type":"text","value":"Reverse proxy for https"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Given config forwards "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https"}]},{"type":"text","value":" traffic to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"http"}]},{"type":"text","value":" on port "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"8080"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"https://next.vault48.org","rel":["nofollow"]},"children":[{"type":"text","value":"https://next.vault48.org"}]},{"type":"text","value":"\nwith http2 support if possible."}]},{"type":"element","tag":"code","props":{"code":"server {\n listen 80;\n server_name next.vault48.org;\n return 301 https://next.vault48.org$request_uri;\n}\n\nserver {\n listen 443 ssl http2;\n listen [::]:443 ssl http2;\n \n # managed by Certbot\n ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; \n ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; \n ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;\n \n server_name next.vault48.org;\n \n location / {\n proxy_redirect off;\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n \n proxy_pass http://127.0.0.1:8080;\n }\n}\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-25ac06"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"80;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" server_name "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"next.vault48.org;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a384e4"},"children":[{"type":"text","value":"301"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" https://next.vault48.org"}]},{"type":"element","tag":"span","props":{"class":"ct-f5033a"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-b94b63"},"children":[{"type":"text","value":"request_uri"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-25ac06"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"443 ssl http2;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" listen "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"[::]:443 ssl http2;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-664979"},"children":[{"type":"text","value":"# managed by Certbot"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" ssl_certificate "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/fullchain.pem; "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" ssl_certificate_key "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/privkey.pem; "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" ssl_trusted_certificate "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"/etc/letsencrypt/live/vault48.org/chain.pem;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" server_name "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"next.vault48.org;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-833e46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1d8091"},"children":[{"type":"text","value":"location"}]},{"type":"element","tag":"span","props":{"class":"ct-833e46"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3285a1"},"children":[{"type":"text","value":"/ "}]},{"type":"element","tag":"span","props":{"class":"ct-833e46"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" proxy_redirect "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"off;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"Host "}]},{"type":"element","tag":"span","props":{"class":"ct-f5033a"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-b94b63"},"children":[{"type":"text","value":"host"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"X-Real-IP "}]},{"type":"element","tag":"span","props":{"class":"ct-f5033a"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-b94b63"},"children":[{"type":"text","value":"remote_addr"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" proxy_set_header "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"X-Forwarded-For "}]},{"type":"element","tag":"span","props":{"class":"ct-f5033a"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-b94b63"},"children":[{"type":"text","value":"proxy_add_x_forwarded_for"}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14047d"},"children":[{"type":"text","value":" proxy_pass "}]},{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"http://127.0.0.1:8080;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ca6963"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-b94b63{color:#C9D1D9}.ct-f5033a{color:#C9D1D9}.ct-a384e4{color:#79C0FF}.ct-14047d{color:#FF7B72}.ct-98243f{color:#FF7B72}.ct-3285a1{color:#FFA657}.ct-1d8091{color:#FF7B72}.ct-833e46{color:#C9D1D9}.ct-664979{color:#8B949E}.ct-ca6963{color:#C9D1D9}.ct-25ac06{color:#FF7B72}.light .ct-25ac06{color:#073642}.light .ct-ca6963{color:#657B83}.light .ct-664979{color:#93A1A1}.light .ct-833e46{color:#657B83}.light .ct-1d8091{color:#073642}.light .ct-3285a1{color:#657B83}.light .ct-98243f{color:#657B83}.light .ct-14047d{color:#859900}.light .ct-a384e4{color:#D33682}.light .ct-f5033a{color:#859900}.light .ct-b94b63{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"fallback-url-for-spa-s","depth":2,"text":"Fallback url for SPA-s"},{"id":"set-up-for-uploads","depth":2,"text":"Set up for uploads"},{"id":"reverse-proxy-for-https","depth":2,"text":"Reverse proxy for https"}]}},"_type":"markdown","_id":"content:Linux:Setting up NGINX.md","_source":"content","_file":"Linux/Setting up NGINX.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/EH6LeCIDqM.json b/api/_content/query/EH6LeCIDqM.json new file mode 100644 index 0000000..958ab26 --- /dev/null +++ b/api/_content/query/EH6LeCIDqM.json @@ -0,0 +1 @@ +{"_path":"/docker/private-docker-registry","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Private Docker Registry","description":"Suitable to work with Drone-ci for hosting private #docker images.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Suitable to work with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" for hosting private #docker images."}]},{"type":"element","tag":"h2","props":{"id":"sample-docker-compose-for-custom-docker-registry"},"children":[{"type":"text","value":"Sample docker-compose for custom docker registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This one brings up private docker registry with ui. First you'll need to generate password for it:"}]},{"type":"element","tag":"code","props":{"code":"docker run \\\n --entrypoint htpasswd registry:2 \\\n -Bbn user mypassword > auth/registry.password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"docker run \\\n --entrypoint htpasswd registry:2 \\\n -Bbn user mypassword > auth/registry.password\n"}]}]}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\nservices:\n registry:\n container_name: docker__registry\n image: registry:2\n ports:\n - 5000:5000\n restart: always\n environment:\n - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n - REGISTRY_AUTH=htpasswd\n - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n - REGISTRY_HTTP_SECRET=password\n - REGISTRY_STORAGE_DELETE_ENABLED=true\n volumes:\n - ./registry/auth:/auth\n - ./registry/data:/data\n ui:\n container_name: docker__ui\n image: parabuzzle/craneoperator:latest\n ports:\n - 80:80\n restart: always\n environment:\n - REGISTRY_HOST=registry\n - REGISTRY_PORT=5000\n - REGISTRY_PROTOCOL=http\n - ALLOW_REGISTRY_LOGIN=true\n - REGISTRY_ALLOW_DELETE=true\n - USERNAME=registry\n - PASSWORD=password\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\nservices:\n registry:\n container_name: docker__registry\n image: registry:2\n ports:\n - 5000:5000\n restart: always\n environment:\n - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n - REGISTRY_AUTH=htpasswd\n - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n - REGISTRY_HTTP_SECRET=password\n - REGISTRY_STORAGE_DELETE_ENABLED=true\n volumes:\n - ./registry/auth:/auth\n - ./registry/data:/data\n ui:\n container_name: docker__ui\n image: parabuzzle/craneoperator:latest\n ports:\n - 80:80\n restart: always\n environment:\n - REGISTRY_HOST=registry\n - REGISTRY_PORT=5000\n - REGISTRY_PROTOCOL=http\n - ALLOW_REGISTRY_LOGIN=true\n - REGISTRY_ALLOW_DELETE=true\n - USERNAME=registry\n - PASSWORD=password\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"squash-layers-on-registry"},"children":[{"type":"text","value":"Squash layers on registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to squash all layers in docker registry to free up disk space."}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Run this command to mark oldest layers"}]}]},{"type":"element","tag":"code","props":{"code":"# Try this first\ndocker run \\\n --rm anoxis/registry-cli \\\n -r https://registry.url \\\n -l user:password \\\n --delete \\\n --num 2\n\n# Then this \ndocker run -it \\\n -v /path/to/registry/data:/registry \\\n -e REGISTRY_URL=https://registry.url \\\n -e DRY_RUN=\"false\" \\\n -e REGISTRY_AUTH=\"user:password\" \\\n mortensrasmussen/docker-registry-manifest-cleanup\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Try this first\ndocker run \\\n --rm anoxis/registry-cli \\\n -r https://registry.url \\\n -l user:password \\\n --delete \\\n --num 2\n\n# Then this \ndocker run -it \\\n -v /path/to/registry/data:/registry \\\n -e REGISTRY_URL=https://registry.url \\\n -e DRY_RUN=\"false\" \\\n -e REGISTRY_AUTH=\"user:password\" \\\n mortensrasmussen/docker-registry-manifest-cleanup\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Suitable to work with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" for hosting private #docker images."}]},{"type":"element","tag":"h2","props":{"id":"sample-docker-compose-for-custom-docker-registry"},"children":[{"type":"text","value":"Sample docker-compose for custom docker registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This one brings up private docker registry with ui. First you'll need to generate password for it:"}]},{"type":"element","tag":"code","props":{"code":"docker run \\\n --entrypoint htpasswd registry:2 \\\n -Bbn user mypassword > auth/registry.password\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":"docker run \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" --entrypoint htpasswd registry:2 \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" -Bbn user mypassword "}]},{"type":"element","tag":"span","props":{"class":"ct-4db34e"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" auth/registry.password"}]}]}]}]}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\nservices:\n registry:\n container_name: docker__registry\n image: registry:2\n ports:\n - 5000:5000\n restart: always\n environment:\n - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data\n - REGISTRY_AUTH=htpasswd\n - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password\n - REGISTRY_HTTP_SECRET=password\n - REGISTRY_STORAGE_DELETE_ENABLED=true\n volumes:\n - ./registry/auth:/auth\n - ./registry/data:/data\n ui:\n container_name: docker__ui\n image: parabuzzle/craneoperator:latest\n ports:\n - 80:80\n restart: always\n environment:\n - REGISTRY_HOST=registry\n - REGISTRY_PORT=5000\n - REGISTRY_PROTOCOL=http\n - ALLOW_REGISTRY_LOGIN=true\n - REGISTRY_ALLOW_DELETE=true\n - USERNAME=registry\n - PASSWORD=password\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"registry"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"docker__registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"registry:2"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"5000:5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_AUTH=htpasswd"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_AUTH_HTPASSWD_REALM=Registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_HTTP_SECRET=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_STORAGE_DELETE_ENABLED=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"./registry/auth:/auth"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"./registry/data:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"ui"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"docker__ui"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"parabuzzle/craneoperator:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"80:80"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-540e92"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_HOST=registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_PORT=5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_PROTOCOL=http"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"ALLOW_REGISTRY_LOGIN=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"REGISTRY_ALLOW_DELETE=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"USERNAME=registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"PASSWORD=password"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"squash-layers-on-registry"},"children":[{"type":"text","value":"Squash layers on registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to squash all layers in docker registry to free up disk space."}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Run this command to mark oldest layers"}]}]},{"type":"element","tag":"code","props":{"code":"# Try this first\ndocker run \\\n --rm anoxis/registry-cli \\\n -r https://registry.url \\\n -l user:password \\\n --delete \\\n --num 2\n\n# Then this \ndocker run -it \\\n -v /path/to/registry/data:/registry \\\n -e REGISTRY_URL=https://registry.url \\\n -e DRY_RUN=\"false\" \\\n -e REGISTRY_AUTH=\"user:password\" \\\n mortensrasmussen/docker-registry-manifest-cleanup\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-94dce8"},"children":[{"type":"text","value":"# Try this first"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":"docker run \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" --rm anoxis/registry-cli \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" -r https://registry.url \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" -l user:password \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" --delete \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" --num 2"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-94dce8"},"children":[{"type":"text","value":"# Then this "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":"docker run -it \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" -v /path/to/registry/data:/registry \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" -e REGISTRY_URL=https://registry.url \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" -e DRY_RUN="}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" -e REGISTRY_AUTH="}]},{"type":"element","tag":"span","props":{"class":"ct-ab8ffd"},"children":[{"type":"text","value":"\"user:password\""}]},{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6431bf"},"children":[{"type":"text","value":" mortensrasmussen/docker-registry-manifest-cleanup"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-94dce8{color:#8B949E}.ct-ab8ffd{color:#A5D6FF}.ct-540e92{color:#7EE787}.ct-4db34e{color:#FF7B72}.ct-6431bf{color:#C9D1D9}.light .ct-6431bf{color:#657B83}.light .ct-4db34e{color:#859900}.light .ct-540e92{color:#268BD2}.light .ct-ab8ffd{color:#2AA198}.light .ct-94dce8{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"sample-docker-compose-for-custom-docker-registry","depth":2,"text":"Sample docker-compose for custom docker registry"},{"id":"squash-layers-on-registry","depth":2,"text":"Squash layers on registry"}]}},"_type":"markdown","_id":"content:Docker:Private docker registry.md","_source":"content","_file":"Docker/Private docker registry.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/FLiVxDo2qK.json b/api/_content/query/FLiVxDo2qK.json new file mode 100644 index 0000000..c56029f --- /dev/null +++ b/api/_content/query/FLiVxDo2qK.json @@ -0,0 +1 @@ +{"_path":"/typescript/add-global-variable-to-window","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Add Global Variable To Window","description":"Sometimes you want to add global variable to your window. That thing's called global module augmentation.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you want to add global variable to your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":". That thing's called "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"global module augmentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say you need to call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.doFancyThings()"}]},{"type":"text","value":". For that you should augment global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" interface in "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"*.d.ts"}]},{"type":"text","value":" file:"}]},{"type":"element","tag":"code","props":{"code":"declare global {\n interface Window {\n doFancyThings: () => void;\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"declare global {\n interface Window {\n doFancyThings: () => void;\n }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is useful for declaring global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.ethereum"}]},{"type":"text","value":" (or "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.web3"}]},{"type":"text","value":") in "},{"type":"element","tag":"a","props":{"href":"/blockchain/Common%20typescript%20examples"},"children":[{"type":"text","value":"blockchain"}]},{"type":"text","value":" projects with typescript, which use wallet browser extensions."}]},{"type":"element","tag":"h2","props":{"id":"augmenting-existing-interface"},"children":[{"type":"text","value":"Augmenting existing interface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you have class "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Sample"}]},{"type":"text","value":" without any functionality:"}]},{"type":"element","tag":"code","props":{"code":"// Sample.ts\n\nexport class Sample {\n // nothing :-)\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// Sample.ts\n\nexport class Sample {\n // nothing :-)\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then you want extend it with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"doFancyThings()"}]},{"type":"text","value":" method. That can be achieved with said "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"module augmentation"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n interface Sample {\n doFancyThings: () => void;\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n interface Sample {\n doFancyThings: () => void;\n }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now you can call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"sample.doFancyThings()"}]},{"type":"text","value":" by importing both "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".ts"}]},{"type":"text","value":" files:"}]},{"type":"element","tag":"code","props":{"code":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This example is useful for "},{"type":"element","tag":"a","props":{"href":"./Frontend/Vue/Adding%20global%20properties%20to%20component"},"children":[{"type":"text","value":"adding global properties to component"}]},{"type":"text","value":" in vue.js."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you want to add global variable to your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":". That thing's called "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"global module augmentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say you need to call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.doFancyThings()"}]},{"type":"text","value":". For that you should augment global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" interface in "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"*.d.ts"}]},{"type":"text","value":" file:"}]},{"type":"element","tag":"code","props":{"code":"declare global {\n interface Window {\n doFancyThings: () => void;\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-76423f"},"children":[{"type":"text","value":"global"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aab988"},"children":[{"type":"text","value":"Window"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f0bc9a"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a1f492"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is useful for declaring global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.ethereum"}]},{"type":"text","value":" (or "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"window.web3"}]},{"type":"text","value":") in "},{"type":"element","tag":"a","props":{"href":"/blockchain/Common%20typescript%20examples"},"children":[{"type":"text","value":"blockchain"}]},{"type":"text","value":" projects with typescript, which use wallet browser extensions."}]},{"type":"element","tag":"h2","props":{"id":"augmenting-existing-interface"},"children":[{"type":"text","value":"Augmenting existing interface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you have class "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Sample"}]},{"type":"text","value":" without any functionality:"}]},{"type":"element","tag":"code","props":{"code":"// Sample.ts\n\nexport class Sample {\n // nothing :-)\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-46d873"},"children":[{"type":"text","value":"// Sample.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"class"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aab988"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-46d873"},"children":[{"type":"text","value":"// nothing :-)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then you want extend it with "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"doFancyThings()"}]},{"type":"text","value":" method. That can be achieved with said "},{"type":"element","tag":"a","props":{"href":"https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation","rel":["nofollow"]},"children":[{"type":"text","value":"module augmentation"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"// fancyThings.ts\nimport { Sample } from \"./Sample\";\n\ndeclare module \"./Sample\" {\n interface Sample {\n doFancyThings: () => void;\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-46d873"},"children":[{"type":"text","value":"// fancyThings.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-76423f"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-309c27"},"children":[{"type":"text","value":"\"./Sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"module"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-309c27"},"children":[{"type":"text","value":"\"./Sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aab988"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f0bc9a"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a1f492"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now you can call "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"sample.doFancyThings()"}]},{"type":"text","value":" by importing both "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".ts"}]},{"type":"text","value":" files:"}]},{"type":"element","tag":"code","props":{"code":"import { Sample } from \"./sample\";\nimport \"./fancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); // ok\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-76423f"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-309c27"},"children":[{"type":"text","value":"\"./sample\""}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-309c27"},"children":[{"type":"text","value":"\"./fancyThings\""}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-580441"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-697848"},"children":[{"type":"text","value":"sample"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-754e74"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f0bc9a"},"children":[{"type":"text","value":"Sample"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-76423f"},"children":[{"type":"text","value":"sample"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-f0bc9a"},"children":[{"type":"text","value":"doFancyThings"}]},{"type":"element","tag":"span","props":{"class":"ct-e6aa60"},"children":[{"type":"text","value":"(); "}]},{"type":"element","tag":"span","props":{"class":"ct-46d873"},"children":[{"type":"text","value":"// ok"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This example is useful for "},{"type":"element","tag":"a","props":{"href":"./Frontend/Vue/Adding%20global%20properties%20to%20component"},"children":[{"type":"text","value":"adding global properties to component"}]},{"type":"text","value":" in vue.js."}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-697848{color:#79C0FF}.ct-309c27{color:#A5D6FF}.ct-46d873{color:#8B949E}.ct-a1f492{color:#79C0FF}.ct-754e74{color:#FF7B72}.ct-f0bc9a{color:#D2A8FF}.ct-aab988{color:#FFA657}.ct-76423f{color:#C9D1D9}.ct-e6aa60{color:#C9D1D9}.ct-580441{color:#FF7B72}.light .ct-580441{color:#073642}.light .ct-e6aa60{color:#657B83}.light .ct-76423f{color:#268BD2}.light .ct-aab988{color:#268BD2}.light .ct-f0bc9a{color:#268BD2}.light .ct-754e74{color:#859900}.light .ct-a1f492{color:#859900}.light .ct-46d873{color:#93A1A1}.light .ct-309c27{color:#2AA198}.light .ct-697848{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"augmenting-existing-interface","depth":2,"text":"Augmenting existing interface"}]}},"_type":"markdown","_id":"content:Typescript:Add global variable to window.md","_source":"content","_file":"Typescript/Add global variable to window.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/KIXVn92YTN.json b/api/_content/query/KIXVn92YTN.json new file mode 100644 index 0000000..f1f2d35 --- /dev/null +++ b/api/_content/query/KIXVn92YTN.json @@ -0,0 +1 @@ +{"_path":"/frontend/react/axios-refresh-token-on-react","_dir":"react","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Axios Refresh Token On React","description":" component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":""}]},{"type":"text","value":" component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props."}]},{"type":"element","tag":"code","props":{"code":"import axios from \"axios\";\nimport React, {\n createContext,\n FC,\n PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n tokens: {\n access: string;\n refresh: string;\n };\n logout: () => void;\n}\n\nconst APIContext = createContext({\n client: axios.create({\n baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n }),\n});\n\nconst APIProvider: FC = ({ \n tokens, \n logout, \n children,\n}) => {\n const client = useRef(\n axios.create({\n baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n })\n ).current;\n\n const refreshTokens = useCallback<() => string>(() => {\n // TODO: implement me\n throw new Error(\"not implemented\");\n }, []);\n\n useEffect(() => {\n if (!tokens.access) {\n return;\n }\n\n // append `access` token to all requests\n const req = client.interceptors.request.use(\n async (config) => {\n config.headers = {\n Authorization: `Bearer ${tokens.access}`,\n };\n return config;\n },\n (error) => {\n Promise.reject(error);\n }\n );\n\n // refreshing interceptor\n const resp = client.interceptors.response.use(\n (response) => {\n return response;\n },\n async function (error) {\n const originalRequest = error.config;\n\n if (error.response.status === 401 && !originalRequest._retry) {\n originalRequest._retry = true;\n\n const newToken = refreshTokens;\n\n return axios({\n ...originalRequest,\n headers: {\n ...originalRequest.headers,\n Authorization: \"Bearer \" + newToken,\n },\n });\n }\n\n logout();\n return Promise.reject(error);\n }\n );\n\n return () => {\n axios.interceptors.request.eject(req);\n axios.interceptors.request.eject(resp);\n };\n }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import axios from \"axios\";\nimport React, {\n createContext,\n FC,\n PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n tokens: {\n access: string;\n refresh: string;\n };\n logout: () => void;\n}\n\nconst APIContext = createContext({\n client: axios.create({\n baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n }),\n});\n\nconst APIProvider: FC = ({ \n tokens, \n logout, \n children,\n}) => {\n const client = useRef(\n axios.create({\n baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n })\n ).current;\n\n const refreshTokens = useCallback<() => string>(() => {\n // TODO: implement me\n throw new Error(\"not implemented\");\n }, []);\n\n useEffect(() => {\n if (!tokens.access) {\n return;\n }\n\n // append `access` token to all requests\n const req = client.interceptors.request.use(\n async (config) => {\n config.headers = {\n Authorization: `Bearer ${tokens.access}`,\n };\n return config;\n },\n (error) => {\n Promise.reject(error);\n }\n );\n\n // refreshing interceptor\n const resp = client.interceptors.response.use(\n (response) => {\n return response;\n },\n async function (error) {\n const originalRequest = error.config;\n\n if (error.response.status === 401 && !originalRequest._retry) {\n originalRequest._retry = true;\n\n const newToken = refreshTokens;\n\n return axios({\n ...originalRequest,\n headers: {\n ...originalRequest.headers,\n Authorization: \"Bearer \" + newToken,\n },\n });\n }\n\n logout();\n return Promise.reject(error);\n }\n );\n\n return () => {\n axios.interceptors.request.eject(req);\n axios.interceptors.request.eject(resp);\n };\n }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":""}]},{"type":"text","value":" component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props."}]},{"type":"element","tag":"code","props":{"code":"import axios from \"axios\";\nimport React, {\n createContext,\n FC,\n PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n tokens: {\n access: string;\n refresh: string;\n };\n logout: () => void;\n}\n\nconst APIContext = createContext({\n client: axios.create({\n baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n }),\n});\n\nconst APIProvider: FC = ({ \n tokens, \n logout, \n children,\n}) => {\n const client = useRef(\n axios.create({\n baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n })\n ).current;\n\n const refreshTokens = useCallback<() => string>(() => {\n // TODO: implement me\n throw new Error(\"not implemented\");\n }, []);\n\n useEffect(() => {\n if (!tokens.access) {\n return;\n }\n\n // append `access` token to all requests\n const req = client.interceptors.request.use(\n async (config) => {\n config.headers = {\n Authorization: `Bearer ${tokens.access}`,\n };\n return config;\n },\n (error) => {\n Promise.reject(error);\n }\n );\n\n // refreshing interceptor\n const resp = client.interceptors.response.use(\n (response) => {\n return response;\n },\n async function (error) {\n const originalRequest = error.config;\n\n if (error.response.status === 401 && !originalRequest._retry) {\n originalRequest._retry = true;\n\n const newToken = refreshTokens;\n\n return axios({\n ...originalRequest,\n headers: {\n ...originalRequest.headers,\n Authorization: \"Bearer \" + newToken,\n },\n });\n }\n\n logout();\n return Promise.reject(error);\n }\n );\n\n return () => {\n axios.interceptors.request.eject(req);\n axios.interceptors.request.eject(resp);\n };\n }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useAPI = () => useContext(APIContext).client;\n\nexport { APIProvider };\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cdcb1e"},"children":[{"type":"text","value":"\"axios\""}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"React"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"createContext"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"PropsWithChildren"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"useContext"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"useEffect"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cdcb1e"},"children":[{"type":"text","value":"\"react\""}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-005a6c"},"children":[{"type":"text","value":"APIProviderProps"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cb2db9"},"children":[{"type":"text","value":"PropsWithChildren"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-afc73c"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-afc73c"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f0eff0"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"refresh"}]},{"type":"element","tag":"span","props":{"class":"ct-afc73c"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f0eff0"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f8ba82"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"createContext"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" client: "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" baseURL: "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"process"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"env"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"NEXT_PUBLIC_API_ENDPOINT"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"APIProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9af740"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-9af740"},"children":[{"type":"text","value":"APIProviderProps"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" ({ "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"children"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"}) "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"create"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" baseURL: "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"process"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"env"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"NEXT_PUBLIC_API_ENDPOINT"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" )."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"<() "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f8ba82"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":">(() "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8069ea"},"children":[{"type":"text","value":"// TODO: implement me"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f8ba82"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-cdcb1e"},"children":[{"type":"text","value":"\"not implemented\""}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"useEffect"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8069ea"},"children":[{"type":"text","value":"// append `access` token to all requests"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"req"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"use"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" Authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-cdcb1e"},"children":[{"type":"text","value":"`Bearer ${"}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-63ec24"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-cdcb1e"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f8ba82"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8069ea"},"children":[{"type":"text","value":"// refreshing interceptor"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"resp"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"use"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4ea82c"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"config"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"status"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-30ee2f"},"children":[{"type":"text","value":"401"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"_retry"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"_retry"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6fcf02"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62a4b7"},"children":[{"type":"text","value":"newToken"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"originalRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" Authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-cdcb1e"},"children":[{"type":"text","value":"\"Bearer \""}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"newToken"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f8ba82"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"eject"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"req"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"interceptors"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"eject"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"resp"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }, ["}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"access"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"refresh"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"refreshTokens"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"]);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"Provider"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"{{ "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" }}"}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":">"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":" {"}]},{"type":"element","tag":"span","props":{"class":"ct-74e615"},"children":[{"type":"text","value":"children"}]},{"type":"element","tag":"span","props":{"class":"ct-70c1b9"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"useAPI"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-35cf76"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-fddbd1"},"children":[{"type":"text","value":"useContext"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"APIContext"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"client"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-7a9050"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-a0bdfd"},"children":[{"type":"text","value":"APIProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-59620a"},"children":[{"type":"text","value":" };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-6fcf02{color:#79C0FF}.ct-30ee2f{color:#79C0FF}.ct-63ec24{color:#A5D6FF}.ct-8069ea{color:#8B949E}.ct-9af740{color:#FFA657}.ct-62a4b7{color:#79C0FF}.ct-f8ba82{color:#79C0FF}.ct-35cf76{color:#FF7B72}.ct-fddbd1{color:#D2A8FF}.ct-f0eff0{color:#79C0FF}.ct-afc73c{color:#FF7B72}.ct-74e615{color:#FFA657}.ct-cb2db9{color:#79C0FF}.ct-005a6c{color:#FFA657}.ct-70c1b9{color:#C9D1D9}.ct-4ea82c{color:#FF7B72}.ct-cdcb1e{color:#A5D6FF}.ct-a0bdfd{color:#C9D1D9}.ct-59620a{color:#C9D1D9}.ct-7a9050{color:#FF7B72}.light .ct-7a9050{color:#859900}.light .ct-59620a{color:#657B83}.light .ct-a0bdfd{color:#268BD2}.light .ct-cdcb1e{color:#2AA198}.light .ct-4ea82c{color:#073642}.light .ct-70c1b9{color:#657B83}.light .ct-005a6c{color:#268BD2}.light .ct-cb2db9{color:#657B83}.light .ct-74e615{color:#657B83}.light .ct-afc73c{color:#859900}.light .ct-f0eff0{color:#859900}.light .ct-fddbd1{color:#268BD2}.light .ct-35cf76{color:#073642}.light .ct-f8ba82{color:#859900}.light .ct-62a4b7{color:#268BD2}.light .ct-9af740{color:#268BD2}.light .ct-8069ea{color:#93A1A1}.light .ct-63ec24{color:#657B83}.light .ct-30ee2f{color:#D33682}.light .ct-6fcf02{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React:Axios refresh token on React.md","_source":"content","_file":"Frontend/React/Axios refresh token on React.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/LKdFxpydAG.json b/api/_content/query/LKdFxpydAG.json new file mode 100644 index 0000000..08a2c9d --- /dev/null +++ b/api/_content/query/LKdFxpydAG.json @@ -0,0 +1 @@ +{"_path":"/sql/postgress-setup","_dir":"sql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Postgress Setup","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-postgresql-12-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"initial-database-connection"},"children":[{"type":"text","value":"Initial database connection"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A local connection (from the database server) can be done by the following command:"}]},{"type":"element","tag":"code","props":{"code":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-password-for-postgres-database-user"},"children":[{"type":"text","value":"Set password for postgres database user"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The password for the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user can be set the the quick command "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"\\password"}]},{"type":"text","value":"\nor by "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"alter user postgres password 'Supersecret'"}]},{"type":"text","value":". A connection using the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" user\nis still not possible from the \"outside\" hence to the default settings in the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password"},"children":[{"type":"text","value":"Update pg_hba.conf to allow postgres user connections with password"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to allow connections of the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user not using OS user\nauthentication, you have to update the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":" which can be found under\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/postgresql/12/main/pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal all postgres peer\n...\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal all postgres peer\n...\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change the last section of the above line to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"md5"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"local all postgres md5\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"local all postgres md5\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A restart is required in order to apply the new configuration:"}]},{"type":"element","tag":"code","props":{"code":"sudo systemctl restart postgresql\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo systemctl restart postgresql\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now a connection from outside the database host is possible e.g."}]},{"type":"element","tag":"code","props":{"code":"psql -U postgres -d postgres -h databasehostname\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"psql -U postgres -d postgres -h databasehostname\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-database-users"},"children":[{"type":"text","value":"Creation of additional database users"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A database user can be created by the following command:"}]},{"type":"element","tag":"code","props":{"code":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n List of roles\n Role name | Attributes | Member of\n-----------+------------------------------------------------------------+-----------\n myuser | | {}\n postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n List of roles\n Role name | Attributes | Member of\n-----------+------------------------------------------------------------+-----------\n myuser | | {}\n postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-databases"},"children":[{"type":"text","value":"Creation of additional databases"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"One can create new Postgres databases within an instance. Therefore you can use the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"psql"}]},{"type":"text","value":"\ncommand to login (see above)."}]},{"type":"element","tag":"code","props":{"code":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n List of databases\n Name | Owner | Encoding | Collate | Ctype | Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname | myuser | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres\n template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n List of databases\n Name | Owner | Encoding | Collate | Ctype | Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname | myuser | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres\n template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You can leave the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"OWNER"}]},{"type":"text","value":" section of the command, when doing so, the current user will become\nowner of the newly created database."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To change the owner of an existing database later, you can use the following command:"}]},{"type":"element","tag":"code","props":{"code":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-postgresql-12-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"sudo apt update"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"sudo apt install -y postgresql postgresql-contrib postgresql-client"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"sudo systemctl status postgresql.service"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"initial-database-connection"},"children":[{"type":"text","value":"Initial database connection"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A local connection (from the database server) can be done by the following command:"}]},{"type":"element","tag":"code","props":{"code":"sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"sudo -u postgres psql"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"psql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"Type "}]},{"type":"element","tag":"span","props":{"class":"ct-c12bff"},"children":[{"type":"text","value":"\"help\""}]},{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5ec62d"},"children":[{"type":"text","value":"for"}]},{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":" help."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"postgres="}]},{"type":"element","tag":"span","props":{"class":"ct-0949e9"},"children":[{"type":"text","value":"#"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"set-password-for-postgres-database-user"},"children":[{"type":"text","value":"Set password for postgres database user"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The password for the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user can be set the the quick command "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"\\password"}]},{"type":"text","value":"\nor by "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"alter user postgres password 'Supersecret'"}]},{"type":"text","value":". A connection using the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" user\nis still not possible from the \"outside\" hence to the default settings in the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password"},"children":[{"type":"text","value":"Update pg_hba.conf to allow postgres user connections with password"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to allow connections of the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"postgres"}]},{"type":"text","value":" database user not using OS user\nauthentication, you have to update the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"pg_hba.conf"}]},{"type":"text","value":" which can be found under\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/postgresql/12/main/pg_hba.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"sudo vi /etc/postgresql/12/main/pg_hba.conf\n\n...\nlocal all postgres peer\n...\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"sudo vi /etc/postgresql/12/main/pg_hba.conf"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ddaa35"},"children":[{"type":"text","value":"local"}]},{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":" all postgres peer"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"..."}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change the last section of the above line to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"md5"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"local all postgres md5\n"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"local all postgres md5"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A restart is required in order to apply the new configuration:"}]},{"type":"element","tag":"code","props":{"code":"sudo systemctl restart postgresql\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"sudo systemctl restart postgresql"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now a connection from outside the database host is possible e.g."}]},{"type":"element","tag":"code","props":{"code":"psql -U postgres -d postgres -h databasehostname\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-559254"},"children":[{"type":"text","value":"psql -U postgres -d postgres -h databasehostname"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-database-users"},"children":[{"type":"text","value":"Creation of additional database users"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A database user can be created by the following command:"}]},{"type":"element","tag":"code","props":{"code":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n List of roles\n Role name | Attributes | Member of\n-----------+------------------------------------------------------------+-----------\n myuser | | {}\n postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n List of roles\n Role name | Attributes | Member of\n-----------+------------------------------------------------------------+-----------\n myuser | | {}\n postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"creation-of-additional-databases"},"children":[{"type":"text","value":"Creation of additional databases"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"One can create new Postgres databases within an instance. Therefore you can use the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"psql"}]},{"type":"text","value":"\ncommand to login (see above)."}]},{"type":"element","tag":"code","props":{"code":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n List of databases\n Name | Owner | Encoding | Collate | Ctype | Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname | myuser | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres\n template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n List of databases\n Name | Owner | Encoding | Collate | Ctype | Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname | myuser | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres\n template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +\n | | | | | postgres=CTc/postgres"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You can leave the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"OWNER"}]},{"type":"text","value":" section of the command, when doing so, the current user will become\nowner of the newly created database."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To change the owner of an existing database later, you can use the following command:"}]},{"type":"element","tag":"code","props":{"code":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n","language":"sql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"postgres=# alter database dbname owner to myuser;\nALTER DATABASE"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-ddaa35{color:#FF7B72}.ct-0949e9{color:#8B949E}.ct-5ec62d{color:#FF7B72}.ct-c12bff{color:#A5D6FF}.ct-559254{color:#C9D1D9}.light .ct-559254{color:#657B83}.light .ct-c12bff{color:#2AA198}.light .ct-5ec62d{color:#859900}.light .ct-0949e9{color:#93A1A1}.light .ct-ddaa35{color:#073642}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"install-postgresql-12-on-ubuntu-2004-lts","depth":2,"text":"Install PostgreSQL 12 on Ubuntu 20.04 LTS"},{"id":"initial-database-connection","depth":2,"text":"Initial database connection"},{"id":"set-password-for-postgres-database-user","depth":2,"text":"Set password for postgres database user","children":[{"id":"update-pg_hbaconf-to-allow-postgres-user-connections-with-password","depth":3,"text":"Update pg_hba.conf to allow postgres user connections with password"}]},{"id":"creation-of-additional-database-users","depth":2,"text":"Creation of additional database users"},{"id":"creation-of-additional-databases","depth":2,"text":"Creation of additional databases"}]}},"_type":"markdown","_id":"content:SQL:Postgress setup.md","_source":"content","_file":"SQL/Postgress setup.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/Llpj9LBd4i.json b/api/_content/query/Llpj9LBd4i.json new file mode 100644 index 0000000..5d49535 --- /dev/null +++ b/api/_content/query/Llpj9LBd4i.json @@ -0,0 +1 @@ +{"_path":"/frontend/vue/adding-global-properties-to-component","_dir":"vue","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Adding Global Properties To Component","description":"The topic's fully covered in the official documentation and in Add global variable to window.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The topic's fully covered in the "},{"type":"element","tag":"a","props":{"href":"https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]},{"type":"text","value":" and in "},{"type":"element","tag":"a","props":{"href":"Add%20global%20variable%20to%20window"},"children":[{"type":"text","value":"Add global variable to window"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you want to add global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$http"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$translate"}]},{"type":"text","value":" services to all of project's components:"}]},{"type":"element","tag":"code","props":{"code":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n interface ComponentCustomProperties {\n $http: typeof axios\n $translate: (key: string) => string\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n interface ComponentCustomProperties {\n $http: typeof axios\n $translate: (key: string) => string\n }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The topic's fully covered in the "},{"type":"element","tag":"a","props":{"href":"https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties","rel":["nofollow"]},"children":[{"type":"text","value":"official documentation"}]},{"type":"text","value":" and in "},{"type":"element","tag":"a","props":{"href":"Add%20global%20variable%20to%20window"},"children":[{"type":"text","value":"Add global variable to window"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For example, you want to add global "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$http"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$translate"}]},{"type":"text","value":" services to all of project's components:"}]},{"type":"element","tag":"code","props":{"code":"// ~/index.d.ts or ~/custom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n interface ComponentCustomProperties {\n $http: typeof axios\n $translate: (key: string) => string\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ba2647"},"children":[{"type":"text","value":"// ~/index.d.ts or ~/custom.d.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b38898"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1ce920"},"children":[{"type":"text","value":"axios"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b38898"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03d1bd"},"children":[{"type":"text","value":"'axios'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4fa168"},"children":[{"type":"text","value":"declare"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4fa168"},"children":[{"type":"text","value":"module"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-03d1bd"},"children":[{"type":"text","value":"'vue'"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4fa168"},"children":[{"type":"text","value":"interface"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a8d69f"},"children":[{"type":"text","value":"ComponentCustomProperties"}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-08507f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5cb2bd"},"children":[{"type":"text","value":"$translate"}]},{"type":"element","tag":"span","props":{"class":"ct-e04799"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-08507f"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-71e141"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-e04799"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-08507f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2c3ffd"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-08507f"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-242aba"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-08507f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2c3ffd"},"children":[{"type":"text","value":"string"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ce3805"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-242aba{color:#FF7B72}.ct-2c3ffd{color:#79C0FF}.ct-71e141{color:#FFA657}.ct-e04799{color:#FF7B72}.ct-5cb2bd{color:#D2A8FF}.ct-08507f{color:#C9D1D9}.ct-a8d69f{color:#FFA657}.ct-4fa168{color:#FF7B72}.ct-03d1bd{color:#A5D6FF}.ct-1ce920{color:#C9D1D9}.ct-ce3805{color:#C9D1D9}.ct-b38898{color:#FF7B72}.ct-ba2647{color:#8B949E}.light .ct-ba2647{color:#93A1A1}.light .ct-b38898{color:#859900}.light .ct-ce3805{color:#657B83}.light .ct-1ce920{color:#268BD2}.light .ct-03d1bd{color:#2AA198}.light .ct-4fa168{color:#073642}.light .ct-a8d69f{color:#268BD2}.light .ct-08507f{color:#657B83}.light .ct-5cb2bd{color:#268BD2}.light .ct-e04799{color:#859900}.light .ct-71e141{color:#657B83}.light .ct-2c3ffd{color:#859900}.light .ct-242aba{color:#073642}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:Vue:Adding global properties to component.md","_source":"content","_file":"Frontend/Vue/Adding global properties to component.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/O9PBAkuWXG.json b/api/_content/query/O9PBAkuWXG.json new file mode 100644 index 0000000..be35f21 --- /dev/null +++ b/api/_content/query/O9PBAkuWXG.json @@ -0,0 +1 @@ +{"_path":"/graphql/refresh-token-in-apollo-client","_dir":"graphql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Refresh Token In Apollo Client","description":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client."}]},{"type":"element","tag":"code","props":{"code":"export const createApolloClient = (\n url: string,\n logout: () => void,\n getAuthorizationData: () => { authorization: string },\n refreshToken: () => Promise<\n { accessToken: string; refreshToken: string } | undefined\n >,\n) =>\n new ApolloClientBase({\n // ...other options\n link: ApolloLink.from([\n // ...other options\n setContext(async (_, { headers }) => {\n return {\n headers: {\n ...headers,\n ...getAuthorizationData(),\n },\n };\n }),\n new HttpLink({\n uri: url,\n fetch: fetchWithTokenRefresh(logout, refreshToken),\n }),\n ]),\n });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"export const createApolloClient = (\n url: string,\n logout: () => void,\n getAuthorizationData: () => { authorization: string },\n refreshToken: () => Promise<\n { accessToken: string; refreshToken: string } | undefined\n >,\n) =>\n new ApolloClientBase({\n // ...other options\n link: ApolloLink.from([\n // ...other options\n setContext(async (_, { headers }) => {\n return {\n headers: {\n ...headers,\n ...getAuthorizationData(),\n },\n };\n }),\n new HttpLink({\n uri: url,\n fetch: fetchWithTokenRefresh(logout, refreshToken),\n }),\n ]),\n });\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Custom fetch function for this request. You should tune "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"text","value":" and\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"text","value":" to match your api."}]},{"type":"element","tag":"code","props":{"code":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n Array.isArray(errors) &&\n errors.some(error => {\n return error.status === 401; // Distinguish unauthorized error here\n });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n try {\n const body = JSON.parse(options?.body as string);\n return body.operationName === 'RefreshToken';\n } catch (e) {\n return false;\n }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n (\n logout: () => void,\n refreshToken: () => Promise<\n { accessToken: string; refreshToken: string } | undefined\n >,\n ) =>\n async (uri: string, options: RequestInit): Promise => {\n // already refreshing token, wait for it and then use refreshed token\n // or use empty authorization if refreshing failed\n if (\n !isRefreshRequestOptions(options) &&\n refreshingPromise &&\n (options.headers as Record)?.authorization\n ) {\n const newAccessToken = await refreshingPromise\n .catch(() => {\n // refreshing token from other request failed, retry without authorization\n return '';\n });\n \n options.headers = {\n ...(options.headers || {}),\n authorization: newAccessToken,\n };\n }\n\n return fetch(uri, options).then(async response => {\n const text = await response.text();\n const json = JSON.parse(text);\n\n // check for unauthorized errors, if not present, just return result\n if (\n isRefreshRequestOptions(options) ||\n !json?.errors ||\n !Array.isArray(json.errors) ||\n !hasUnauthorizedError(json.errors)\n ) {\n return {\n ...response,\n ok: true,\n json: async () =>\n new Promise(resolve => {\n resolve(json);\n }),\n text: async () =>\n new Promise(resolve => {\n resolve(text);\n }),\n };\n }\n\n // If unauthorized, refresh token and try again\n if (!refreshingPromise) {\n refreshingPromise = refreshToken()\n .then(async (tokens): Promise => {\n refreshingPromise = null;\n\n if (!tokens?.accessToken) {\n throw new Error('Session expired');\n }\n\n return tokens?.accessToken;\n })\n .catch(() => {\n refreshingPromise = null;\n\n // can't refresh token. logging out\n logout();\n throw new Error('Session expired');\n });\n }\n\n // success or any non-auth error\n return refreshingPromise\n .then(async (newAccessToken: string) => {\n // wait for other request's refreshing query to finish, when retry\n\n return fetch(uri, {\n ...options,\n headers: {\n ...(options.headers || {}),\n authorization: newAccessToken,\n },\n });\n })\n .catch(async () => {\n // refreshing token from other request failed, retry without authorization\n\n return fetch(uri, {\n ...options,\n headers: {\n ...(options.headers || {}),\n authorization: '',\n },\n });\n });\n });\n };\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n Array.isArray(errors) &&\n errors.some(error => {\n return error.status === 401; // Distinguish unauthorized error here\n });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n try {\n const body = JSON.parse(options?.body as string);\n return body.operationName === 'RefreshToken';\n } catch (e) {\n return false;\n }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n (\n logout: () => void,\n refreshToken: () => Promise<\n { accessToken: string; refreshToken: string } | undefined\n >,\n ) =>\n async (uri: string, options: RequestInit): Promise => {\n // already refreshing token, wait for it and then use refreshed token\n // or use empty authorization if refreshing failed\n if (\n !isRefreshRequestOptions(options) &&\n refreshingPromise &&\n (options.headers as Record)?.authorization\n ) {\n const newAccessToken = await refreshingPromise\n .catch(() => {\n // refreshing token from other request failed, retry without authorization\n return '';\n });\n \n options.headers = {\n ...(options.headers || {}),\n authorization: newAccessToken,\n };\n }\n\n return fetch(uri, options).then(async response => {\n const text = await response.text();\n const json = JSON.parse(text);\n\n // check for unauthorized errors, if not present, just return result\n if (\n isRefreshRequestOptions(options) ||\n !json?.errors ||\n !Array.isArray(json.errors) ||\n !hasUnauthorizedError(json.errors)\n ) {\n return {\n ...response,\n ok: true,\n json: async () =>\n new Promise(resolve => {\n resolve(json);\n }),\n text: async () =>\n new Promise(resolve => {\n resolve(text);\n }),\n };\n }\n\n // If unauthorized, refresh token and try again\n if (!refreshingPromise) {\n refreshingPromise = refreshToken()\n .then(async (tokens): Promise => {\n refreshingPromise = null;\n\n if (!tokens?.accessToken) {\n throw new Error('Session expired');\n }\n\n return tokens?.accessToken;\n })\n .catch(() => {\n refreshingPromise = null;\n\n // can't refresh token. logging out\n logout();\n throw new Error('Session expired');\n });\n }\n\n // success or any non-auth error\n return refreshingPromise\n .then(async (newAccessToken: string) => {\n // wait for other request's refreshing query to finish, when retry\n\n return fetch(uri, {\n ...options,\n headers: {\n ...(options.headers || {}),\n authorization: newAccessToken,\n },\n });\n })\n .catch(async () => {\n // refreshing token from other request failed, retry without authorization\n\n return fetch(uri, {\n ...options,\n headers: {\n ...(options.headers || {}),\n authorization: '',\n },\n });\n });\n });\n };\n\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client."}]},{"type":"element","tag":"code","props":{"code":"export const createApolloClient = (\n url: string,\n logout: () => void,\n getAuthorizationData: () => { authorization: string },\n refreshToken: () => Promise<\n { accessToken: string; refreshToken: string } | undefined\n >,\n) =>\n new ApolloClientBase({\n // ...other options\n link: ApolloLink.from([\n // ...other options\n setContext(async (_, { headers }) => {\n return {\n headers: {\n ...headers,\n ...getAuthorizationData(),\n },\n };\n }),\n new HttpLink({\n uri: url,\n fetch: fetchWithTokenRefresh(logout, refreshToken),\n }),\n ]),\n });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"createApolloClient"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"url"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6ef29e"},"children":[{"type":"text","value":"getAuthorizationData"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"authorization"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a6207a"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"<"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"undefined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" >,"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"ApolloClientBase"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// ...other options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" link: "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"ApolloLink"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"(["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// ...other options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6ef29e"},"children":[{"type":"text","value":"setContext"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"_"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":", { "}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"getAuthorizationData"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"HttpLink"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" uri: "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"url"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" fetch: "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"fetchWithTokenRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ]),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Custom fetch function for this request. You should tune "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"text","value":" and\n"},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"text","value":" to match your api."}]},{"type":"element","tag":"code","props":{"code":"/** Global singleton for refreshing promise */\nlet refreshingPromise: Promise | null = null;\n\n/** Checks if GraphQl errors has unauthenticated error */\nconst hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean =>\n Array.isArray(errors) &&\n errors.some(error => {\n return error.status === 401; // Distinguish unauthorized error here\n });\n\n/** Detects if customFetch is sending refresh request */\nconst isRefreshRequestOptions = (options: RequestInit) => {\n try {\n const body = JSON.parse(options?.body as string);\n return body.operationName === 'RefreshToken';\n } catch (e) {\n return false;\n }\n};\n\n/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */\nexport const fetchWithTokenRefresh =\n (\n logout: () => void,\n refreshToken: () => Promise<\n { accessToken: string; refreshToken: string } | undefined\n >,\n ) =>\n async (uri: string, options: RequestInit): Promise => {\n // already refreshing token, wait for it and then use refreshed token\n // or use empty authorization if refreshing failed\n if (\n !isRefreshRequestOptions(options) &&\n refreshingPromise &&\n (options.headers as Record)?.authorization\n ) {\n const newAccessToken = await refreshingPromise\n .catch(() => {\n // refreshing token from other request failed, retry without authorization\n return '';\n });\n \n options.headers = {\n ...(options.headers || {}),\n authorization: newAccessToken,\n };\n }\n\n return fetch(uri, options).then(async response => {\n const text = await response.text();\n const json = JSON.parse(text);\n\n // check for unauthorized errors, if not present, just return result\n if (\n isRefreshRequestOptions(options) ||\n !json?.errors ||\n !Array.isArray(json.errors) ||\n !hasUnauthorizedError(json.errors)\n ) {\n return {\n ...response,\n ok: true,\n json: async () =>\n new Promise(resolve => {\n resolve(json);\n }),\n text: async () =>\n new Promise(resolve => {\n resolve(text);\n }),\n };\n }\n\n // If unauthorized, refresh token and try again\n if (!refreshingPromise) {\n refreshingPromise = refreshToken()\n .then(async (tokens): Promise => {\n refreshingPromise = null;\n\n if (!tokens?.accessToken) {\n throw new Error('Session expired');\n }\n\n return tokens?.accessToken;\n })\n .catch(() => {\n refreshingPromise = null;\n\n // can't refresh token. logging out\n logout();\n throw new Error('Session expired');\n });\n }\n\n // success or any non-auth error\n return refreshingPromise\n .then(async (newAccessToken: string) => {\n // wait for other request's refreshing query to finish, when retry\n\n return fetch(uri, {\n ...options,\n headers: {\n ...(options.headers || {}),\n authorization: newAccessToken,\n },\n });\n })\n .catch(async () => {\n // refreshing token from other request failed, retry without authorization\n\n return fetch(uri, {\n ...options,\n headers: {\n ...(options.headers || {}),\n authorization: '',\n },\n });\n });\n });\n };\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"/** Global singleton for refreshing promise */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a6207a"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db5c41"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"/** Checks if GraphQl errors has unauthenticated error */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6ef29e"},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c5470"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"<{ "}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"code"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c5470"},"children":[{"type":"text","value":"ErrorCode"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" }>)"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"isArray"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"some"}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"status"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-afc978"},"children":[{"type":"text","value":"401"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// Distinguish unauthorized error here"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"/** Detects if customFetch is sending refresh request */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6ef29e"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c5470"},"children":[{"type":"text","value":"RequestInit"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7561ef"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"operationName"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"==="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d171d6"},"children":[{"type":"text","value":"'RefreshToken'"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db5c41"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7561ef"},"children":[{"type":"text","value":"fetchWithTokenRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":": () "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":": () "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" { accessToken: "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db5c41"},"children":[{"type":"text","value":"undefined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ) "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c5470"},"children":[{"type":"text","value":"RequestInit"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c5470"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-7c5470"},"children":[{"type":"text","value":"Response"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// already refreshing token, wait for it and then use refreshed token"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// or use empty authorization if refreshing failed"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"&&"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a6207a"},"children":[{"type":"text","value":"Record"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":">)?."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7561ef"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// refreshing token from other request failed, retry without authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d171d6"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"async"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7561ef"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7561ef"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// check for unauthorized errors, if not present, just return result"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"isRefreshRequestOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"||"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"||"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"hasUnauthorizedError"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"errors"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"response"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ok: "}]},{"type":"element","tag":"span","props":{"class":"ct-db5c41"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"unknown"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":">("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"json"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":">("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"text"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// If unauthorized, refresh token and try again"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"refreshToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-6ef29e"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c5470"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db5c41"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-d171d6"},"children":[{"type":"text","value":"'Session expired'"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"tokens"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-db5c41"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// can't refresh token. logging out"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"logout"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8aeb6e"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-d171d6"},"children":[{"type":"text","value":"'Session expired'"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// success or any non-auth error"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"refreshingPromise"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-6ef29e"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-859173"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-74e54e"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7487c"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-824036"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-c1c1d0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// wait for other request's refreshing query to finish, when retry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"newAccessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-51f5f2"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8f9c91"},"children":[{"type":"text","value":"// refreshing token from other request failed, retry without authorization"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d62d0f"},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"uri"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":", {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" headers: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-936d89"},"children":[{"type":"text","value":"headers"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-633375"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" {}),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" authorization: "}]},{"type":"element","tag":"span","props":{"class":"ct-d171d6"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-40f337"},"children":[{"type":"text","value":" };"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-d171d6{color:#A5D6FF}.ct-7561ef{color:#79C0FF}.ct-afc978{color:#79C0FF}.ct-7c5470{color:#FFA657}.ct-db5c41{color:#79C0FF}.ct-936d89{color:#C9D1D9}.ct-8f9c91{color:#8B949E}.ct-a6207a{color:#FFA657}.ct-824036{color:#FF7B72}.ct-6ef29e{color:#D2A8FF}.ct-8aeb6e{color:#79C0FF}.ct-a7487c{color:#79C0FF}.ct-74e54e{color:#FF7B72}.ct-859173{color:#FFA657}.ct-c1c1d0{color:#C9D1D9}.ct-d62d0f{color:#D2A8FF}.ct-51f5f2{color:#FF7B72}.ct-40f337{color:#C9D1D9}.ct-633375{color:#FF7B72}.light .ct-633375{color:#859900}.light .ct-40f337{color:#657B83}.light .ct-51f5f2{color:#073642}.light .ct-d62d0f{color:#268BD2}.light .ct-c1c1d0{color:#657B83}.light .ct-859173{color:#657B83}.light .ct-74e54e{color:#859900}.light .ct-a7487c{color:#859900}.light .ct-8aeb6e{color:#859900}.light .ct-6ef29e{color:#268BD2}.light .ct-824036{color:#073642}.light .ct-a6207a{color:#268BD2}.light .ct-8f9c91{color:#93A1A1}.light .ct-936d89{color:#268BD2}.light .ct-db5c41{color:#B58900}.light .ct-7c5470{color:#268BD2}.light .ct-afc978{color:#D33682}.light .ct-7561ef{color:#268BD2}.light .ct-d171d6{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:GraphQL:Refresh token in Apollo client.md","_source":"content","_file":"GraphQL/Refresh token in Apollo client.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/PwERR4vHv2.json b/api/_content/query/PwERR4vHv2.json new file mode 100644 index 0000000..2be79be --- /dev/null +++ b/api/_content/query/PwERR4vHv2.json @@ -0,0 +1 @@ +{"_path":"/frontend/react-native/oauth2-login","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"OAuth2 Login","description":"Use #oauth2 login with React-Native","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Use #oauth2 login with React-Native"}]},{"type":"element","tag":"h2","props":{"id":"common-oauth2-providers"},"children":[{"type":"text","value":"Common OAuth2 providers"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be handled by "},{"type":"element","tag":"a","props":{"href":"react-native-app-auth"},"children":[{"type":"text","value":"react-native-app-auth"}]},{"type":"text","value":" by redirecting to url "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"com.yourapp://oauth2provider"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"example-for-google"},"children":[{"type":"text","value":"Example for #Google"}]},{"type":"element","tag":"code","props":{"code":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n issuer: 'https://accounts.google.com',\n clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n redirectUrl: `com.yourapp:/oauth2redirect/google`,\n scopes: ['openid', 'profile'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n issuer: 'https://accounts.google.com',\n clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n redirectUrl: `com.yourapp:/oauth2redirect/google`,\n scopes: ['openid', 'profile'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"example-for-yandex"},"children":[{"type":"text","value":"Example for #Yandex"}]},{"type":"element","tag":"code","props":{"code":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n serviceConfiguration: {\n authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n // TODO: replace it with your own backend to secure client_secret:\n tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n },\n clientId: YANDEX_OAUTH_CLIENT,\n redirectUrl: `${APP_ID}:/oauth2redirect`,\n scopes: ['login:info', 'login:avatar'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n serviceConfiguration: {\n authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n // TODO: replace it with your own backend to secure client_secret:\n tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n },\n clientId: YANDEX_OAUTH_CLIENT,\n redirectUrl: `${APP_ID}:/oauth2redirect`,\n scopes: ['login:info', 'login:avatar'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"apple-id-login"},"children":[{"type":"text","value":"Apple ID login"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication","rel":["nofollow"]},"children":[{"type":"text","value":"react-native-apple-authentication"}]},{"type":"text","value":" has its own "},{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication/tree/main/docs","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":" on setting up OAuth using Apple ID."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Use #oauth2 login with React-Native"}]},{"type":"element","tag":"h2","props":{"id":"common-oauth2-providers"},"children":[{"type":"text","value":"Common OAuth2 providers"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be handled by "},{"type":"element","tag":"a","props":{"href":"react-native-app-auth"},"children":[{"type":"text","value":"react-native-app-auth"}]},{"type":"text","value":" by redirecting to url "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"com.yourapp://oauth2provider"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h3","props":{"id":"example-for-google"},"children":[{"type":"text","value":"Example for #Google"}]},{"type":"element","tag":"code","props":{"code":"import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n// ...\nconst authState = await authorize({\n issuer: 'https://accounts.google.com',\n clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n redirectUrl: `com.yourapp:/oauth2redirect/google`,\n scopes: ['openid', 'profile'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-bd1253"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'react-native-app-auth'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3bfb45"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"GOOGLE_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f1b659"},"children":[{"type":"text","value":"// ..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3bfb45"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-696c41"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" issuer: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'https://accounts.google.com'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" clientId: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"GOOGLE_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"}.apps.googleusercontent.com`"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" redirectUrl: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"`com.yourapp:/oauth2redirect/google`"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" scopes: ["}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'openid'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'profile'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" dangerouslyAllowInsecureHttpRequests: "}]},{"type":"element","tag":"span","props":{"class":"ct-18c609"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"});"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"example-for-yandex"},"children":[{"type":"text","value":"Example for #Yandex"}]},{"type":"element","tag":"code","props":{"code":"const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; // better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n serviceConfiguration: {\n authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,\n // TODO: replace it with your own backend to secure client_secret:\n tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n },\n clientId: YANDEX_OAUTH_CLIENT,\n redirectUrl: `${APP_ID}:/oauth2redirect`,\n scopes: ['login:info', 'login:avatar'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3bfb45"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3bfb45"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"YANDEX_OAUTH_SECRET"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"; "}]},{"type":"element","tag":"span","props":{"class":"ct-f1b659"},"children":[{"type":"text","value":"// better hide it somehow"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3bfb45"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'com.yourapp'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3bfb45"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-109d53"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-696c41"},"children":[{"type":"text","value":"authorize"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" serviceConfiguration: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" authorizationEndpoint: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"`https://oauth.yandex.ru/authorize?response_type=code&client_id=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"}&redirect_uri=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"}:/oauth2redirect`"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f1b659"},"children":[{"type":"text","value":"// TODO: replace it with your own backend to secure client_secret:"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" tokenEndpoint: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"`https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"}&client_secret=${"}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"YANDEX_OAUTH_SECRET"}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" clientId: "}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"YANDEX_OAUTH_CLIENT"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" redirectUrl: "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-7cf54e"},"children":[{"type":"text","value":"APP_ID"}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"}:/oauth2redirect`"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" scopes: ["}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'login:info'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-5e7163"},"children":[{"type":"text","value":"'login:avatar'"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":" dangerouslyAllowInsecureHttpRequests: "}]},{"type":"element","tag":"span","props":{"class":"ct-18c609"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"});"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-696c41"},"children":[{"type":"text","value":"callback"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-bd1253"},"children":[{"type":"text","value":"authState"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-bd1253"},"children":[{"type":"text","value":"accessToken"}]},{"type":"element","tag":"span","props":{"class":"ct-268c77"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"apple-id-login"},"children":[{"type":"text","value":"Apple ID login"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication","rel":["nofollow"]},"children":[{"type":"text","value":"react-native-apple-authentication"}]},{"type":"text","value":" has its own "},{"type":"element","tag":"a","props":{"href":"https://github.com/invertase/react-native-apple-authentication/tree/main/docs","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":" on setting up OAuth using Apple ID."}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-18c609{color:#79C0FF}.ct-696c41{color:#D2A8FF}.ct-f1b659{color:#8B949E}.ct-7cf54e{color:#79C0FF}.ct-3bfb45{color:#FF7B72}.ct-5e7163{color:#A5D6FF}.ct-bd1253{color:#C9D1D9}.ct-268c77{color:#C9D1D9}.ct-109d53{color:#FF7B72}.light .ct-109d53{color:#859900}.light .ct-268c77{color:#657B83}.light .ct-bd1253{color:#268BD2}.light .ct-5e7163{color:#2AA198}.light .ct-3bfb45{color:#073642}.light .ct-7cf54e{color:#268BD2}.light .ct-f1b659{color:#93A1A1}.light .ct-696c41{color:#268BD2}.light .ct-18c609{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"common-oauth2-providers","depth":2,"text":"Common OAuth2 providers","children":[{"id":"example-for-google","depth":3,"text":"Example for #Google"},{"id":"example-for-yandex","depth":3,"text":"Example for #Yandex"}]},{"id":"apple-id-login","depth":2,"text":"Apple ID login"}]}},"_type":"markdown","_id":"content:Frontend:React Native:OAuth2 login.md","_source":"content","_file":"Frontend/React Native/OAuth2 login.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/QqziXmSF9l.json b/api/_content/query/QqziXmSF9l.json new file mode 100644 index 0000000..2bd4778 --- /dev/null +++ b/api/_content/query/QqziXmSF9l.json @@ -0,0 +1 @@ +{"_path":"/frontend/react-native/useful-comands","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Useful Comands","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"show-android-logcat"},"children":[{"type":"text","value":"Show android logcat"}]},{"type":"element","tag":"code","props":{"code":"adb logcat com.application:I \"*:S\"\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"adb logcat com.application:I \"*:S\"\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"get-apks-sha-256"},"children":[{"type":"text","value":"Get .apk's SHA-256"}]},{"type":"element","tag":"code","props":{"code":"keytool -printcert -jarfile \"$1\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"keytool -printcert -jarfile \"$1\"\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"assemble-debug-release-on-android"},"children":[{"type":"text","value":"Assemble debug release on Android"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Packages release with bundled resources."}]},{"type":"element","tag":"code","props":{"code":"npx react-native bundle \\\n --platform android \\\n --dev false \\\n --entry-file index.js \\\n --bundle-output android/app/src/main/assets/index.android.bundle \\\n --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"npx react-native bundle \\\n --platform android \\\n --dev false \\\n --entry-file index.js \\\n --bundle-output android/app/src/main/assets/index.android.bundle \\\n --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"send-release-to-android-device"},"children":[{"type":"text","value":"Send release to Android device"}]},{"type":"element","tag":"code","props":{"code":"cd ./android \\\n && ./gradlew assembleRelease \\\n && adb install ./app/build/outputs/apk/release/app-release.apk\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"cd ./android \\\n && ./gradlew assembleRelease \\\n && adb install ./app/build/outputs/apk/release/app-release.apk\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"deep-links"},"children":[{"type":"text","value":"Deep links"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://zarah.dev/2022/02/08/android12-deeplinks.html","rel":["nofollow"]},"children":[{"type":"text","value":"https://zarah.dev/2022/02/08/android12-deeplinks.html"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification","rel":["nofollow"]},"children":[{"type":"text","value":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls","rel":["nofollow"]},"children":[{"type":"text","value":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls"}]}]}]},{"type":"element","tag":"h3","props":{"id":"open-deep-links"},"children":[{"type":"text","value":"Open deep links"}]},{"type":"element","tag":"code","props":{"code":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"reverify-links-on-android"},"children":[{"type":"text","value":"Reverify links on Android"}]},{"type":"element","tag":"code","props":{"code":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n adb shell pm verify-app-links --re-verify $PACKAGE\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n adb shell pm verify-app-links --re-verify $PACKAGE\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"show-android-logcat"},"children":[{"type":"text","value":"Show android logcat"}]},{"type":"element","tag":"code","props":{"code":"adb logcat com.application:I \"*:S\"\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"adb logcat com.application:I "}]},{"type":"element","tag":"span","props":{"class":"ct-8c8ca9"},"children":[{"type":"text","value":"\"*:S\""}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"get-apks-sha-256"},"children":[{"type":"text","value":"Get .apk's SHA-256"}]},{"type":"element","tag":"code","props":{"code":"keytool -printcert -jarfile \"$1\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"keytool -printcert -jarfile "}]},{"type":"element","tag":"span","props":{"class":"ct-8c8ca9"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-d5cc7b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a5dd1b"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-8c8ca9"},"children":[{"type":"text","value":"\""}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"assemble-debug-release-on-android"},"children":[{"type":"text","value":"Assemble debug release on Android"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Packages release with bundled resources."}]},{"type":"element","tag":"code","props":{"code":"npx react-native bundle \\\n --platform android \\\n --dev false \\\n --entry-file index.js \\\n --bundle-output android/app/src/main/assets/index.android.bundle \\\n --assets-dest android/app/src/main/res/\n\ncd android && ./gradlew assembleDebug\n\n# do your stuff\n\n./gradlew clean\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"npx react-native bundle \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" --platform android \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" --dev "}]},{"type":"element","tag":"span","props":{"class":"ct-75854a"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" --entry-file index.js \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" --bundle-output android/app/src/main/assets/index.android.bundle \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" --assets-dest android/app/src/main/res/"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75854a"},"children":[{"type":"text","value":"cd"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" android "}]},{"type":"element","tag":"span","props":{"class":"ct-5f27d7"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" ./gradlew assembleDebug"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-662dda"},"children":[{"type":"text","value":"# do your stuff"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"./gradlew clean"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"send-release-to-android-device"},"children":[{"type":"text","value":"Send release to Android device"}]},{"type":"element","tag":"code","props":{"code":"cd ./android \\\n && ./gradlew assembleRelease \\\n && adb install ./app/build/outputs/apk/release/app-release.apk\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-75854a"},"children":[{"type":"text","value":"cd"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" ./android \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5f27d7"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" ./gradlew assembleRelease \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5f27d7"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" adb install ./app/build/outputs/apk/release/app-release.apk"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"deep-links"},"children":[{"type":"text","value":"Deep links"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://zarah.dev/2022/02/08/android12-deeplinks.html","rel":["nofollow"]},"children":[{"type":"text","value":"https://zarah.dev/2022/02/08/android12-deeplinks.html"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification","rel":["nofollow"]},"children":[{"type":"text","value":"https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls","rel":["nofollow"]},"children":[{"type":"text","value":"https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls"}]}]}]},{"type":"element","tag":"h3","props":{"id":"open-deep-links"},"children":[{"type":"text","value":"Open deep links"}]},{"type":"element","tag":"code","props":{"code":"# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-662dda"},"children":[{"type":"text","value":"# ios "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"xcrun simctl openurl booted "}]},{"type":"element","tag":"span","props":{"class":"ct-d5cc7b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a5dd1b"},"children":[{"type":"text","value":"1"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-662dda"},"children":[{"type":"text","value":"# android"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"adb shell am start -W -a android.intent.action.VIEW -d "}]},{"type":"element","tag":"span","props":{"class":"ct-d5cc7b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a5dd1b"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"com.application"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"reverify-links-on-android"},"children":[{"type":"text","value":"Reverify links on Android"}]},{"type":"element","tag":"code","props":{"code":"PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n adb shell pm verify-app-links --re-verify $PACKAGE\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"PACKAGE="}]},{"type":"element","tag":"span","props":{"class":"ct-8c8ca9"},"children":[{"type":"text","value":"\"com.application\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":"adb shell pm set-app-links --package "}]},{"type":"element","tag":"span","props":{"class":"ct-d5cc7b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a5dd1b"},"children":[{"type":"text","value":"PACKAGE"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" 0 all "}]},{"type":"element","tag":"span","props":{"class":"ct-5f27d7"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a1e55a"},"children":[{"type":"text","value":" adb shell pm verify-app-links --re-verify "}]},{"type":"element","tag":"span","props":{"class":"ct-d5cc7b"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-a5dd1b"},"children":[{"type":"text","value":"PACKAGE"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-662dda{color:#8B949E}.ct-5f27d7{color:#FF7B72}.ct-75854a{color:#79C0FF}.ct-a5dd1b{color:#C9D1D9}.ct-d5cc7b{color:#C9D1D9}.ct-8c8ca9{color:#A5D6FF}.ct-a1e55a{color:#C9D1D9}.light .ct-a1e55a{color:#657B83}.light .ct-8c8ca9{color:#2AA198}.light .ct-d5cc7b{color:#859900}.light .ct-a5dd1b{color:#268BD2}.light .ct-75854a{color:#268BD2}.light .ct-5f27d7{color:#859900}.light .ct-662dda{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"show-android-logcat","depth":2,"text":"Show android logcat"},{"id":"get-apks-sha-256","depth":2,"text":"Get .apk's SHA-256"},{"id":"assemble-debug-release-on-android","depth":2,"text":"Assemble debug release on Android"},{"id":"send-release-to-android-device","depth":2,"text":"Send release to Android device"},{"id":"deep-links","depth":2,"text":"Deep links","children":[{"id":"open-deep-links","depth":3,"text":"Open deep links"},{"id":"reverify-links-on-android","depth":3,"text":"Reverify links on Android"}]}]}},"_type":"markdown","_id":"content:Frontend:React Native:Useful comands.md","_source":"content","_file":"Frontend/React Native/Useful comands.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/S7L9CBleOj.json b/api/_content/query/S7L9CBleOj.json new file mode 100644 index 0000000..652dc2f --- /dev/null +++ b/api/_content/query/S7L9CBleOj.json @@ -0,0 +1 @@ +{"_path":"/frontend/vue/make-nuxt-handle-obsidian-highlights","_dir":"vue","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Make Nuxt Handle Obsidian Highlights","description":"By default Nuxt Content Plugin not handling highlight links. To fix that we will create Nitro plugin:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"By default "},{"type":"element","tag":"a","props":{"href":"https://content.nuxtjs.org","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content Plugin"}]},{"type":"text","value":" not handling "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"highlight"}]},{"type":"text","value":" links. To fix that we will create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Nitro"}]},{"type":"text","value":" plugin:"}]},{"type":"element","tag":"code","props":{"code":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n if (file._id.endsWith(\".md\")) {\n file.body = file.body.replace(\n /==([^=]+)==/gs,\n `$1`\n );\n }\n });\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n if (file._id.endsWith(\".md\")) {\n file.body = file.body.replace(\n /==([^=]+)==/gs,\n `$1`\n );\n }\n });\n});\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"By default "},{"type":"element","tag":"a","props":{"href":"https://content.nuxtjs.org","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content Plugin"}]},{"type":"text","value":" not handling "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"highlight"}]},{"type":"text","value":" links. To fix that we will create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Nitro"}]},{"type":"text","value":" plugin:"}]},{"type":"element","tag":"code","props":{"code":"// ~/server/plugins/highlight.ts\nexport default defineNitroPlugin((nitroApp) => {\n nitroApp.hooks.hook(\"content:file:beforeParse\", (file) => {\n if (file._id.endsWith(\".md\")) {\n file.body = file.body.replace(\n /==([^=]+)==/gs,\n `$1`\n );\n }\n });\n});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d44533"},"children":[{"type":"text","value":"// ~/server/plugins/highlight.ts"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-009f14"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-0aa45e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-009f14"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-0aa45e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-587ef2"},"children":[{"type":"text","value":"defineNitroPlugin"}]},{"type":"element","tag":"span","props":{"class":"ct-0aa45e"},"children":[{"type":"text","value":"((nitroApp) "}]},{"type":"element","tag":"span","props":{"class":"ct-fe84d3"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-0aa45e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aaf06c"},"children":[{"type":"text","value":"{"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"nitroApp"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"hooks"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1e6537"},"children":[{"type":"text","value":"hook"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-a56f94"},"children":[{"type":"text","value":"\"content:file:beforeParse\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ad76ea"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"_id"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1e6537"},"children":[{"type":"text","value":"endsWith"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-a56f94"},"children":[{"type":"text","value":"\".md\""}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ad76ea"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-98eece"},"children":[{"type":"text","value":"body"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-1e6537"},"children":[{"type":"text","value":"replace"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-709a0e"},"children":[{"type":"text","value":"/==("}]},{"type":"element","tag":"span","props":{"class":"ct-d418a6"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-ad76ea"},"children":[{"type":"text","value":"^"}]},{"type":"element","tag":"span","props":{"class":"ct-d418a6"},"children":[{"type":"text","value":"=]"}]},{"type":"element","tag":"span","props":{"class":"ct-ad76ea"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-709a0e"},"children":[{"type":"text","value":")==/"}]},{"type":"element","tag":"span","props":{"class":"ct-ad76ea"},"children":[{"type":"text","value":"gs"}]},{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a56f94"},"children":[{"type":"text","value":"`$1`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-356b04"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-aaf06c"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-0aa45e"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-aaf06c"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-d418a6{color:#79C0FF}.ct-709a0e{color:#A5D6FF}.ct-ad76ea{color:#FF7B72}.ct-a56f94{color:#A5D6FF}.ct-1e6537{color:#D2A8FF}.ct-98eece{color:#C9D1D9}.ct-356b04{color:#C9D1D9}.ct-aaf06c{color:#C9D1D9}.ct-fe84d3{color:#FF7B72}.ct-587ef2{color:#D2A8FF}.ct-0aa45e{color:#FFA657}.ct-009f14{color:#FF7B72}.ct-d44533{color:#8B949E}.light .ct-d44533{color:#93A1A1}.light .ct-009f14{color:#859900}.light .ct-0aa45e{color:#657B83}.light .ct-587ef2{color:#268BD2}.light .ct-fe84d3{color:#073642}.light .ct-aaf06c{color:#657B83}.light .ct-356b04{color:#657B83}.light .ct-98eece{color:#268BD2}.light .ct-1e6537{color:#268BD2}.light .ct-a56f94{color:#2AA198}.light .ct-ad76ea{color:#859900}.light .ct-709a0e{color:#D30102}.light .ct-d418a6{color:#CB4B16}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:Vue:Make Nuxt handle Obsidian highlights.md","_source":"content","_file":"Frontend/Vue/Make Nuxt handle Obsidian highlights.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/TvYXYGXdZ0.json b/api/_content/query/TvYXYGXdZ0.json new file mode 100644 index 0000000..17eba77 --- /dev/null +++ b/api/_content/query/TvYXYGXdZ0.json @@ -0,0 +1 @@ +{"_path":"/sql/mysql-and-mariadb-setup","_dir":"sql","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"MySQL And MariaDB Setup","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-mariadb-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install MariaDB on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"access-database-from-outside"},"children":[{"type":"text","value":"Access Database from outside"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Open "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/mysql/mariadb.conf.d/50-server.cnf"}]},{"type":"text","value":" and change the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"bind-address"}]},{"type":"text","value":" to:"}]},{"type":"element","tag":"code","props":{"code":"...\nbind-address = 0.0.0.0\n...\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"...\nbind-address = 0.0.0.0\n...\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"create-administrative-user"},"children":[{"type":"text","value":"Create Administrative User"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Create a new user "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"newuser"}]},{"type":"text","value":" for the host "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"localhost"}]},{"type":"text","value":" with a new "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"password"}]},{"type":"text","value":":"}]}]},{"type":"element","tag":"code","props":{"code":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n"}]}]}]},{"type":"element","tag":"ol","props":{"start":2},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Grant all permissions to the new user"}]}]},{"type":"element","tag":"code","props":{"code":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n"}]}]}]},{"type":"element","tag":"ol","props":{"start":3},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Update permissions"}]}]},{"type":"element","tag":"code","props":{"code":"FLUSH PRIVILEGES;\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"FLUSH PRIVILEGES;\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"install-mariadb-on-ubuntu-2004-lts"},"children":[{"type":"text","value":"Install MariaDB on Ubuntu 20.04 LTS"}]},{"type":"element","tag":"code","props":{"code":"sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-39acdd"},"children":[{"type":"text","value":"sudo apt update"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-39acdd"},"children":[{"type":"text","value":"sudo apt install mariadb-server"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-39acdd"},"children":[{"type":"text","value":"sudo mysql_secure_installation"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"access-database-from-outside"},"children":[{"type":"text","value":"Access Database from outside"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Open "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"/etc/mysql/mariadb.conf.d/50-server.cnf"}]},{"type":"text","value":" and change the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"bind-address"}]},{"type":"text","value":" to:"}]},{"type":"element","tag":"code","props":{"code":"...\nbind-address = 0.0.0.0\n...\n","language":"nginx"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-39acdd"},"children":[{"type":"text","value":"..."}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-39acdd"},"children":[{"type":"text","value":"bind-"}]},{"type":"element","tag":"span","props":{"class":"ct-18d6eb"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-39acdd"},"children":[{"type":"text","value":" = 0.0.0.0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-39acdd"},"children":[{"type":"text","value":"..."}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"create-administrative-user"},"children":[{"type":"text","value":"Create Administrative User"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Create a new user "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"newuser"}]},{"type":"text","value":" for the host "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"localhost"}]},{"type":"text","value":" with a new "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"password"}]},{"type":"text","value":":"}]}]},{"type":"element","tag":"code","props":{"code":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';"}]}]}]}]}]},{"type":"element","tag":"ol","props":{"start":2},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Grant all permissions to the new user"}]}]},{"type":"element","tag":"code","props":{"code":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';"}]}]}]}]}]},{"type":"element","tag":"ol","props":{"start":3},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Update permissions"}]}]},{"type":"element","tag":"code","props":{"code":"FLUSH PRIVILEGES;\n","language":"mysql"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"FLUSH PRIVILEGES;"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-18d6eb{color:#FF7B72}.ct-39acdd{color:#C9D1D9}.light .ct-39acdd{color:#657B83}.light .ct-18d6eb{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"install-mariadb-on-ubuntu-2004-lts","depth":2,"text":"Install MariaDB on Ubuntu 20.04 LTS"},{"id":"access-database-from-outside","depth":2,"text":"Access Database from outside"},{"id":"create-administrative-user","depth":2,"text":"Create Administrative User"}]}},"_type":"markdown","_id":"content:SQL:MySQL and MariaDB setup.md","_source":"content","_file":"SQL/MySQL and MariaDB setup.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/UBl6xR2vxQ.json b/api/_content/query/UBl6xR2vxQ.json new file mode 100644 index 0000000..4869763 --- /dev/null +++ b/api/_content/query/UBl6xR2vxQ.json @@ -0,0 +1 @@ +{"_path":"/docker/refresh-containers-on-pull","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Refresh Containers On Pull","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"setting-up-watchtower"},"children":[{"type":"text","value":"Setting up watchtower"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://containrrr.dev/watchtower/","rel":["nofollow"]},"children":[{"type":"text","value":"Watchtower"}]},{"type":"text","value":" will automatically pull updated #docker containers. Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" and "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n watchtower:\n container_name: docker__watchtower\n image: v2tec/watchtower\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock\n - /home/user/.docker/config.json:/config.json\n command: --interval 60 image_1 image_2\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nservices:\n watchtower:\n container_name: docker__watchtower\n image: v2tec/watchtower\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock\n - /home/user/.docker/config.json:/config.json\n command: --interval 60 image_1 image_2\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h2","props":{"id":"setting-up-watchtower"},"children":[{"type":"text","value":"Setting up watchtower"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://containrrr.dev/watchtower/","rel":["nofollow"]},"children":[{"type":"text","value":"Watchtower"}]},{"type":"text","value":" will automatically pull updated #docker containers. Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" and "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n watchtower:\n container_name: docker__watchtower\n image: v2tec/watchtower\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock\n - /home/user/.docker/config.json:/config.json\n command: --interval 60 image_1 image_2\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-2bd4b1"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"watchtower"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-2bd4b1"},"children":[{"type":"text","value":"docker__watchtower"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-2bd4b1"},"children":[{"type":"text","value":"v2tec/watchtower"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-2bd4b1"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-2bd4b1"},"children":[{"type":"text","value":"/var/run/docker.sock:/var/run/docker.sock"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-2bd4b1"},"children":[{"type":"text","value":"/home/user/.docker/config.json:/config.json"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b7ea0d"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-3b812b"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-2bd4b1"},"children":[{"type":"text","value":"--interval 60 image_1 image_2"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-2bd4b1{color:#A5D6FF}.ct-3b812b{color:#C9D1D9}.ct-b7ea0d{color:#7EE787}.light .ct-b7ea0d{color:#268BD2}.light .ct-3b812b{color:#657B83}.light .ct-2bd4b1{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"setting-up-watchtower","depth":2,"text":"Setting up watchtower"}]}},"_type":"markdown","_id":"content:Docker:Refresh containers on pull.md","_source":"content","_file":"Docker/Refresh containers on pull.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/WJQDeZ21lK.json b/api/_content/query/WJQDeZ21lK.json new file mode 100644 index 0000000..1a3e2e9 --- /dev/null +++ b/api/_content/query/WJQDeZ21lK.json @@ -0,0 +1 @@ +{"_path":"/git/git-aliases-and-useful-commands","_dir":"git","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Git Aliases And Useful Commands","description":"Shorthands for #git commands can be specified. Should be placed at ~/.gitconfig.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Shorthands for #git commands can be specified. Should be placed at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"[alias]\n flush = git clean-branches branch | grep -v master | xargs git branch -D\n lol = log --oneline --graph\n l = lol\n c = commit -am\n cv = commit --no-verify -am\n p = push\n pf = p --force-with-lease\n ignore-now = update-index --skip-worktree\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[alias]\n flush = git clean-branches branch | grep -v master | xargs git branch -D\n lol = log --oneline --graph\n l = lol\n c = commit -am\n cv = commit --no-verify -am\n p = push\n pf = p --force-with-lease\n ignore-now = update-index --skip-worktree\n"}]}]}]},{"type":"element","tag":"table","props":{},"children":[{"type":"element","tag":"thead","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"command"}]}]},{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"description"}]}]}]}]},{"type":"element","tag":"tbody","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git flush"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"drops all branches, except master"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git lol"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"shows log"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git c"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits with message"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git cv"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits without hooks"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git p"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"pushes"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git pf"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"push with --force and additional check"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git ignore-now"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"starts ignoring file from now on"}]}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Shorthands for #git commands can be specified. Should be placed at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"[alias]\n flush = git clean-branches branch | grep -v master | xargs git branch -D\n lol = log --oneline --graph\n l = lol\n c = commit -am\n cv = commit --no-verify -am\n p = push\n pf = p --force-with-lease\n ignore-now = update-index --skip-worktree\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"[alias]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" flush "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" git clean"}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"branches branch "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" grep "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"v master "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" xargs git branch "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"D"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" lol "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" log "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"oneline "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"graph"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" l "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" lol"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" c "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" commit "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"am"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" cv "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" commit "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"no"}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"verify "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"am"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" p "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" push"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" pf "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" p "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"force"}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"with"}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"lease"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" ignore"}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"now "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":" update"}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"index "}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"skip"}]},{"type":"element","tag":"span","props":{"class":"ct-cc76b1"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-487bf9"},"children":[{"type":"text","value":"worktree"}]}]}]}]}]},{"type":"element","tag":"table","props":{},"children":[{"type":"element","tag":"thead","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"command"}]}]},{"type":"element","tag":"th","props":{"align":null},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"description"}]}]}]}]},{"type":"element","tag":"tbody","props":{},"children":[{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git flush"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"drops all branches, except master"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git lol"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"shows log"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git c"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits with message"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git cv"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"commits without hooks"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git p"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"pushes"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git pf"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"push with --force and additional check"}]}]},{"type":"element","tag":"tr","props":{},"children":[{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"git ignore-now"}]}]},{"type":"element","tag":"td","props":{"align":null},"children":[{"type":"text","value":"starts ignoring file from now on"}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-cc76b1{color:#FF7B72}.ct-487bf9{color:#C9D1D9}.light .ct-487bf9{color:#657B83}.light .ct-cc76b1{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Git:Git aliases and useful commands.md","_source":"content","_file":"Git/Git aliases and useful commands.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/WO7KYRkFiw.json b/api/_content/query/WO7KYRkFiw.json new file mode 100644 index 0000000..acf138f --- /dev/null +++ b/api/_content/query/WO7KYRkFiw.json @@ -0,0 +1 @@ +{"_path":"/blockchain/smart-contracts","_dir":"blockchain","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Smart Contracts","description":"For common functions see Common typescript examples.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For common functions see "},{"type":"element","tag":"a","props":{"href":"Common%20typescript%20examples"},"children":[{"type":"text","value":"Common typescript examples"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"getting-smart-contract-instance"},"children":[{"type":"text","value":"Getting smart contract instance"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for calling smart contract methods:"}]},{"type":"element","tag":"code","props":{"code":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n const abiFromJson = JSON.parse(JSON.stringify(abi));\n return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n const abiFromJson = JSON.parse(JSON.stringify(abi));\n return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"executing-contract-method"},"children":[{"type":"text","value":"Executing contract method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Contract has "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"read"}]},{"type":"text","value":" and "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"write"}]},{"type":"text","value":" methods. To get a list of methods, you can paste contract address on "},{"type":"element","tag":"a","props":{"href":"https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract","rel":["nofollow"]},"children":[{"type":"text","value":"https://etherscan.io/ ETH"}]},{"type":"text","value":" or any other service."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Read"}]},{"type":"text","value":" methods doesn't require spending "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":". "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Write"}]},{"type":"text","value":" methods cost some amount of "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":", hence they will be executed with confirmation from user."}]},{"type":"element","tag":"h3","props":{"id":"example-for-metamask-without-private-key"},"children":[{"type":"text","value":"Example for #Metamask without private key"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n // getting contract\n const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n \n // Calling write method\n try {\n // authorizing with Metamask\n await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n // getting wallet address\n const addressUser = web3.currentProvider.selectedAddress;\n // calling \"store\" store method for contract\n // payload should include `from` address, that matches\n // current user's wallet\n await contract.methods.store(0, 'Parameter').send({\n from: addressUser,\n });\n } catch (e) {\n throw new Error(e);\n }\n \n // calling read method\n try {\n // this method can return data\n const result = await contract.methods.retrieve().call();\n } catch (e) {\n throw new Error(e);\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n // getting contract\n const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n \n // Calling write method\n try {\n // authorizing with Metamask\n await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n // getting wallet address\n const addressUser = web3.currentProvider.selectedAddress;\n // calling \"store\" store method for contract\n // payload should include `from` address, that matches\n // current user's wallet\n await contract.methods.store(0, 'Parameter').send({\n from: addressUser,\n });\n } catch (e) {\n throw new Error(e);\n }\n \n // calling read method\n try {\n // this method can return data\n const result = await contract.methods.retrieve().call();\n } catch (e) {\n throw new Error(e);\n }\n}\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"nodejs-and-react-native-example"},"children":[{"type":"text","value":"Node.js and React Native example"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n const transaction = contract.methods.store(val);\n const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n const options = {\n to: CONTRACT_ADDRESS,\n data: transaction.encodeABI(),\n gas: await transaction.estimateGas({ from: account.address }),\n gasPrice: await web3.eth.getGasPrice(),\n };\n const signed = await web3.eth.accounts.signTransaction(\n options,\n privateKey,\n );\n await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n const transaction = contract.methods.store(val);\n const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n const options = {\n to: CONTRACT_ADDRESS,\n data: transaction.encodeABI(),\n gas: await transaction.estimateGas({ from: account.address }),\n gasPrice: await web3.eth.getGasPrice(),\n };\n const signed = await web3.eth.accounts.signTransaction(\n options,\n privateKey,\n );\n await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"calling-a-batch-of-contracts-methods"},"children":[{"type":"text","value":"Calling a batch of contract's methods"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Function calls batch of requests, returning array of results. For example:"}]},{"type":"element","tag":"code","props":{"code":" const requests = [\n contract.method.balanceOf().call,\n contract.method.getStaked().call\n ]\n\n const result = await makeBatchRequest(request);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":" const requests = [\n contract.method.balanceOf().call,\n contract.method.getStaked().call\n ]\n\n const result = await makeBatchRequest(request);\n"}]}]}]},{"type":"element","tag":"code","props":{"code":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n try {\n const web3 = getWeb3NoAccount();\n const batch = new web3.BatchRequest();\n\n const promises = calls.map((call) => {\n return new Promise((resolve, reject) => {\n batch.add(\n call.request({}, (err, result) => {\n if (err) {\n reject(err);\n } else {\n resolve(result);\n }\n })\n );\n });\n });\n\n batch.execute();\n\n return Promise.all(promises);\n } catch {\n return null;\n }\n};\n\nexport default makeBatchRequest;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n try {\n const web3 = getWeb3NoAccount();\n const batch = new web3.BatchRequest();\n\n const promises = calls.map((call) => {\n return new Promise((resolve, reject) => {\n batch.add(\n call.request({}, (err, result) => {\n if (err) {\n reject(err);\n } else {\n resolve(result);\n }\n })\n );\n });\n });\n\n batch.execute();\n\n return Promise.all(promises);\n } catch {\n return null;\n }\n};\n\nexport default makeBatchRequest;\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-smart-contract-events"},"children":[{"type":"text","value":"Subscribing to smart contract events"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"There're different ways to subscribe for contract events. For all of them you will need following variables:"}]},{"type":"element","tag":"code","props":{"code":" import Web3 from 'web3';\n const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n const ABI = 'YOUR ABI HERE';\n const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":" import Web3 from 'web3';\n const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n const ABI = 'YOUR ABI HERE';\n const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"by-accessing-contractevents"},"children":[{"type":"text","value":"By accessing contract.events"}]},{"type":"element","tag":"code","props":{"code":"referralProgramContract.events\n .RegisterUser()\n .on('connected', (subscriptionId: string) => {\n console.log(`| UserRegistered | events | ${subscriptionId}`);\n })\n .on(\n 'data',\n async (event: {\n removed: boolean;\n returnValues: RegisterUserResponseInterface;\n }) => {\n try {\n if (event.removed) {\n return;\n }\n const { user, referrer } = event.returnValues;\n console.log(user, referrer);\n } catch (e) {\n console.log(`| ONCE | ${e}`);\n }\n },\n )\n .on('error', (error: ErrnoException) => {\n console.log(error);\n });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"referralProgramContract.events\n .RegisterUser()\n .on('connected', (subscriptionId: string) => {\n console.log(`| UserRegistered | events | ${subscriptionId}`);\n })\n .on(\n 'data',\n async (event: {\n removed: boolean;\n returnValues: RegisterUserResponseInterface;\n }) => {\n try {\n if (event.removed) {\n return;\n }\n const { user, referrer } = event.returnValues;\n console.log(user, referrer);\n } catch (e) {\n console.log(`| ONCE | ${e}`);\n }\n },\n )\n .on('error', (error: ErrnoException) => {\n console.log(error);\n });\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"with-filtering"},"children":[{"type":"text","value":"With filtering"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We're listening to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" event here:"}]},{"type":"element","tag":"code","props":{"code":" let options = {\n filter: {\n value: [],\n },\n fromBlock: 0\n };\n\n myContract.events.Transfer(options)\n .on('data', event => console.log(event))\n .on('changed', changed => console.log(changed))\n .on('error', err => throw err)\n .on('connected', str => console.log(str))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":" let options = {\n filter: {\n value: [],\n },\n fromBlock: 0\n };\n\n myContract.events.Transfer(options)\n .on('data', event => console.log(event))\n .on('changed', changed => console.log(changed))\n .on('error', err => throw err)\n .on('connected', str => console.log(str))\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"common-subscribe-method"},"children":[{"type":"text","value":"Common Subscribe method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Filtering options can also be specified:"}]},{"type":"element","tag":"code","props":{"code":" let options = {\n fromBlock: 0,\n address: ['address-1', 'address-2'], //Only get events from specific addresses\n topics: [] //What topics to subscribe to\n };\n\n let subscription = ('logs', options, (err,event) => {\n if (!err)\n console.log(event)\n });\n\n subscription.on('data', event => console.log(event))\n subscription.on('changed', changed => console.log(changed))\n subscription.on('error', err => { throw err })\n subscription.on('connected', nr => console.log(nr))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":" let options = {\n fromBlock: 0,\n address: ['address-1', 'address-2'], //Only get events from specific addresses\n topics: [] //What topics to subscribe to\n };\n\n let subscription = ('logs', options, (err,event) => {\n if (!err)\n console.log(event)\n });\n\n subscription.on('data', event => console.log(event))\n subscription.on('changed', changed => console.log(changed))\n subscription.on('error', err => { throw err })\n subscription.on('connected', nr => console.log(nr))\n"}]}]}]},{"type":"element","tag":"h3","props":{"id":"getting-event-history"},"children":[{"type":"text","value":"Getting event history"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Getting history for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" events for specific values. More info can be found "},{"type":"element","tag":"a","props":{"href":"https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"code","props":{"code":" //example options(optional)\n let options = {\n filter: {\n // only get events where transfer value was 1000 or 1337\n value: ['1000', '1337'] \n },\n // number | \"earliest\" | \"pending\" | \"latest\"\n fromBlock: 0, \n toBlock: 'latest'\n };\n\n myContract.getPastEvents('Transfer', options)\n .then(results => console.log(results))\n .catch(err => throw err);\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":" //example options(optional)\n let options = {\n filter: {\n // only get events where transfer value was 1000 or 1337\n value: ['1000', '1337'] \n },\n // number | \"earliest\" | \"pending\" | \"latest\"\n fromBlock: 0, \n toBlock: 'latest'\n };\n\n myContract.getPastEvents('Transfer', options)\n .then(results => console.log(results))\n .catch(err => throw err);\n\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For common functions see "},{"type":"element","tag":"a","props":{"href":"Common%20typescript%20examples"},"children":[{"type":"text","value":"Common typescript examples"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"getting-smart-contract-instance"},"children":[{"type":"text","value":"Getting smart contract instance"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for calling smart contract methods:"}]},{"type":"element","tag":"code","props":{"code":"import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract => {\n const abiFromJson = JSON.parse(JSON.stringify(abi));\n return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'web3-eth-contract'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cf891f"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"abi"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7da052"},"children":[{"type":"text","value":"object"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7da052"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-95f676"},"children":[{"type":"text","value":"abiFromJson"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cc0932"},"children":[{"type":"text","value":"JSON"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-95f676"},"children":[{"type":"text","value":"parse"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"abiFromJson"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-cebc24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-cebc24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"executing-contract-method"},"children":[{"type":"text","value":"Executing contract method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Contract has "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"read"}]},{"type":"text","value":" and "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"write"}]},{"type":"text","value":" methods. To get a list of methods, you can paste contract address on "},{"type":"element","tag":"a","props":{"href":"https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract","rel":["nofollow"]},"children":[{"type":"text","value":"https://etherscan.io/ ETH"}]},{"type":"text","value":" or any other service."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Read"}]},{"type":"text","value":" methods doesn't require spending "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":". "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"Write"}]},{"type":"text","value":" methods cost some amount of "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"gas"}]},{"type":"text","value":", hence they will be executed with confirmation from user."}]},{"type":"element","tag":"h3","props":{"id":"example-for-metamask-without-private-key"},"children":[{"type":"text","value":"Example for #Metamask without private key"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI of contract\nconst CONTRACT_ABI = { /* ... */ };\n // address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) => {\n // getting contract\n const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n \n // Calling write method\n try {\n // authorizing with Metamask\n await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n // getting wallet address\n const addressUser = web3.currentProvider.selectedAddress;\n // calling \"store\" store method for contract\n // payload should include `from` address, that matches\n // current user's wallet\n await contract.methods.store(0, 'Parameter').send({\n from: addressUser,\n });\n } catch (e) {\n throw new Error(e);\n }\n \n // calling read method\n try {\n // this method can return data\n const result = await contract.methods.retrieve().call();\n } catch (e) {\n throw new Error(e);\n }\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// see example below"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// ABI of contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"/* ... */"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// address for contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'0xdea164f67df4dbfe675d5271c9d404e0260f33bb'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"executeContractMethod"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ({}) "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// getting contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// Calling write method"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// authorizing with Metamask"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"({ method: "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'eth_requestAccounts'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// getting wallet address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"addressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"currentProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"selectedAddress"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// calling \"store\" store method for contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// payload should include `from` address, that matches"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// current user's wallet"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"store"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-adbb26"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'Parameter'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"send"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" from: "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"addressUser"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a68b75"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// calling read method"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// this method can return data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"retrieve"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a68b75"},"children":[{"type":"text","value":"Error"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"nodejs-and-react-native-example"},"children":[{"type":"text","value":"Node.js and React Native example"}]},{"type":"element","tag":"code","props":{"code":"// see example below\nimport { getContract } from '.';\n\n// ABI контракта\nconst CONTRACT_ABI = { /* ... */ };\n// contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n// getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n// account's private key\nconst privateKey = '...';\n\n// write-methods requires private key\nconst executeContractMethod = async (val: number) => {\n const transaction = contract.methods.store(val);\n const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n const options = {\n to: CONTRACT_ADDRESS,\n data: transaction.encodeABI(),\n gas: await transaction.estimateGas({ from: account.address }),\n gasPrice: await web3.eth.getGasPrice(),\n };\n const signed = await web3.eth.accounts.signTransaction(\n options,\n privateKey,\n );\n await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// see example below"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'.'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// ABI контракта"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"/* ... */"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// contract address"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'0xdea164f67df4dbfe675d5271c9d404e0260f33bb'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// getting contract"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"getContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// account's private key"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'...'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// write-methods requires private key"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cf891f"},"children":[{"type":"text","value":"executeContractMethod"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"val"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7da052"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"methods"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"store"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"val"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"account"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"accounts"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"privateKeyToAccount"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" to: "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" data: "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"encodeABI"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" gas: "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"transaction"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"estimateGas"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"({ from: "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"account"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"address"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" gasPrice: "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"getGasPrice"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"(),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"signed"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"accounts"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"signTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"privateKey"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"eth"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"sendSignedTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"signed"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"rawTransaction"}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"};"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"calling-a-batch-of-contracts-methods"},"children":[{"type":"text","value":"Calling a batch of contract's methods"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Function calls batch of requests, returning array of results. For example:"}]},{"type":"element","tag":"code","props":{"code":" const requests = [\n contract.method.balanceOf().call,\n contract.method.getStaked().call\n ]\n\n const result = await makeBatchRequest(request);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"requests"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ["}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"method"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"balanceOf"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"call"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"method"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"getStaked"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"call"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"request"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"code","props":{"code":"const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) => {\n try {\n const web3 = getWeb3NoAccount();\n const batch = new web3.BatchRequest();\n\n const promises = calls.map((call) => {\n return new Promise((resolve, reject) => {\n batch.add(\n call.request({}, (err, result) => {\n if (err) {\n reject(err);\n } else {\n resolve(result);\n }\n })\n );\n });\n });\n\n batch.execute();\n\n return Promise.all(promises);\n } catch {\n return null;\n }\n};\n\nexport default makeBatchRequest;\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"givenProvider"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"PROVIDER_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cf891f"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"calls"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7da052"},"children":[{"type":"text","value":"any"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":"[]) "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"getWeb3NoAccount"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"BatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"promises"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"calls"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"map"}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7da052"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"add"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"reject"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"resolve"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"result"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"batch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"execute"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a68b75"},"children":[{"type":"text","value":"Promise"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"all"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"promises"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a7fefb"},"children":[{"type":"text","value":"null"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"};"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-cebc24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"default"}]},{"type":"element","tag":"span","props":{"class":"ct-cebc24"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"makeBatchRequest"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"subscribing-to-smart-contract-events"},"children":[{"type":"text","value":"Subscribing to smart contract events"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"There're different ways to subscribe for contract events. For all of them you will need following variables:"}]},{"type":"element","tag":"code","props":{"code":" import Web3 from 'web3';\n const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n const ABI = 'YOUR ABI HERE';\n const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'web3'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'YOUR_RPC_ENDPOINT_HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'YOUR ABI HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'YOUR CONTRACT ADDRESS HERE'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"Web3"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"Contract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"ABI"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"CONTRACT_ADDRESS"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"by-accessing-contractevents"},"children":[{"type":"text","value":"By accessing contract.events"}]},{"type":"element","tag":"code","props":{"code":"referralProgramContract.events\n .RegisterUser()\n .on('connected', (subscriptionId: string) => {\n console.log(`| UserRegistered | events | ${subscriptionId}`);\n })\n .on(\n 'data',\n async (event: {\n removed: boolean;\n returnValues: RegisterUserResponseInterface;\n }) => {\n try {\n if (event.removed) {\n return;\n }\n const { user, referrer } = event.returnValues;\n console.log(user, referrer);\n } catch (e) {\n console.log(`| ONCE | ${e}`);\n }\n },\n )\n .on('error', (error: ErrnoException) => {\n console.log(error);\n });\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"referralProgramContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"events"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"RegisterUser"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"()"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-cf891f"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-ab4b45"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":", ("}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"subscriptionId"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7da052"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"`| UserRegistered | events | ${"}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"subscriptionId"}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"removed"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7da052"},"children":[{"type":"text","value":"boolean"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"returnValues"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94ff29"},"children":[{"type":"text","value":"RegisterUserResponseInterface"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"try"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"removed"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"user"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-85544b"},"children":[{"type":"text","value":"referrer"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"returnValues"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"user"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"referrer"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" } "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"`| ONCE | ${"}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"e"}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" )"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-cf891f"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-ab4b45"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":", ("}]},{"type":"element","tag":"span","props":{"class":"ct-b0cc89"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-aa91ad"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94ff29"},"children":[{"type":"text","value":"ErrnoException"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-c8130a"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-8c132e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" });"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"with-filtering"},"children":[{"type":"text","value":"With filtering"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We're listening to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" event here:"}]},{"type":"element","tag":"code","props":{"code":" let options = {\n filter: {\n value: [],\n },\n fromBlock: 0\n };\n\n myContract.events.Transfer(options)\n .on('data', event => console.log(event))\n .on('changed', changed => console.log(changed))\n .on('error', err => throw err)\n .on('connected', str => console.log(str))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" filter: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" value: [],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-adbb26"},"children":[{"type":"text","value":"0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"events"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"Transfer"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'changed'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"changed"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"str"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"))"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"common-subscribe-method"},"children":[{"type":"text","value":"Common Subscribe method"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Filtering options can also be specified:"}]},{"type":"element","tag":"code","props":{"code":" let options = {\n fromBlock: 0,\n address: ['address-1', 'address-2'], //Only get events from specific addresses\n topics: [] //What topics to subscribe to\n };\n\n let subscription = ('logs', options, (err,event) => {\n if (!err)\n console.log(event)\n });\n\n subscription.on('data', event => console.log(event))\n subscription.on('changed', changed => console.log(changed))\n subscription.on('error', err => { throw err })\n subscription.on('connected', nr => console.log(nr))\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-adbb26"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" address: ["}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'address-1'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'address-2'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"], "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"//Only get events from specific addresses"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" topics: [] "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"//What topics to subscribe to"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'logs'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'data'"}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'changed'"}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"changed"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'error'"}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"throw"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"err"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" })"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"subscription"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"on"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'connected'"}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"console"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"nr"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"))"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"getting-event-history"},"children":[{"type":"text","value":"Getting event history"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Getting history for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"Transfer"}]},{"type":"text","value":" events for specific values. More info can be found "},{"type":"element","tag":"a","props":{"href":"https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"code","props":{"code":" //example options(optional)\n let options = {\n filter: {\n // only get events where transfer value was 1000 or 1337\n value: ['1000', '1337'] \n },\n // number | \"earliest\" | \"pending\" | \"latest\"\n fromBlock: 0, \n toBlock: 'latest'\n };\n\n myContract.getPastEvents('Transfer', options)\n .then(results => console.log(results))\n .catch(err => throw err);\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"//example options(optional)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5db75f"},"children":[{"type":"text","value":"let"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9eda9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" filter: {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// only get events where transfer value was 1000 or 1337"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" value: ["}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'1000'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'1337'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"] "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-3ba34d"},"children":[{"type":"text","value":"// number | \"earliest\" | \"pending\" | \"latest\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" fromBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-adbb26"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" toBlock: "}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'latest'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" };"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"myContract"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"getPastEvents"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-1e061f"},"children":[{"type":"text","value":"'Transfer'"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"then"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"log"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-94cfb8"},"children":[{"type":"text","value":"results"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"class":"ct-62706a"},"children":[{"type":"text","value":"catch"}]},{"type":"element","tag":"span","props":{"class":"ct-04815e"},"children":[{"type":"text","value":" "}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-94ff29{color:#FFA657}.ct-ab4b45{color:#A5D6FF}.ct-a7fefb{color:#79C0FF}.ct-a68b75{color:#79C0FF}.ct-adbb26{color:#79C0FF}.ct-85544b{color:#79C0FF}.ct-5db75f{color:#FF7B72}.ct-3ba34d{color:#8B949E}.ct-cebc24{color:#FFA657}.ct-62706a{color:#D2A8FF}.ct-cc0932{color:#79C0FF}.ct-95f676{color:#79C0FF}.ct-7da052{color:#79C0FF}.ct-b0cc89{color:#FFA657}.ct-aa91ad{color:#FF7B72}.ct-cf891f{color:#D2A8FF}.ct-8c132e{color:#C9D1D9}.ct-c8130a{color:#FF7B72}.ct-1e061f{color:#A5D6FF}.ct-94cfb8{color:#C9D1D9}.ct-04815e{color:#C9D1D9}.ct-d9eda9{color:#FF7B72}.light .ct-d9eda9{color:#859900}.light .ct-04815e{color:#657B83}.light .ct-94cfb8{color:#268BD2}.light .ct-1e061f{color:#2AA198}.light .ct-c8130a{color:#073642}.light .ct-8c132e{color:#657B83}.light .ct-cf891f{color:#268BD2}.light .ct-aa91ad{color:#859900}.light .ct-b0cc89{color:#657B83}.light .ct-7da052{color:#859900}.light .ct-95f676{color:#268BD2}.light .ct-cc0932{color:#657B83}.light .ct-62706a{color:#268BD2}.light .ct-cebc24{color:#657B83}.light .ct-3ba34d{color:#93A1A1}.light .ct-5db75f{color:#073642}.light .ct-85544b{color:#268BD2}.light .ct-adbb26{color:#D33682}.light .ct-a68b75{color:#859900}.light .ct-a7fefb{color:#B58900}.light .ct-ab4b45{color:#2AA198}.light .ct-94ff29{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"getting-smart-contract-instance","depth":2,"text":"Getting smart contract instance"},{"id":"executing-contract-method","depth":2,"text":"Executing contract method","children":[{"id":"example-for-metamask-without-private-key","depth":3,"text":"Example for #Metamask without private key"},{"id":"nodejs-and-react-native-example","depth":3,"text":"Node.js and React Native example"},{"id":"calling-a-batch-of-contracts-methods","depth":3,"text":"Calling a batch of contract's methods"}]},{"id":"subscribing-to-smart-contract-events","depth":2,"text":"Subscribing to smart contract events","children":[{"id":"by-accessing-contractevents","depth":3,"text":"By accessing contract.events"},{"id":"with-filtering","depth":3,"text":"With filtering"},{"id":"common-subscribe-method","depth":3,"text":"Common Subscribe method"},{"id":"getting-event-history","depth":3,"text":"Getting event history"}]}]}},"_type":"markdown","_id":"content:Blockchain:Smart contracts.md","_source":"content","_file":"Blockchain/Smart contracts.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/WUiUHbO5Pg.json b/api/_content/query/WUiUHbO5Pg.json new file mode 100644 index 0000000..0ed8053 --- /dev/null +++ b/api/_content/query/WUiUHbO5Pg.json @@ -0,0 +1 @@ +{"_path":"/css/test-if-browser-supports-css-rules","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Test If Browser Supports CSS Rules","description":"To test if browser supports some #CSS rules, do following:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To test if browser supports some #CSS rules, do following:"}]},{"type":"element","tag":"code","props":{"code":"@supports (backdrop-filter: blur(5px)) {\n backdrop-filter: blur(5px);\n}\n","language":"css"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@supports (backdrop-filter: blur(5px)) {\n backdrop-filter: blur(5px);\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"@mixin"}]},{"type":"text","value":" will only apply rule if browser support backdrop filtering:"}]},{"type":"element","tag":"code","props":{"code":"@mixin can_backdrop {\n @supports (\n (-webkit-backdrop-filter: blur(5px)) or \n (backdrop-filter: blur(5px))\n ) {\n @content;\n }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@mixin can_backdrop {\n @supports (\n (-webkit-backdrop-filter: blur(5px)) or \n (backdrop-filter: blur(5px))\n ) {\n @content;\n }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To test if browser supports some #CSS rules, do following:"}]},{"type":"element","tag":"code","props":{"code":"@supports (backdrop-filter: blur(5px)) {\n backdrop-filter: blur(5px);\n}\n","language":"css"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-10cca1"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-eb47e8"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffdf0"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-96a3e4"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-10cca1"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-59177d"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":": blur(5px);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"@mixin"}]},{"type":"text","value":" will only apply rule if browser support backdrop filtering:"}]},{"type":"element","tag":"code","props":{"code":"@mixin can_backdrop {\n @supports (\n (-webkit-backdrop-filter: blur(5px)) or \n (backdrop-filter: blur(5px))\n ) {\n @content;\n }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-10cca1"},"children":[{"type":"text","value":"@mixin"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-93e3d0"},"children":[{"type":"text","value":"can_backdrop"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-10cca1"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ef0360"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-62510a"},"children":[{"type":"text","value":"-webkit-backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-ef0360"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b8b910"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-ef0360"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-daadee"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-0b9e02"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-ef0360"},"children":[{"type":"text","value":")) "}]},{"type":"element","tag":"span","props":{"class":"ct-8b6902"},"children":[{"type":"text","value":"or"}]},{"type":"element","tag":"span","props":{"class":"ct-ef0360"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-eb47e8"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-4ffdf0"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-96a3e4"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-10cca1"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-10cca1"},"children":[{"type":"text","value":"@content"}]},{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d28d13"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-8b6902{color:#79C0FF}.ct-0b9e02{color:#FF7B72}.ct-daadee{color:#79C0FF}.ct-b8b910{color:#79C0FF}.ct-62510a{color:#79C0FF}.ct-ef0360{color:#C9D1D9}.ct-93e3d0{color:#D2A8FF}.ct-59177d{color:#7EE787}.ct-96a3e4{color:#79C0FF}.ct-4ffdf0{color:#79C0FF}.ct-eb47e8{color:#79C0FF}.ct-d28d13{color:#C9D1D9}.ct-10cca1{color:#FF7B72}.light .ct-10cca1{color:#859900}.light .ct-d28d13{color:#657B83}.light .ct-eb47e8{color:#859900}.light .ct-4ffdf0{color:#268BD2}.light .ct-96a3e4{color:#D33682}.light .ct-59177d{color:#268BD2}.light .ct-93e3d0{color:#268BD2}.light .ct-ef0360{color:#657B83}.light .ct-62510a{color:#859900}.light .ct-b8b910{color:#268BD2}.light .ct-daadee{color:#D33682}.light .ct-0b9e02{color:#859900}.light .ct-8b6902{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:CSS:Test if browser supports CSS rules.md","_source":"content","_file":"CSS/Test if browser supports CSS rules.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/a1s3E9iAyd.json b/api/_content/query/a1s3E9iAyd.json new file mode 100644 index 0000000..444ba72 --- /dev/null +++ b/api/_content/query/a1s3E9iAyd.json @@ -0,0 +1 @@ +{"_path":"/docker/wait-for-mysql","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Wait For Mysql","description":"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful query from database or exits with non-zero status after timeout."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Don't forget to change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$query"}]},{"type":"text","value":" for the actually working one."}]},{"type":"element","tag":"code","props":{"code":"# Waits for mysql to become actually available\nwait_for_mysql() {\n query=\"SELECT count(*) FROM users\"\n \n timeout=180 # 3 minutes limit\n i=0\n \n while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n sleep 1;\n\n i=$(($i+1))\n if [[ ${i} -ge ${timeout} ]]; then\n echo \"[Error] can't properly query MySQL after ${i} secs\"\n exit 1;\n fi\n done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# Waits for mysql to become actually available\nwait_for_mysql() {\n query=\"SELECT count(*) FROM users\"\n \n timeout=180 # 3 minutes limit\n i=0\n \n while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n sleep 1;\n\n i=$(($i+1))\n if [[ ${i} -ge ${timeout} ]]; then\n echo \"[Error] can't properly query MySQL after ${i} secs\"\n exit 1;\n fi\n done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20redis"},"children":[{"type":"text","value":"Wait for redis"}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/vishnubob/wait-for-it","rel":["nofollow"]},"children":[{"type":"text","value":"wait-for-it.sh"}]},{"type":"text","value":" doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This script waits for first successful query from database or exits with non-zero status after timeout."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Don't forget to change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"$query"}]},{"type":"text","value":" for the actually working one."}]},{"type":"element","tag":"code","props":{"code":"# Waits for mysql to become actually available\nwait_for_mysql() {\n query=\"SELECT count(*) FROM users\"\n \n timeout=180 # 3 minutes limit\n i=0\n \n while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 >/dev/null 2>&1; do\n sleep 1;\n\n i=$(($i+1))\n if [[ ${i} -ge ${timeout} ]]; then\n echo \"[Error] can't properly query MySQL after ${i} secs\"\n exit 1;\n fi\n done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dd550d"},"children":[{"type":"text","value":"# Waits for mysql to become actually available"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e9e727"},"children":[{"type":"text","value":"wait_for_mysql"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":"() {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" query="}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\"SELECT count(*) FROM users\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" timeout=180 "}]},{"type":"element","tag":"span","props":{"class":"ct-dd550d"},"children":[{"type":"text","value":"# 3 minutes limit"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" i=0"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"while"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-440d95"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" -it "}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-62f297"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" mysql --user="}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-62f297"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" -e "}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-62f297"},"children":[{"type":"text","value":"query"}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"do"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" sleep 1"}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" i="}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"$(("}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-62f297"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-52c063"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" [[ "}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-62f297"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"-ge"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-62f297"},"children":[{"type":"text","value":"timeout"}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" ]]"}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":";"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"then"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-440d95"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":"\"[Error] can't properly query MySQL after "}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"${"}]},{"type":"element","tag":"span","props":{"class":"ct-62f297"},"children":[{"type":"text","value":"i"}]},{"type":"element","tag":"span","props":{"class":"ct-cc8827"},"children":[{"type":"text","value":"}"}]},{"type":"element","tag":"span","props":{"class":"ct-c5795a"},"children":[{"type":"text","value":" secs\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-440d95"},"children":[{"type":"text","value":"exit"}]},{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"fi"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-741c1f"},"children":[{"type":"text","value":"done"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-68b7cc"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dd550d"},"children":[{"type":"text","value":"# usage: wait_for_mysql miin-mysql-dev root password database"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"Wait%20for%20redis"},"children":[{"type":"text","value":"Wait for redis"}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-52c063{color:#79C0FF}.ct-62f297{color:#C9D1D9}.ct-cc8827{color:#C9D1D9}.ct-440d95{color:#79C0FF}.ct-741c1f{color:#FF7B72}.ct-c5795a{color:#A5D6FF}.ct-68b7cc{color:#C9D1D9}.ct-e9e727{color:#D2A8FF}.ct-dd550d{color:#8B949E}.light .ct-dd550d{color:#93A1A1}.light .ct-e9e727{color:#268BD2}.light .ct-68b7cc{color:#657B83}.light .ct-c5795a{color:#2AA198}.light .ct-741c1f{color:#859900}.light .ct-440d95{color:#268BD2}.light .ct-cc8827{color:#859900}.light .ct-62f297{color:#268BD2}.light .ct-52c063{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Wait for mysql.md","_source":"content","_file":"Docker/Wait for mysql.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/aP6pCxBj14.json b/api/_content/query/aP6pCxBj14.json new file mode 100644 index 0000000..4685ff9 --- /dev/null +++ b/api/_content/query/aP6pCxBj14.json @@ -0,0 +1 @@ +{"_path":"/linux/resume-or-start-screen-session","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Resume Or Start Screen Session","description":"Running this script will enter currently running screen session or will start new one.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Running this script will enter currently running "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"screen"}]},{"type":"text","value":" session or will start new one."}]},{"type":"element","tag":"code","props":{"code":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Running this script will enter currently running "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"screen"}]},{"type":"text","value":" session or will start new one."}]},{"type":"element","tag":"code","props":{"code":"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ac822e"},"children":[{"type":"text","value":"( screen -r bash "}]},{"type":"element","tag":"span","props":{"class":"ct-35a9ce"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-ac822e"},"children":[{"type":"text","value":" ( screen -d bash "}]},{"type":"element","tag":"span","props":{"class":"ct-35a9ce"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-ac822e"},"children":[{"type":"text","value":" screen -r bash "}]},{"type":"element","tag":"span","props":{"class":"ct-35a9ce"},"children":[{"type":"text","value":"||"}]},{"type":"element","tag":"span","props":{"class":"ct-ac822e"},"children":[{"type":"text","value":" screen -SAm bash bash ) )"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-35a9ce{color:#FF7B72}.ct-ac822e{color:#C9D1D9}.light .ct-ac822e{color:#657B83}.light .ct-35a9ce{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Linux:Resume or start screen session.md","_source":"content","_file":"Linux/Resume or start screen session.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/arOc40mIpI.json b/api/_content/query/arOc40mIpI.json new file mode 100644 index 0000000..49a5a09 --- /dev/null +++ b/api/_content/query/arOc40mIpI.json @@ -0,0 +1 @@ +{"_path":"/docker/drone-ci","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Drone Ci","description":"Can be used with Private docker registry to deploy things using #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" to deploy things using #docker."}]},{"type":"element","tag":"h2","props":{"id":"pushing-to-private-docker_registry"},"children":[{"type":"text","value":"Pushing to private docker_registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_login"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_password"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_registry"}]},{"type":"text","value":" organizations variables in your "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":". And "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker_repo"}]},{"type":"text","value":" variable for your repo as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker.yourdomain.com/your-image"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is example of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".droneci"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"private docker registry"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n os: linux\n arch: amd64\n\nsteps:\n - name: build-master\n image: plugins/docker\n when:\n branch:\n - master\n settings:\n dockerfile: Dockerfile\n tag:\n - ${DRONE_BRANCH}\n username:\n from_secret: global_docker_login\n password:\n from_secret: global_docker_password\n registry:\n from_secret: global_docker_registry\n repo:\n from_secret: docker_repo\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n os: linux\n arch: amd64\n\nsteps:\n - name: build-master\n image: plugins/docker\n when:\n branch:\n - master\n settings:\n dockerfile: Dockerfile\n tag:\n - ${DRONE_BRANCH}\n username:\n from_secret: global_docker_login\n password:\n from_secret: global_docker_password\n registry:\n from_secret: global_docker_registry\n repo:\n from_secret: docker_repo\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-for-drone-ci"},"children":[{"type":"text","value":"Docker-compose file for drone-ci"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":" service is ui itself and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone-agent"}]},{"type":"text","value":" is runner for builds, that can be started on different machine (or machines)."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"secret_id"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"rpc_secret"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone.url"}]},{"type":"text","value":" to something you like."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n drone:\n container_name: drone\n image: drone/drone:latest\n environment:\n - DRONE_GITHUB_CLIENT_ID=secret_id\n - DRONE_GITHUB_CLIENT_SECRET=client_secret\n - DRONE_RPC_SECRET=rpc_secret\n - DRONE_SERVER_HOST=drone.url\n - DRONE_USER_CREATE=\"username:user,admin:true\"\n - DRONE_SERVER_PROTO=https\n - DRONE_TLS_AUTOCERT=false\n - DRONE_GIT_ALWAYS_AUTH=false\n - DRONE_LOGS_DEBUG=true\n - DRONE_LOGS_TRACE=true\n restart: always\n volumes:\n - ./data:/data\n ports:\n - 8090:80\n drone-agent:\n container_name: drone__agent\n image: drone/agent:latest\n command: agent\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock\n environment:\n - DRONE_RPC_SERVER=https://drone.url\n - DRONE_RPC_SECRET=rpc_secret\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nservices:\n drone:\n container_name: drone\n image: drone/drone:latest\n environment:\n - DRONE_GITHUB_CLIENT_ID=secret_id\n - DRONE_GITHUB_CLIENT_SECRET=client_secret\n - DRONE_RPC_SECRET=rpc_secret\n - DRONE_SERVER_HOST=drone.url\n - DRONE_USER_CREATE=\"username:user,admin:true\"\n - DRONE_SERVER_PROTO=https\n - DRONE_TLS_AUTOCERT=false\n - DRONE_GIT_ALWAYS_AUTH=false\n - DRONE_LOGS_DEBUG=true\n - DRONE_LOGS_TRACE=true\n restart: always\n volumes:\n - ./data:/data\n ports:\n - 8090:80\n drone-agent:\n container_name: drone__agent\n image: drone/agent:latest\n command: agent\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock\n environment:\n - DRONE_RPC_SERVER=https://drone.url\n - DRONE_RPC_SECRET=rpc_secret\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"caching-builds"},"children":[{"type":"text","value":"Caching builds"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Haven't checked that yet, but there's a "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/the-ultimate-droneci-caching-guide","rel":["nofollow"]},"children":[{"type":"text","value":"manual"}]},{"type":"text","value":" from "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/","rel":["nofollow"]},"children":[{"type":"text","value":"Laszlo Fogas"}]},{"type":"text","value":" about that."}]},{"type":"element","tag":"h2","props":{"id":"get-user-info"},"children":[{"type":"text","value":"Get user info"}]},{"type":"element","tag":"code","props":{"code":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n"}]}]}]},{"type":"element","tag":"h2","props":{"id":"mark-user-as-trusted"},"children":[{"type":"text","value":"Mark user as trusted"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"drone repo update $1 --trusted=true && drone repo info $1\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"drone repo update $1 --trusted=true && drone repo info $1\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Can be used with "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"Private docker registry"}]},{"type":"text","value":" to deploy things using #docker."}]},{"type":"element","tag":"h2","props":{"id":"pushing-to-private-docker_registry"},"children":[{"type":"text","value":"Pushing to private docker_registry"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should specify "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_login"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_password"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"global_docker_registry"}]},{"type":"text","value":" organizations variables in your "},{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":". And "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker_repo"}]},{"type":"text","value":" variable for your repo as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docker.yourdomain.com/your-image"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is example of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".droneci"}]},{"type":"text","value":" for "},{"type":"element","tag":"a","props":{"href":"Private%20docker%20registry"},"children":[{"type":"text","value":"private docker registry"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n os: linux\n arch: amd64\n\nsteps:\n - name: build-master\n image: plugins/docker\n when:\n branch:\n - master\n settings:\n dockerfile: Dockerfile\n tag:\n - ${DRONE_BRANCH}\n username:\n from_secret: global_docker_login\n password:\n from_secret: global_docker_password\n registry:\n from_secret: global_docker_registry\n repo:\n from_secret: docker_repo\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"kind"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"pipeline"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"platform"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"os"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"linux"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"arch"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"amd64"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"steps"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"build-master"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"plugins/docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"when"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"branch"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"master"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"settings"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"dockerfile"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"Dockerfile"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"tag"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"${DRONE_BRANCH}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"username"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"global_docker_login"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"password"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"global_docker_password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"registry"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"global_docker_registry"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"repo"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"docker_repo"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-for-drone-ci"},"children":[{"type":"text","value":"Docker-compose file for drone-ci"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone"}]},{"type":"text","value":" service is ui itself and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone-agent"}]},{"type":"text","value":" is runner for builds, that can be started on different machine (or machines)."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Change "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"secret_id"}]},{"type":"text","value":", "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"rpc_secret"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"drone.url"}]},{"type":"text","value":" to something you like."}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nservices:\n drone:\n container_name: drone\n image: drone/drone:latest\n environment:\n - DRONE_GITHUB_CLIENT_ID=secret_id\n - DRONE_GITHUB_CLIENT_SECRET=client_secret\n - DRONE_RPC_SECRET=rpc_secret\n - DRONE_SERVER_HOST=drone.url\n - DRONE_USER_CREATE=\"username:user,admin:true\"\n - DRONE_SERVER_PROTO=https\n - DRONE_TLS_AUTOCERT=false\n - DRONE_GIT_ALWAYS_AUTH=false\n - DRONE_LOGS_DEBUG=true\n - DRONE_LOGS_TRACE=true\n restart: always\n volumes:\n - ./data:/data\n ports:\n - 8090:80\n drone-agent:\n container_name: drone__agent\n image: drone/agent:latest\n command: agent\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock\n environment:\n - DRONE_RPC_SERVER=https://drone.url\n - DRONE_RPC_SECRET=rpc_secret\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"drone"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"drone"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"drone/drone:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_GITHUB_CLIENT_ID=secret_id"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_GITHUB_CLIENT_SECRET=client_secret"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_RPC_SECRET=rpc_secret"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_SERVER_HOST=drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_USER_CREATE=\"username:user,admin:true\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_SERVER_PROTO=https"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_TLS_AUTOCERT=false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_GIT_ALWAYS_AUTH=false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_LOGS_DEBUG=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_LOGS_TRACE=true"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"./data:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"8090:80"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"drone-agent"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"drone__agent"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"drone/agent:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"agent"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"/var/run/docker.sock:/var/run/docker.sock"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-236dc9"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_RPC_SERVER=https://drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-82031d"},"children":[{"type":"text","value":"DRONE_RPC_SECRET=rpc_secret"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"caching-builds"},"children":[{"type":"text","value":"Caching builds"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Haven't checked that yet, but there's a "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/the-ultimate-droneci-caching-guide","rel":["nofollow"]},"children":[{"type":"text","value":"manual"}]},{"type":"text","value":" from "},{"type":"element","tag":"a","props":{"href":"https://laszlo.cloud/","rel":["nofollow"]},"children":[{"type":"text","value":"Laszlo Fogas"}]},{"type":"text","value":" about that."}]},{"type":"element","tag":"h2","props":{"id":"get-user-info"},"children":[{"type":"text","value":"Get user info"}]},{"type":"element","tag":"code","props":{"code":"export DRONE_SERVER=https://drone.url\nexport DRONE_TOKEN=password\ndrone info\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6679c7"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" DRONE_SERVER=https://drone.url"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-6679c7"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" DRONE_TOKEN=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":"drone info"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"mark-user-as-trusted"},"children":[{"type":"text","value":"Mark user as trusted"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"1"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"drone repo update $1 --trusted=true && drone repo info $1\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":"drone repo update "}]},{"type":"element","tag":"span","props":{"class":"ct-05aea5"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-9be66d"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" --trusted=true "}]},{"type":"element","tag":"span","props":{"class":"ct-6c3775"},"children":[{"type":"text","value":"&&"}]},{"type":"element","tag":"span","props":{"class":"ct-259684"},"children":[{"type":"text","value":" drone repo info "}]},{"type":"element","tag":"span","props":{"class":"ct-05aea5"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-9be66d"},"children":[{"type":"text","value":"1"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-6c3775{color:#FF7B72}.ct-9be66d{color:#C9D1D9}.ct-05aea5{color:#C9D1D9}.ct-6679c7{color:#FF7B72}.ct-82031d{color:#A5D6FF}.ct-259684{color:#C9D1D9}.ct-236dc9{color:#7EE787}.light .ct-236dc9{color:#268BD2}.light .ct-259684{color:#657B83}.light .ct-82031d{color:#2AA198}.light .ct-6679c7{color:#073642}.light .ct-05aea5{color:#859900}.light .ct-9be66d{color:#268BD2}.light .ct-6c3775{color:#859900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"pushing-to-private-docker_registry","depth":2,"text":"Pushing to private docker_registry"},{"id":"docker-compose-file-for-drone-ci","depth":2,"text":"Docker-compose file for drone-ci"},{"id":"caching-builds","depth":2,"text":"Caching builds"},{"id":"get-user-info","depth":2,"text":"Get user info"},{"id":"mark-user-as-trusted","depth":2,"text":"Mark user as trusted"}]}},"_type":"markdown","_id":"content:Docker:Drone-ci.md","_source":"content","_file":"Docker/Drone-ci.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/caMZB0IDKr.json b/api/_content/query/caMZB0IDKr.json new file mode 100644 index 0000000..19285a2 --- /dev/null +++ b/api/_content/query/caMZB0IDKr.json @@ -0,0 +1 @@ +{"_path":"/docker/building-static-pages-with-docker","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Building Static Pages With Docker","description":"Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:"}]},{"type":"element","tag":"code","props":{"code":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html\n","language":"Dockerfile"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:"}]},{"type":"element","tag":"code","props":{"code":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html\n","language":"Dockerfile"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"FROM node:16-alpine as builder\nWORKDIR /app\nCOPY package.json yarn.lock ./\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder /app/dist /usr/share/nginx/html"}]}]}]}]}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Building static pages with Docker.md","_source":"content","_file":"Docker/Building static pages with Docker.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/eIcZslqPOz.json b/api/_content/query/eIcZslqPOz.json new file mode 100644 index 0000000..7c932cd --- /dev/null +++ b/api/_content/query/eIcZslqPOz.json @@ -0,0 +1 @@ +{"_path":"/git/force-git-to-use-https","_dir":"git","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Force Git To Use HTTPS","description":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Put this inside your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"[url \"https://github.com\"]\n insteadOf = git://github.com\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[url \"https://github.com\"]\n insteadOf = git://github.com\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Put this inside your "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"~/.gitconfig"}]},{"type":"text","value":":"}]},{"type":"element","tag":"code","props":{"code":"[url \"https://github.com\"]\n insteadOf = git://github.com\n","language":"c"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-35ce96"},"children":[{"type":"text","value":"[url "}]},{"type":"element","tag":"span","props":{"class":"ct-528a2e"},"children":[{"type":"text","value":"\"https://github.com\""}]},{"type":"element","tag":"span","props":{"class":"ct-35ce96"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-35ce96"},"children":[{"type":"text","value":" insteadOf "}]},{"type":"element","tag":"span","props":{"class":"ct-fa8b57"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-35ce96"},"children":[{"type":"text","value":" git:"}]},{"type":"element","tag":"span","props":{"class":"ct-3930f2"},"children":[{"type":"text","value":"//github.com"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-3930f2{color:#8B949E}.ct-fa8b57{color:#FF7B72}.ct-528a2e{color:#A5D6FF}.ct-35ce96{color:#C9D1D9}.light .ct-35ce96{color:#657B83}.light .ct-528a2e{color:#2AA198}.light .ct-fa8b57{color:#859900}.light .ct-3930f2{color:#93A1A1}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Git:Force git to use HTTPS.md","_source":"content","_file":"Git/Force git to use HTTPS.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/epeSDkttbj.json b/api/_content/query/epeSDkttbj.json new file mode 100644 index 0000000..f798cd4 --- /dev/null +++ b/api/_content/query/epeSDkttbj.json @@ -0,0 +1 @@ +{"_path":"/css/sass-nth-child-iterate-mixin","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Sass Nth Child Iterate Mixin","description":"Say, we need to color n items by specific colors, which depend on its position. #SCSS supports iteration over lists for that purposes:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we need to color "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" items by specific colors, which depend on its position. #SCSS supports "},{"type":"element","tag":"a","props":{"href":"https://sass-lang.com/documentation/at-rules/control/each","rel":["nofollow"]},"children":[{"type":"text","value":"iteration over lists"}]},{"type":"text","value":" for that purposes:"}]},{"type":"element","tag":"code","props":{"code":"@mixin color-per-child($colors) {\n @each $color in $colors {\n &:nth-child(#{index(($colors), ($color))}) {\n color: $color;\n }\n }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@mixin color-per-child($colors) {\n @each $color in $colors {\n &:nth-child(#{index(($colors), ($color))}) {\n color: $color;\n }\n }\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage is simple:"}]},{"type":"element","tag":"code","props":{"code":".item {\n @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":".item {\n @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Say, we need to color "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" items by specific colors, which depend on its position. #SCSS supports "},{"type":"element","tag":"a","props":{"href":"https://sass-lang.com/documentation/at-rules/control/each","rel":["nofollow"]},"children":[{"type":"text","value":"iteration over lists"}]},{"type":"text","value":" for that purposes:"}]},{"type":"element","tag":"code","props":{"code":"@mixin color-per-child($colors) {\n @each $color in $colors {\n &:nth-child(#{index(($colors), ($color))}) {\n color: $color;\n }\n }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-908659"},"children":[{"type":"text","value":"@mixin"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-14e41c"},"children":[{"type":"text","value":"color-per-child"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-20fa53"},"children":[{"type":"text","value":"$colors"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908659"},"children":[{"type":"text","value":"@each"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-20fa53"},"children":[{"type":"text","value":"$color"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-908659"},"children":[{"type":"text","value":"in"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-20fa53"},"children":[{"type":"text","value":"$colors"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-776cce"},"children":[{"type":"text","value":"&"}]},{"type":"element","tag":"span","props":{"class":"ct-59c2b0"},"children":[{"type":"text","value":":nth-child"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-20fa53"},"children":[{"type":"text","value":"#{"}]},{"type":"element","tag":"span","props":{"class":"ct-2fe314"},"children":[{"type":"text","value":"index"}]},{"type":"element","tag":"span","props":{"class":"ct-20fa53"},"children":[{"type":"text","value":"(($colors), ($color))}"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-845dc7"},"children":[{"type":"text","value":"color"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-20fa53"},"children":[{"type":"text","value":"$color"}]},{"type":"element","tag":"span","props":{"class":"ct-eed04f"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage is simple:"}]},{"type":"element","tag":"code","props":{"code":".item {\n @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-803228"},"children":[{"type":"text","value":".item"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-360621"},"children":[{"type":"text","value":"@include"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f63cee"},"children":[{"type":"text","value":"color_per_child"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-26bba9"},"children":[{"type":"text","value":"#ded187"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-26bba9"},"children":[{"type":"text","value":"#dbde87"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-26bba9"},"children":[{"type":"text","value":"#bade87"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-26bba9"},"children":[{"type":"text","value":"#9cde87"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-26bba9"},"children":[{"type":"text","value":"#87deaa"}]},{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":"));"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-431b9d"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-26bba9{color:#79C0FF}.ct-f63cee{color:#D2A8FF}.ct-360621{color:#FF7B72}.ct-803228{color:#79C0FF}.ct-431b9d{color:#C9D1D9}.ct-845dc7{color:#79C0FF}.ct-2fe314{color:#79C0FF}.ct-59c2b0{color:#79C0FF}.ct-776cce{color:#7EE787}.ct-20fa53{color:#FFA657}.ct-14e41c{color:#D2A8FF}.ct-eed04f{color:#C9D1D9}.ct-908659{color:#FF7B72}.light .ct-908659{color:#859900}.light .ct-eed04f{color:#657B83}.light .ct-14e41c{color:#268BD2}.light .ct-20fa53{color:#657B83}.light .ct-776cce{color:#268BD2}.light .ct-59c2b0{color:#93A1A1}.light .ct-2fe314{color:#268BD2}.light .ct-845dc7{color:#859900}.light .ct-431b9d{color:#657B83}.light .ct-803228{color:#93A1A1}.light .ct-360621{color:#859900}.light .ct-f63cee{color:#268BD2}.light .ct-26bba9{color:#CB4B16}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:CSS:Sass nth-child iterate mixin.md","_source":"content","_file":"CSS/Sass nth-child iterate mixin.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/gviYR2nAXj.json b/api/_content/query/gviYR2nAXj.json new file mode 100644 index 0000000..816e0cb --- /dev/null +++ b/api/_content/query/gviYR2nAXj.json @@ -0,0 +1 @@ +{"_path":"/linux/gitea-for-git-hosting","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Gitea For Git Hosting","description":"Self-hosted #git repositories with gitea and #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Self-hosted #git repositories with "},{"type":"element","tag":"a","props":{"href":"https://gitea.io/ru-ru/","rel":["nofollow"]},"children":[{"type":"text","value":"gitea"}]},{"type":"text","value":" and #docker."}]},{"type":"element","tag":"h2","props":{"id":"setting-up-with-docker-compose"},"children":[{"type":"text","value":"Setting up with docker-compose"}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nnetworks:\n gitea:\n external: false\nservices:\n server:\n image: gitea/gitea:latest\n container_name: gitea\n environment:\n - USER_UID=1000\n - USER_GID=1000\n restart: always\n networks:\n - gitea\n volumes:\n - ./var/lib/gitea:/data\n - ./etc/gitea:/etc/gitea\n - /etc/timezone:/etc/timezone:ro\n - /etc/localtime:/etc/localtime:ro\n ports:\n - \"3000:3000\"\n - \"222:22\"\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: \"3\"\n\nnetworks:\n gitea:\n external: false\nservices:\n server:\n image: gitea/gitea:latest\n container_name: gitea\n environment:\n - USER_UID=1000\n - USER_GID=1000\n restart: always\n networks:\n - gitea\n volumes:\n - ./var/lib/gitea:/data\n - ./etc/gitea:/etc/gitea\n - /etc/timezone:/etc/timezone:ro\n - /etc/localtime:/etc/localtime:ro\n ports:\n - \"3000:3000\"\n - \"222:22\"\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Self-hosted #git repositories with "},{"type":"element","tag":"a","props":{"href":"https://gitea.io/ru-ru/","rel":["nofollow"]},"children":[{"type":"text","value":"gitea"}]},{"type":"text","value":" and #docker."}]},{"type":"element","tag":"h2","props":{"id":"setting-up-with-docker-compose"},"children":[{"type":"text","value":"Setting up with docker-compose"}]},{"type":"element","tag":"code","props":{"code":"version: \"3\"\n\nnetworks:\n gitea:\n external: false\nservices:\n server:\n image: gitea/gitea:latest\n container_name: gitea\n environment:\n - USER_UID=1000\n - USER_GID=1000\n restart: always\n networks:\n - gitea\n volumes:\n - ./var/lib/gitea:/data\n - ./etc/gitea:/etc/gitea\n - /etc/timezone:/etc/timezone:ro\n - /etc/localtime:/etc/localtime:ro\n ports:\n - \"3000:3000\"\n - \"222:22\"\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"\"3\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"networks"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"gitea"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"external"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-b5d663"},"children":[{"type":"text","value":"false"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"server"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"gitea/gitea:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"USER_UID=1000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"USER_GID=1000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"always"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"networks"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"./var/lib/gitea:/data"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"./etc/gitea:/etc/gitea"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"/etc/timezone:/etc/timezone:ro"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"/etc/localtime:/etc/localtime:ro"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d9b4de"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"\"3000:3000\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-1fc9a0"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-385a1d"},"children":[{"type":"text","value":"\"222:22\""}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-b5d663{color:#79C0FF}.ct-385a1d{color:#A5D6FF}.ct-1fc9a0{color:#C9D1D9}.ct-d9b4de{color:#7EE787}.light .ct-d9b4de{color:#268BD2}.light .ct-1fc9a0{color:#657B83}.light .ct-385a1d{color:#2AA198}.light .ct-b5d663{color:#B58900}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"setting-up-with-docker-compose","depth":2,"text":"Setting up with docker-compose"}]}},"_type":"markdown","_id":"content:Linux:Gitea for git hosting.md","_source":"content","_file":"Linux/Gitea for git hosting.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/iZIUw8pCoM.json b/api/_content/query/iZIUw8pCoM.json new file mode 100644 index 0000000..0631c60 --- /dev/null +++ b/api/_content/query/iZIUw8pCoM.json @@ -0,0 +1 @@ +{"_path":"/typescript/type-guards","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Type Guards","description":"Useful for type checking at compile and run time:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for type checking at compile and run time:"}]},{"type":"element","tag":"code","props":{"code":"function isFish(pet: Fish | Bird): pet is Fish {\n return (pet as Fish).swim !== undefined;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"function isFish(pet: Fish | Bird): pet is Fish {\n return (pet as Fish).swim !== undefined;\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage:"}]},{"type":"element","tag":"code","props":{"code":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n pet.swim();\n} else {\n pet.fly();\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n pet.swim();\n} else {\n pet.fly();\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Useful for type checking at compile and run time:"}]},{"type":"element","tag":"code","props":{"code":"function isFish(pet: Fish | Bird): pet is Fish {\n return (pet as Fish).swim !== undefined;\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e6988d"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-68061a"},"children":[{"type":"text","value":"isFish"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-b5a0e2"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-f141b4"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5d2456"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f141b4"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5d2456"},"children":[{"type":"text","value":"Bird"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"class":"ct-f141b4"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b5a0e2"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f141b4"},"children":[{"type":"text","value":"is"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-5d2456"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-e1ee51"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-359d96"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-ba0a2b"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-359d96"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-cc88bc"},"children":[{"type":"text","value":"Fish"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"class":"ct-ba0a2b"},"children":[{"type":"text","value":"swim"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-359d96"},"children":[{"type":"text","value":"!=="}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dbf28d"},"children":[{"type":"text","value":"undefined"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Usage:"}]},{"type":"element","tag":"code","props":{"code":"const pet = getSmallPet();\n \nif (isFish(pet)) {\n pet.swim();\n} else {\n pet.fly();\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-bd6ed9"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d4f6a5"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-359d96"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e3a74f"},"children":[{"type":"text","value":"getSmallPet"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-359d96"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-e3a74f"},"children":[{"type":"text","value":"isFish"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-ba0a2b"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ba0a2b"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e3a74f"},"children":[{"type":"text","value":"swim"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"} "}]},{"type":"element","tag":"span","props":{"class":"ct-359d96"},"children":[{"type":"text","value":"else"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ba0a2b"},"children":[{"type":"text","value":"pet"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-e3a74f"},"children":[{"type":"text","value":"fly"}]},{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3d81ad"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-e3a74f{color:#D2A8FF}.ct-d4f6a5{color:#79C0FF}.ct-bd6ed9{color:#FF7B72}.ct-dbf28d{color:#79C0FF}.ct-cc88bc{color:#FFA657}.ct-ba0a2b{color:#C9D1D9}.ct-359d96{color:#FF7B72}.ct-3d81ad{color:#C9D1D9}.ct-5d2456{color:#FFA657}.ct-f141b4{color:#FF7B72}.ct-b5a0e2{color:#FFA657}.ct-68061a{color:#D2A8FF}.ct-e1ee51{color:#C9D1D9}.ct-e6988d{color:#FF7B72}.light .ct-e6988d{color:#073642}.light .ct-e1ee51{color:#657B83}.light .ct-68061a{color:#268BD2}.light .ct-b5a0e2{color:#657B83}.light .ct-f141b4{color:#859900}.light .ct-5d2456{color:#268BD2}.light .ct-3d81ad{color:#657B83}.light .ct-359d96{color:#859900}.light .ct-ba0a2b{color:#268BD2}.light .ct-cc88bc{color:#268BD2}.light .ct-dbf28d{color:#B58900}.light .ct-bd6ed9{color:#073642}.light .ct-d4f6a5{color:#268BD2}.light .ct-e3a74f{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Typescript:Type guards.md","_source":"content","_file":"Typescript/Type guards.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/ki2hTtdZ9z.json b/api/_content/query/ki2hTtdZ9z.json new file mode 100644 index 0000000..f4c667c --- /dev/null +++ b/api/_content/query/ki2hTtdZ9z.json @@ -0,0 +1 @@ +{"_path":"/typescript/flatten-object-with-periods","_dir":"typescript","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Flatten Object With Periods","description":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Used for typing "},{"type":"element","tag":"a","props":{"href":"https://www.npmjs.com/package/i18n-js","rel":["nofollow"]},"children":[{"type":"text","value":"i18n.js"}]},{"type":"text","value":" dictionaries;"}]},{"type":"element","tag":"code","props":{"code":"import en from './en.json';\ntype TranslationPath = Flatten;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n I18nLib.t(key, options);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import en from './en.json';\ntype TranslationPath = Flatten;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n I18nLib.t(key, options);\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Flatten type defined here:"}]},{"type":"element","tag":"code","props":{"code":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten = [D] extends [never]\n ? never\n : T extends PluralForm // plural object\n ? ''\n : T extends object\n ? { [K in keyof T]-?: Join> }[keyof T]\n : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join = K extends string | number\n ? P extends string | number\n ? `${K}${'' extends P ? '' : '.'}${P}`\n : never\n : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten = [D] extends [never]\n ? never\n : T extends PluralForm // plural object\n ? ''\n : T extends object\n ? { [K in keyof T]-?: Join> }[keyof T]\n : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join = K extends string | number\n ? P extends string | number\n ? `${K}${'' extends P ? '' : '.'}${P}`\n : never\n : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Used for typing "},{"type":"element","tag":"a","props":{"href":"https://www.npmjs.com/package/i18n-js","rel":["nofollow"]},"children":[{"type":"text","value":"i18n.js"}]},{"type":"text","value":" dictionaries;"}]},{"type":"element","tag":"code","props":{"code":"import en from './en.json';\ntype TranslationPath = Flatten;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =>\n I18nLib.t(key, options);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8756fd"},"children":[{"type":"text","value":"en"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"'./en.json'"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"TranslationPath"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"typeof"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8756fd"},"children":[{"type":"text","value":"en"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":">;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-02aa0f"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-679523"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-242dc6"},"children":[{"type":"text","value":"t"}]},{"type":"element","tag":"span","props":{"class":"ct-679523"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1dff2a"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-679523"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-c56ad7"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-1dff2a"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-679523"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c830d"},"children":[{"type":"text","value":"TranslationPath"}]},{"type":"element","tag":"span","props":{"class":"ct-679523"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-c56ad7"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-1dff2a"},"children":[{"type":"text","value":"?:"}]},{"type":"element","tag":"span","props":{"class":"ct-679523"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7c830d"},"children":[{"type":"text","value":"TranslateOptions"}]},{"type":"element","tag":"span","props":{"class":"ct-679523"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-02aa0f"},"children":[{"type":"text","value":"=>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8756fd"},"children":[{"type":"text","value":"I18nLib"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-b8298a"},"children":[{"type":"text","value":"t"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-8756fd"},"children":[{"type":"text","value":"key"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-8756fd"},"children":[{"type":"text","value":"options"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":");"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Flatten type defined here:"}]},{"type":"element","tag":"code","props":{"code":"// This one based on answer from StackOverflow:\n// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object\n\nexport type Flatten = [D] extends [never]\n ? never\n : T extends PluralForm // plural object\n ? ''\n : T extends object\n ? { [K in keyof T]-?: Join> }[keyof T]\n : '';\n\n// Fix it for you plural form\ntype PluralForm = Record<'one' | 'few' | 'many', string>;\n\ntype Join = K extends string | number\n ? P extends string | number\n ? `${K}${'' extends P ? '' : '.'}${P}`\n : never\n : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f1fc48"},"children":[{"type":"text","value":"// This one based on answer from StackOverflow:"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f1fc48"},"children":[{"type":"text","value":"// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"] "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"never"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"PluralForm"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f1fc48"},"children":[{"type":"text","value":"// plural object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"''"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"object"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" { ["}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"in"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"keyof"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"]"}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"-?:"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Join"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Flatten"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"], "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Prev"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"["}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"D"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"]>> }["}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"keyof"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"T"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"]"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f1fc48"},"children":[{"type":"text","value":"// Fix it for you plural form"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"PluralForm"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Record"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"'one'"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"'few'"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"'many'"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":">;"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Join"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"number"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"string"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"number"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"K"}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"}${''"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb8cb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"extends"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb8cb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb8cb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb8cb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"''"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb8cb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-ffb8cb"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"'.'}${"}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"P"}]},{"type":"element","tag":"span","props":{"class":"ct-a49555"},"children":[{"type":"text","value":"}`"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"never"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-52c38c"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Prev"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-e52d61"},"children":[{"type":"text","value":"never"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"1"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"2"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"3"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"4"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-ddc9a9"},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"span","props":{"class":"ct-8d3044"},"children":[{"type":"text","value":"Array"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-becebd"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-e523ef"},"children":[{"type":"text","value":">];"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-ffb8cb{color:#A5D6FF}.ct-becebd{color:#79C0FF}.ct-e52d61{color:#79C0FF}.ct-f1fc48{color:#8B949E}.ct-b8298a{color:#D2A8FF}.ct-7c830d{color:#FFA657}.ct-c56ad7{color:#FFA657}.ct-1dff2a{color:#FF7B72}.ct-242dc6{color:#D2A8FF}.ct-679523{color:#C9D1D9}.ct-02aa0f{color:#FF7B72}.ct-8d3044{color:#FFA657}.ct-52c38c{color:#FF7B72}.ct-a49555{color:#A5D6FF}.ct-8756fd{color:#C9D1D9}.ct-e523ef{color:#C9D1D9}.ct-ddc9a9{color:#FF7B72}.light .ct-ddc9a9{color:#859900}.light .ct-e523ef{color:#657B83}.light .ct-8756fd{color:#268BD2}.light .ct-a49555{color:#2AA198}.light .ct-52c38c{color:#073642}.light .ct-8d3044{color:#268BD2}.light .ct-02aa0f{color:#073642}.light .ct-679523{color:#657B83}.light .ct-242dc6{color:#268BD2}.light .ct-1dff2a{color:#859900}.light .ct-c56ad7{color:#657B83}.light .ct-7c830d{color:#268BD2}.light .ct-b8298a{color:#268BD2}.light .ct-f1fc48{color:#93A1A1}.light .ct-e52d61{color:#859900}.light .ct-becebd{color:#D33682}.light .ct-ffb8cb{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Typescript:Flatten object with periods.md","_source":"content","_file":"Typescript/Flatten object with periods.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/kmbybMtElx.json b/api/_content/query/kmbybMtElx.json new file mode 100644 index 0000000..3d52ff6 --- /dev/null +++ b/api/_content/query/kmbybMtElx.json @@ -0,0 +1 @@ +{"_path":"/linux/google-photos-alternative-with-photoprism","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Google Photos Alternative With Photoprism","description":"Photo Prism is a free alternative to Google photos, can be set up with #docker.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://photoprism.app/","rel":["nofollow"]},"children":[{"type":"text","value":"Photo Prism"}]},{"type":"text","value":" is a free alternative to Google photos, can be set up with #docker."}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-to-run-it"},"children":[{"type":"text","value":"Docker compose file to run it"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Check out current "},{"type":"element","tag":"a","props":{"href":"https://dl.photoprism.app/docker/docker-compose.yml","rel":["nofollow"]},"children":[{"type":"text","value":"example"}]},{"type":"text","value":" at photoprism's "},{"type":"element","tag":"a","props":{"href":"https://docs.photoprism.app/getting-started/docker-compose/","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: '3.5'\n\nservices:\n photoprism:\n container_name: photoprism__app\n image: photoprism/photoprism:latest\n depends_on:\n - mariadb\n restart: unless-stopped\n security_opt:\n - seccomp:unconfined\n - apparmor:unconfined\n ports:\n - 2342:2342 # HTTP port (host:container)\n environment:\n PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n PHOTOPRISM_SITE_URL: \"https://service.url/\"\n PHOTOPRISM_ORIGINALS_LIMIT: 5000\n PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n PHOTOPRISM_DEBUG: \"false\" \n PHOTOPRISM_PUBLIC: \"false\" \n PHOTOPRISM_READONLY: \"false\" \n PHOTOPRISM_EXPERIMENTAL: \"false\"\n PHOTOPRISM_DISABLE_CHOWN: \"false\"\n PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n PHOTOPRISM_DISABLE_FACES: \"false\" \n PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n PHOTOPRISM_DARKTABLE_PRESETS: \"false\" \n PHOTOPRISM_DETECT_NSFW: \"false\" \n PHOTOPRISM_UPLOAD_NSFW: \"true\" \n PHOTOPRISM_DATABASE_DRIVER: \"mysql\" \n PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n PHOTOPRISM_DATABASE_NAME: \"photoprism\" \n PHOTOPRISM_DATABASE_USER: \"root\" \n PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"version: '3.5'\n\nservices:\n photoprism:\n container_name: photoprism__app\n image: photoprism/photoprism:latest\n depends_on:\n - mariadb\n restart: unless-stopped\n security_opt:\n - seccomp:unconfined\n - apparmor:unconfined\n ports:\n - 2342:2342 # HTTP port (host:container)\n environment:\n PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n PHOTOPRISM_SITE_URL: \"https://service.url/\"\n PHOTOPRISM_ORIGINALS_LIMIT: 5000\n PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n PHOTOPRISM_DEBUG: \"false\" \n PHOTOPRISM_PUBLIC: \"false\" \n PHOTOPRISM_READONLY: \"false\" \n PHOTOPRISM_EXPERIMENTAL: \"false\"\n PHOTOPRISM_DISABLE_CHOWN: \"false\"\n PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n PHOTOPRISM_DISABLE_FACES: \"false\" \n PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n PHOTOPRISM_DARKTABLE_PRESETS: \"false\" \n PHOTOPRISM_DETECT_NSFW: \"false\" \n PHOTOPRISM_UPLOAD_NSFW: \"true\" \n PHOTOPRISM_DATABASE_DRIVER: \"mysql\" \n PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n PHOTOPRISM_DATABASE_NAME: \"photoprism\" \n PHOTOPRISM_DATABASE_USER: \"root\" \n PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://photoprism.app/","rel":["nofollow"]},"children":[{"type":"text","value":"Photo Prism"}]},{"type":"text","value":" is a free alternative to Google photos, can be set up with #docker."}]},{"type":"element","tag":"h2","props":{"id":"docker-compose-file-to-run-it"},"children":[{"type":"text","value":"Docker compose file to run it"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Check out current "},{"type":"element","tag":"a","props":{"href":"https://dl.photoprism.app/docker/docker-compose.yml","rel":["nofollow"]},"children":[{"type":"text","value":"example"}]},{"type":"text","value":" at photoprism's "},{"type":"element","tag":"a","props":{"href":"https://docs.photoprism.app/getting-started/docker-compose/","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":"."}]},{"type":"element","tag":"code","props":{"code":"version: '3.5'\n\nservices:\n photoprism:\n container_name: photoprism__app\n image: photoprism/photoprism:latest\n depends_on:\n - mariadb\n restart: unless-stopped\n security_opt:\n - seccomp:unconfined\n - apparmor:unconfined\n ports:\n - 2342:2342 # HTTP port (host:container)\n environment:\n PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n PHOTOPRISM_SITE_URL: \"https://service.url/\"\n PHOTOPRISM_ORIGINALS_LIMIT: 5000\n PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n PHOTOPRISM_DEBUG: \"false\" \n PHOTOPRISM_PUBLIC: \"false\" \n PHOTOPRISM_READONLY: \"false\" \n PHOTOPRISM_EXPERIMENTAL: \"false\"\n PHOTOPRISM_DISABLE_CHOWN: \"false\"\n PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n PHOTOPRISM_DISABLE_FACES: \"false\" \n PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n PHOTOPRISM_DARKTABLE_PRESETS: \"false\" \n PHOTOPRISM_DETECT_NSFW: \"false\" \n PHOTOPRISM_UPLOAD_NSFW: \"true\" \n PHOTOPRISM_DATABASE_DRIVER: \"mysql\" \n PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n PHOTOPRISM_DATABASE_NAME: \"photoprism\" \n PHOTOPRISM_DATABASE_USER: \"root\" \n PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"/photoprism\"\n    working_dir: \"/photoprism\"\n    volumes:\n      - \"./data/originals:/photoprism/originals\"    \n      - \"./data/imports:/photoprism/import\"\n      - \"./data/storage:/photoprism/storage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \"./database:/var/lib/mysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"version"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"'3.5'"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"services"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"photoprism"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"photoprism__app"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"photoprism/photoprism:latest"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"depends_on"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"mariadb"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"unless-stopped"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"security_opt"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"seccomp:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"apparmor:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"ports"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"2342:2342"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2164ab"},"children":[{"type":"text","value":"# HTTP port (host:container)"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_ADMIN_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"password\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_URL"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"https://service.url/\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_ORIGINALS_LIMIT"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-981ffc"},"children":[{"type":"text","value":"5000"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_HTTP_COMPRESSION"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"gzip\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DEBUG"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_PUBLIC"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_READONLY"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_EXPERIMENTAL"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_CHOWN"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_WEBDAV"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_SETTINGS"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_TENSORFLOW"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_FACES"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DISABLE_CLASSIFICATION"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DARKTABLE_PRESETS"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DETECT_NSFW"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"false\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_UPLOAD_NSFW"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"true\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_DRIVER"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"mysql\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_SERVER"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"mariadb:3306\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_NAME"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"photoprism\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_USER"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"root\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_DATABASE_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"insecure\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_TITLE"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"PhotoPrism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_CAPTION"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"Browse Your Life\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_DESCRIPTION"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"PHOTOPRISM_SITE_AUTHOR"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"HOME"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"/photoprism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"working_dir"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"/photoprism\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"./data/originals:/photoprism/originals\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"./data/imports:/photoprism/import\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"./data/storage:/photoprism/storage\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"  "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"mariadb"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"container_name"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"photoprism__db"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"restart"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"unless-stopped"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"mariadb:10.6"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"security_opt"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"seccomp:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"apparmor:unconfined"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"command"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"volumes"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      - "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"\"./database:/var/lib/mysql\""}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2164ab"},"children":[{"type":"text","value":"# Important, don't remove"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"environment"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"MYSQL_ROOT_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"insecure"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"MYSQL_DATABASE"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"photoprism"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"MYSQL_USER"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"photoprism"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":"      "}]},{"type":"element","tag":"span","props":{"class":"ct-dba52a"},"children":[{"type":"text","value":"MYSQL_PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-3b7f9c"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e1c2e"},"children":[{"type":"text","value":"insecure"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-981ffc{color:#79C0FF}.ct-2164ab{color:#8B949E}.ct-8e1c2e{color:#A5D6FF}.ct-3b7f9c{color:#C9D1D9}.ct-dba52a{color:#7EE787}.light .ct-dba52a{color:#268BD2}.light .ct-3b7f9c{color:#657B83}.light .ct-8e1c2e{color:#2AA198}.light .ct-2164ab{color:#93A1A1}.light .ct-981ffc{color:#D33682}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"docker-compose-file-to-run-it","depth":2,"text":"Docker compose file to run it"}]}},"_type":"markdown","_id":"content:Linux:Google photos alternative with Photoprism.md","_source":"content","_file":"Linux/Google photos alternative with Photoprism.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/pVAGVLBNPu.json b/api/_content/query/pVAGVLBNPu.json new file mode 100644 index 0000000..d9ce29b --- /dev/null +++ b/api/_content/query/pVAGVLBNPu.json @@ -0,0 +1 @@ +{"_path":"/linux/rsync-file-with-ssh","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Rsync File With SSH","description":"Downloads file from #SSH with rsync and puts it in current folder.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Downloads file from #SSH with rsync and puts it in current folder."}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n \"$DEST_PATH\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n \"$DEST_PATH\"\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Downloads file from #SSH with rsync and puts it in current folder."}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=/tmp\nREMOTE_FILE=sample.text\nDEST_PATH=./\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n \"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE\" \\\n \"$DEST_PATH\"\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ef439a"},"children":[{"type":"text","value":"#!/bin/bash"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":"PORT=22"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":"USER=user"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":"HOST=example.com"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":"REMOTE_PATH=/tmp"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":"REMOTE_FILE=sample.text"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":"DEST_PATH=./"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":"rsync -a -e "}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"\"ssh -p "}]},{"type":"element","tag":"span","props":{"class":"ct-f4aa73"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-604d9c"},"children":[{"type":"text","value":"PORT"}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":" -P -v \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-f4aa73"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-604d9c"},"children":[{"type":"text","value":"USER"}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"@"}]},{"type":"element","tag":"span","props":{"class":"ct-f4aa73"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-604d9c"},"children":[{"type":"text","value":"HOST"}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-f4aa73"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-604d9c"},"children":[{"type":"text","value":"REMOTE_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"class":"ct-f4aa73"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-604d9c"},"children":[{"type":"text","value":"REMOTE_FILE"}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-952492"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-f4aa73"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-604d9c"},"children":[{"type":"text","value":"DEST_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-e38ba3"},"children":[{"type":"text","value":"\""}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-604d9c{color:#C9D1D9}.ct-f4aa73{color:#C9D1D9}.ct-e38ba3{color:#A5D6FF}.ct-952492{color:#C9D1D9}.ct-ef439a{color:#8B949E}.light .ct-ef439a{color:#93A1A1}.light .ct-952492{color:#657B83}.light .ct-e38ba3{color:#2AA198}.light .ct-f4aa73{color:#859900}.light .ct-604d9c{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Linux:Rsync file with SSH.md","_source":"content","_file":"Linux/Rsync file with SSH.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/pv8ckH0an3.json b/api/_content/query/pv8ckH0an3.json new file mode 100644 index 0000000..2abe80b --- /dev/null +++ b/api/_content/query/pv8ckH0an3.json @@ -0,0 +1 @@ +{"_path":"/frontend/react-native/preserve-flatlist-scroll-position-in-react-native","_dir":"react-native","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Preserve FlatList Scroll Position In React Native","description":"Sometimes you need to keep scroll position of FlatList in React Native after some user interactions.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to keep scroll position of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"FlatList"}]},{"type":"text","value":" in React Native after some user interactions."}]},{"type":"element","tag":"code","props":{"code":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC = ({ interact }) => {\n const scrollPosition = useRef(0);\n const scrollHeight = useRef(0);\n \n // set it to `true` before interaction and back to `false` right after\n const shouldKeepScrollPosition = useRef(false);\n\n const onScroll = useCallback(\n (event: NativeSyntheticEvent) => {\n scrollPosition.current = event.nativeEvent.contentOffset.y;\n },\n [],\n );\n\n const onContentSizeChange = useCallback((_: number, h: number) => {\n if (!shouldKeepScrollPosition.current) {\n scrollHeight.current = h;\n return;\n }\n\n ref.current?.scrollToOffset({\n offset: scrollPosition.current + (h - scrollHeight.current),\n animated: false,\n });\n\n scrollHeight.current = h;\n }, []);\n\n // onInteraction wraps interaction to preserve scroll position\n const onInteraction = useCallback(\n () => {\n shouldKeepScrollPosition.current = true;\n\n setTimeout(() => {\n interact();\n }, 0);\n\n setTimeout(() => {\n shouldKeepScrollPosition.current = false;\n }, 500);\n },\n [setSelectedSubThemes],\n );\n \n return (\n \n )\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC = ({ interact }) => {\n const scrollPosition = useRef(0);\n const scrollHeight = useRef(0);\n \n // set it to `true` before interaction and back to `false` right after\n const shouldKeepScrollPosition = useRef(false);\n\n const onScroll = useCallback(\n (event: NativeSyntheticEvent) => {\n scrollPosition.current = event.nativeEvent.contentOffset.y;\n },\n [],\n );\n\n const onContentSizeChange = useCallback((_: number, h: number) => {\n if (!shouldKeepScrollPosition.current) {\n scrollHeight.current = h;\n return;\n }\n\n ref.current?.scrollToOffset({\n offset: scrollPosition.current + (h - scrollHeight.current),\n animated: false,\n });\n\n scrollHeight.current = h;\n }, []);\n\n // onInteraction wraps interaction to preserve scroll position\n const onInteraction = useCallback(\n () => {\n shouldKeepScrollPosition.current = true;\n\n setTimeout(() => {\n interact();\n }, 0);\n\n setTimeout(() => {\n shouldKeepScrollPosition.current = false;\n }, 500);\n },\n [setSelectedSubThemes],\n );\n \n return (\n \n )\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Sometimes you need to keep scroll position of "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"FlatList"}]},{"type":"text","value":" in React Native after some user interactions."}]},{"type":"element","tag":"code","props":{"code":"// interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () => void; }\n\nconst SomeList: FC = ({ interact }) => {\n const scrollPosition = useRef(0);\n const scrollHeight = useRef(0);\n \n // set it to `true` before interaction and back to `false` right after\n const shouldKeepScrollPosition = useRef(false);\n\n const onScroll = useCallback(\n (event: NativeSyntheticEvent) => {\n scrollPosition.current = event.nativeEvent.contentOffset.y;\n },\n [],\n );\n\n const onContentSizeChange = useCallback((_: number, h: number) => {\n if (!shouldKeepScrollPosition.current) {\n scrollHeight.current = h;\n return;\n }\n\n ref.current?.scrollToOffset({\n offset: scrollPosition.current + (h - scrollHeight.current),\n animated: false,\n });\n\n scrollHeight.current = h;\n }, []);\n\n // onInteraction wraps interaction to preserve scroll position\n const onInteraction = useCallback(\n () => {\n shouldKeepScrollPosition.current = true;\n\n setTimeout(() => {\n interact();\n }, 0);\n\n setTimeout(() => {\n shouldKeepScrollPosition.current = false;\n }, 500);\n },\n [setSelectedSubThemes],\n );\n \n return (\n \n )\n}\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-23639f"},"children":[{"type":"text","value":"// interact() is doing some stuff, that changes FlatList scroll size"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-143e9a"},"children":[{"type":"text","value":"Props"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" { "}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-1c1580"},"children":[{"type":"text","value":"void"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"; }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-37c6e0"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7e17fd"},"children":[{"type":"text","value":"SomeList"}]},{"type":"element","tag":"span","props":{"class":"ct-b249b4"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-72292b"},"children":[{"type":"text","value":"FC"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-72292b"},"children":[{"type":"text","value":"Props"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":"> "}]},{"type":"element","tag":"span","props":{"class":"ct-b249b4"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" ({ "}]},{"type":"element","tag":"span","props":{"class":"ct-194cdd"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" }) "}]},{"type":"element","tag":"span","props":{"class":"ct-37c6e0"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2ed460"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-3a6b54"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2ed460"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-3a6b54"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-23639f"},"children":[{"type":"text","value":"// set it to `true` before interaction and back to `false` right after"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2ed460"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"useRef"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-8fcdb5"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2ed460"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-194cdd"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-b249b4"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-72292b"},"children":[{"type":"text","value":"NativeSyntheticEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-72292b"},"children":[{"type":"text","value":"NativeScrollEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":">) "}]},{"type":"element","tag":"span","props":{"class":"ct-37c6e0"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"nativeEvent"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"contentOffset"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"y"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" [],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-37c6e0"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c6e208"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b249b4"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-7e17fd"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"class":"ct-194cdd"},"children":[{"type":"text","value":"_"}]},{"type":"element","tag":"span","props":{"class":"ct-b249b4"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-169751"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"class":"ct-194cdd"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-b249b4"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-169751"},"children":[{"type":"text","value":"number"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"class":"ct-37c6e0"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-e44bc7"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"!"}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":") {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"?."}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"scrollToOffset"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" offset: "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"scrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"+"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"-"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"),"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" animated: "}]},{"type":"element","tag":"span","props":{"class":"ct-8fcdb5"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" });"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"scrollHeight"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"h"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" }, []);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-23639f"},"children":[{"type":"text","value":"// onInteraction wraps interaction to preserve scroll position"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2ed460"},"children":[{"type":"text","value":"onInteraction"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"useCallback"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" () "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8fcdb5"},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2ed460"},"children":[{"type":"text","value":"setTimeout"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-089a5a"},"children":[{"type":"text","value":"interact"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"();"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" }, "}]},{"type":"element","tag":"span","props":{"class":"ct-3a6b54"},"children":[{"type":"text","value":"0"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-2ed460"},"children":[{"type":"text","value":"setTimeout"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"(() "}]},{"type":"element","tag":"span","props":{"class":"ct-74ea31"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"shouldKeepScrollPosition"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"current"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8fcdb5"},"children":[{"type":"text","value":"false"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" }, "}]},{"type":"element","tag":"span","props":{"class":"ct-3a6b54"},"children":[{"type":"text","value":"500"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" },"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" ["}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"setSelectedSubThemes"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"],"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" );"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"return"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"<"}]},{"type":"element","tag":"span","props":{"class":"ct-d12798"},"children":[{"type":"text","value":"FlatList"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-23639f"},"children":[{"type":"text","value":"// ...required FlatList options"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"ref"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"onContentSizeChange"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"onRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"onRefresh"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"{"}]},{"type":"element","tag":"span","props":{"class":"ct-34bf83"},"children":[{"type":"text","value":"onScroll"}]},{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"}"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-04d162"},"children":[{"type":"text","value":"/>"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":" )"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-4643a0"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-d12798{color:#FFA657}.ct-169751{color:#79C0FF}.ct-c6e208{color:#79C0FF}.ct-34bf83{color:#C9D1D9}.ct-8fcdb5{color:#79C0FF}.ct-3a6b54{color:#79C0FF}.ct-2ed460{color:#79C0FF}.ct-194cdd{color:#FFA657}.ct-72292b{color:#FFA657}.ct-b249b4{color:#FF7B72}.ct-7e17fd{color:#D2A8FF}.ct-e44bc7{color:#C9D1D9}.ct-37c6e0{color:#FF7B72}.ct-1c1580{color:#79C0FF}.ct-089a5a{color:#D2A8FF}.ct-04d162{color:#FF7B72}.ct-143e9a{color:#FFA657}.ct-4643a0{color:#C9D1D9}.ct-74ea31{color:#FF7B72}.ct-23639f{color:#8B949E}.light .ct-23639f{color:#93A1A1}.light .ct-74ea31{color:#073642}.light .ct-4643a0{color:#657B83}.light .ct-143e9a{color:#268BD2}.light .ct-04d162{color:#859900}.light .ct-089a5a{color:#268BD2}.light .ct-1c1580{color:#859900}.light .ct-37c6e0{color:#073642}.light .ct-e44bc7{color:#657B83}.light .ct-7e17fd{color:#268BD2}.light .ct-b249b4{color:#859900}.light .ct-72292b{color:#268BD2}.light .ct-194cdd{color:#657B83}.light .ct-2ed460{color:#268BD2}.light .ct-3a6b54{color:#D33682}.light .ct-8fcdb5{color:#B58900}.light .ct-34bf83{color:#268BD2}.light .ct-c6e208{color:#268BD2}.light .ct-169751{color:#859900}.light .ct-d12798{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Frontend:React Native:Preserve FlatList scroll position in React Native.md","_source":"content","_file":"Frontend/React Native/Preserve FlatList scroll position in React Native.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/rNRhET0KmZ.json b/api/_content/query/rNRhET0KmZ.json new file mode 100644 index 0000000..aa16769 --- /dev/null +++ b/api/_content/query/rNRhET0KmZ.json @@ -0,0 +1 @@ +{"_path":"/docker/github-pages-with-drone-ci","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Github Pages With Drone Ci","description":"To deploy github pages with Drone-ci you will need .drone.yml as specified below. You also should define secrets github_username and github_token (get it here) in your drone's repository setup.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To deploy github pages with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" you will need "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".drone.yml"}]},{"type":"text","value":" as specified below. You also should define secrets "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_username"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_token"}]},{"type":"text","value":" (get it "},{"type":"element","tag":"a","props":{"href":"https://github.com/settings/tokens","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]},{"type":"text","value":") in your drone's repository setup."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Github repository should be named as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"yourname.github.io"}]},{"type":"text","value":" and it could be accessed at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/"}]},{"type":"text","value":". Otherwise it'll be available at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/repo-name/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/repo-name/"}]},{"type":"text","value":", what you might not like."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should create branch named "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" in that repo and setup GH Pages at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https://github.com//.github.io/settings/pages"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This config will update "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins."}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n os: linux\n arch: amd64\n\nsteps:\n - name: build\n image: node:16\n commands:\n - yarn\n - yarn generate\n - rm -rf ./docs\n - mv ./.output/public ./docs\n - touch ./docs/.nojekyll\n - name: publish\n image: plugins/gh-pages\n settings:\n target_branch: gh-pages\n username:\n from_secret: github_username\n password:\n from_secret: github_token\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n os: linux\n arch: amd64\n\nsteps:\n - name: build\n image: node:16\n commands:\n - yarn\n - yarn generate\n - rm -rf ./docs\n - mv ./.output/public ./docs\n - touch ./docs/.nojekyll\n - name: publish\n image: plugins/gh-pages\n settings:\n target_branch: gh-pages\n username:\n from_secret: github_username\n password:\n from_secret: github_token\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Here we're moving "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./.output/public"}]},{"type":"text","value":" to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./docs"}]},{"type":"text","value":", because #nuxt creates symlink for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docs"}]},{"type":"text","value":" and git can't work with that."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Also we create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".nojekyll"}]},{"type":"text","value":" at the root of repo, so github's internal engine won't "},{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"ignore files that start with underscore"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"additional-reading"},"children":[{"type":"text","value":"Additional reading"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://plugins.drone.io/plugins/gh-pages","rel":["nofollow"]},"children":[{"type":"text","value":"Drone Github Pages Documentation"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"Bypassing Jekyll on GitHub Pages"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To deploy github pages with "},{"type":"element","tag":"a","props":{"href":"Drone-ci"},"children":[{"type":"text","value":"Drone-ci"}]},{"type":"text","value":" you will need "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".drone.yml"}]},{"type":"text","value":" as specified below. You also should define secrets "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_username"}]},{"type":"text","value":" and "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"github_token"}]},{"type":"text","value":" (get it "},{"type":"element","tag":"a","props":{"href":"https://github.com/settings/tokens","rel":["nofollow"]},"children":[{"type":"text","value":"here"}]},{"type":"text","value":") in your drone's repository setup."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Github repository should be named as "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"yourname.github.io"}]},{"type":"text","value":" and it could be accessed at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/"}]},{"type":"text","value":". Otherwise it'll be available at "},{"type":"element","tag":"a","props":{"href":"https://yourname.github.io/repo-name/","rel":["nofollow"]},"children":[{"type":"text","value":"https://yourname.github.io/repo-name/"}]},{"type":"text","value":", what you might not like."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You should create branch named "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" in that repo and setup GH Pages at "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"https://github.com//.github.io/settings/pages"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This config will update "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"gh-pages"}]},{"type":"text","value":" branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins."}]},{"type":"element","tag":"code","props":{"code":"kind: pipeline\nname: build\ntype: docker\n\nplatform:\n os: linux\n arch: amd64\n\nsteps:\n - name: build\n image: node:16\n commands:\n - yarn\n - yarn generate\n - rm -rf ./docs\n - mv ./.output/public ./docs\n - touch ./docs/.nojekyll\n - name: publish\n image: plugins/gh-pages\n settings:\n target_branch: gh-pages\n username:\n from_secret: github_username\n password:\n from_secret: github_token\n","language":"yaml"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"kind"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"pipeline"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"type"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"docker"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"platform"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"os"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"linux"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"arch"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"amd64"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"steps"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"build"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"node:16"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"commands"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"yarn"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"yarn generate"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"rm -rf ./docs"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"mv ./.output/public ./docs"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"touch ./docs/.nojekyll"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" - "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"name"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"publish"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"image"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"plugins/gh-pages"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"settings"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"target_branch"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"gh-pages"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"username"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"github_username"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"password"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":":"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-d3cd64"},"children":[{"type":"text","value":"from_secret"}]},{"type":"element","tag":"span","props":{"class":"ct-987c19"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-27659a"},"children":[{"type":"text","value":"github_token"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Here we're moving "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./.output/public"}]},{"type":"text","value":" to "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"./docs"}]},{"type":"text","value":", because #nuxt creates symlink for "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"docs"}]},{"type":"text","value":" and git can't work with that."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Also we create "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".nojekyll"}]},{"type":"text","value":" at the root of repo, so github's internal engine won't "},{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"ignore files that start with underscore"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"additional-reading"},"children":[{"type":"text","value":"Additional reading"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://plugins.drone.io/plugins/gh-pages","rel":["nofollow"]},"children":[{"type":"text","value":"Drone Github Pages Documentation"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/","rel":["nofollow"]},"children":[{"type":"text","value":"Bypassing Jekyll on GitHub Pages"}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-27659a{color:#A5D6FF}.ct-987c19{color:#C9D1D9}.ct-d3cd64{color:#7EE787}.light .ct-d3cd64{color:#268BD2}.light .ct-987c19{color:#657B83}.light .ct-27659a{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"additional-reading","depth":2,"text":"Additional reading"}]}},"_type":"markdown","_id":"content:Docker:Github pages with drone-ci.md","_source":"content","_file":"Docker/Github pages with drone-ci.md","_extension":"md"} \ No newline at end of file diff --git a/api/_content/query/v8MG1Q8wMg.json b/api/_content/query/v8MG1Q8wMg.json new file mode 100644 index 0000000..6b220fc --- /dev/null +++ b/api/_content/query/v8MG1Q8wMg.json @@ -0,0 +1 @@ +{"_path":"/docker/seed-dump-inside-docker","_dir":"docker","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Seed Dump Inside Docker","description":"If you need to seed .sql dump in #docker container, just run this command. Also you can try to rsync file with SSH to get it from remote host.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to seed "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".sql"}]},{"type":"text","value":" dump in #docker container, just run this command. Also you can try to "},{"type":"element","tag":"a","props":{"href":"/linux/Rsync%20file%20with%20SSH"},"children":[{"type":"text","value":"rsync file with SSH"}]},{"type":"text","value":" to get it from remote host."}]},{"type":"element","tag":"code","props":{"code":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you need to seed "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".sql"}]},{"type":"text","value":" dump in #docker container, just run this command. Also you can try to "},{"type":"element","tag":"a","props":{"href":"/linux/Rsync%20file%20with%20SSH"},"children":[{"type":"text","value":"rsync file with SSH"}]},{"type":"text","value":" to get it from remote host."}]},{"type":"element","tag":"code","props":{"code":"#####\n# usage: ./script.sh \"/path/to/dump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f99778"},"children":[{"type":"text","value":"#####"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f99778"},"children":[{"type":"text","value":"# usage: ./script.sh \"/path/to/dump.sql\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-f99778"},"children":[{"type":"text","value":"#####"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":"DUMP_PATH="}]},{"type":"element","tag":"span","props":{"class":"ct-b9da81"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-833fcb"},"children":[{"type":"text","value":"1"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":"CONTAINER="}]},{"type":"element","tag":"span","props":{"class":"ct-56be54"},"children":[{"type":"text","value":"\"db\""}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":"USER=root"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":"PASSWORD=password"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":"DB=database"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":"cat "}]},{"type":"element","tag":"span","props":{"class":"ct-56be54"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-b9da81"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-833fcb"},"children":[{"type":"text","value":"DUMP_PATH"}]},{"type":"element","tag":"span","props":{"class":"ct-56be54"},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-9072b0"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":" docker "}]},{"type":"element","tag":"span","props":{"class":"ct-6ff593"},"children":[{"type":"text","value":"exec"}]},{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":" -i "}]},{"type":"element","tag":"span","props":{"class":"ct-b9da81"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-833fcb"},"children":[{"type":"text","value":"CONTAINER"}]},{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":" mysql -u"}]},{"type":"element","tag":"span","props":{"class":"ct-b9da81"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-833fcb"},"children":[{"type":"text","value":"USER"}]},{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":" -p"}]},{"type":"element","tag":"span","props":{"class":"ct-b9da81"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-833fcb"},"children":[{"type":"text","value":"PASSWORD"}]},{"type":"element","tag":"span","props":{"class":"ct-ced384"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b9da81"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-833fcb"},"children":[{"type":"text","value":"DB"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-6ff593{color:#79C0FF}.ct-9072b0{color:#FF7B72}.ct-56be54{color:#A5D6FF}.ct-833fcb{color:#C9D1D9}.ct-b9da81{color:#C9D1D9}.ct-ced384{color:#C9D1D9}.ct-f99778{color:#8B949E}.light .ct-f99778{color:#93A1A1}.light .ct-ced384{color:#657B83}.light .ct-b9da81{color:#859900}.light .ct-833fcb{color:#268BD2}.light .ct-56be54{color:#2AA198}.light .ct-9072b0{color:#859900}.light .ct-6ff593{color:#268BD2}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Docker:Seed dump inside docker.md","_source":"content","_file":"Docker/Seed dump inside docker.md","_extension":"md"} \ No newline at end of file diff --git a/assets/css/_mixins.scss b/assets/css/_mixins.scss deleted file mode 100644 index bf8d574..0000000 --- a/assets/css/_mixins.scss +++ /dev/null @@ -1,27 +0,0 @@ -@import "./variables"; - -@mixin phone { - @media (max-width: $size-phone) { - @content; - } -} - -@mixin tablet { - @media (max-width: $size-tablet) { - @content; - } -} - -@mixin desktop { - @media (max-width: $size-desktop) { - @content; - } -} - -@mixin color-per-child($colors) { - @each $color in $colors { - &:nth-child(#{index(($colors), ($color))}) { - color: $color; - } - } -} diff --git a/assets/css/_transitions.scss b/assets/css/_transitions.scss deleted file mode 100644 index 49402f4..0000000 --- a/assets/css/_transitions.scss +++ /dev/null @@ -1,10 +0,0 @@ -.page-enter-active, -.page-leave-active { - transition: all 0.4s; -} - -.page-enter-from, -.page-leave-to { - opacity: 0; - transform: translate(0, 50px); -} diff --git a/assets/css/_variables.scss b/assets/css/_variables.scss deleted file mode 100644 index 1f73ea9..0000000 --- a/assets/css/_variables.scss +++ /dev/null @@ -1,3 +0,0 @@ -$size-phone: 560px; -$size-tablet: 768px; -$size-desktop: 1024px; diff --git a/assets/css/main.scss b/assets/css/main.scss deleted file mode 100644 index e46ccc5..0000000 --- a/assets/css/main.scss +++ /dev/null @@ -1,206 +0,0 @@ -@import url("https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@600&family=Roboto:wght@400;700&display=swap"); -@import "./variables"; -@import "./transitions.scss"; - -body, -html { - font-family: var(--family-roboto); - background: var(--color-background); - color: var(--color-text); - padding: 0; - margin: 0; -} - -* { - box-sizing: border-box; - transition: color 250ms; -} - -a { - color: var(--color-link); - - h1 > &, - h2 > &, - h3 > &, - h4 > &, - h5 > & { - text-decoration: none; - color: var(--color-header); - } -} - -pre { - background-color: var(--color-code-background); - padding: 10px; - border-radius: 10px; - overflow: scroll; - width: 100%; - line-height: 1.5em; -} - -:not(pre) > code { - background-color: var(--color-code-background); - color: var(--color-code-inline); - padding: 0 5px; - border-radius: 4px; -} - -h1, -h2, -h3, -h4, -h5 { - font-family: var(--family-roboto-slab); - color: var(--color-header); - font-weight: 700; -} - -h1 { - color: var(--color-heading-primary); - font-size: 2.6rem; - margin-bottom: 1.5rem; - - &:not(:first-child) { - margin-top: 3rem; - } -} - -h2 { - color: var(--color-heading-secondary); - - &:not(:first-child) { - margin-top: 2rem; - } -} - -h3, -h4, -h5 { - color: var(--color-heading-tertiary); -} - -p, -li { - line-height: 1.45em; -} - -li { - &:not(:last-child) { - margin-bottom: 0.25em; - } -} - -button { - background: none; - border: none; - padding: 0; - - &:focus { - border: none; - } -} - -table { - border-collapse: collapse; - border: 2px solid var(--color-line); - - td, - th { - border: 1px solid var(--color-line); - padding: 5px 10px; - text-align: left; - } - - thead { - background: var(--color-table-head); - border-bottom: 2px solid var(--color-line); - } -} - -blockquote { - border-left: 3px solid var(--color-primary); - color: var(--color-text); - padding: 0 20px; - - ul, - ol { - padding-left: 15px; - } -} - -.highlight { - background-color: var(--color-highlight-background); - color: var(--color-highlight-color); - padding: 0 1px; - border-radius: 3px; -} - -:root { - // fonts - --family-roboto-slab: "Roboto Slab", "Segoe UI", Tahoma, Geneva, Verdana, - sans-serif; - --family-roboto: "Roboto", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; - - // breakpoints - --size-phone: $phone; - --size-tablet: $size-tablet; - --size-desktop: $size-desktop; -} - -:root.dark { - // palette - --color-primary: #e84a72; - --color-background: #16161c; - --color-menu-background: #1a1c23; - --color-line: #2d2f36; - --color-menu-overlay-background: #{transparentize(#16161c, 0.1)}; - --color-code-background: #1a1c23; - --color-code-language-background: #{lighten(#1a1c23, 4%)}; - --color-code-language-name: #1eaeae; - --color-text: #fdf0ed; - --color-text-secondary: #{mix(#ffffff, #1a1c23, 60%)}; - --color-link: #e84a72; - --color-code-inline: #1eb980; - --color-heading-primary: white; - --color-heading-secondary: #f9cbbe; - --color-heading-tertiary: #f9cec3; - --color-menu-title: #fadad1; - --color-menu-link: #fab28e; - --color-menu-link-active: #e84a72; - --color-menu-line: #2e303e; - --color-table-head: #{mix(#e84a72, #1a1c23, 10%)}; - --color-rating-1: #ded187; - --color-rating-2: #dbde87; - --color-rating-3: #bade87; - --color-rating-4: #9cde87; - --color-rating-5: #87deaa; - --color-highlight-color: var(--color-text); - --color-highlight-background: #254e50; -} - -:root.light { - $pinky: #{mix(#fadad1, #fce9e4, 50%)}; - - --color-primary: #e84a72; - --color-background: #fce9e4; - --color-menu-background: #{$pinky}; - --color-line: #{$pinky}; - --color-menu-overlay-background: #{transparentize(#16161c, 0.1)}; - --color-code-background: #{$pinky}; - --color-code-language-background: #{lighten(#1a1c23, 4%)}; - --color-code-language-name: #1eaeae; - --color-text: #5a5d68; - --color-text-secondary: #{mix(#ffffff, #5a5d68, 20%)}; - --color-link: #e84a72; - --color-code-inline: #8931b9; - --color-heading-primary: #4c5161; - --color-heading-secondary: #{mix(#f9cbbe, #1eaeae, 35%)}; - --color-heading-tertiary: #{mix(#f9cbbe, #1eaeae, 35%)}; - --color-menu-title: #{mix(#f9cbbe, #1eaeae, 35%)}; - --color-menu-link: #{mix(#f9cbbe, #e84a72, 20%)}; - --color-menu-link-active: #e84a72; - --color-menu-line: #f9cbbe; - --color-table-head: #{mix(#e84a72, #fadad1, 10%)}; - --color-highlight-color: var(--color-text); - --color-highlight-background: #fab795; -} diff --git a/assets/svg/svg-logo.svg b/assets/svg/svg-logo.svg deleted file mode 100644 index 55af5b8..0000000 --- a/assets/svg/svg-logo.svg +++ /dev/null @@ -1,56 +0,0 @@ - - - SVG Logo - Designed for the SVG Logo Contest in 2006 by Harvey Rayner, and adopted by W3C in 2009. It is available under the Creative Commons license for those who have an SVG product or who are using SVG on their site. - - - - - SVG Logo - 14-08-2009 - - W3C - Harvey Rayner, designer - - See document description - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/bio/_payload.js b/bio/_payload.js new file mode 100644 index 0000000..d91e649 --- /dev/null +++ b/bio/_payload.js @@ -0,0 +1 @@ +export default {data:{},prerenderedAt:1667450784326} \ No newline at end of file diff --git a/bio/index.html b/bio/index.html new file mode 100644 index 0000000..b1d758e --- /dev/null +++ b/bio/index.html @@ -0,0 +1,6 @@ + + + +

Howdy!

My name is Fedor Katurov, I'm a fullstack developer from Siberia.

I develop frontend applications with React, Vue and numerous other frameworks for the most of my time, but I'm also capable of doing Typescript and Golang backend.

I've started coding more than 15 years ago as a hobby and still love doing that on my work and free time.

Skills

React

Classes and FC-s, hooks, context, redux, redux-saga, mobx

Typescript

For both frontend and backend development: generics, guards, infers

SSR (Next, Gatsby)

Automated generation, incremental, static, and dynamic rendering

Vue.js & Nuxt

Common SPA-s and SSR blogs like this one, with composition API, and Vuex

React Native

Basic developing and releasing experience without native modules

Golang

Monolith and microservice apps with REST, GraphQL, and GRPC

Docker

Docker, docker-compose, private registries, gitlab-ci, and drone-ci

HTML, CSS, SVG

Adaptive markup, all modern techniques, preprocessors, and CSS-in-JS

Linux Shell

Linux user since 2003, can write scripts to automate my work. BTW, I use Arch!

GraphQL

Both server- and client-side. Queries, mutations, cache manipulation

REST API

With Axios, fetch, express, gorilla-mux, and gin-gonic

SQL

Base queries, JOIN-s, indexes and simpl query optimizations
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/blockchain/common-typescript-examples/_payload.js b/blockchain/common-typescript-examples/_payload.js new file mode 100644 index 0000000..f797367 --- /dev/null +++ b/blockchain/common-typescript-examples/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a_,a$,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,bA,bB,bC,bD,bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN,bO,bP,bQ,bR,bS,bT,bU,bV,bW,bX,bY,bZ,b_,b$,ca,cb,cc){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:aY,_path:aZ},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-84dtRQ1pg6":{_path:aZ,_dir:"blockchain",_draft:ak,_partial:ak,_locale:"en",_empty:ak,title:aY,description:p,excerpt:{type:a_,children:[{type:a,tag:a$,props:{},children:[{type:a,tag:Y,props:{},children:[{type:c,value:ba},{type:a,tag:M,props:{href:Z,rel:[_]},children:[{type:c,value:Z}]}]},{type:a,tag:Y,props:{},children:[{type:c,value:bb},{type:a,tag:M,props:{href:bc},children:[{type:c,value:bd}]}]}]},{type:a,tag:u,props:{id:al},children:[{type:c,value:am}]},{type:a,tag:D,props:{},children:[{type:c,value:be},{type:a,tag:N,props:{},children:[{type:c,value:bf}]},{type:c,value:bg},{type:a,tag:M,props:{href:bh,rel:[_]},children:[{type:c,value:bi}]},{type:c,value:bj}]},{type:a,tag:j,props:{code:an,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:an}]}]}]},{type:a,tag:u,props:{id:ao},children:[{type:c,value:ap}]},{type:a,tag:j,props:{code:aq,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aq}]}]}]},{type:a,tag:u,props:{id:ar},children:[{type:c,value:as}]},{type:a,tag:j,props:{code:at,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:at}]}]}]},{type:a,tag:u,props:{id:au},children:[{type:c,value:av}]},{type:a,tag:D,props:{},children:[{type:c,value:bk},{type:a,tag:N,props:{},children:[{type:c,value:O}]},{type:c,value:bl},{type:a,tag:N,props:{},children:[{type:c,value:P}]},{type:c,value:bm}]},{type:a,tag:j,props:{code:aw,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aw}]}]}]},{type:a,tag:u,props:{id:ax},children:[{type:c,value:ay}]},{type:a,tag:D,props:{},children:[{type:c,value:bn}]},{type:a,tag:j,props:{code:az,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:az}]}]}]},{type:a,tag:u,props:{id:aA},children:[{type:c,value:aB}]},{type:a,tag:j,props:{code:aC,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aC}]}]}]},{type:a,tag:u,props:{id:aD},children:[{type:c,value:aE}]},{type:a,tag:j,props:{code:aF,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aF}]}]}]},{type:a,tag:u,props:{id:aG},children:[{type:c,value:aH}]},{type:a,tag:j,props:{code:aI,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aI}]}]}]},{type:a,tag:u,props:{id:aJ},children:[{type:c,value:aK}]},{type:a,tag:D,props:{},children:[{type:c,value:bo}]},{type:a,tag:j,props:{code:aL,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aL}]}]}]},{type:a,tag:D,props:{},children:[{type:c,value:bp}]},{type:a,tag:j,props:{code:aM,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:c,value:aM}]}]}]}]},body:{type:a_,children:[{type:a,tag:a$,props:{},children:[{type:a,tag:Y,props:{},children:[{type:c,value:ba},{type:a,tag:M,props:{href:Z,rel:[_]},children:[{type:c,value:Z}]}]},{type:a,tag:Y,props:{},children:[{type:c,value:bb},{type:a,tag:M,props:{href:bc},children:[{type:c,value:bd}]}]}]},{type:a,tag:u,props:{id:al},children:[{type:c,value:am}]},{type:a,tag:D,props:{},children:[{type:c,value:be},{type:a,tag:N,props:{},children:[{type:c,value:bf}]},{type:c,value:bg},{type:a,tag:M,props:{href:bh,rel:[_]},children:[{type:c,value:bi}]},{type:c,value:bj}]},{type:a,tag:j,props:{code:an,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:aN}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'web3'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F URL of your node"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'https:\u002F\u002F...'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:"export"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"givenProvider"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"||"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]}]}]}]},{type:a,tag:u,props:{id:ao},children:[{type:c,value:ap}]},{type:a,tag:j,props:{code:aq,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:aa},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:br},children:[{type:c,value:bs}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:bt},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:aa},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:bu},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:bt},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-258e6e"},children:[{type:c,value:"string"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:bx}]},{type:a,tag:b,props:{class:aa},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bs}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:u,props:{id:ar},children:[{type:c,value:as}]},{type:a,tag:j,props:{code:at,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F first we need to authorize"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"authorize"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aP}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aQ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:by}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'eth_requestAccounts'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F then we can get wallet address"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getCurrentAddressUser"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aP}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aQ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"selectedAddress"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:u,props:{id:au},children:[{type:c,value:av}]},{type:a,tag:D,props:{},children:[{type:c,value:bk},{type:a,tag:N,props:{},children:[{type:c,value:O}]},{type:c,value:bl},{type:a,tag:N,props:{},children:[{type:c,value:P}]},{type:c,value:bm}]},{type:a,tag:j,props:{code:aw,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"transfer"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ({ "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bA}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getTransactionCount"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bE}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bF}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:bG}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bH}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" gasLimit: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" gasPrice: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" nonce: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bI}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"EthUtil"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"toBuffer"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:aR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"Transaction"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"sign"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:bK}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"serialize"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:"this"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"sendSignedTransaction"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"`0x${"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bK}]},{type:a,tag:b,props:{class:aS},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:aS},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'hex'"}]},{type:a,tag:b,props:{class:aS},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"}`"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bL}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:u,props:{id:ax},children:[{type:c,value:ay}]},{type:a,tag:D,props:{},children:[{type:c,value:bn}]},{type:a,tag:j,props:{code:az,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:aN}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bM}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bN}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:bO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"estimateFee"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ({"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bA}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"estimateGas"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bE}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bF}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:bG}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bH}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bI}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"asciiToHex"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" })."}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"call"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"fromWei"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:aT},children:[{type:c,value:bP}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"())"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bQ}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"multiply"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:aT},children:[{type:c,value:bP}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"()))"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bQ}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"()"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bL}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:u,props:{id:aA},children:[{type:c,value:aB}]},{type:a,tag:j,props:{code:aC,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:aN}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bM}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bN}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:bO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aQ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'accountsChanged'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"callback"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]}]}]}]},{type:a,tag:u,props:{id:aD},children:[{type:c,value:aE}]},{type:a,tag:j,props:{code:aF,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'chainChanged'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"handler"}]},{type:a,tag:b,props:{class:"ct-e10a08"},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]}]}]}]}]},{type:a,tag:u,props:{id:aG},children:[{type:c,value:aH}]},{type:a,tag:j,props:{code:aI,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:aU}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bS}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'wallet_watchAsset'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" params: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" type: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'ERC20'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" options: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" address: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'0xb60e8dd61c5d32be8058bb8eb970870f07233155'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" symbol: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'FOO'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" decimals: "}]},{type:a,tag:b,props:{class:aW},children:[{type:c,value:bT}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" image: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'https:\u002F\u002Ffoo.io\u002Ftoken-image.svg'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bU}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:y},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:br},children:[{type:c,value:"then"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:"(("}]},{type:a,tag:b,props:{class:bu},children:[{type:c,value:bV}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:bx}]},{type:a,tag:b,props:{class:aa},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:bW}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aj}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"log"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'FOO successfully added to wallet!'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bY}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"else"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"throw"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:aT},children:[{type:c,value:"Error"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'Something went wrong.'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bZ}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bU}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:bX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:b_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]}]}]}]}]},{type:a,tag:u,props:{id:aJ},children:[{type:c,value:aK}]},{type:a,tag:D,props:{},children:[{type:c,value:bo}]},{type:a,tag:j,props:{code:aL,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:o},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getChainID"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aP}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:by}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'eth_chainId'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:D,props:{},children:[{type:c,value:bp}]},{type:a,tag:j,props:{code:aM,language:q},children:[{type:a,tag:r,props:{},children:[{type:a,tag:j,props:{__ignoreMap:p},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:b$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aU}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bS}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'wallet_switchEthereumChain'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" params: [{ chainId: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:ca}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" }], "}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:cb}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"} "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"switchError"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aj}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F This error code indicates that the chain has not been added to MetaMask."}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:bW}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:b_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"==="}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:aW},children:[{type:c,value:"4902"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aj}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:b$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aU}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" method: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'wallet_addEthereumChain'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" params: [{ "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" chainId: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:ca}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:cb}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" chainName: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'Ropsten Test Network'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" nativeCurrency: { "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" name: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:cc}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" symbol: "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:cc}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" decimals: "}]},{type:a,tag:b,props:{class:aW},children:[{type:c,value:bT}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }, "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" rpcUrls: ["}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'https:\u002F\u002Fropsten.infura.io\u002Fv3\u002F9aa3d95b3bc440fa88ea12eaa4456161'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"], "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" blockExplorerUrls: ["}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'https:\u002F\u002Fropsten.etherscan.io'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"] "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }] ,"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bY}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"addError"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aj}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F handle \"add\" error"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bZ}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:"\u002F\u002F handle other \"switch\" errors"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-9ace98{color:#79C0FF}.ct-e10a08{color:#C9D1D9}.ct-ca7e41{color:#79C0FF}.ct-4cf26c{color:#A5D6FF}.ct-258e6e{color:#79C0FF}.ct-20a880{color:#FFA657}.ct-43ccc9{color:#FF7B72}.ct-214987{color:#D2A8FF}.ct-e39819{color:#C9D1D9}.ct-6b924a{color:#FF7B72}.ct-0d36f8{color:#D2A8FF}.ct-4450c1{color:#79C0FF}.ct-38e07a{color:#FF7B72}.ct-caa1f8{color:#8B949E}.ct-b27b08{color:#A5D6FF}.ct-6452fd{color:#C9D1D9}.ct-cd469a{color:#C9D1D9}.ct-7b29aa{color:#FF7B72}.light .ct-7b29aa{color:#859900}.light .ct-cd469a{color:#657B83}.light .ct-6452fd{color:#268BD2}.light .ct-b27b08{color:#2AA198}.light .ct-caa1f8{color:#93A1A1}.light .ct-38e07a{color:#073642}.light .ct-4450c1{color:#268BD2}.light .ct-0d36f8{color:#268BD2}.light .ct-6b924a{color:#073642}.light .ct-e39819{color:#657B83}.light .ct-214987{color:#268BD2}.light .ct-43ccc9{color:#859900}.light .ct-20a880{color:#657B83}.light .ct-258e6e{color:#859900}.light .ct-4cf26c{color:#657B83}.light .ct-ca7e41{color:#859900}.light .ct-e10a08{color:#859900}.light .ct-9ace98{color:#D33682}"}]}],toc:{title:p,searchDepth:C,depth:C,links:[{id:al,depth:C,text:am},{id:ao,depth:C,text:ap},{id:ar,depth:C,text:as},{id:au,depth:C,text:av},{id:ax,depth:C,text:ay},{id:aA,depth:C,text:aB},{id:aD,depth:C,text:aE},{id:aG,depth:C,text:aH},{id:aJ,depth:C,text:aK}]}},_type:"markdown",_id:"content:Blockchain:Common typescript examples.md",_source:"content",_file:"Blockchain\u002FCommon typescript examples.md",_extension:"md"}},prerenderedAt:1667450790267}}("element","span","text","ct-cd469a","line","ct-6452fd"," ",".","ct-7b29aa","code","ct-0d36f8","ct-b27b08"," ","(","ct-38e07a","","typescript","pre","web3",",","h2","=","const","ct-4450c1","ct-e39819"," {"," ",", ",2,"p"," ","utils","from","ct-caa1f8","await",");","=\u003E","}","a","code-inline","value","memo","eth",";","async"," (","return","request","toHex","ethereum","li","https:\u002F\u002Fmetamask.github.io\u002Ftest-dapp\u002F","nofollow","Web3","ct-6b924a","to","gasLimit","gasPrice","();","),","toString",")","({",") {",false,"connecting-to-node","Connecting to node","import Web3 from 'web3';\n\n\u002F\u002F URL of your node\nconst PROVIDER_URL = 'https:\u002F\u002F...';\n\nexport const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n","getting-wallet-balance","Getting wallet balance","const getBalance = async (address: string) =\u003E {\n return await web3.eth.getBalance(address);\n}\n","getting-wallet-address","Getting wallet address","\u002F\u002F first we need to authorize\nconst authorize = async () =\u003E {\n await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n}\n\n\u002F\u002F then we can get wallet address\nconst getCurrentAddressUser = () =\u003E {\n return web3.currentProvider.selectedAddress;\n}\n","sending-transaction","Sending transaction","\nconst transfer = async ({ \n from, \n to, \n value, \n memo, \n privateKey, \n gasLimit = 44000 \n}) =\u003E {\n const nonce = await web3.eth.getTransactionCount(from);\n const gasPrice = await web3.eth.getGasPrice();\n \n const rawTx = {\n from,\n to,\n value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),\n gasLimit: web3.utils.toHex(gasLimit),\n gasPrice: web3.utils.toHex(gasPrice),\n nonce: web3.utils.toHex(nonce),\n data: memo,\n };\n \n const privateKeyBuffer = EthUtil.toBuffer(privateKey);\n \n const tx = new Transaction(rawTx);\n \n tx.sign(privateKeyBuffer);\n const serializedTx = tx.serialize();\n \n return this.web3.eth.sendSignedTransaction(\n `0x${serializedTx.toString('hex')}`\n );\n}\n","estimating-transaction-fee","Estimating transaction FEE","import { web3 } from '.';\n\nconst estimateFee = async ({\n from,\n to,\n value,\n memo,\n}) =\u003E {\n const gasPrice = await web3.eth.getGasPrice();\n const gasLimit = await web3.eth.estimateGas({\n from,\n to,\n value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),\n data: web3.utils.asciiToHex(memo),\n }).call();\n \n return web3.utils.fromWei(\n BigInt(gasPrice.toString())\n .multiply(BigInt(gasLimit.toString()))\n .toString()\n );\n}\n","subscribing-to-wallet-address-change","Subscribing to wallet address change","import { web3 } from '.';\n\nweb3.currentProvider.on('accountsChanged', callback);\n","watching-network-change","Watching network change","ethereum.on('chainChanged', handler: (chainId: string) =\u003E void);\n","adding-custom-token-to-wallet","Adding custom token to wallet","window.ethereum\n .request({\n method: 'wallet_watchAsset',\n params: {\n type: 'ERC20',\n options: {\n address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',\n symbol: 'FOO',\n decimals: 18,\n image: 'https:\u002F\u002Ffoo.io\u002Ftoken-image.svg',\n },\n },\n })\n .then((success) =\u003E {\n if (success) {\n console.log('FOO successfully added to wallet!')\n } else {\n throw new Error('Something went wrong.')\n }\n })\n .catch(console.error)\n","changing-network-to-custom","Changing network to custom","const getChainID = async () =\u003E {\n return ethereum.request({ method: 'eth_chainId' })\n}\n","try {\n await window.ethereum.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: '0x03' }], \u002F\u002F ropsten chainID (3) in hex\n });\n} catch (switchError) {\n \u002F\u002F This error code indicates that the chain has not been added to MetaMask.\n if (error.code === 4902) {\n try {\n await window.ethereum.request({\n method: 'wallet_addEthereumChain',\n params: [{ \n chainId: '0x03', \u002F\u002F ropsten chainID (3) in hex\n chainName: 'Ropsten Test Network', \n nativeCurrency: { \n name: 'ETH',\n symbol: 'ETH',\n decimals: 18\n }, \n rpcUrls: ['https:\u002F\u002Fropsten.infura.io\u002Fv3\u002F9aa3d95b3bc440fa88ea12eaa4456161'], \n blockExplorerUrls: ['https:\u002F\u002Fropsten.etherscan.io'] \n }] ,\n });\n } catch (addError) {\n \u002F\u002F handle \"add\" error\n }\n }\n \u002F\u002F handle other \"switch\" errors\n}\n","import","new"," () ","currentProvider","tx","ct-4cf26c","ct-ca7e41","window"," .","ct-9ace98","catch","Common Typescript Examples","\u002Fblockchain\u002Fcommon-typescript-examples","root","ul","Simple #dapp example for tests: ","Interaction with smart contracts described in ","Smart%20contracts","Smart contracts","If #Metamask extension installed, ","Web3.givenProvider"," is available in global window. You can use ","https:\u002F\u002Finfura.io","Infura"," or your node instead:","Sending "," tokens with "," as value:","Useful to get fixed amount of tokens from user with pre-estimated fee.","Checking current chainId:","Asking wallet to change current network:","PROVIDER_URL","ct-214987","getBalance","ct-43ccc9","ct-20a880","address",":",") ","({ method: ","privateKey","}) ","nonce","getGasPrice","rawTx"," value: ","toWei","'ether'",")),"," data: ","privateKeyBuffer","serializedTx"," );"," { "," } ","'.'","BigInt"," .","on"," method: ","18"," })","success","if","console"," } "," }","error","try","'0x03'","\u002F\u002F ropsten chainID (3) in hex","'ETH'")) \ No newline at end of file diff --git a/blockchain/common-typescript-examples/index.html b/blockchain/common-typescript-examples/index.html new file mode 100644 index 0000000..5642eab --- /dev/null +++ b/blockchain/common-typescript-examples/index.html @@ -0,0 +1,6 @@ + + +Common Typescript Examples • Obsidian Garden +

Common Typescript Examples

Connecting to node

If #Metamask extension installed, Web3.givenProvider is available in global window. You can use Infura or your node instead:

import Web3 from 'web3';// URL of your nodeconst PROVIDER_URL = 'https://...';export const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);

Getting wallet balance

const getBalance = async (address: string) => {    return await web3.eth.getBalance(address);}

Getting wallet address

// first we need to authorizeconst authorize = async () => {  await web3.currentProvider.request({ method: 'eth_requestAccounts' });}// then we can get wallet addressconst getCurrentAddressUser = () => {    return web3.currentProvider.selectedAddress;}

Sending transaction

Sending value tokens with memo as value:

const transfer = async ({   from,   to,   value,   memo,   privateKey,   gasLimit = }) => {    const nonce = await web3.eth.getTransactionCount(from);    const gasPrice = await web3.eth.getGasPrice();        const rawTx = {      from,      to,      value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')),      gasLimit: web3.utils.toHex(gasLimit),      gasPrice: web3.utils.toHex(gasPrice),      nonce: web3.utils.toHex(nonce),      data: memo,    };        const privateKeyBuffer = EthUtil.toBuffer(privateKey);        const tx = new Transaction(rawTx);        tx.sign(privateKeyBuffer);    const serializedTx = tx.serialize();        return this.web3.eth.sendSignedTransaction(      `0x${serializedTx.toString('hex')}`    );}

Estimating transaction FEE

Useful to get fixed amount of tokens from user with pre-estimated fee.

import { web3 } from '.';const estimateFee = async ({    from,    to,    value,    memo,}) => {    const gasPrice = await web3.eth.getGasPrice();    const gasLimit = await web3.eth.estimateGas({      from,      to,      value: web3.utils.toHex(web3.utils.toWei(value, 'ether')),      data: web3.utils.asciiToHex(memo),    }).call();        return web3.utils.fromWei(      BigInt(gasPrice.toString())        .multiply(BigInt(gasLimit.toString()))        .toString()    );}

Subscribing to wallet address change

import { web3 } from '.';web3.currentProvider.on('accountsChanged', callback);

Watching network change

ethereum.on('chainChanged', handler: 

Adding custom token to wallet

window.ethereum  .request({    method: 'wallet_watchAsset',    params: {      type: 'ERC20',      options: {        address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',        symbol: 'FOO',        decimals: 18,        image: 'https://foo.io/token-image.svg',      },    },  })  .then((success) => {    if (success) {      console.log('FOO successfully added to wallet!')    } else {      throw new Error('Something went wrong.')    }  })  .catch(console.error)

Changing network to custom

Checking current chainId:

const getChainID = async () => {    return ethereum.request({ method: 'eth_chainId' })}

Asking wallet to change current network:

try {  await window.ethereum.request({    method: 'wallet_switchEthereumChain',    params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex  });} catch (switchError) {  // This error code indicates that the chain has not been added to MetaMask.  if (error.code === 4902) {    try {      await window.ethereum.request({        method: 'wallet_addEthereumChain',        params: [{           chainId: '0x03', // ropsten chainID (3) in hex          chainName: 'Ropsten Test Network',           nativeCurrency: {               name: 'ETH',              symbol: 'ETH',              decimals: 18          },           rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'],           blockExplorerUrls: ['https://ropsten.etherscan.io']         }] ,      });    } catch (addError) {      // handle "add" error    }  }  // handle other "switch" errors}
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/blockchain/smart-contracts/_payload.js b/blockchain/smart-contracts/_payload.js new file mode 100644 index 0000000..08197c8 --- /dev/null +++ b/blockchain/smart-contracts/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a_,a$,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,bA,bB,bC,bD,bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN,bO,bP,bQ,bR,bS,bT,bU,bV,bW,bX,bY,bZ,b_,b$,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,cA,cB,cC,cD,cE,cF,cG,cH,cI,cJ,cK,cL,cM,cN,cO,cP,cQ,cR,cS,cT,cU,cV,cW,cX,cY,cZ,c_,c$,da,db){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:bI,_path:bJ}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-GyYuUyCYai":{_path:bJ,_dir:"blockchain",_draft:aF,_partial:aF,_locale:"en",_empty:aF,title:bI,description:"For common functions see Common typescript examples.",excerpt:{type:bK,children:[{type:a,tag:A,props:{},children:[{type:c,value:bL},{type:a,tag:_,props:{href:bM},children:[{type:c,value:bN}]},{type:c,value:i}]},{type:a,tag:$,props:{id:aG},children:[{type:c,value:aH}]},{type:a,tag:A,props:{},children:[{type:c,value:bO}]},{type:a,tag:m,props:{code:aI,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aI}]}]}]},{type:a,tag:$,props:{id:aJ},children:[{type:c,value:aK}]},{type:a,tag:A,props:{},children:[{type:c,value:bP},{type:a,tag:G,props:{},children:[{type:c,value:bQ}]},{type:c,value:bR},{type:a,tag:G,props:{},children:[{type:c,value:bS}]},{type:c,value:bT},{type:a,tag:_,props:{href:bU,rel:[as]},children:[{type:c,value:bV}]},{type:c,value:bW}]},{type:a,tag:A,props:{},children:[{type:a,tag:G,props:{},children:[{type:c,value:bX}]},{type:c,value:bY},{type:a,tag:G,props:{},children:[{type:c,value:at}]},{type:c,value:bZ},{type:a,tag:G,props:{},children:[{type:c,value:b_}]},{type:c,value:b$},{type:a,tag:G,props:{},children:[{type:c,value:at}]},{type:c,value:ca}]},{type:a,tag:D,props:{id:aL},children:[{type:c,value:aM}]},{type:a,tag:m,props:{code:aN,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aN}]}]}]},{type:a,tag:D,props:{id:aO},children:[{type:c,value:aP}]},{type:a,tag:m,props:{code:aQ,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aQ}]}]}]},{type:a,tag:D,props:{id:aR},children:[{type:c,value:aS}]},{type:a,tag:A,props:{},children:[{type:c,value:cb}]},{type:a,tag:m,props:{code:aT,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aT}]}]}]},{type:a,tag:m,props:{code:aU,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aU}]}]}]},{type:a,tag:$,props:{id:aV},children:[{type:c,value:aW}]},{type:a,tag:A,props:{},children:[{type:c,value:cc}]},{type:a,tag:m,props:{code:aX,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:aX}]}]}]},{type:a,tag:D,props:{id:aY},children:[{type:c,value:aZ}]},{type:a,tag:m,props:{code:a_,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:a_}]}]}]},{type:a,tag:D,props:{id:a$},children:[{type:c,value:ba}]},{type:a,tag:A,props:{},children:[{type:c,value:cd},{type:a,tag:au,props:{},children:[{type:c,value:af}]},{type:c,value:ce}]},{type:a,tag:m,props:{code:bb,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:bb}]}]}]},{type:a,tag:D,props:{id:bc},children:[{type:c,value:bd}]},{type:a,tag:A,props:{},children:[{type:c,value:cf}]},{type:a,tag:m,props:{code:be,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:be}]}]}]},{type:a,tag:D,props:{id:bf},children:[{type:c,value:bg}]},{type:a,tag:A,props:{},children:[{type:c,value:cg},{type:a,tag:au,props:{},children:[{type:c,value:af}]},{type:c,value:ch},{type:a,tag:_,props:{href:ci,rel:[as]},children:[{type:c,value:cj}]}]},{type:a,tag:m,props:{code:bh,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:c,value:bh}]}]}]}]},body:{type:bK,children:[{type:a,tag:A,props:{},children:[{type:c,value:bL},{type:a,tag:_,props:{href:bM},children:[{type:c,value:bN}]},{type:c,value:i}]},{type:a,tag:$,props:{id:aG},children:[{type:c,value:aH}]},{type:a,tag:A,props:{},children:[{type:c,value:bO}]},{type:a,tag:m,props:{code:aI,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bi}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'web3-eth-contract'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bj}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:I},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:"abi"}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:"object"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:bk}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:"?:"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:ck}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:cl},children:[{type:c,value:cm}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-cc0932"},children:[{type:c,value:"JSON"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:cl},children:[{type:c,value:"parse"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bi}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cm}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bk}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bl}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:bm}]},{type:a,tag:b,props:{class:av},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:cn}]},{type:a,tag:b,props:{class:av},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]}]}]}]},{type:a,tag:$,props:{id:aJ},children:[{type:c,value:aK}]},{type:a,tag:A,props:{},children:[{type:c,value:bP},{type:a,tag:G,props:{},children:[{type:c,value:bQ}]},{type:c,value:bR},{type:a,tag:G,props:{},children:[{type:c,value:bS}]},{type:c,value:bT},{type:a,tag:_,props:{href:bU,rel:[as]},children:[{type:c,value:bV}]},{type:c,value:bW}]},{type:a,tag:A,props:{},children:[{type:a,tag:G,props:{},children:[{type:c,value:bX}]},{type:c,value:bY},{type:a,tag:G,props:{},children:[{type:c,value:at}]},{type:c,value:bZ},{type:a,tag:G,props:{},children:[{type:c,value:b_}]},{type:c,value:b$},{type:a,tag:G,props:{},children:[{type:c,value:at}]},{type:c,value:ca}]},{type:a,tag:D,props:{id:aL},children:[{type:c,value:aM}]},{type:a,tag:m,props:{code:aN,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:co}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bj}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F ABI of contract"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:cp}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:cq}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F address for contract"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:cr}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:bm}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cs}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:bn}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ({}) "}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:ct}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F Calling write method"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F authorizing with Metamask"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cu}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({ method: "}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'eth_requestAccounts'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F getting wallet address"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cu}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"selectedAddress"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F calling \"store\" store method for contract"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F payload should include `from` address, that matches"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F current user's wallet"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bo}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cx}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'Parameter'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:")."}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"send"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" from: "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cy}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bp}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:br},children:[{type:c,value:cz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bs}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F calling read method"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F this method can return data"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bt}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bo}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"retrieve"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bu}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bp}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:br},children:[{type:c,value:cz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bs}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"}"}]}]}]}]}]},{type:a,tag:D,props:{id:aO},children:[{type:c,value:aP}]},{type:a,tag:m,props:{code:aQ,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:co}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bj}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F ABI контракта"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:cp}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:cq}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F contract address"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:cr}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:ct}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F account's private key"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'...'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F write-methods requires private key"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:I},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:cs}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:bn}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cA}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:"number"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bx}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bo}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cx}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"privateKeyToAccount"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" to: "}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" data: "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bx}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"encodeABI"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:cD}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" gas: "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bx}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"estimateGas"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({ from: "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bk}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" }),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" gasPrice: "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getGasPrice"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:cD}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"signTransaction"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" );"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"sendSignedTransaction"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"rawTransaction"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:cF}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bl}]}]}]}]}]},{type:a,tag:D,props:{id:aR},children:[{type:c,value:aS}]},{type:a,tag:A,props:{},children:[{type:c,value:cb}]},{type:a,tag:m,props:{code:aT,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:"requests"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ["}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cG}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cH}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"balanceOf"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bu}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cG}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cH}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getStaked"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bu}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bv}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" ]"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bt}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:by}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]}]}]}]},{type:a,tag:m,props:{code:aU,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"givenProvider"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"||"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:"PROVIDER_URL"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:I},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:by}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cI}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:"any"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"[]) "}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getWeb3NoAccount"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"BatchRequest"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cI}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"map"}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:cK}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"(("}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cL}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cM}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"add"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cN}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cM}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" } "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"else"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cN}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:cL}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bt}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" );"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:cy}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"execute"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:br},children:[{type:c,value:cK}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"all"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bp}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-a7fefb"},children:[{type:c,value:"null"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bs}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bl}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:bm}]},{type:a,tag:b,props:{class:av},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:cn}]},{type:a,tag:b,props:{class:av},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:by}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]}]}]}]},{type:a,tag:$,props:{id:aV},children:[{type:c,value:aW}]},{type:a,tag:A,props:{},children:[{type:c,value:cc}]},{type:a,tag:m,props:{code:aX,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ag}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'web3'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'YOUR_RPC_ENDPOINT_HERE'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'YOUR ABI HERE'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'YOUR CONTRACT ADDRESS HERE'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:bB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:bi}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]}]}]}]},{type:a,tag:D,props:{id:aY},children:[{type:c,value:aZ}]},{type:a,tag:m,props:{code:a_,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"referralProgramContract"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cP}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"RegisterUser"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"()"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:cQ},children:[{type:c,value:bC}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:cR}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cS}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:ck}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"`| UserRegistered | events | ${"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cS}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:cT}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:bn}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cU}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:U},children:[{type:c,value:"boolean"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cV}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:cW},children:[{type:c,value:"RegisterUserResponseInterface"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }) "}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cU}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:cY}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cY}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" } "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"`| ONCE | ${"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:cT}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bE}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" )"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:cQ},children:[{type:c,value:bF}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:cR}]},{type:a,tag:b,props:{class:L},children:[{type:c,value:cZ}]},{type:a,tag:b,props:{class:C},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:cW},children:[{type:c,value:"ErrnoException"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:I},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cZ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:c_}]}]}]}]}]},{type:a,tag:D,props:{id:a$},children:[{type:c,value:ba}]},{type:a,tag:A,props:{},children:[{type:c,value:cd},{type:a,tag:au,props:{},children:[{type:c,value:af}]},{type:c,value:ce}]},{type:a,tag:m,props:{code:bb,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:c$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" value: [],"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bE}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bG}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:az}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bH}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:cP}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ak}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:da}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:db}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bF}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"str"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]}]}]}]},{type:a,tag:D,props:{id:bc},children:[{type:c,value:bd}]},{type:a,tag:A,props:{},children:[{type:c,value:cf}]},{type:a,tag:m,props:{code:be,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bG}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" address: ["}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'address-1'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'address-2'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"], "}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002FOnly get events from specific addresses"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" topics: [] "}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002FWhat topics to subscribe to"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bH}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'logs'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:cF}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ak}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ak}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:c_}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bD}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:da}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:db}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bF}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:bC}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"nr"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]}]}]}]},{type:a,tag:D,props:{id:bf},children:[{type:c,value:bg}]},{type:a,tag:A,props:{},children:[{type:c,value:cg},{type:a,tag:au,props:{},children:[{type:c,value:af}]},{type:c,value:ch},{type:a,tag:_,props:{href:ci,rel:[as]},children:[{type:c,value:cj}]}]},{type:a,tag:m,props:{code:bh,language:w},children:[{type:a,tag:x,props:{},children:[{type:a,tag:m,props:{__ignoreMap:v},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002Fexample options(optional)"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:c$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F only get events where transfer value was 1000 or 1337"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" value: ["}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'1000'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'1337'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"] "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bE}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"\u002F\u002F number | \"earliest\" | \"pending\" | \"latest\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bG}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:", "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" toBlock: "}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'latest'"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bH}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"getPastEvents"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:"'Transfer'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ak}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"then"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"results"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-94ff29{color:#FFA657}.ct-ab4b45{color:#A5D6FF}.ct-a7fefb{color:#79C0FF}.ct-a68b75{color:#79C0FF}.ct-adbb26{color:#79C0FF}.ct-85544b{color:#79C0FF}.ct-5db75f{color:#FF7B72}.ct-3ba34d{color:#8B949E}.ct-cebc24{color:#FFA657}.ct-62706a{color:#D2A8FF}.ct-cc0932{color:#79C0FF}.ct-95f676{color:#79C0FF}.ct-7da052{color:#79C0FF}.ct-b0cc89{color:#FFA657}.ct-aa91ad{color:#FF7B72}.ct-cf891f{color:#D2A8FF}.ct-8c132e{color:#C9D1D9}.ct-c8130a{color:#FF7B72}.ct-1e061f{color:#A5D6FF}.ct-94cfb8{color:#C9D1D9}.ct-04815e{color:#C9D1D9}.ct-d9eda9{color:#FF7B72}.light .ct-d9eda9{color:#859900}.light .ct-04815e{color:#657B83}.light .ct-94cfb8{color:#268BD2}.light .ct-1e061f{color:#2AA198}.light .ct-c8130a{color:#073642}.light .ct-8c132e{color:#657B83}.light .ct-cf891f{color:#268BD2}.light .ct-aa91ad{color:#859900}.light .ct-b0cc89{color:#657B83}.light .ct-7da052{color:#859900}.light .ct-95f676{color:#268BD2}.light .ct-cc0932{color:#657B83}.light .ct-62706a{color:#268BD2}.light .ct-cebc24{color:#657B83}.light .ct-3ba34d{color:#93A1A1}.light .ct-5db75f{color:#073642}.light .ct-85544b{color:#268BD2}.light .ct-adbb26{color:#D33682}.light .ct-a68b75{color:#859900}.light .ct-a7fefb{color:#B58900}.light .ct-ab4b45{color:#2AA198}.light .ct-94ff29{color:#268BD2}"}]}],toc:{title:v,searchDepth:ar,depth:ar,links:[{id:aG,depth:ar,text:aH},{id:aJ,depth:ar,text:aK,children:[{id:aL,depth:Z,text:aM},{id:aO,depth:Z,text:aP},{id:aR,depth:Z,text:aS}]},{id:aV,depth:ar,text:aW,children:[{id:aY,depth:Z,text:aZ},{id:a$,depth:Z,text:ba},{id:bc,depth:Z,text:bd},{id:bf,depth:Z,text:bg}]}]}},_type:"markdown",_id:"content:Blockchain:Smart contracts.md",_source:"content",_file:"Blockchain\u002FSmart contracts.md",_extension:"md"}},prerenderedAt:1667450790566}}("element","span","text","ct-04815e","line"," ","ct-94cfb8","ct-d9eda9",".","ct-8c132e","ct-62706a","(","code","ct-5db75f","ct-1e061f","=","ct-85544b","const"," "," ","ct-3ba34d","","typescript","pre"," {",");","p",";","ct-aa91ad","h3",", ","=\u003E","strong","web3","ct-c8130a","log"," (","ct-b0cc89","on",":"," { ","new","await","options"," ","console","ct-7da052","CONTRACT_ADDRESS","contract",",","))",3,"a","h2","getContract","e"," ","event"," .","Transfer","import"," } ","from","ct-cf891f",")","return","eth","catch",") {","Web3","subscription",2,"nofollow","gas","code-inline","ct-cebc24","CONTRACT_ABI","try","ct-adbb26","0","();",") ","err"," .","let",false,"getting-smart-contract-instance","Getting smart contract instance","import { Contract } from 'web3-eth-contract';\nimport { web3 } from '.';\n\nconst getContract = (abi: object, address?: string): Contract =\u003E {\n const abiFromJson = JSON.parse(JSON.stringify(abi));\n return new web3.eth.Contract(abiFromJson, address);\n};\n\nexport default getContract;\n","executing-contract-method","Executing contract method","example-for-metamask-without-private-key","Example for #Metamask without private key","\u002F\u002F see example below\nimport { getContract } from '.';\n\n\u002F\u002F ABI of contract\nconst CONTRACT_ABI = { \u002F* ... *\u002F };\n \u002F\u002F address for contract\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\nexport const executeContractMethod = async ({}) =\u003E {\n \u002F\u002F getting contract\n const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n \n \u002F\u002F Calling write method\n try {\n \u002F\u002F authorizing with Metamask\n await web3.currentProvider.request({ method: 'eth_requestAccounts' });\n \u002F\u002F getting wallet address\n const addressUser = web3.currentProvider.selectedAddress;\n \u002F\u002F calling \"store\" store method for contract\n \u002F\u002F payload should include `from` address, that matches\n \u002F\u002F current user's wallet\n await contract.methods.store(0, 'Parameter').send({\n from: addressUser,\n });\n } catch (e) {\n throw new Error(e);\n }\n \n \u002F\u002F calling read method\n try {\n \u002F\u002F this method can return data\n const result = await contract.methods.retrieve().call();\n } catch (e) {\n throw new Error(e);\n }\n}\n","nodejs-and-react-native-example","Node.js and React Native example","\u002F\u002F see example below\nimport { getContract } from '.';\n\n\u002F\u002F ABI контракта\nconst CONTRACT_ABI = { \u002F* ... *\u002F };\n\u002F\u002F contract address\nconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';\n\u002F\u002F getting contract\nconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);\n\u002F\u002F account's private key\nconst privateKey = '...';\n\n\u002F\u002F write-methods requires private key\nconst executeContractMethod = async (val: number) =\u003E {\n const transaction = contract.methods.store(val);\n const account = web3.eth.accounts.privateKeyToAccount(privateKey);\n const options = {\n to: CONTRACT_ADDRESS,\n data: transaction.encodeABI(),\n gas: await transaction.estimateGas({ from: account.address }),\n gasPrice: await web3.eth.getGasPrice(),\n };\n const signed = await web3.eth.accounts.signTransaction(\n options,\n privateKey,\n );\n await web3.eth.sendSignedTransaction(signed.rawTransaction!);\n};\n","calling-a-batch-of-contracts-methods","Calling a batch of contract's methods"," const requests = [\n contract.method.balanceOf().call,\n contract.method.getStaked().call\n ]\n\n const result = await makeBatchRequest(request);\n","const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);\n\nconst makeBatchRequest = (calls: any[]) =\u003E {\n try {\n const web3 = getWeb3NoAccount();\n const batch = new web3.BatchRequest();\n\n const promises = calls.map((call) =\u003E {\n return new Promise((resolve, reject) =\u003E {\n batch.add(\n call.request({}, (err, result) =\u003E {\n if (err) {\n reject(err);\n } else {\n resolve(result);\n }\n })\n );\n });\n });\n\n batch.execute();\n\n return Promise.all(promises);\n } catch {\n return null;\n }\n};\n\nexport default makeBatchRequest;\n","subscribing-to-smart-contract-events","Subscribing to smart contract events"," import Web3 from 'web3';\n const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');\n const ABI = 'YOUR ABI HERE';\n const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';\n const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);\n","by-accessing-contractevents","By accessing contract.events","referralProgramContract.events\n .RegisterUser()\n .on('connected', (subscriptionId: string) =\u003E {\n console.log(`| UserRegistered | events | ${subscriptionId}`);\n })\n .on(\n 'data',\n async (event: {\n removed: boolean;\n returnValues: RegisterUserResponseInterface;\n }) =\u003E {\n try {\n if (event.removed) {\n return;\n }\n const { user, referrer } = event.returnValues;\n console.log(user, referrer);\n } catch (e) {\n console.log(`| ONCE | ${e}`);\n }\n },\n )\n .on('error', (error: ErrnoException) =\u003E {\n console.log(error);\n });\n","with-filtering","With filtering"," let options = {\n filter: {\n value: [],\n },\n fromBlock: 0\n };\n\n myContract.events.Transfer(options)\n .on('data', event =\u003E console.log(event))\n .on('changed', changed =\u003E console.log(changed))\n .on('error', err =\u003E throw err)\n .on('connected', str =\u003E console.log(str))\n","common-subscribe-method","Common Subscribe method"," let options = {\n fromBlock: 0,\n address: ['address-1', 'address-2'], \u002F\u002FOnly get events from specific addresses\n topics: [] \u002F\u002FWhat topics to subscribe to\n };\n\n let subscription = ('logs', options, (err,event) =\u003E {\n if (!err)\n console.log(event)\n });\n\n subscription.on('data', event =\u003E console.log(event))\n subscription.on('changed', changed =\u003E console.log(changed))\n subscription.on('error', err =\u003E { throw err })\n subscription.on('connected', nr =\u003E console.log(nr))\n","getting-event-history","Getting event history"," \u002F\u002Fexample options(optional)\n let options = {\n filter: {\n \u002F\u002F only get events where transfer value was 1000 or 1337\n value: ['1000', '1337'] \n },\n \u002F\u002F number | \"earliest\" | \"pending\" | \"latest\"\n fromBlock: 0, \n toBlock: 'latest'\n };\n\n myContract.getPastEvents('Transfer', options)\n .then(results =\u003E console.log(results))\n .catch(err =\u003E throw err);\n\n","Contract","'.'","address","};","export","async","methods"," } ","throw","ct-a68b75"," }","result","().","call","privateKey","transaction","makeBatchRequest","batch","if","myContract","'connected'","'data'"," },","'error'"," fromBlock: "," };","Smart Contracts","\u002Fblockchain\u002Fsmart-contracts","root","For common functions see ","Common%20typescript%20examples","Common typescript examples","Useful for calling smart contract methods:","Contract has ","read"," and ","write"," methods. To get a list of methods, you can paste contract address on ","https:\u002F\u002Fetherscan.io\u002Ftoken\u002F0xdac17f958d2ee523a2206206994597c13d831ec7#readContract","https:\u002F\u002Fetherscan.io\u002F ETH"," or any other service.","Read"," methods doesn't require spending ",". ","Write"," methods cost some amount of ",", hence they will be executed with confirmation from user.","Function calls batch of requests, returning array of results. For example:","There're different ways to subscribe for contract events. For all of them you will need following variables:","We're listening to "," event here:","Filtering options can also be specified:","Getting history for "," events for specific values. More info can be found ","https:\u002F\u002Fweb3js.readthedocs.io\u002Fen\u002Fv1.2.11\u002Fweb3-eth-subscribe.html#","here","string","ct-95f676","abiFromJson","default","\u002F\u002F see example below","\u002F* ... *\u002F"," };","'0xdea164f67df4dbfe675d5271c9d404e0260f33bb'","executeContractMethod","\u002F\u002F getting contract","currentProvider","request","addressUser","store"," });","Error","val","account","accounts","(),","signed","!"," ","method","calls","promises","Promise","resolve","reject"," ","ABI","events","ct-ab4b45",", (","subscriptionId","}`","removed","returnValues","ct-94ff29","user","referrer","error"," });"," filter: {","'changed'","changed")) \ No newline at end of file diff --git a/blockchain/smart-contracts/index.html b/blockchain/smart-contracts/index.html new file mode 100644 index 0000000..730c2a4 --- /dev/null +++ b/blockchain/smart-contracts/index.html @@ -0,0 +1,6 @@ + + +Smart Contracts • Obsidian Garden +

Smart Contracts

For common functions see Common typescript examples.

Getting smart contract instance

Useful for calling smart contract methods:

import { Contract } from 'web3-eth-contract';import { web3 } from '.';const getContract = (abi: object, address?: string): => {  const abiFromJson = JSON.parse(  return new web3.eth.Contract(abiFromJson, address);};export default getContract;

Executing contract method

Contract has read and write methods. To get a list of methods, you can paste contract address on https://etherscan.io/ ETH or any other service.

Read methods doesn't require spending gas. Write methods cost some amount of gas, hence they will be executed with confirmation from user.

Example for #Metamask without private key

// see example belowimport { getContract } from '.';// ABI of contractconst CONTRACT_ABI = { /* ... */ }; // address for contractconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';export const executeContractMethod = async ({}) => {  // getting contract  const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);    // Calling write method  try {    // authorizing with Metamask    await web3.currentProvider.request({ method: 'eth_requestAccounts' });    // getting wallet address    const addressUser = web3.currentProvider.selectedAddress;    // calling "store" store method for contract    // payload should include `from` address, that matches    // current user's wallet    await contract.methods.store(0, 'Parameter').send({      from: addressUser,    });  } catch (e) {    throw new Error(e);  }    // calling read method  try {    // this method can return data    const result = await contract.methods.retrieve().call();  } catch (e) {    throw new Error(e);  }}

Node.js and React Native example

// see example belowimport { getContract } from '.';// ABI контрактаconst CONTRACT_ABI = { /* ... */ };// contract addressconst CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb';// getting contractconst contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS);// account's private keyconst privateKey = '...';// write-methods requires private keyconst executeContractMethod = async (val: number) => {    const transaction = contract.methods.store(val);    const account = web3.eth.accounts.privateKeyToAccount(privateKey);    const options = {      to: CONTRACT_ADDRESS,      data: transaction.encodeABI(),      gas: await transaction.estimateGas({ from: account.address }),      gasPrice: await web3.eth.getGasPrice(),    };    const signed = await web3.eth.accounts.signTransaction(      options,      privateKey,    );    await web3.eth.sendSignedTransaction(signed.rawTransaction!);};

Calling a batch of contract's methods

Function calls batch of requests, returning array of results. For example:

  const requests = [   contract.method.balanceOf().call,   contract.method.getStaked().call  ]  const result = await makeBatchRequest(request);
const web3 = new Web3(Web3.givenProvider || PROVIDER_URL);const makeBatchRequest = (calls: any[]) => {  try {    const web3 = getWeb3NoAccount();    const batch = new web3.BatchRequest();    const promises = calls.map=> {      return new Promise((resolve, reject) => {        batch.add(            if (err) {              reject(err);            } else {              resolve(result);            }          })        );      });    });    batch.execute();    return Promise.all(promises);  } catch {    return null;  }};export default makeBatchRequest;

Subscribing to smart contract events

There're different ways to subscribe for contract events. For all of them you will need following variables:

  import Web3 from 'web3';  const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE');  const ABI = 'YOUR ABI HERE';  const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE';  const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS);

By accessing contract.events

referralProgramContract.events  .RegisterUser()  .on('connected', (subscriptionId: string) => {    console.log(`| UserRegistered | events | ${subscriptionId}`);  })  .on(    'data',    async (event: {      removed: boolean;      returnValues: RegisterUserResponseInterface;    }) => {      try {        if (event.removed) {          return;        }        const { user, referrer } = event.returnValues;        console.log(user, referrer);      } catch (e) {        console.log(`| ONCE | ${e}`);      }    },  )  .on('error', (error: ErrnoException) => {    console.log(error);  });

With filtering

We're listening to Transfer event here:

  let options = {    filter: {        value: [],    },    fromBlock: 0  };  myContract.events.Transfer(options)    .on('data' log(event))    .on('changed' log(changed))    .on('error'     .on('connected' log(str))

Common Subscribe method

Filtering options can also be specified:

  let options = {    fromBlock: 0,    address: ['address-1', 'address-2'],    //Only get events from specific addresses    topics: []                              //What topics to subscribe to  };  let subscription = ('logs', options      if (!err)      console.log(event)  });  subscription.on('data'=> console.log(event))  subscription.on('changed'=> console.log(changed))  subscription.on('error'=> { throw err })  subscription.on('connected'=> console.log(nr))

Getting event history

Getting history for Transfer events for specific values. More info can be found here

  //example options(optional)  let options = {    filter: {        // only get events where transfer value was 1000 or 1337        value: ['1000', '1337']        },    // number | "earliest" | "pending" | "latest"    fromBlock: 0,                      toBlock: 'latest'  };  myContract.getPastEvents('Transfer', options)    .then log(results))    .catch 
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/components/bio/BioHeading.vue b/components/bio/BioHeading.vue deleted file mode 100644 index d743f54..0000000 --- a/components/bio/BioHeading.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - - diff --git a/components/bio/BioProjects.vue b/components/bio/BioProjects.vue deleted file mode 100644 index 06f3f26..0000000 --- a/components/bio/BioProjects.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - - - diff --git a/components/bio/BioSkills.vue b/components/bio/BioSkills.vue deleted file mode 100644 index c8f21a1..0000000 --- a/components/bio/BioSkills.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - - - diff --git a/components/content/ProseA.vue b/components/content/ProseA.vue deleted file mode 100644 index 02b6630..0000000 --- a/components/content/ProseA.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/components/content/ProseCode.vue b/components/content/ProseCode.vue deleted file mode 100644 index 6d393cc..0000000 --- a/components/content/ProseCode.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - diff --git a/components/home/HomeContentList.vue b/components/home/HomeContentList.vue deleted file mode 100644 index 364d7f5..0000000 --- a/components/home/HomeContentList.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - - - diff --git a/components/home/HomeHeader.vue b/components/home/HomeHeader.vue deleted file mode 100644 index 6574a4d..0000000 --- a/components/home/HomeHeader.vue +++ /dev/null @@ -1,110 +0,0 @@ - - - diff --git a/components/home/HomeReference.vue b/components/home/HomeReference.vue deleted file mode 100644 index 5c1bae6..0000000 --- a/components/home/HomeReference.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - - - diff --git a/components/icons/ArrowRight.vue b/components/icons/ArrowRight.vue deleted file mode 100644 index 029ad70..0000000 --- a/components/icons/ArrowRight.vue +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/components/icons/IconStar.vue b/components/icons/IconStar.vue deleted file mode 100644 index 1ddd5c5..0000000 --- a/components/icons/IconStar.vue +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/components/icons/Moon.vue b/components/icons/Moon.vue deleted file mode 100644 index 073802f..0000000 --- a/components/icons/Moon.vue +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/components/icons/Sun.vue b/components/icons/Sun.vue deleted file mode 100644 index f82f572..0000000 --- a/components/icons/Sun.vue +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/components/layout/LayoutFooter.vue b/components/layout/LayoutFooter.vue deleted file mode 100644 index 65d555d..0000000 --- a/components/layout/LayoutFooter.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/components/layout/LayoutMainMenu.vue b/components/layout/LayoutMainMenu.vue deleted file mode 100644 index 6d31ffd..0000000 --- a/components/layout/LayoutMainMenu.vue +++ /dev/null @@ -1,73 +0,0 @@ - - - - - diff --git a/components/layout/LayoutMainMenuRow.vue b/components/layout/LayoutMainMenuRow.vue deleted file mode 100644 index 02f9006..0000000 --- a/components/layout/LayoutMainMenuRow.vue +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - diff --git a/components/layout/LayoutMainMenuToggle.vue b/components/layout/LayoutMainMenuToggle.vue deleted file mode 100644 index 8b7c9a6..0000000 --- a/components/layout/LayoutMainMenuToggle.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - - - diff --git a/components/layout/LayoutThemeToggle.vue b/components/layout/LayoutThemeToggle.vue deleted file mode 100644 index 6e0d67a..0000000 --- a/components/layout/LayoutThemeToggle.vue +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - diff --git a/components/skills/SkillsCard.vue b/components/skills/SkillsCard.vue deleted file mode 100644 index e681256..0000000 --- a/components/skills/SkillsCard.vue +++ /dev/null @@ -1,77 +0,0 @@ - - - - - diff --git a/components/ui/UiActionButton.vue b/components/ui/UiActionButton.vue deleted file mode 100644 index b3cf413..0000000 --- a/components/ui/UiActionButton.vue +++ /dev/null @@ -1,115 +0,0 @@ - - - - - diff --git a/components/ui/UiIconCopy.vue b/components/ui/UiIconCopy.vue deleted file mode 100644 index 132580e..0000000 --- a/components/ui/UiIconCopy.vue +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/components/ui/UiStars.vue b/components/ui/UiStars.vue deleted file mode 100644 index 0ae38a4..0000000 --- a/components/ui/UiStars.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - - - diff --git a/constants/skills.ts b/constants/skills.ts deleted file mode 100644 index 7a34325..0000000 --- a/constants/skills.ts +++ /dev/null @@ -1,100 +0,0 @@ -import ReactLogo from "@/assets/svg/react-logo.svg"; -import ReactNativeLogo from "@/assets/svg/react-native-logo.svg"; -import ReactSSR from "@/assets/svg/react-ssr-logo.svg"; -import TsLogo from "@/assets/svg/ts-logo.svg"; -import GoLangLogo from "@/assets/svg/golang-logo.svg"; -import HTMLLogo from "@/assets/svg/html-logo.svg"; -import SVGLogo from "@/assets/svg/svg-logo.svg"; -import ArchLogo from "@/assets/svg/arch-logo.svg"; -import GQLLogo from "@/assets/svg/gql-logo.svg"; -import SwaggerLogo from "@/assets/svg/swagger-logo.svg"; -import VueLogo from "@/assets/svg/vue-logo.svg"; -import PostgresLogo from "@/assets/svg/postgres-logo.svg"; -import DockerLogo from "@/assets/svg/docker-logo.svg"; - -interface Skill { - title: string; - description?: string; - icon: string; - level: number; -} - -export const skills: Skill[] = [ - { - title: "React", - description: "Classes and FC-s, hooks, context, redux, redux-saga, mobx", - level: 5, - icon: ReactLogo, - }, - { - title: "Typescript", - description: - "For both frontend and backend development: generics, guards, infers", - level: 4, - icon: TsLogo, - }, - { - title: "SSR (Next, Gatsby)", - description: `Automated generation, incremental, static, and dynamic rendering`, - level: 4, - icon: ReactSSR, - }, - { - title: "Vue.js & Nuxt", - description: `Common SPA-s and SSR blogs like this one, with composition API, and Vuex`, - level: 3, - icon: VueLogo, - }, - { - title: "React Native", - description: `Basic developing and releasing experience without native modules`, - level: 3, - icon: ReactNativeLogo, - }, - { - title: "Golang", - description: "Monolith and microservice apps with REST, GraphQL, and GRPC", - level: 2, - icon: GoLangLogo, - }, - { - title: "Docker", - description: - "Docker, docker-compose, private registries, gitlab-ci, and drone-ci", - level: 4, - icon: DockerLogo as string, - }, - { - title: "HTML, CSS, SVG", - description: - "Adaptive markup, all modern techniques, preprocessors, and CSS-in-JS", - level: 5, - icon: HTMLLogo, - }, - { - title: "Linux Shell", - description: - "Linux user since 2003, can write scripts to automate my work. BTW, I use Arch!", - level: 4, - icon: ArchLogo as string, - }, - { - title: "GraphQL", - description: - "Both server- and client-side. Queries, mutations, cache manipulation", - level: 4, - icon: GQLLogo as string, - }, - { - title: "REST API", - description: "With Axios, fetch, express, gorilla-mux, and gin-gonic", - level: 4, - icon: SwaggerLogo as string, - }, - { - title: "SQL", - description: "Base queries, JOIN-s, indexes and simpl query optimizations", - level: 2, - icon: PostgresLogo as string, - }, -]; diff --git a/content/Blockchain/Common typescript examples.md b/content/Blockchain/Common typescript examples.md deleted file mode 100644 index 3ec57a0..0000000 --- a/content/Blockchain/Common typescript examples.md +++ /dev/null @@ -1,192 +0,0 @@ -- Simple #dapp example for tests: [https://metamask.github.io/test-dapp/](https://metamask.github.io/test-dapp/) -- Interaction with smart contracts described in [Smart contracts](Smart%20contracts.md) - -## Connecting to node - -If #Metamask extension installed, `Web3.givenProvider` is available in global window. You can use [Infura](https://infura.io) or your node instead: - -```typescript -import Web3 from 'web3'; - -// URL of your node -const PROVIDER_URL = 'https://...'; - -export const web3 = new Web3(Web3.givenProvider || PROVIDER_URL); -``` - -## Getting wallet balance - -```typescript -const getBalance = async (address: string) => { - return await web3.eth.getBalance(address); -} -``` - -## Getting wallet address - -```typescript -// first we need to authorize -const authorize = async () => { - await web3.currentProvider.request({ method: 'eth_requestAccounts' }); -} - -// then we can get wallet address -const getCurrentAddressUser = () => { - return web3.currentProvider.selectedAddress; -} -``` - -## Sending transaction - -Sending `value` tokens with `memo` as value: - -```typescript - -const transfer = async ({ - from, - to, - value, - memo, - privateKey, - gasLimit = 44000 -}) => { - const nonce = await web3.eth.getTransactionCount(from); - const gasPrice = await web3.eth.getGasPrice(); - - const rawTx = { - from, - to, - value: web3.utils.toHex(Web3.utils.toWei(value, 'ether')), - gasLimit: web3.utils.toHex(gasLimit), - gasPrice: web3.utils.toHex(gasPrice), - nonce: web3.utils.toHex(nonce), - data: memo, - }; - - const privateKeyBuffer = EthUtil.toBuffer(privateKey); - - const tx = new Transaction(rawTx); - - tx.sign(privateKeyBuffer); - const serializedTx = tx.serialize(); - - return this.web3.eth.sendSignedTransaction( - `0x${serializedTx.toString('hex')}` - ); -} -``` - -## Estimating transaction FEE - -Useful to get fixed amount of tokens from user with pre-estimated fee. - -```typescript -import { web3 } from '.'; - -const estimateFee = async ({ - from, - to, - value, - memo, -}) => { - const gasPrice = await web3.eth.getGasPrice(); - const gasLimit = await web3.eth.estimateGas({ - from, - to, - value: web3.utils.toHex(web3.utils.toWei(value, 'ether')), - data: web3.utils.asciiToHex(memo), - }).call(); - - return web3.utils.fromWei( - BigInt(gasPrice.toString()) - .multiply(BigInt(gasLimit.toString())) - .toString() - ); -} -``` - -## Subscribing to wallet address change - -```typescript -import { web3 } from '.'; - -web3.currentProvider.on('accountsChanged', callback); -``` - - -## Watching network change - -```typescript -ethereum.on('chainChanged', handler: (chainId: string) => void); -``` - -## Adding custom token to wallet - -```typescript -window.ethereum - .request({ - method: 'wallet_watchAsset', - params: { - type: 'ERC20', - options: { - address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155', - symbol: 'FOO', - decimals: 18, - image: 'https://foo.io/token-image.svg', - }, - }, - }) - .then((success) => { - if (success) { - console.log('FOO successfully added to wallet!') - } else { - throw new Error('Something went wrong.') - } - }) - .catch(console.error) - ``` - -## Changing network to custom - -Checking current chainId: - -```typescript -const getChainID = async () => { - return ethereum.request({ method: 'eth_chainId' }) -} -``` - -Asking wallet to change current network: - -```typescript -try { - await window.ethereum.request({ - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x03' }], // ropsten chainID (3) in hex - }); -} catch (switchError) { - // This error code indicates that the chain has not been added to MetaMask. - if (error.code === 4902) { - try { - await window.ethereum.request({ - method: 'wallet_addEthereumChain', - params: [{ - chainId: '0x03', // ropsten chainID (3) in hex - chainName: 'Ropsten Test Network', - nativeCurrency: { - name: 'ETH', - symbol: 'ETH', - decimals: 18 - }, - rpcUrls: ['https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'], - blockExplorerUrls: ['https://ropsten.etherscan.io'] - }] , - }); - } catch (addError) { - // handle "add" error - } - } - // handle other "switch" errors -} -``` - diff --git a/content/Blockchain/Smart contracts.md b/content/Blockchain/Smart contracts.md deleted file mode 100644 index f59fa06..0000000 --- a/content/Blockchain/Smart contracts.md +++ /dev/null @@ -1,248 +0,0 @@ -For common functions see [Common typescript examples](Common%20typescript%20examples.md). - -## Getting smart contract instance - -Useful for calling smart contract methods: - -```typescript -import { Contract } from 'web3-eth-contract'; -import { web3 } from '.'; - -const getContract = (abi: object, address?: string): Contract => { - const abiFromJson = JSON.parse(JSON.stringify(abi)); - return new web3.eth.Contract(abiFromJson, address); -}; - -export default getContract; -``` -## Executing contract method - -Contract has **read** and **write** methods. To get a list of methods, you can paste contract address on [https://etherscan.io/ ETH](https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract) or any other service. - - **Read** methods doesn't require spending **gas**. **Write** methods cost some amount of **gas**, hence they will be executed with confirmation from user. - -### Example for #Metamask without private key - -```typescript -// see example below -import { getContract } from '.'; - -// ABI of contract -const CONTRACT_ABI = { /* ... */ }; - // address for contract -const CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb'; - -export const executeContractMethod = async ({}) => { - // getting contract - const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS); - - // Calling write method - try { - // authorizing with Metamask - await web3.currentProvider.request({ method: 'eth_requestAccounts' }); - // getting wallet address - const addressUser = web3.currentProvider.selectedAddress; - // calling "store" store method for contract - // payload should include `from` address, that matches - // current user's wallet - await contract.methods.store(0, 'Parameter').send({ - from: addressUser, - }); - } catch (e) { - throw new Error(e); - } - - // calling read method - try { - // this method can return data - const result = await contract.methods.retrieve().call(); - } catch (e) { - throw new Error(e); - } -} -``` - -### Node.js and React Native example - -```typescript -// see example below -import { getContract } from '.'; - -// ABI контракта -const CONTRACT_ABI = { /* ... */ }; -// contract address -const CONTRACT_ADDRESS = '0xdea164f67df4dbfe675d5271c9d404e0260f33bb'; -// getting contract -const contract = getContract(CONTRACT_ABI, CONTRACT_ADDRESS); -// account's private key -const privateKey = '...'; - -// write-methods requires private key -const executeContractMethod = async (val: number) => { - const transaction = contract.methods.store(val); - const account = web3.eth.accounts.privateKeyToAccount(privateKey); - const options = { - to: CONTRACT_ADDRESS, - data: transaction.encodeABI(), - gas: await transaction.estimateGas({ from: account.address }), - gasPrice: await web3.eth.getGasPrice(), - }; - const signed = await web3.eth.accounts.signTransaction( - options, - privateKey, - ); - await web3.eth.sendSignedTransaction(signed.rawTransaction!); -}; -``` - -### Calling a batch of contract's methods - -Function calls batch of requests, returning array of results. For example: - -```typescript - const requests = [ - contract.method.balanceOf().call, - contract.method.getStaked().call - ] - - const result = await makeBatchRequest(request); -``` - -```typescript -const web3 = new Web3(Web3.givenProvider || PROVIDER_URL); - -const makeBatchRequest = (calls: any[]) => { - try { - const web3 = getWeb3NoAccount(); - const batch = new web3.BatchRequest(); - - const promises = calls.map((call) => { - return new Promise((resolve, reject) => { - batch.add( - call.request({}, (err, result) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }) - ); - }); - }); - - batch.execute(); - - return Promise.all(promises); - } catch { - return null; - } -}; - -export default makeBatchRequest; -``` - -## Subscribing to smart contract events - -There're different ways to subscribe for contract events. For all of them you will need following variables: - -```typescript - import Web3 from 'web3'; - const web3 = new Web3('YOUR_RPC_ENDPOINT_HERE'); - const ABI = 'YOUR ABI HERE'; - const CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS HERE'; - const myContract = new Web3.Contract(ABI, CONTRACT_ADDRESS); -``` - -### By accessing contract.events - -```typescript -referralProgramContract.events - .RegisterUser() - .on('connected', (subscriptionId: string) => { - console.log(`| UserRegistered | events | ${subscriptionId}`); - }) - .on( - 'data', - async (event: { - removed: boolean; - returnValues: RegisterUserResponseInterface; - }) => { - try { - if (event.removed) { - return; - } - const { user, referrer } = event.returnValues; - console.log(user, referrer); - } catch (e) { - console.log(`| ONCE | ${e}`); - } - }, - ) - .on('error', (error: ErrnoException) => { - console.log(error); - }); -``` - -### With filtering - -We're listening to `Transfer` event here: - -```typescript - let options = { - filter: { - value: [], - }, - fromBlock: 0 - }; - - myContract.events.Transfer(options) - .on('data', event => console.log(event)) - .on('changed', changed => console.log(changed)) - .on('error', err => throw err) - .on('connected', str => console.log(str)) -``` - -### Common Subscribe method - -Filtering options can also be specified: - -```typescript - let options = { - fromBlock: 0, - address: ['address-1', 'address-2'], //Only get events from specific addresses - topics: [] //What topics to subscribe to - }; - - let subscription = ('logs', options, (err,event) => { - if (!err) - console.log(event) - }); - - subscription.on('data', event => console.log(event)) - subscription.on('changed', changed => console.log(changed)) - subscription.on('error', err => { throw err }) - subscription.on('connected', nr => console.log(nr)) -``` - -### Getting event history - -Getting history for `Transfer` events for specific values. More info can be found [here](https://web3js.readthedocs.io/en/v1.2.11/web3-eth-subscribe.html#) - -```typescript - //example options(optional) - let options = { - filter: { - // only get events where transfer value was 1000 or 1337 - value: ['1000', '1337'] - }, - // number | "earliest" | "pending" | "latest" - fromBlock: 0, - toBlock: 'latest' - }; - - myContract.getPastEvents('Transfer', options) - .then(results => console.log(results)) - .catch(err => throw err); - -``` - diff --git a/content/CSS/Automatic Grid like Masonry with pure CSS.md b/content/CSS/Automatic Grid like Masonry with pure CSS.md deleted file mode 100644 index d890856..0000000 --- a/content/CSS/Automatic Grid like Masonry with pure CSS.md +++ /dev/null @@ -1,45 +0,0 @@ -Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns. - -```scss -$cell: 250px; -$gap: 20px; - -.grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax($cell, 1fr)); - grid-auto-rows: 256px; - grid-auto-flow: row dense; - grid-column-gap: $gap; - grid-row-gap: $gap; -} -``` - -### Basic elements with double height or width - -```scss -.h-2 { // takes 2 columns - grid-column-end: span 2; -} - -.v-2 { // takes 2 rows - grid-row-end: span 2; -} -``` - -### Header, that fills all columns - -```scss -.full-width { - grid-row: 1 / 2; // height: 1 row - grid-column: 1 / -1; -} -``` - -### Stamp element, that takes 3 rows in the top right corner - -```scss -.top-right { - grid-row: 1 / 3; // height here - grid-column: -2 / -1; // width here -} -``` diff --git a/content/CSS/Sass nth-child iterate mixin.md b/content/CSS/Sass nth-child iterate mixin.md deleted file mode 100644 index 4a39dc6..0000000 --- a/content/CSS/Sass nth-child iterate mixin.md +++ /dev/null @@ -1,19 +0,0 @@ -Say, we need to color `n` items by specific colors, which depend on its position. #SCSS supports [iteration over lists](https://sass-lang.com/documentation/at-rules/control/each) for that purposes: - -```scss -@mixin color-per-child($colors) { - @each $color in $colors { - &:nth-child(#{index(($colors), ($color))}) { - color: $color; - } - } -} -``` - -Usage is simple: - -```scss -.item { - @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa)); -} -``` \ No newline at end of file diff --git a/content/CSS/Test if browser supports CSS rules.md b/content/CSS/Test if browser supports CSS rules.md deleted file mode 100644 index 4fdbfc4..0000000 --- a/content/CSS/Test if browser supports CSS rules.md +++ /dev/null @@ -1,20 +0,0 @@ -To test if browser supports some #CSS rules, do following: - -```css -@supports (backdrop-filter: blur(5px)) { - backdrop-filter: blur(5px); -} -``` - -This `@mixin` will only apply rule if browser support backdrop filtering: - -```scss -@mixin can_backdrop { - @supports ( - (-webkit-backdrop-filter: blur(5px)) or - (backdrop-filter: blur(5px)) - ) { - @content; - } -} -``` diff --git a/content/Docker/Building static pages with Docker.md b/content/Docker/Building static pages with Docker.md deleted file mode 100644 index 0690be2..0000000 --- a/content/Docker/Building static pages with Docker.md +++ /dev/null @@ -1,15 +0,0 @@ -Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt: - -```Dockerfile -FROM node:16-alpine as builder -WORKDIR /app -COPY package.json yarn.lock ./ -RUN yarn -COPY . . - -# your generate command here -RUN yarn generate - -FROM nginx -COPY --from=builder /app/dist /usr/share/nginx/html -``` diff --git a/content/Docker/Drone-ci.md b/content/Docker/Drone-ci.md deleted file mode 100644 index ce33822..0000000 --- a/content/Docker/Drone-ci.md +++ /dev/null @@ -1,98 +0,0 @@ -Can be used with [Private docker registry](Private%20docker%20registry.md) to deploy things using #docker. - -## Pushing to private docker_registry - -You should specify `global_docker_login`, `global_docker_password`, `global_docker_registry` organizations variables in your **drone**. And `docker_repo` variable for your repo as `docker.yourdomain.com/your-image`. - -This is example of `.droneci` for [private docker registry](Private%20docker%20registry.md): - -```yaml -kind: pipeline -name: build -type: docker - -platform: - os: linux - arch: amd64 - -steps: - - name: build-master - image: plugins/docker - when: - branch: - - master - settings: - dockerfile: Dockerfile - tag: - - ${DRONE_BRANCH} - username: - from_secret: global_docker_login - password: - from_secret: global_docker_password - registry: - from_secret: global_docker_registry - repo: - from_secret: docker_repo -``` - -## Docker-compose file for drone-ci - -The `drone` service is ui itself and `drone-agent` is runner for builds, that can be started on different machine (or machines). - -Change `secret_id`, `rpc_secret` and `drone.url` to something you like. - -```yaml -version: "3" - -services: - drone: - container_name: drone - image: drone/drone:latest - environment: - - DRONE_GITHUB_CLIENT_ID=secret_id - - DRONE_GITHUB_CLIENT_SECRET=client_secret - - DRONE_RPC_SECRET=rpc_secret - - DRONE_SERVER_HOST=drone.url - - DRONE_USER_CREATE="username:user,admin:true" - - DRONE_SERVER_PROTO=https - - DRONE_TLS_AUTOCERT=false - - DRONE_GIT_ALWAYS_AUTH=false - - DRONE_LOGS_DEBUG=true - - DRONE_LOGS_TRACE=true - restart: always - volumes: - - ./data:/data - ports: - - 8090:80 - drone-agent: - container_name: drone__agent - image: drone/agent:latest - command: agent - restart: always - volumes: - - /var/run/docker.sock:/var/run/docker.sock - environment: - - DRONE_RPC_SERVER=https://drone.url - - DRONE_RPC_SECRET=rpc_secret -``` - -## Caching builds - -Haven't checked that yet, but there's a [manual](https://laszlo.cloud/the-ultimate-droneci-caching-guide) from [Laszlo Fogas](https://laszlo.cloud/) about that. - -## Get user info - -```shell -export DRONE_SERVER=https://drone.url -export DRONE_TOKEN=password -drone info -``` - -## Mark user as trusted - -Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to `1`. - -```shell -drone repo update $1 --trusted=true && drone repo info $1 -``` - diff --git a/content/Docker/Github pages with drone-ci.md b/content/Docker/Github pages with drone-ci.md deleted file mode 100644 index 209c6fc..0000000 --- a/content/Docker/Github pages with drone-ci.md +++ /dev/null @@ -1,44 +0,0 @@ -To deploy github pages with [Drone-ci](Drone-ci.md) you will need `.drone.yml` as specified below. You also should define secrets `github_username` and `github_token` (get it [here](https://github.com/settings/tokens)) in your drone's repository setup. - -Github repository should be named as `yourname.github.io` and it could be accessed at https://yourname.github.io/. Otherwise it'll be available at https://yourname.github.io/repo-name/, what you might not like. - -You should create branch named `gh-pages` in that repo and setup GH Pages at `https://github.com//.github.io/settings/pages`. - -This config will update `gh-pages` branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins. - -```yaml -kind: pipeline -name: build -type: docker - -platform: - os: linux - arch: amd64 - -steps: - - name: build - image: node:16 - commands: - - yarn - - yarn generate - - rm -rf ./docs - - mv ./.output/public ./docs - - touch ./docs/.nojekyll - - name: publish - image: plugins/gh-pages - settings: - target_branch: gh-pages - username: - from_secret: github_username - password: - from_secret: github_token -``` - -Here we're moving `./.output/public` to `./docs`, because #nuxt creates symlink for `docs` and git can't work with that. - -Also we create `.nojekyll` at the root of repo, so github's internal engine won't [ignore files that start with underscore](https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/). - -## Additional reading - -- [Drone Github Pages Documentation](https://plugins.drone.io/plugins/gh-pages) -- [Bypassing Jekyll on GitHub Pages](https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/) diff --git a/content/Docker/Private docker registry.md b/content/Docker/Private docker registry.md deleted file mode 100644 index 9aa2eb1..0000000 --- a/content/Docker/Private docker registry.md +++ /dev/null @@ -1,71 +0,0 @@ -Suitable to work with [Drone-ci](Drone-ci.md) for hosting private #docker images. - -## Sample docker-compose for custom docker registry - -This one brings up private docker registry with ui. First you'll need to generate password for it: - -```shell -docker run \ - --entrypoint htpasswd registry:2 \ - -Bbn user mypassword > auth/registry.password -``` - -```yaml -version: "3" -services: - registry: - container_name: docker__registry - image: registry:2 - ports: - - 5000:5000 - restart: always - environment: - - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data - - REGISTRY_AUTH=htpasswd - - REGISTRY_AUTH_HTPASSWD_REALM=Registry - - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password - - REGISTRY_HTTP_SECRET=password - - REGISTRY_STORAGE_DELETE_ENABLED=true - volumes: - - ./registry/auth:/auth - - ./registry/data:/data - ui: - container_name: docker__ui - image: parabuzzle/craneoperator:latest - ports: - - 80:80 - restart: always - environment: - - REGISTRY_HOST=registry - - REGISTRY_PORT=5000 - - REGISTRY_PROTOCOL=http - - ALLOW_REGISTRY_LOGIN=true - - REGISTRY_ALLOW_DELETE=true - - USERNAME=registry - - PASSWORD=password -``` - -## Squash layers on registry - -Sometimes you need to squash all layers in docker registry to free up disk space. - -1. Run this command to mark oldest layers - -```shell -# Try this first -docker run \ - --rm anoxis/registry-cli \ - -r https://registry.url \ - -l user:password \ - --delete \ - --num 2 - -# Then this -docker run -it \ - -v /path/to/registry/data:/registry \ - -e REGISTRY_URL=https://registry.url \ - -e DRY_RUN="false" \ - -e REGISTRY_AUTH="user:password" \ - mortensrasmussen/docker-registry-manifest-cleanup -``` - diff --git a/content/Docker/Refresh containers on pull.md b/content/Docker/Refresh containers on pull.md deleted file mode 100644 index 14283dd..0000000 --- a/content/Docker/Refresh containers on pull.md +++ /dev/null @@ -1,17 +0,0 @@ -## Setting up watchtower - -[Watchtower](https://containrrr.dev/watchtower/) will automatically pull updated #docker containers. Can be used with [Private docker registry](Private%20docker%20registry.md) and [Drone-ci](Drone-ci.md). - -```yaml -version: "3" - -services: - watchtower: - container_name: docker__watchtower - image: v2tec/watchtower - restart: always - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - /home/user/.docker/config.json:/config.json - command: --interval 60 image_1 image_2 -``` \ No newline at end of file diff --git a/content/Docker/Seed dump inside docker.md b/content/Docker/Seed dump inside docker.md deleted file mode 100644 index 3c1a449..0000000 --- a/content/Docker/Seed dump inside docker.md +++ /dev/null @@ -1,15 +0,0 @@ -If you need to seed `.sql` dump in #docker container, just run this command. Also you can try to [rsync file with SSH](/linux/Rsync%20file%20with%20SSH) to get it from remote host. - -```shell -##### -# usage: ./script.sh "/path/to/dump.sql" -##### - -DUMP_PATH=$1 -CONTAINER="db" -USER=root -PASSWORD=password -DB=database - -cat "$DUMP_PATH" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB -``` diff --git a/content/Docker/Wait for mysql.md b/content/Docker/Wait for mysql.md deleted file mode 100644 index fcfbfec..0000000 --- a/content/Docker/Wait for mysql.md +++ /dev/null @@ -1,29 +0,0 @@ -[wait-for-it.sh](https://github.com/vishnubob/wait-for-it) doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections - -This script waits for first successful query from database or exits with non-zero status after timeout. - -Don't forget to change `$query` for the actually working one. - -```shell -# Waits for mysql to become actually available -wait_for_mysql() { - query="SELECT count(*) FROM users" - - timeout=180 # 3 minutes limit - i=0 - - while ! docker exec -it "$1" mysql --user="$2" --password="$3" -e "$query" $4 >/dev/null 2>&1; do - sleep 1; - - i=$(($i+1)) - if [[ ${i} -ge ${timeout} ]]; then - echo "[Error] can't properly query MySQL after ${i} secs" - exit 1; - fi - done -} - -# usage: wait_for_mysql miin-mysql-dev root password database -``` - -[Wait for redis](Wait%20for%20redis.md) \ No newline at end of file diff --git a/content/Docker/Wait for redis.md b/content/Docker/Wait for redis.md deleted file mode 100644 index 24b0bb7..0000000 --- a/content/Docker/Wait for redis.md +++ /dev/null @@ -1,24 +0,0 @@ -[wait-for-it.sh](https://github.com/vishnubob/wait-for-it) doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections - -This script waits for first successful ping or exits with non-zero status after 3 minutes. - -```shell -# Waits for redis to become actually available -wait_for_redis() { - timeout=180 # 3 minutes - i=0 - while ! docker exec -it "$1" redis-cli -h localhost -p 6379 -a "$2" ping | grep "PONG" >/dev/null 2>&1; do - sleep 1; - - i=$(($i+1)) - if [[ ${i} -ge ${timeout} ]]; then - echo "[Error] can't properly ping Redis container after ${i} secs" - exit 1; - fi - done -} - -# usage: wait_for_redis miin-redis-dev password -``` - -[Wait for mysql](Wait%20for%20mysql.md) \ No newline at end of file diff --git a/content/Frontend/React Native/OAuth2 login.md b/content/Frontend/React Native/OAuth2 login.md deleted file mode 100644 index 6b07206..0000000 --- a/content/Frontend/React Native/OAuth2 login.md +++ /dev/null @@ -1,48 +0,0 @@ -Use #oauth2 login with React-Native - -## Common OAuth2 providers - -Can be handled by [react-native-app-auth](react-native-app-auth) by redirecting to url `com.yourapp://oauth2provider`. - -### Example for #Google - -```typescript -import { authorize } from 'react-native-app-auth'; - -const GOOGLE_OAUTH_CLIENT = '...'; - -// ... -const authState = await authorize({ - issuer: 'https://accounts.google.com', - clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`, - redirectUrl: `com.yourapp:/oauth2redirect/google`, - scopes: ['openid', 'profile'], - dangerouslyAllowInsecureHttpRequests: true, -}); -``` - -### Example for #Yandex - -```typescript -const YANDEX_OAUTH_CLIENT = '...'; -const YANDEX_OAUTH_SECRET = '...'; // better hide it somehow -const APP_ID = 'com.yourapp'; - -const authState = await authorize({ - serviceConfiguration: { - authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`, - // TODO: replace it with your own backend to secure client_secret: - tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`, - }, - clientId: YANDEX_OAUTH_CLIENT, - redirectUrl: `${APP_ID}:/oauth2redirect`, - scopes: ['login:info', 'login:avatar'], - dangerouslyAllowInsecureHttpRequests: true, -}); - -callback(authState.accessToken); -``` - -## Apple ID login - -[react-native-apple-authentication](https://github.com/invertase/react-native-apple-authentication) has its own [documentation](https://github.com/invertase/react-native-apple-authentication/tree/main/docs) on setting up OAuth using Apple ID. \ No newline at end of file diff --git a/content/Frontend/React Native/Preserve FlatList scroll position in React Native.md b/content/Frontend/React Native/Preserve FlatList scroll position in React Native.md deleted file mode 100644 index a7871ad..0000000 --- a/content/Frontend/React Native/Preserve FlatList scroll position in React Native.md +++ /dev/null @@ -1,60 +0,0 @@ -Sometimes you need to keep scroll position of `FlatList` in React Native after some user interactions. - -```typescript -// interact() is doing some stuff, that changes FlatList scroll size -type Props = { interact: () => void; } - -const SomeList: FC = ({ interact }) => { - const scrollPosition = useRef(0); - const scrollHeight = useRef(0); - - // set it to `true` before interaction and back to `false` right after - const shouldKeepScrollPosition = useRef(false); - - const onScroll = useCallback( - (event: NativeSyntheticEvent) => { - scrollPosition.current = event.nativeEvent.contentOffset.y; - }, - [], - ); - - const onContentSizeChange = useCallback((_: number, h: number) => { - if (!shouldKeepScrollPosition.current) { - scrollHeight.current = h; - return; - } - - ref.current?.scrollToOffset({ - offset: scrollPosition.current + (h - scrollHeight.current), - animated: false, - }); - - scrollHeight.current = h; - }, []); - - // onInteraction wraps interaction to preserve scroll position - const onInteraction = useCallback( - () => { - shouldKeepScrollPosition.current = true; - - setTimeout(() => { - interact(); - }, 0); - - setTimeout(() => { - shouldKeepScrollPosition.current = false; - }, 500); - }, - [setSelectedSubThemes], - ); - - return ( - - ) -} \ No newline at end of file diff --git a/content/Frontend/React Native/Useful comands.md b/content/Frontend/React Native/Useful comands.md deleted file mode 100644 index 6fd2ae1..0000000 --- a/content/Frontend/React Native/Useful comands.md +++ /dev/null @@ -1,65 +0,0 @@ -## Show android logcat - -```shell -adb logcat com.application:I "*:S" -``` - -## Get .apk's SHA-256 - -```bash -keytool -printcert -jarfile "$1" -``` - -## Assemble debug release on Android - -Packages release with bundled resources. - -```shell -npx react-native bundle \ - --platform android \ - --dev false \ - --entry-file index.js \ - --bundle-output android/app/src/main/assets/index.android.bundle \ - --assets-dest android/app/src/main/res/ - -cd android && ./gradlew assembleDebug - -# do your stuff - -./gradlew clean -``` - -## Send release to Android device - -```shell -cd ./android \ - && ./gradlew assembleRelease \ - && adb install ./app/build/outputs/apk/release/app-release.apk -``` - -## Deep links - -- https://zarah.dev/2022/02/08/android12-deeplinks.html -- https://developer.android.com/training/app-links/verify-site-associations#invoke-domain-verification -- https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://miin.ru&relation=delegate_permission/common.handle_all_urls - -### Open deep links - -```shell -# ios -xcrun simctl openurl booted $1 - -# android -adb shell am start -W -a android.intent.action.VIEW -d $1 \ -com.application -``` - -### Reverify links on Android - -```shell -PACKAGE="com.application" - -adb shell pm set-app-links --package $PACKAGE 0 all && \ - adb shell pm verify-app-links --re-verify $PACKAGE -``` - diff --git a/content/Frontend/React/Axios refresh token on React.md b/content/Frontend/React/Axios refresh token on React.md deleted file mode 100644 index 304f9a4..0000000 --- a/content/Frontend/React/Axios refresh token on React.md +++ /dev/null @@ -1,106 +0,0 @@ -`` component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props. - -```typescript -import axios from "axios"; -import React, { - createContext, - FC, - PropsWithChildren, - useCallback, - useContext, - useEffect, - useRef, -} from "react"; - -interface APIProviderProps extends PropsWithChildren { - tokens: { - access: string; - refresh: string; - }; - logout: () => void; -} - -const APIContext = createContext({ - client: axios.create({ - baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT, - }), -}); - -const APIProvider: FC = ({ - tokens, - logout, - children, -}) => { - const client = useRef( - axios.create({ - baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT, - }) - ).current; - - const refreshTokens = useCallback<() => string>(() => { - // TODO: implement me - throw new Error("not implemented"); - }, []); - - useEffect(() => { - if (!tokens.access) { - return; - } - - // append `access` token to all requests - const req = client.interceptors.request.use( - async (config) => { - config.headers = { - Authorization: `Bearer ${tokens.access}`, - }; - return config; - }, - (error) => { - Promise.reject(error); - } - ); - - // refreshing interceptor - const resp = client.interceptors.response.use( - (response) => { - return response; - }, - async function (error) { - const originalRequest = error.config; - - if (error.response.status === 401 && !originalRequest._retry) { - originalRequest._retry = true; - - const newToken = refreshTokens; - - return axios({ - ...originalRequest, - headers: { - ...originalRequest.headers, - Authorization: "Bearer " + newToken, - }, - }); - } - - logout(); - return Promise.reject(error); - } - ); - - return () => { - axios.interceptors.request.eject(req); - axios.interceptors.request.eject(resp); - }; - }, [client, tokens.access, tokens.refresh, refreshTokens, logout]); - - return ( - - {children} - - ); -}; - -export const useAPI = () => useContext(APIContext).client; - -export { APIProvider }; -``` \ No newline at end of file diff --git a/content/Frontend/React/Axios with AbortController.md b/content/Frontend/React/Axios with AbortController.md deleted file mode 100644 index 3b61767..0000000 --- a/content/Frontend/React/Axios with AbortController.md +++ /dev/null @@ -1,32 +0,0 @@ -If you need to cancel some request, use [axios with AbortController](https://axios-http.com/docs/cancellation). Previously axios used cancellation token, but now it's deprecated. - -`AbortController` can be used with a multiple requests to cancel them at once. - -```typescript -import { useCallback, useRef } from "react"; -import axios from 'axios'; - -const client = axios.create(); - -export const useGetUsers = () => { - const controller = useRef(new AbortController()); - - const get = useCallback(async () => { - const result = await client.get("/", { - // params and props here - signal: controller.current.signal, - }); - - return result.data; - }, []); - - const cancel = useCallback(() => { - controller.current.abort(); - - // controller should be rewritten or all requests will fail - controller.current = new AbortController(); - }, [controller]); - - return { get, cancel }; -}; -``` diff --git a/content/Frontend/Vue/Adding global properties to component.md b/content/Frontend/Vue/Adding global properties to component.md deleted file mode 100644 index 7f379b3..0000000 --- a/content/Frontend/Vue/Adding global properties to component.md +++ /dev/null @@ -1,17 +0,0 @@ -The topic's fully covered in the [official documentation](https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties) and in [Add global variable to window](Add%20global%20variable%20to%20window.md). - -For example, you want to add global `$http` and `$translate` services to all of project's components: - -```typescript -// ~/index.d.ts or ~/custom.d.ts - -import axios from 'axios' - -declare module 'vue' { - interface ComponentCustomProperties { - $http: typeof axios - $translate: (key: string) => string - } -} -``` - diff --git a/content/Frontend/Vue/Make Nuxt handle Obsidian highlights.md b/content/Frontend/Vue/Make Nuxt handle Obsidian highlights.md deleted file mode 100644 index e5dc753..0000000 --- a/content/Frontend/Vue/Make Nuxt handle Obsidian highlights.md +++ /dev/null @@ -1,16 +0,0 @@ -By default [Nuxt Content Plugin](https://content.nuxtjs.org) not handling `==highlight==` links. To fix that we will create `Nitro` plugin: - -```typescript -// ~/server/plugins/highlight.ts -export default defineNitroPlugin((nitroApp) => { - nitroApp.hooks.hook("content:file:beforeParse", (file) => { - if (file._id.endsWith(".md")) { - file.body = file.body.replace( - /==([^=]+)==/gs, - `$1` - ); - } - }); -}); -``` - diff --git a/content/Git/Force git to use HTTPS.md b/content/Git/Force git to use HTTPS.md deleted file mode 100644 index 247ee2a..0000000 --- a/content/Git/Force git to use HTTPS.md +++ /dev/null @@ -1,8 +0,0 @@ -Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol. - -Put this inside your `~/.gitconfig`: - -```c -[url "https://github.com"] - insteadOf = git://github.com -``` diff --git a/content/Git/Git aliases and useful commands.md b/content/Git/Git aliases and useful commands.md deleted file mode 100644 index 21bb848..0000000 --- a/content/Git/Git aliases and useful commands.md +++ /dev/null @@ -1,30 +0,0 @@ -Shorthands for #git commands can be specified. Should be placed at `~/.gitconfig`. - -```c -[alias] - flush = git clean-branches branch | grep -v master | xargs git branch -D - lol = log --oneline --graph - l = lol - c = commit -am - cv = commit --no-verify -am - p = push - pf = p --force-with-lease - ignore-now = update-index --skip-worktree -``` - -| **command** | **description** | -|---|---| -| `git flush` | drops all branches, except master | -| `git lol` | shows log | -|`git c` | commits with message | -| `git cv` | commits without hooks | -| `git p` | pushes | -| `git pf` | push with --force and additional check | -| `git ignore-now` | starts ignoring file from now on | - - - - - - - diff --git a/content/GraphQL/Apollo Client pagination.md b/content/GraphQL/Apollo Client pagination.md deleted file mode 100644 index 913e81e..0000000 --- a/content/GraphQL/Apollo Client pagination.md +++ /dev/null @@ -1,79 +0,0 @@ -Say, we have `gql` response like this and we wan't to have pagination with it. Let's merge it as it specified in [official documentation](https://www.apollographql.com/docs/react/caching/cache-field-behavior/#the-merge-function) - -```graphql -query listItems( - filter: Filter, - sort: String, - limit: Number, - offset: Number, -): ItemList! - -input Filter { - name: String! - type: String! -} - -type ItemList { - items: [Item!]! - totalCount: Int! -} -``` - -We will setup `ApolloClient` with `typePolicies` to merge incoming data in cache: - -```typescript -import { ApolloClient, InMemoryCache } from '@apollo/client'; - -const client = new ApolloClient({ - // ... - cache: new InMemoryCache({ typePolicies }), - // ... -}); - -export const typePolicies: TypePolicies = { - Query: { - fields: { - // query name - listItems: { - // apollo will serialize and use keyArgs as unique - // identifier in cache for every query - // consider choosing the right fields, - // i.e. limit and offset won't work here - keyArgs: [ - 'sort', // primitive type - 'filter', ['name', 'type'] // nested fields of `filter` - ], - merge: mergeItemsWithTotalCount, - }, - } -} -``` - -We will need merge function `mergeItemsWithTotalCount`, which will join results of query and cached data for specific key: - -```typescript -/** merges all sources with { items: unknown[], totalCount: number } */ -const mergeItemsWithTotalCount = (existing, incoming, { args }) => { - // no existing data - if (!existing || !args?.offset || args.offset < existing.length) { - return incoming || []; - } - - // If hook was called multiple times - if (existing?.items?.length && args?.offset < existing.items.length) { - return existing || []; - } - - // merge cache and incoming data - const items = [...(existing?.items || []), ...(incoming?.items || [])]; - - // apply latest result for totalCount - const totalCount = incoming?.totalCount || existing?.totalCount; - - return { - ...(incoming || existing || {}), - items, - totalCount, - }; - }; -``` \ No newline at end of file diff --git a/content/GraphQL/Refresh token in Apollo client.md b/content/GraphQL/Refresh token in Apollo client.md deleted file mode 100644 index 4b4c04e..0000000 --- a/content/GraphQL/Refresh token in Apollo client.md +++ /dev/null @@ -1,157 +0,0 @@ -If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client. - -```typescript -export const createApolloClient = ( - url: string, - logout: () => void, - getAuthorizationData: () => { authorization: string }, - refreshToken: () => Promise< - { accessToken: string; refreshToken: string } | undefined - >, -) => - new ApolloClientBase({ - // ...other options - link: ApolloLink.from([ - // ...other options - setContext(async (_, { headers }) => { - return { - headers: { - ...headers, - ...getAuthorizationData(), - }, - }; - }), - new HttpLink({ - uri: url, - fetch: fetchWithTokenRefresh(logout, refreshToken), - }), - ]), - }); -``` - -Custom fetch function for this request. You should tune `hasUnauthorizedError` and -`isRefreshRequestOptions` to match your api. - -```typescript -/** Global singleton for refreshing promise */ -let refreshingPromise: Promise | null = null; - -/** Checks if GraphQl errors has unauthenticated error */ -const hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): boolean => - Array.isArray(errors) && - errors.some(error => { - return error.status === 401; // Distinguish unauthorized error here - }); - -/** Detects if customFetch is sending refresh request */ -const isRefreshRequestOptions = (options: RequestInit) => { - try { - const body = JSON.parse(options?.body as string); - return body.operationName === 'RefreshToken'; - } catch (e) { - return false; - } -}; - -/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */ -export const fetchWithTokenRefresh = - ( - logout: () => void, - refreshToken: () => Promise< - { accessToken: string; refreshToken: string } | undefined - >, - ) => - async (uri: string, options: RequestInit): Promise => { - // already refreshing token, wait for it and then use refreshed token - // or use empty authorization if refreshing failed - if ( - !isRefreshRequestOptions(options) && - refreshingPromise && - (options.headers as Record)?.authorization - ) { - const newAccessToken = await refreshingPromise - .catch(() => { - // refreshing token from other request failed, retry without authorization - return ''; - }); - - options.headers = { - ...(options.headers || {}), - authorization: newAccessToken, - }; - } - - return fetch(uri, options).then(async response => { - const text = await response.text(); - const json = JSON.parse(text); - - // check for unauthorized errors, if not present, just return result - if ( - isRefreshRequestOptions(options) || - !json?.errors || - !Array.isArray(json.errors) || - !hasUnauthorizedError(json.errors) - ) { - return { - ...response, - ok: true, - json: async () => - new Promise(resolve => { - resolve(json); - }), - text: async () => - new Promise(resolve => { - resolve(text); - }), - }; - } - - // If unauthorized, refresh token and try again - if (!refreshingPromise) { - refreshingPromise = refreshToken() - .then(async (tokens): Promise => { - refreshingPromise = null; - - if (!tokens?.accessToken) { - throw new Error('Session expired'); - } - - return tokens?.accessToken; - }) - .catch(() => { - refreshingPromise = null; - - // can't refresh token. logging out - logout(); - throw new Error('Session expired'); - }); - } - - // success or any non-auth error - return refreshingPromise - .then(async (newAccessToken: string) => { - // wait for other request's refreshing query to finish, when retry - - return fetch(uri, { - ...options, - headers: { - ...(options.headers || {}), - authorization: newAccessToken, - }, - }); - }) - .catch(async () => { - // refreshing token from other request failed, retry without authorization - - return fetch(uri, { - ...options, - headers: { - ...(options.headers || {}), - authorization: '', - }, - }); - }); - }); - }; - -``` \ No newline at end of file diff --git a/content/Linux/Gitea for git hosting.md b/content/Linux/Gitea for git hosting.md deleted file mode 100644 index 072a3ca..0000000 --- a/content/Linux/Gitea for git hosting.md +++ /dev/null @@ -1,29 +0,0 @@ -Self-hosted #git repositories with [gitea](https://gitea.io/ru-ru/) and #docker. - -## Setting up with docker-compose - -```yaml -version: "3" - -networks: - gitea: - external: false -services: - server: - image: gitea/gitea:latest - container_name: gitea - environment: - - USER_UID=1000 - - USER_GID=1000 - restart: always - networks: - - gitea - volumes: - - ./var/lib/gitea:/data - - ./etc/gitea:/etc/gitea - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - ports: - - "3000:3000" - - "222:22" -``` \ No newline at end of file diff --git a/content/Linux/Google photos alternative with Photoprism.md b/content/Linux/Google photos alternative with Photoprism.md deleted file mode 100644 index 413b767..0000000 --- a/content/Linux/Google photos alternative with Photoprism.md +++ /dev/null @@ -1,70 +0,0 @@ -[Photo Prism](https://photoprism.app/) is a free alternative to Google photos, can be set up with #docker. - -## Docker compose file to run it - -Check out current [example](https://dl.photoprism.app/docker/docker-compose.yml) at photoprism's [documentation](https://docs.photoprism.app/getting-started/docker-compose/). - -```yaml -version: '3.5' - -services: - photoprism: - container_name: photoprism__app - image: photoprism/photoprism:latest - depends_on: - - mariadb - restart: unless-stopped - security_opt: - - seccomp:unconfined - - apparmor:unconfined - ports: - - 2342:2342 # HTTP port (host:container) - environment: - PHOTOPRISM_ADMIN_PASSWORD: "password" - PHOTOPRISM_SITE_URL: "https://service.url/" - PHOTOPRISM_ORIGINALS_LIMIT: 5000 - PHOTOPRISM_HTTP_COMPRESSION: "gzip" - PHOTOPRISM_DEBUG: "false" - PHOTOPRISM_PUBLIC: "false" - PHOTOPRISM_READONLY: "false" - PHOTOPRISM_EXPERIMENTAL: "false" - PHOTOPRISM_DISABLE_CHOWN: "false" - PHOTOPRISM_DISABLE_WEBDAV: "false" - PHOTOPRISM_DISABLE_SETTINGS: "false" - PHOTOPRISM_DISABLE_TENSORFLOW: "false" - PHOTOPRISM_DISABLE_FACES: "false" - PHOTOPRISM_DISABLE_CLASSIFICATION: "false" - PHOTOPRISM_DARKTABLE_PRESETS: "false" - PHOTOPRISM_DETECT_NSFW: "false" - PHOTOPRISM_UPLOAD_NSFW: "true" - PHOTOPRISM_DATABASE_DRIVER: "mysql" - PHOTOPRISM_DATABASE_SERVER: "mariadb:3306" - PHOTOPRISM_DATABASE_NAME: "photoprism" - PHOTOPRISM_DATABASE_USER: "root" - PHOTOPRISM_DATABASE_PASSWORD: "insecure" - PHOTOPRISM_SITE_TITLE: "PhotoPrism" - PHOTOPRISM_SITE_CAPTION: "Browse Your Life" - PHOTOPRISM_SITE_DESCRIPTION: "" -      PHOTOPRISM_SITE_AUTHOR: "" -      HOME: "/photoprism" -    working_dir: "/photoprism" -    volumes: -      - "./data/originals:/photoprism/originals"     -      - "./data/imports:/photoprism/import" -      - "./data/storage:/photoprism/storage" -  mariadb: -    container_name: photoprism__db -    restart: unless-stopped -    image: mariadb:10.6 -    security_opt: -      - seccomp:unconfined -      - apparmor:unconfined -    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 -    volumes: -      - "./database:/var/lib/mysql" # Important, don't remove -    environment: -      MYSQL_ROOT_PASSWORD: insecure -      MYSQL_DATABASE: photoprism -      MYSQL_USER: photoprism -      MYSQL_PASSWORD: insecure -``` \ No newline at end of file diff --git a/content/Linux/Resume or start screen session.md b/content/Linux/Resume or start screen session.md deleted file mode 100644 index a7eca3e..0000000 --- a/content/Linux/Resume or start screen session.md +++ /dev/null @@ -1,5 +0,0 @@ -Running this script will enter currently running `screen` session or will start new one. - -```shell -( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) ) -``` diff --git a/content/Linux/Rsync file with SSH.md b/content/Linux/Rsync file with SSH.md deleted file mode 100644 index cd8026e..0000000 --- a/content/Linux/Rsync file with SSH.md +++ /dev/null @@ -1,16 +0,0 @@ -Downloads file from #SSH with rsync and puts it in current folder. - -```bash -#!/bin/bash - -PORT=22 -USER=user -HOST=example.com -REMOTE_PATH=/tmp -REMOTE_FILE=sample.text -DEST_PATH=./ - -rsync -a -e "ssh -p $PORT" -P -v \ - "$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE" \ - "$DEST_PATH" -``` diff --git a/content/Linux/SSH.md b/content/Linux/SSH.md deleted file mode 100644 index 601cef5..0000000 --- a/content/Linux/SSH.md +++ /dev/null @@ -1,13 +0,0 @@ -## Config aliases for #SSH hosts - -#SSH config can be used to made aliases for different hosts. Should be put at `~/.ssh/config`. To simply call `ssh router` without parameters, use this: - -``` -Host router - HostName 192.168.0.1 - IdentityFile ~/.ssh/id_rsa - User root - Port 22522 -``` - - diff --git a/content/Linux/Setting up NGINX.md b/content/Linux/Setting up NGINX.md deleted file mode 100644 index 4e31e2b..0000000 --- a/content/Linux/Setting up NGINX.md +++ /dev/null @@ -1,57 +0,0 @@ -## Fallback url for SPA-s - -```nginx -server { - # ... - location / { - # First attempt to serve request as file, then - # as directory, then fall back to displaying a 404. - try_files $uri $uri/ =404; - } - # ... -} -``` - -## Set up for uploads - -```nginx -server { - # ... - client_max_body_size 200M; - # ... -} -``` - -## Reverse proxy for https - -Given config forwards `https` traffic to `http` on port `8080` for https://next.vault48.org - with http2 support if possible. - -```nginx -server { - listen 80; - server_name next.vault48.org; - return 301 https://next.vault48.org$request_uri; -} - -server { - listen 443 ssl http2; - listen [::]:443 ssl http2; - - # managed by Certbot - ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem; - ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem; - - server_name next.vault48.org; - - location / { - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - proxy_pass http://127.0.0.1:8080; - } -} -``` diff --git a/content/SQL/MySQL and MariaDB setup.md b/content/SQL/MySQL and MariaDB setup.md deleted file mode 100644 index a86ce9a..0000000 --- a/content/SQL/MySQL and MariaDB setup.md +++ /dev/null @@ -1,37 +0,0 @@ -## Install MariaDB on Ubuntu 20.04 LTS - -```bash -sudo apt update -sudo apt install mariadb-server -sudo mysql_secure_installation -``` - -## Access Database from outside - -Open `/etc/mysql/mariadb.conf.d/50-server.cnf` and change the `bind-address` to: - -```nginx -... -bind-address = 0.0.0.0 -... -``` - -## Create Administrative User - -1. Create a new user `newuser` for the host `localhost` with a new `password`: - -```mysql -CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; -``` - -2. Grant all permissions to the new user - -```mysql -GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; -``` - -3. Update permissions - -```mysql -FLUSH PRIVILEGES; -``` \ No newline at end of file diff --git a/content/SQL/Postgress setup.md b/content/SQL/Postgress setup.md deleted file mode 100644 index 7d9771f..0000000 --- a/content/SQL/Postgress setup.md +++ /dev/null @@ -1,105 +0,0 @@ -## Install PostgreSQL 12 on Ubuntu 20.04 LTS - -```bash -sudo apt update -sudo apt install -y postgresql postgresql-contrib postgresql-client -sudo systemctl status postgresql.service -``` - -## Initial database connection - -A local connection (from the database server) can be done by the following command: - -```bash -sudo -u postgres psql - -psql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1)) -Type "help" for help. - -postgres=# -``` - -## Set password for postgres database user - -The password for the `postgres` database user can be set the the quick command `\password` -or by `alter user postgres password 'Supersecret'`. A connection using the `postgres` user -is still not possible from the "outside" hence to the default settings in the `pg_hba.conf`. - -### Update pg_hba.conf to allow postgres user connections with password - -In order to allow connections of the `postgres` database user not using OS user -authentication, you have to update the `pg_hba.conf` which can be found under -`/etc/postgresql/12/main/pg_hba.conf`. - -```shell -sudo vi /etc/postgresql/12/main/pg_hba.conf - -... -local all postgres peer -... -``` - -Change the last section of the above line to `md5`. - -``` -local all postgres md5 -``` - -A restart is required in order to apply the new configuration: - -```bash -sudo systemctl restart postgresql -``` - -Now a connection from outside the database host is possible e.g. - -```bash -psql -U postgres -d postgres -h databasehostname -``` - -## Creation of additional database users - -A database user can be created by the following command: - -```sql -create user myuser with encrypted password 'Supersecret'; -CREATE ROLE - -postgres=# \du - List of roles - Role name | Attributes | Member of ------------+------------------------------------------------------------+----------- - myuser | | {} - postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {} -``` - -## Creation of additional databases - -One can create new Postgres databases within an instance. Therefore you can use the `psql` -command to login (see above). - -```sql -CREATE DATABASE dbname OWNER myuser; -CREATE DATABASE - -postgres=# \l - List of databases - Name | Owner | Encoding | Collate | Ctype | Access privileges ------------+----------+----------+-------------+-------------+----------------------- - dbname | myuser | UTF8 | en_US.UTF-8 | en_US.UTF-8 | - postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | - template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + - | | | | | postgres=CTc/postgres - template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + - | | | | | postgres=CTc/postgres -``` - -You can leave the `OWNER` section of the command, when doing so, the current user will become -owner of the newly created database. - -To change the owner of an existing database later, you can use the following command: - -```sql -postgres=# alter database dbname owner to myuser; -ALTER DATABASE -``` \ No newline at end of file diff --git a/content/Typescript/Add global variable to window.md b/content/Typescript/Add global variable to window.md deleted file mode 100644 index 0f7407c..0000000 --- a/content/Typescript/Add global variable to window.md +++ /dev/null @@ -1,50 +0,0 @@ -Sometimes you want to add global variable to your `window`. That thing's called [global module augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#global-augmentation). - -Say you need to call `window.doFancyThings()`. For that you should augment global `window` interface in `*.d.ts` file: - -```typescript -declare global { - interface Window { - doFancyThings: () => void; - } -} -``` - -This is useful for declaring global `window.ethereum` (or `window.web3`) in [blockchain](/blockchain/Common%20typescript%20examples) projects with typescript, which use wallet browser extensions. - -## Augmenting existing interface - -For example, you have class `Sample` without any functionality: - -```typescript -// Sample.ts - -export class Sample { - // nothing :-) -} -``` - -Then you want extend it with `doFancyThings()` method. That can be achieved with said [module augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation): - -```typescript -// fancyThings.ts -import { Sample } from "./Sample"; - -declare module "./Sample" { - interface Sample { - doFancyThings: () => void; - } -} -``` - -Now you can call `sample.doFancyThings()` by importing both `.ts` files: - -```typescript -import { Sample } from "./sample"; -import "./fancyThings"; - -const sample = new Sample(); -sample.doFancyThings(); // ok -``` - -This example is useful for [adding global properties to component](../Frontend/Vue/Adding%20global%20properties%20to%20component.md) in vue.js. diff --git a/content/Typescript/Flatten object with periods.md b/content/Typescript/Flatten object with periods.md deleted file mode 100644 index bf57b24..0000000 --- a/content/Typescript/Flatten object with periods.md +++ /dev/null @@ -1,38 +0,0 @@ -This helper generates Typescript types for i18n dictionary json -files by flattening it with period delimiter. Supports plural forms. - -Used for typing [i18n.js](https://www.npmjs.com/package/i18n-js) dictionaries; - -```typescript -import en from './en.json'; -type TranslationPath = Flatten; - -const t = (key: TranslationPath, options?: TranslateOptions) => - I18nLib.t(key, options); -``` - -Flatten type defined here: - -```typescript -// This one based on answer from StackOverflow: -// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-object - -export type Flatten = [D] extends [never] - ? never - : T extends PluralForm // plural object - ? '' - : T extends object - ? { [K in keyof T]-?: Join> }[keyof T] - : ''; - -// Fix it for you plural form -type PluralForm = Record<'one' | 'few' | 'many', string>; - -type Join = K extends string | number - ? P extends string | number - ? `${K}${'' extends P ? '' : '.'}${P}` - : never - : never; - -type Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>]; -``` \ No newline at end of file diff --git a/content/Typescript/Type guards.md b/content/Typescript/Type guards.md deleted file mode 100644 index cefd51e..0000000 --- a/content/Typescript/Type guards.md +++ /dev/null @@ -1,20 +0,0 @@ -Useful for type checking at compile and run time: - -```typescript -function isFish(pet: Fish | Bird): pet is Fish { - return (pet as Fish).swim !== undefined; -} -``` - -Usage: - -```typescript -const pet = getSmallPet(); - -if (isFish(pet)) { - pet.swim(); -} else { - pet.fly(); -} -``` - diff --git a/css/automatic-grid-like-masonry-with-pure-css/_payload.js b/css/automatic-grid-like-masonry-with-pure-css/_payload.js new file mode 100644 index 0000000..ab55fb8 --- /dev/null +++ b/css/automatic-grid-like-masonry-with-pure-css/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:Q,_path:R},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-yoYMujrz1O":{_path:R,_dir:"css",_draft:y,_partial:y,_locale:"en",_empty:y,title:Q,description:z,excerpt:{type:S,children:[{type:a,tag:T,props:{},children:[{type:c,value:z}]},{type:a,tag:g,props:{code:A,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:c,value:A}]}]}]},{type:a,tag:q,props:{id:B},children:[{type:c,value:C}]},{type:a,tag:g,props:{code:D,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:c,value:D}]}]}]},{type:a,tag:q,props:{id:E},children:[{type:c,value:F}]},{type:a,tag:g,props:{code:G,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:c,value:G}]}]}]},{type:a,tag:q,props:{id:H},children:[{type:c,value:I}]},{type:a,tag:g,props:{code:J,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:c,value:J}]}]}]}]},body:{type:S,children:[{type:a,tag:T,props:{},children:[{type:c,value:z}]},{type:a,tag:g,props:{code:A,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:U},children:[{type:c,value:"$cell: "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"250"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:U},children:[{type:c,value:"$gap: "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"20"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:".grid"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"display"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:"grid"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"grid-template-columns"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:V},children:[{type:c,value:"repeat"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:"auto-fit"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:V},children:[{type:c,value:"minmax"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:"$cell"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:"ct-5efdf0"},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:"ct-7d7f24"},children:[{type:c,value:"fr"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"));"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:"grid-auto-rows"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"256"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"grid-auto-flow"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:"row"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:"dense"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"grid-column-gap"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"grid-row-gap"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]}]}]}]},{type:a,tag:q,props:{id:B},children:[{type:c,value:C}]},{type:a,tag:g,props:{code:D,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:".h-2"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"\u002F\u002F takes 2 columns"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:"grid-column-end"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:b}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:".v-2"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"\u002F\u002F takes 2 rows"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:"grid-row-end"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:b}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]}]}]}]},{type:a,tag:q,props:{id:E},children:[{type:c,value:F}]},{type:a,tag:g,props:{code:G,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:".full-width"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"\u002F\u002F height: 1 row"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]}]}]}]},{type:a,tag:q,props:{id:H},children:[{type:c,value:I}]},{type:a,tag:g,props:{code:J,language:n},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:".top-right"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"3"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"\u002F\u002F height here"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"-2"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"\u002F\u002F width here"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-be4ab6{color:#8B949E}.ct-e2d197{color:#79C0FF}.ct-7d7f24{color:#FF7B72}.ct-5efdf0{color:#79C0FF}.ct-5ceb9b{color:#FFA657}.ct-6497b4{color:#79C0FF}.ct-ffa706{color:#79C0FF}.ct-bb41bd{color:#79C0FF}.ct-6d1ecb{color:#C9D1D9}.ct-14ca3a{color:#79C0FF}.ct-fca03a{color:#C9D1D9}.ct-fe2762{color:#FF7B72}.ct-45c47a{color:#79C0FF}.ct-eb1f40{color:#FFA657}.light .ct-eb1f40{color:#657B83}.light .ct-45c47a{color:#D33682}.light .ct-fe2762{color:#859900}.light .ct-fca03a{color:#657B83}.light .ct-14ca3a{color:#93A1A1}.light .ct-6d1ecb{color:#657B83}.light .ct-bb41bd{color:#859900}.light .ct-ffa706{color:#657B83}.light .ct-6497b4{color:#268BD2}.light .ct-5ceb9b{color:#657B83}.light .ct-5efdf0{color:#D33682}.light .ct-7d7f24{color:#859900}.light .ct-e2d197{color:#859900}.light .ct-be4ab6{color:#93A1A1}"}]}],toc:{title:l,searchDepth:ae,depth:ae,links:[{id:B,depth:P,text:C},{id:E,depth:P,text:F},{id:H,depth:P,text:I}]}},_type:"markdown",_id:"content:CSS:Automatic Grid like Masonry with pure CSS.md",_source:"content",_file:"CSS\u002FAutomatic Grid like Masonry with pure CSS.md",_extension:"md"}},prerenderedAt:1667450790803}}("element","span","text","ct-fca03a","line","ct-6d1ecb","code","ct-45c47a",": ",";"," ","","ct-e2d197","scss","pre"," ","h3","ct-fe2762","ct-14ca3a","ct-bb41bd","}","ct-be4ab6","ct-5ceb9b","1",false,"Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows\u002Fcolumns.","$cell: 250px;\n$gap: 20px;\n\n.grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));\n grid-auto-rows: 256px;\n grid-auto-flow: row dense;\n grid-column-gap: $gap;\n grid-row-gap: $gap;\n}\n","basic-elements-with-double-height-or-width","Basic elements with double height or width",".h-2 { \u002F\u002F takes 2 columns\n grid-column-end: span 2;\n}\n\n.v-2 { \u002F\u002F takes 2 rows\n grid-row-end: span 2;\n}\n","header-that-fills-all-columns","Header, that fills all columns",".full-width {\n grid-row: 1 \u002F 2; \u002F\u002F height: 1 row\n grid-column: 1 \u002F -1;\n}\n","stamp-element-that-takes-3-rows-in-the-top-right-corner","Stamp element, that takes 3 rows in the top right corner",".top-right {\n grid-row: 1 \u002F 3; \u002F\u002F height here\n grid-column: -2 \u002F -1; \u002F\u002F width here\n}\n","px"," {","ct-ffa706","2","; ",3,"Automatic Grid Like Masonry With Pure CSS","\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css","root","p","ct-eb1f40","ct-6497b4","(",", ","$gap"," { "," ","grid-row","\u002F","grid-column"," \u002F ","-1",2)) \ No newline at end of file diff --git a/css/automatic-grid-like-masonry-with-pure-css/index.html b/css/automatic-grid-like-masonry-with-pure-css/index.html new file mode 100644 index 0000000..612af1c --- /dev/null +++ b/css/automatic-grid-like-masonry-with-pure-css/index.html @@ -0,0 +1,6 @@ + + +Automatic Grid Like Masonry With Pure CSS • Obsidian Garden +

Automatic Grid Like Masonry With Pure CSS

Grid, that places items by density. Pure #css solution. Can be used with items, that take different amount of rows/columns.

$cell: 250px;$gap: 20px;.grid {  display: grid;  grid-template-columns: repeat(auto-fit, minmax($cell, 1fr));  grid-auto-rows: 256px;  grid-auto-flow: row dense;  grid-column-gap: $gap;  grid-row-gap: $gap;}

Basic elements with double height or width

.h-2 { // takes 2 columns    grid-column-end: span 2;}.v-2 { // takes 2 rows    grid-row-end: span 2;}

Header, that fills all columns

.full-width {  grid-row: 1 / 2; // height: 1 row  grid-column: 1 / -1;}

Stamp element, that takes 3 rows in the top right corner

.top-right {  grid-row: 1 / 3; // height here  grid-column: -2 / -1; // width here}
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/css/sass-nth-child-iterate-mixin/_payload.js b/css/sass-nth-child-iterate-mixin/_payload.js new file mode 100644 index 0000000..f3cf052 --- /dev/null +++ b/css/sass-nth-child-iterate-mixin/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:t,_path:u},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-ex7u9maCrE":{_path:u,_dir:"css",_draft:p,_partial:p,_locale:"en",_empty:p,title:t,description:"Say, we need to color n items by specific colors, which depend on its position. #SCSS supports iteration over lists for that purposes:",excerpt:{type:v,children:[{type:a,tag:l,props:{},children:[{type:b,value:w},{type:a,tag:x,props:{},children:[{type:b,value:y}]},{type:b,value:z},{type:a,tag:A,props:{href:B,rel:[C]},children:[{type:b,value:D}]},{type:b,value:E}]},{type:a,tag:g,props:{code:q,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:g,props:{__ignoreMap:i},children:[{type:b,value:q}]}]}]},{type:a,tag:l,props:{},children:[{type:b,value:F}]},{type:a,tag:g,props:{code:r,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:g,props:{__ignoreMap:i},children:[{type:b,value:r}]}]}]}]},body:{type:v,children:[{type:a,tag:l,props:{},children:[{type:b,value:w},{type:a,tag:x,props:{},children:[{type:b,value:y}]},{type:b,value:z},{type:a,tag:A,props:{href:B,rel:[C]},children:[{type:b,value:D}]},{type:b,value:E}]},{type:a,tag:g,props:{code:q,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:g,props:{__ignoreMap:i},children:[{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:s},children:[{type:b,value:"@mixin"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:"ct-14e41c"},children:[{type:b,value:"color-per-child"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:G}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:I}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:s},children:[{type:b,value:"@each"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:K}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:s},children:[{type:b,value:"in"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:L}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" "}]},{type:a,tag:c,props:{class:"ct-776cce"},children:[{type:b,value:"&"}]},{type:a,tag:c,props:{class:"ct-59c2b0"},children:[{type:b,value:":nth-child"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:G}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"#{"}]},{type:a,tag:c,props:{class:"ct-2fe314"},children:[{type:b,value:"index"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"(($colors), ($color))}"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:I}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" "}]},{type:a,tag:c,props:{class:"ct-845dc7"},children:[{type:b,value:"color"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:": "}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:K}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:";"}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:" }"}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:" }"}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:M}]}]}]}]}]},{type:a,tag:l,props:{},children:[{type:b,value:F}]},{type:a,tag:g,props:{code:r,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:g,props:{__ignoreMap:i},children:[{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:"ct-803228"},children:[{type:b,value:".item"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:L}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:"ct-360621"},children:[{type:b,value:"@include"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:"ct-f63cee"},children:[{type:b,value:"color_per_child"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:"(("}]},{type:a,tag:c,props:{class:k},children:[{type:b,value:"#ded187"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:k},children:[{type:b,value:"#dbde87"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:k},children:[{type:b,value:"#bade87"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:k},children:[{type:b,value:"#9cde87"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:k},children:[{type:b,value:"#87deaa"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:"));"}]}]},{type:a,tag:c,props:{class:f},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:M}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-26bba9{color:#79C0FF}.ct-f63cee{color:#D2A8FF}.ct-360621{color:#FF7B72}.ct-803228{color:#79C0FF}.ct-431b9d{color:#C9D1D9}.ct-845dc7{color:#79C0FF}.ct-2fe314{color:#79C0FF}.ct-59c2b0{color:#79C0FF}.ct-776cce{color:#7EE787}.ct-20fa53{color:#FFA657}.ct-14e41c{color:#D2A8FF}.ct-eed04f{color:#C9D1D9}.ct-908659{color:#FF7B72}.light .ct-908659{color:#859900}.light .ct-eed04f{color:#657B83}.light .ct-14e41c{color:#268BD2}.light .ct-20fa53{color:#657B83}.light .ct-776cce{color:#268BD2}.light .ct-59c2b0{color:#93A1A1}.light .ct-2fe314{color:#268BD2}.light .ct-845dc7{color:#859900}.light .ct-431b9d{color:#657B83}.light .ct-803228{color:#93A1A1}.light .ct-360621{color:#859900}.light .ct-f63cee{color:#268BD2}.light .ct-26bba9{color:#CB4B16}"}]}],toc:{title:i,searchDepth:N,depth:N,links:[]}},_type:"markdown",_id:"content:CSS:Sass nth-child iterate mixin.md",_source:"content",_file:"CSS\u002FSass nth-child iterate mixin.md",_extension:"md"}},prerenderedAt:1667450790855}}("element","text","span","ct-eed04f","ct-431b9d","line","code","ct-20fa53",""," ","ct-26bba9","p","scss","pre",", ",false,"@mixin color-per-child($colors) {\n @each $color in $colors {\n &:nth-child(#{index(($colors), ($color))}) {\n color: $color;\n }\n }\n}\n",".item {\n @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));\n}\n","ct-908659","Sass Nth Child Iterate Mixin","\u002Fcss\u002Fsass-nth-child-iterate-mixin","root","Say, we need to color ","code-inline","n"," items by specific colors, which depend on its position. #SCSS supports ","a","https:\u002F\u002Fsass-lang.com\u002Fdocumentation\u002Fat-rules\u002Fcontrol\u002Feach","nofollow","iteration over lists"," for that purposes:","Usage is simple:","(","$colors",") {"," ","$color"," {","}",2)) \ No newline at end of file diff --git a/css/sass-nth-child-iterate-mixin/index.html b/css/sass-nth-child-iterate-mixin/index.html new file mode 100644 index 0000000..dd12f0e --- /dev/null +++ b/css/sass-nth-child-iterate-mixin/index.html @@ -0,0 +1,6 @@ + + +Sass Nth Child Iterate Mixin • Obsidian Garden +

Sass Nth Child Iterate Mixin

Say, we need to color n items by specific colors, which depend on its position. #SCSS supports iteration over lists for that purposes:

@mixin color-per-child($colors) {  @each $color in $colors {    &:nth-child(#{index(($colors), ($color))}) {      color: $color;    }  }}

Usage is simple:

.item {  @include color_per_child((#ded187, #dbde87, #bade87, #9cde87, #87deaa));}
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/css/test-if-browser-supports-css-rules/_payload.js b/css/test-if-browser-supports-css-rules/_payload.js new file mode 100644 index 0000000..fe6177c --- /dev/null +++ b/css/test-if-browser-supports-css-rules/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:x,_path:y}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-OwjCJk80Rt":{_path:y,_dir:l,_draft:m,_partial:m,_locale:"en",_empty:m,title:x,description:n,excerpt:{type:z,children:[{type:a,tag:j,props:{},children:[{type:b,value:n}]},{type:a,tag:f,props:{code:o,language:l},children:[{type:a,tag:k,props:{},children:[{type:a,tag:f,props:{__ignoreMap:h},children:[{type:b,value:o}]}]}]},{type:a,tag:j,props:{},children:[{type:b,value:A},{type:a,tag:B,props:{},children:[{type:b,value:p}]},{type:b,value:C}]},{type:a,tag:f,props:{code:q,language:D},children:[{type:a,tag:k,props:{},children:[{type:a,tag:f,props:{__ignoreMap:h},children:[{type:b,value:q}]}]}]}]},body:{type:z,children:[{type:a,tag:j,props:{},children:[{type:b,value:n}]},{type:a,tag:f,props:{code:o,language:l},children:[{type:a,tag:k,props:{},children:[{type:a,tag:f,props:{__ignoreMap:h},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:G},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:H},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:u}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:v}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:")) {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:"ct-59177d"},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:": blur(5px);"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:K}]}]}]}]}]},{type:a,tag:j,props:{},children:[{type:b,value:A},{type:a,tag:B,props:{},children:[{type:b,value:p}]},{type:b,value:C}]},{type:a,tag:f,props:{code:q,language:D},children:[{type:a,tag:k,props:{},children:[{type:a,tag:f,props:{__ignoreMap:h},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:"ct-93e3d0"},children:[{type:b,value:"can_backdrop"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:i},children:[{type:b,value:M}]},{type:a,tag:c,props:{class:"ct-62510a"},children:[{type:b,value:"-webkit-backdrop-filter"}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:"ct-b8b910"},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:u}]},{type:a,tag:c,props:{class:"ct-daadee"},children:[{type:b,value:v}]},{type:a,tag:c,props:{class:"ct-0b9e02"},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:")) "}]},{type:a,tag:c,props:{class:"ct-8b6902"},children:[{type:b,value:"or"}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:L}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:M}]},{type:a,tag:c,props:{class:G},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:H},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:u}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:v}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"))"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" ) {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"@content"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:";"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" }"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:K}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-8b6902{color:#79C0FF}.ct-0b9e02{color:#FF7B72}.ct-daadee{color:#79C0FF}.ct-b8b910{color:#79C0FF}.ct-62510a{color:#79C0FF}.ct-ef0360{color:#C9D1D9}.ct-93e3d0{color:#D2A8FF}.ct-59177d{color:#7EE787}.ct-96a3e4{color:#79C0FF}.ct-4ffdf0{color:#79C0FF}.ct-eb47e8{color:#79C0FF}.ct-d28d13{color:#C9D1D9}.ct-10cca1{color:#FF7B72}.light .ct-10cca1{color:#859900}.light .ct-d28d13{color:#657B83}.light .ct-eb47e8{color:#859900}.light .ct-4ffdf0{color:#268BD2}.light .ct-96a3e4{color:#D33682}.light .ct-59177d{color:#268BD2}.light .ct-93e3d0{color:#268BD2}.light .ct-ef0360{color:#657B83}.light .ct-62510a{color:#859900}.light .ct-b8b910{color:#268BD2}.light .ct-daadee{color:#D33682}.light .ct-0b9e02{color:#859900}.light .ct-8b6902{color:#657B83}"}]}],toc:{title:h,searchDepth:N,depth:N,links:[]}},_type:"markdown",_id:"content:CSS:Test if browser supports CSS rules.md",_source:"content",_file:"CSS\u002FTest if browser supports CSS rules.md",_extension:"md"}},prerenderedAt:1667450790892}}("element","text","span","ct-d28d13","line","code","ct-10cca1","","ct-ef0360","p","pre","css",false,"To test if browser supports some #CSS rules, do following:","@supports (backdrop-filter: blur(5px)) {\n backdrop-filter: blur(5px);\n}\n","@mixin","@mixin can_backdrop {\n @supports (\n (-webkit-backdrop-filter: blur(5px)) or \n (backdrop-filter: blur(5px))\n ) {\n @content;\n }\n}\n","backdrop-filter",": ","blur","(","5","px","Test If Browser Supports CSS Rules","\u002Fcss\u002Ftest-if-browser-supports-css-rules","root","This ","code-inline"," will only apply rule if browser support backdrop filtering:","scss","@supports"," (","ct-eb47e8","ct-4ffdf0","ct-96a3e4"," ","}"," "," (",2)) \ No newline at end of file diff --git a/css/test-if-browser-supports-css-rules/index.html b/css/test-if-browser-supports-css-rules/index.html new file mode 100644 index 0000000..df2cbc0 --- /dev/null +++ b/css/test-if-browser-supports-css-rules/index.html @@ -0,0 +1,6 @@ + + +Test If Browser Supports CSS Rules • Obsidian Garden +

Test If Browser Supports CSS Rules

To test if browser supports some #CSS rules, do following:

@supports (backdrop-filter: blur(5px)) {    backdrop-filter: blur(5px);}

This @mixin will only apply rule if browser support backdrop filtering:

@mixin can_backdrop {  @supports (    (-webkit-backdrop-filter: blur(5px)) or     (backdrop-filter: blur(5px))  ) {    @content;  }}
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/custom.d.ts b/custom.d.ts deleted file mode 100644 index 5e52f80..0000000 --- a/custom.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module "*.svg" { - const content: string; - export default content; -} diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 3b16256..0000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM node:16-alpine as builder -WORKDIR /app -COPY package.json yarn.lock ./ -RUN yarn -COPY . . - -RUN yarn generate - -FROM nginx -COPY docker/nginx.conf /etc/nginx/nginx.conf -COPY --from=builder /app/dist /usr/share/nginx/html diff --git a/docker/building-static-pages-with-docker/_payload.js b/docker/building-static-pages-with-docker/_payload.js new file mode 100644 index 0000000..ca82699 --- /dev/null +++ b/docker/building-static-pages-with-docker/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:h,_path:i},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-QKxL2z8jga":{_path:i,_dir:"docker",_draft:d,_partial:d,_locale:"en",_empty:d,title:h,description:e,excerpt:{type:j,children:[{type:a,tag:k,props:{},children:[{type:b,value:e}]},{type:a,tag:c,props:{code:f,language:l},children:[{type:a,tag:m,props:{},children:[{type:a,tag:c,props:{__ignoreMap:g},children:[{type:b,value:f}]}]}]}]},body:{type:j,children:[{type:a,tag:k,props:{},children:[{type:b,value:e}]},{type:a,tag:c,props:{code:f,language:l},children:[{type:a,tag:m,props:{},children:[{type:a,tag:c,props:{__ignoreMap:g},children:[{type:a,tag:n,props:{class:"line"},children:[{type:a,tag:n,props:{},children:[{type:b,value:"FROM node:16-alpine as builder\nWORKDIR \u002Fapp\nCOPY package.json yarn.lock .\u002F\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder \u002Fapp\u002Fdist \u002Fusr\u002Fshare\u002Fnginx\u002Fhtml"}]}]}]}]}]}],toc:{title:g,searchDepth:o,depth:o,links:[]}},_type:"markdown",_id:"content:Docker:Building static pages with Docker.md",_source:"content",_file:"Docker\u002FBuilding static pages with Docker.md",_extension:"md"}},prerenderedAt:1667450790935}}("element","text","code",false,"Sample #Dockerfile for static Typescript builds such a #nextjs, #gatsby or #nuxt:","FROM node:16-alpine as builder\nWORKDIR \u002Fapp\nCOPY package.json yarn.lock .\u002F\nRUN yarn\nCOPY . .\n\n# your generate command here\nRUN yarn generate\n\nFROM nginx\nCOPY --from=builder \u002Fapp\u002Fdist \u002Fusr\u002Fshare\u002Fnginx\u002Fhtml\n","","Building Static Pages With Docker","\u002Fdocker\u002Fbuilding-static-pages-with-docker","root","p","Dockerfile","pre","span",2)) \ No newline at end of file diff --git a/docker/building-static-pages-with-docker/index.html b/docker/building-static-pages-with-docker/index.html new file mode 100644 index 0000000..94e2314 --- /dev/null +++ b/docker/building-static-pages-with-docker/index.html @@ -0,0 +1,16 @@ + + +Building Static Pages With Docker • Obsidian Garden + + \ No newline at end of file diff --git a/docker/drone-ci/_payload.js b/docker/drone-ci/_payload.js new file mode 100644 index 0000000..ecd79b4 --- /dev/null +++ b/docker/drone-ci/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:_,_path:$},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-uFdiCIitkN":{_path:$,_dir:aa,_draft:F,_partial:F,_locale:"en",_empty:F,title:_,description:"Can be used with Private docker registry to deploy things using #docker.",excerpt:{type:ab,children:[{type:a,tag:n,props:{},children:[{type:b,value:ac},{type:a,tag:q,props:{href:w},children:[{type:b,value:ad}]},{type:b,value:ae}]},{type:a,tag:o,props:{id:G},children:[{type:b,value:H}]},{type:a,tag:n,props:{},children:[{type:b,value:af},{type:a,tag:h,props:{},children:[{type:b,value:I}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:J}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:K}]},{type:b,value:ag},{type:a,tag:ah,props:{},children:[{type:b,value:v}]},{type:b,value:ai},{type:a,tag:h,props:{},children:[{type:b,value:L}]},{type:b,value:aj},{type:a,tag:h,props:{},children:[{type:b,value:ak}]},{type:b,value:x}]},{type:a,tag:n,props:{},children:[{type:b,value:al},{type:a,tag:h,props:{},children:[{type:b,value:am}]},{type:b,value:an},{type:a,tag:q,props:{href:w},children:[{type:b,value:ao}]},{type:b,value:i}]},{type:a,tag:k,props:{code:M,language:y},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:b,value:M}]}]}]},{type:a,tag:o,props:{id:N},children:[{type:b,value:O}]},{type:a,tag:n,props:{},children:[{type:b,value:ap},{type:a,tag:h,props:{},children:[{type:b,value:v}]},{type:b,value:aq},{type:a,tag:h,props:{},children:[{type:b,value:P}]},{type:b,value:ar}]},{type:a,tag:n,props:{},children:[{type:b,value:as},{type:a,tag:h,props:{},children:[{type:b,value:at}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:au}]},{type:b,value:av},{type:a,tag:h,props:{},children:[{type:b,value:aw}]},{type:b,value:ax}]},{type:a,tag:k,props:{code:Q,language:y},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:b,value:Q}]}]}]},{type:a,tag:o,props:{id:R},children:[{type:b,value:S}]},{type:a,tag:n,props:{},children:[{type:b,value:ay},{type:a,tag:q,props:{href:az,rel:[z]},children:[{type:b,value:aA}]},{type:b,value:aB},{type:a,tag:q,props:{href:aC,rel:[z]},children:[{type:b,value:aD}]},{type:b,value:aE}]},{type:a,tag:o,props:{id:T},children:[{type:b,value:U}]},{type:a,tag:k,props:{code:V,language:A},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:b,value:V}]}]}]},{type:a,tag:o,props:{id:W},children:[{type:b,value:X}]},{type:a,tag:n,props:{},children:[{type:b,value:aF},{type:a,tag:h,props:{},children:[{type:b,value:B}]},{type:b,value:x}]},{type:a,tag:k,props:{code:Y,language:A},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:b,value:Y}]}]}]}]},body:{type:ab,children:[{type:a,tag:n,props:{},children:[{type:b,value:ac},{type:a,tag:q,props:{href:w},children:[{type:b,value:ad}]},{type:b,value:ae}]},{type:a,tag:o,props:{id:G},children:[{type:b,value:H}]},{type:a,tag:n,props:{},children:[{type:b,value:af},{type:a,tag:h,props:{},children:[{type:b,value:I}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:J}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:K}]},{type:b,value:ag},{type:a,tag:ah,props:{},children:[{type:b,value:v}]},{type:b,value:ai},{type:a,tag:h,props:{},children:[{type:b,value:L}]},{type:b,value:aj},{type:a,tag:h,props:{},children:[{type:b,value:ak}]},{type:b,value:x}]},{type:a,tag:n,props:{},children:[{type:b,value:al},{type:a,tag:h,props:{},children:[{type:b,value:am}]},{type:b,value:an},{type:a,tag:q,props:{href:w},children:[{type:b,value:ao}]},{type:b,value:i}]},{type:a,tag:k,props:{code:M,language:y},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"kind"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"pipeline"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:aG}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"build"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"type"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aa}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"platform"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:C}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"os"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"linux"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:C}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"arch"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"amd64"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"steps"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" - "}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aG}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"build-master"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:Z}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"plugins\u002Fdocker"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"when"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"branch"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aH}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"master"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"settings"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"dockerfile"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"Dockerfile"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"tag"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aH}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"${DRONE_BRANCH}"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"username"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:I}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"password"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:J}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"registry"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:K}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:s}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"repo"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:L}]}]}]}]}]},{type:a,tag:o,props:{id:N},children:[{type:b,value:O}]},{type:a,tag:n,props:{},children:[{type:b,value:ap},{type:a,tag:h,props:{},children:[{type:b,value:v}]},{type:b,value:aq},{type:a,tag:h,props:{},children:[{type:b,value:P}]},{type:b,value:ar}]},{type:a,tag:n,props:{},children:[{type:b,value:as},{type:a,tag:h,props:{},children:[{type:b,value:at}]},{type:b,value:u},{type:a,tag:h,props:{},children:[{type:b,value:au}]},{type:b,value:av},{type:a,tag:h,props:{},children:[{type:b,value:aw}]},{type:b,value:ax}]},{type:a,tag:k,props:{code:Q,language:y},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"version"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"3\""}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"services"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:C}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:v}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aI}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:v}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:Z}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"drone\u002Fdrone:latest"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aJ}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_GITHUB_CLIENT_ID=secret_id"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_GITHUB_CLIENT_SECRET=client_secret"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aK}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_SERVER_HOST=drone.url"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_USER_CREATE=\"username:user,admin:true\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_SERVER_PROTO=https"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_TLS_AUTOCERT=false"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_GIT_ALWAYS_AUTH=false"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_LOGS_DEBUG=true"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_LOGS_TRACE=true"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aL}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aM}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aN}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:".\u002Fdata:\u002Fdata"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"ports"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"8090:80"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:C}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:P}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aI}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"drone__agent"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:Z}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"drone\u002Fagent:latest"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"command"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"agent"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aL}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aM}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aN}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:aJ}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"DRONE_RPC_SERVER=https:\u002F\u002Fdrone.url"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aK}]}]}]}]}]},{type:a,tag:o,props:{id:R},children:[{type:b,value:S}]},{type:a,tag:n,props:{},children:[{type:b,value:ay},{type:a,tag:q,props:{href:az,rel:[z]},children:[{type:b,value:aA}]},{type:b,value:aB},{type:a,tag:q,props:{href:aC,rel:[z]},children:[{type:b,value:aD}]},{type:b,value:aE}]},{type:a,tag:o,props:{id:T},children:[{type:b,value:U}]},{type:a,tag:k,props:{code:V,language:A},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:aO},children:[{type:b,value:aP}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" DRONE_SERVER=https:\u002F\u002Fdrone.url"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:aO},children:[{type:b,value:aP}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" DRONE_TOKEN=password"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"drone info"}]}]}]}]}]},{type:a,tag:o,props:{id:W},children:[{type:b,value:X}]},{type:a,tag:n,props:{},children:[{type:b,value:aF},{type:a,tag:h,props:{},children:[{type:b,value:B}]},{type:b,value:x}]},{type:a,tag:k,props:{code:Y,language:A},children:[{type:a,tag:r,props:{},children:[{type:a,tag:k,props:{__ignoreMap:p},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"drone repo update "}]},{type:a,tag:c,props:{class:aQ},children:[{type:b,value:aR}]},{type:a,tag:c,props:{class:aS},children:[{type:b,value:B}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" --trusted=true "}]},{type:a,tag:c,props:{class:"ct-6c3775"},children:[{type:b,value:"&&"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" drone repo info "}]},{type:a,tag:c,props:{class:aQ},children:[{type:b,value:aR}]},{type:a,tag:c,props:{class:aS},children:[{type:b,value:B}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-6c3775{color:#FF7B72}.ct-9be66d{color:#C9D1D9}.ct-05aea5{color:#C9D1D9}.ct-6679c7{color:#FF7B72}.ct-82031d{color:#A5D6FF}.ct-259684{color:#C9D1D9}.ct-236dc9{color:#7EE787}.light .ct-236dc9{color:#268BD2}.light .ct-259684{color:#657B83}.light .ct-82031d{color:#2AA198}.light .ct-6679c7{color:#073642}.light .ct-05aea5{color:#859900}.light .ct-9be66d{color:#268BD2}.light .ct-6c3775{color:#859900}"}]}],toc:{title:p,searchDepth:t,depth:t,links:[{id:G,depth:t,text:H},{id:N,depth:t,text:O},{id:R,depth:t,text:S},{id:T,depth:t,text:U},{id:W,depth:t,text:X}]}},_type:"markdown",_id:"content:Docker:Drone-ci.md",_source:"content",_file:"Docker\u002FDrone-ci.md",_extension:"md"}},prerenderedAt:1667450790996}}("element","text","span","ct-259684","line","ct-236dc9","ct-82031d","code-inline",":",": ","code"," "," - ","p","h2","","a","pre"," ",2,", ","drone","Private%20docker%20registry",".","yaml","nofollow","shell","1"," "," ","from_secret",false,"pushing-to-private-docker_registry","Pushing to private docker_registry","global_docker_login","global_docker_password","global_docker_registry","docker_repo","kind: pipeline\nname: build\ntype: docker\n\nplatform:\n os: linux\n arch: amd64\n\nsteps:\n - name: build-master\n image: plugins\u002Fdocker\n when:\n branch:\n - master\n settings:\n dockerfile: Dockerfile\n tag:\n - ${DRONE_BRANCH}\n username:\n from_secret: global_docker_login\n password:\n from_secret: global_docker_password\n registry:\n from_secret: global_docker_registry\n repo:\n from_secret: docker_repo\n","docker-compose-file-for-drone-ci","Docker-compose file for drone-ci","drone-agent","version: \"3\"\n\nservices:\n drone:\n container_name: drone\n image: drone\u002Fdrone:latest\n environment:\n - DRONE_GITHUB_CLIENT_ID=secret_id\n - DRONE_GITHUB_CLIENT_SECRET=client_secret\n - DRONE_RPC_SECRET=rpc_secret\n - DRONE_SERVER_HOST=drone.url\n - DRONE_USER_CREATE=\"username:user,admin:true\"\n - DRONE_SERVER_PROTO=https\n - DRONE_TLS_AUTOCERT=false\n - DRONE_GIT_ALWAYS_AUTH=false\n - DRONE_LOGS_DEBUG=true\n - DRONE_LOGS_TRACE=true\n restart: always\n volumes:\n - .\u002Fdata:\u002Fdata\n ports:\n - 8090:80\n drone-agent:\n container_name: drone__agent\n image: drone\u002Fagent:latest\n command: agent\n restart: always\n volumes:\n - \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock\n environment:\n - DRONE_RPC_SERVER=https:\u002F\u002Fdrone.url\n - DRONE_RPC_SECRET=rpc_secret\n","caching-builds","Caching builds","get-user-info","Get user info","export DRONE_SERVER=https:\u002F\u002Fdrone.url\nexport DRONE_TOKEN=password\ndrone info\n","mark-user-as-trusted","Mark user as trusted","drone repo update $1 --trusted=true && drone repo info $1\n","image","Drone Ci","\u002Fdocker\u002Fdrone-ci","docker","root","Can be used with ","Private docker registry"," to deploy things using #docker.","You should specify "," organizations variables in your ","strong",". And "," variable for your repo as ","docker.yourdomain.com\u002Fyour-image","This is example of ",".droneci"," for ","private docker registry","The "," service is ui itself and "," is runner for builds, that can be started on different machine (or machines).","Change ","secret_id","rpc_secret"," and ","drone.url"," to something you like.","Haven't checked that yet, but there's a ","https:\u002F\u002Flaszlo.cloud\u002Fthe-ultimate-droneci-caching-guide","manual"," from ","https:\u002F\u002Flaszlo.cloud\u002F","Laszlo Fogas"," about that.","Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to ","name"," - ","container_name","environment","DRONE_RPC_SECRET=rpc_secret","restart","always","volumes","ct-6679c7","export","ct-05aea5","$","ct-9be66d")) \ No newline at end of file diff --git a/docker/drone-ci/index.html b/docker/drone-ci/index.html new file mode 100644 index 0000000..fe2a423 --- /dev/null +++ b/docker/drone-ci/index.html @@ -0,0 +1,6 @@ + + +Drone Ci • Obsidian Garden +

Drone Ci

Can be used with Private docker registry to deploy things using #docker.

Pushing to private docker_registry

You should specify global_docker_login, global_docker_password, global_docker_registry organizations variables in your drone. And docker_repo variable for your repo as docker.yourdomain.com/your-image.

This is example of .droneci for private docker registry:

kind: pipelinename: buildtype: dockerplatform:  os: linux  arch: amd64steps:  - name: build-master    image: plugins/docker    when:      branch:        - master    settings:      dockerfile: Dockerfile      tag:        - ${DRONE_BRANCH}      username:        from_secret: global_docker_login      password:        from_secret: global_docker_password      registry:        from_secret: global_docker_registry      repo:        from_secret: docker_repo

Docker-compose file for drone-ci

The drone service is ui itself and drone-agent is runner for builds, that can be started on different machine (or machines).

Change secret_id, rpc_secret and drone.url to something you like.

version: "3"services:  drone:    container_name: drone    image: drone/drone:latest    environment:      - DRONE_GITHUB_CLIENT_ID=secret_id      - DRONE_GITHUB_CLIENT_SECRET=client_secret      - DRONE_RPC_SECRET=rpc_secret      - DRONE_SERVER_HOST=drone.url      - DRONE_USER_CREATE="username:user,admin:true"      - DRONE_SERVER_PROTO=https      - DRONE_TLS_AUTOCERT=false      - DRONE_GIT_ALWAYS_AUTH=false      - DRONE_LOGS_DEBUG=true      - DRONE_LOGS_TRACE=true    restart: always    volumes:      - ./data:/data    ports:      - 8090:80  drone-agent:    container_name: drone__agent    image: drone/agent:latest    command: agent    restart: always    volumes:      - /var/run/docker.sock:/var/run/docker.sock    environment:      - DRONE_RPC_SERVER=https://drone.url      - DRONE_RPC_SECRET=rpc_secret

Caching builds

Haven't checked that yet, but there's a manual from Laszlo Fogas about that.

Get user info

export DRONE_SERVER=https://drone.urlexport DRONE_TOKEN=passworddrone info

Mark user as trusted

Sometimes it won't help, then connect to drone database with sqlite and change user's trusted flag to 1.

drone repo update $1 --trusted=true && drone repo info $1
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/docker/github-pages-with-drone-ci/_payload.js b/docker/github-pages-with-drone-ci/_payload.js new file mode 100644 index 0000000..acc8bc8 --- /dev/null +++ b/docker/github-pages-with-drone-ci/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:H,_path:I},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-ZOfNnzEGMw":{_path:I,_dir:J,_draft:x,_partial:x,_locale:"en",_empty:x,title:H,description:"To deploy github pages with Drone-ci you will need .drone.yml as specified below. You also should define secrets github_username and github_token (get it here) in your drone's repository setup.",excerpt:{type:K,children:[{type:a,tag:j,props:{},children:[{type:b,value:L},{type:a,tag:i,props:{href:p},children:[{type:b,value:p}]},{type:b,value:M},{type:a,tag:f,props:{},children:[{type:b,value:N}]},{type:b,value:O},{type:a,tag:f,props:{},children:[{type:b,value:y}]},{type:b,value:P},{type:a,tag:f,props:{},children:[{type:b,value:z}]},{type:b,value:Q},{type:a,tag:i,props:{href:R,rel:[k]},children:[{type:b,value:S}]},{type:b,value:T}]},{type:a,tag:j,props:{},children:[{type:b,value:U},{type:a,tag:f,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:i,props:{href:q,rel:[k]},children:[{type:b,value:q}]},{type:b,value:X},{type:a,tag:i,props:{href:r,rel:[k]},children:[{type:b,value:r}]},{type:b,value:Y}]},{type:a,tag:j,props:{},children:[{type:b,value:Z},{type:a,tag:f,props:{},children:[{type:b,value:n}]},{type:b,value:_},{type:a,tag:f,props:{},children:[{type:b,value:$}]},{type:b,value:s}]},{type:a,tag:j,props:{},children:[{type:b,value:aa},{type:a,tag:f,props:{},children:[{type:b,value:n}]},{type:b,value:ab}]},{type:a,tag:t,props:{code:A,language:ac},children:[{type:a,tag:ad,props:{},children:[{type:a,tag:t,props:{__ignoreMap:B},children:[{type:b,value:A}]}]}]},{type:a,tag:j,props:{},children:[{type:b,value:ae},{type:a,tag:f,props:{},children:[{type:b,value:af}]},{type:b,value:ag},{type:a,tag:f,props:{},children:[{type:b,value:ah}]},{type:b,value:ai},{type:a,tag:f,props:{},children:[{type:b,value:aj}]},{type:b,value:ak}]},{type:a,tag:j,props:{},children:[{type:b,value:al},{type:a,tag:f,props:{},children:[{type:b,value:am}]},{type:b,value:an},{type:a,tag:i,props:{href:u,rel:[k]},children:[{type:b,value:ao}]},{type:b,value:s}]},{type:a,tag:ap,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:aq,props:{},children:[{type:a,tag:v,props:{},children:[{type:a,tag:i,props:{href:ar,rel:[k]},children:[{type:b,value:as}]}]},{type:a,tag:v,props:{},children:[{type:a,tag:i,props:{href:u,rel:[k]},children:[{type:b,value:at}]}]}]}]},body:{type:K,children:[{type:a,tag:j,props:{},children:[{type:b,value:L},{type:a,tag:i,props:{href:p},children:[{type:b,value:p}]},{type:b,value:M},{type:a,tag:f,props:{},children:[{type:b,value:N}]},{type:b,value:O},{type:a,tag:f,props:{},children:[{type:b,value:y}]},{type:b,value:P},{type:a,tag:f,props:{},children:[{type:b,value:z}]},{type:b,value:Q},{type:a,tag:i,props:{href:R,rel:[k]},children:[{type:b,value:S}]},{type:b,value:T}]},{type:a,tag:j,props:{},children:[{type:b,value:U},{type:a,tag:f,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:i,props:{href:q,rel:[k]},children:[{type:b,value:q}]},{type:b,value:X},{type:a,tag:i,props:{href:r,rel:[k]},children:[{type:b,value:r}]},{type:b,value:Y}]},{type:a,tag:j,props:{},children:[{type:b,value:Z},{type:a,tag:f,props:{},children:[{type:b,value:n}]},{type:b,value:_},{type:a,tag:f,props:{},children:[{type:b,value:$}]},{type:b,value:s}]},{type:a,tag:j,props:{},children:[{type:b,value:aa},{type:a,tag:f,props:{},children:[{type:b,value:n}]},{type:b,value:ab}]},{type:a,tag:t,props:{code:A,language:ac},children:[{type:a,tag:ad,props:{},children:[{type:a,tag:t,props:{__ignoreMap:B},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:"kind"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"pipeline"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:au}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:"type"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:J}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:"platform"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:av}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"os"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"linux"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:av}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"arch"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"amd64"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:"steps"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aw}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:au}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:ax}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"node:16"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"commands"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"yarn"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"yarn generate"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"rm -rf .\u002Fdocs"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"mv .\u002F.output\u002Fpublic .\u002Fdocs"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"touch .\u002Fdocs\u002F.nojekyll"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aw}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"publish"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:ax}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"plugins\u002Fgh-pages"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:w}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"settings"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"target_branch"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:n}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"username"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ay}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:az}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"password"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:m}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ay}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:az}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:z}]}]}]}]}]},{type:a,tag:j,props:{},children:[{type:b,value:ae},{type:a,tag:f,props:{},children:[{type:b,value:af}]},{type:b,value:ag},{type:a,tag:f,props:{},children:[{type:b,value:ah}]},{type:b,value:ai},{type:a,tag:f,props:{},children:[{type:b,value:aj}]},{type:b,value:ak}]},{type:a,tag:j,props:{},children:[{type:b,value:al},{type:a,tag:f,props:{},children:[{type:b,value:am}]},{type:b,value:an},{type:a,tag:i,props:{href:u,rel:[k]},children:[{type:b,value:ao}]},{type:b,value:s}]},{type:a,tag:ap,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:aq,props:{},children:[{type:a,tag:v,props:{},children:[{type:a,tag:i,props:{href:ar,rel:[k]},children:[{type:b,value:as}]}]},{type:a,tag:v,props:{},children:[{type:a,tag:i,props:{href:u,rel:[k]},children:[{type:b,value:at}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-27659a{color:#A5D6FF}.ct-987c19{color:#C9D1D9}.ct-d3cd64{color:#7EE787}.light .ct-d3cd64{color:#268BD2}.light .ct-987c19{color:#657B83}.light .ct-27659a{color:#2AA198}"}]}],toc:{title:B,searchDepth:G,depth:G,links:[{id:C,depth:G,text:D}]}},_type:"markdown",_id:"content:Docker:Github pages with drone-ci.md",_source:"content",_file:"Docker\u002FGithub pages with drone-ci.md",_extension:"md"}},prerenderedAt:1667450791088}}("element","text","span","ct-987c19","line","code-inline","ct-d3cd64","ct-27659a","a","p","nofollow",": ",":","gh-pages"," - ","Drone-ci","https:\u002F\u002Fyourname.github.io\u002F","https:\u002F\u002Fyourname.github.io\u002Frepo-name\u002F",".","code","https:\u002F\u002Fgithub.blog\u002F2009-12-29-bypassing-jekyll-on-github-pages\u002F","li"," ",false,"github_username","github_token","kind: pipeline\nname: build\ntype: docker\n\nplatform:\n os: linux\n arch: amd64\n\nsteps:\n - name: build\n image: node:16\n commands:\n - yarn\n - yarn generate\n - rm -rf .\u002Fdocs\n - mv .\u002F.output\u002Fpublic .\u002Fdocs\n - touch .\u002Fdocs\u002F.nojekyll\n - name: publish\n image: plugins\u002Fgh-pages\n settings:\n target_branch: gh-pages\n username:\n from_secret: github_username\n password:\n from_secret: github_token\n","","additional-reading","Additional reading","name"," ",2,"Github Pages With Drone Ci","\u002Fdocker\u002Fgithub-pages-with-drone-ci","docker","root","To deploy github pages with "," you will need ",".drone.yml"," as specified below. You also should define secrets "," and "," (get it ","https:\u002F\u002Fgithub.com\u002Fsettings\u002Ftokens","here",") in your drone's repository setup.","Github repository should be named as ","yourname.github.io"," and it could be accessed at ",". Otherwise it'll be available at ",", what you might not like.","You should create branch named "," in that repo and setup GH Pages at ","https:\u002F\u002Fgithub.com\u002F\u003Cyourusername\u003E\u002F\u003Cyourusername\u003E.github.io\u002Fsettings\u002Fpages","This config will update "," branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins.","yaml","pre","Here we're moving ",".\u002F.output\u002Fpublic"," to ",".\u002Fdocs",", because #nuxt creates symlink for ","docs"," and git can't work with that.","Also we create ",".nojekyll"," at the root of repo, so github's internal engine won't ","ignore files that start with underscore","h2","ul","https:\u002F\u002Fplugins.drone.io\u002Fplugins\u002Fgh-pages","Drone Github Pages Documentation","Bypassing Jekyll on GitHub Pages","build"," "," - ","image"," ","from_secret")) \ No newline at end of file diff --git a/docker/github-pages-with-drone-ci/index.html b/docker/github-pages-with-drone-ci/index.html new file mode 100644 index 0000000..5834da0 --- /dev/null +++ b/docker/github-pages-with-drone-ci/index.html @@ -0,0 +1,6 @@ + + +Github Pages With Drone Ci • Obsidian Garden +

Github Pages With Drone Ci

To deploy github pages with Drone-ci you will need .drone.yml as specified below. You also should define secrets github_username and github_token (get it here) in your drone's repository setup.

Github repository should be named as yourname.github.io and it could be accessed at https://yourname.github.io/. Otherwise it'll be available at https://yourname.github.io/repo-name/, what you might not like.

You should create branch named gh-pages in that repo and setup GH Pages at https://github.com/<yourusername>/<yourusername>.github.io/settings/pages.

This config will update gh-pages branch in your project, which will contain only generated content. I know, that's bad, but there's no better way to do that with generic drone plugins.

kind: pipelinename: buildtype: dockerplatform:  os: linux  arch: amd64steps:  - name: build    image: node:16    commands:      - yarn      - yarn generate      - rm -rf ./docs      - mv ./.output/public ./docs      - touch ./docs/.nojekyll  - name: publish    image: plugins/gh-pages    settings:      target_branch: gh-pages      username:        from_secret: github_username      password:        from_secret: github_token

Here we're moving ./.output/public to ./docs, because #nuxt creates symlink for docs and git can't work with that.

Also we create .nojekyll at the root of repo, so github's internal engine won't ignore files that start with underscore.

Additional reading

btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/docker/nginx.conf b/docker/nginx.conf deleted file mode 100644 index 5e7d76a..0000000 --- a/docker/nginx.conf +++ /dev/null @@ -1,54 +0,0 @@ -worker_processes 4; - -events { - worker_connections 1024; -} - -http { - server { - listen 80; - root /usr/share/nginx/html; - include /etc/nginx/mime.types; - - gzip on; - gzip_min_length 1000; - gzip_proxied expired no-cache no-store private auth; - gzip_types text/plain application/xml application/javascript; - - ## All static files will be served directly. - location ~* ^.+\.(?:css|cur|js|jpe?g|gif|htc|ico|png|xml|otf|ttf|eot|woff|woff2|svg)$ { - access_log off; - expires 1d; - add_header Cache-Control public; - gzip_static on; - - ## No need to bleed constant updates. Send the all shebang in one - ## fell swoop. - tcp_nodelay off; - - ## Set the OS file cache. - open_file_cache max=3000 inactive=120s; - open_file_cache_valid 45s; - open_file_cache_min_uses 2; - open_file_cache_errors off; - } - - location / { - # try_files $uri @index; - index index.html; - - add_header Last-Modified $date_gmt; - add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; - if_modified_since off; - expires off; - etag off; - } - - location @index { - add_header Cache-Control "no-store, no-cache, must-revalidate"; - expires -1; - try_files /index.html =404; - } - } -} - diff --git a/docker/private-docker-registry/_payload.js b/docker/private-docker-registry/_payload.js new file mode 100644 index 0000000..3269f4c --- /dev/null +++ b/docker/private-docker-registry/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:B,_path:C},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-3LsByI0Qek":{_path:C,_dir:"docker",_draft:t,_partial:t,_locale:"en",_empty:t,title:B,description:"Suitable to work with Drone-ci for hosting private #docker images.",excerpt:{type:D,children:[{type:a,tag:n,props:{},children:[{type:c,value:E},{type:a,tag:F,props:{href:p},children:[{type:c,value:p}]},{type:c,value:G}]},{type:a,tag:q,props:{id:u},children:[{type:c,value:v}]},{type:a,tag:n,props:{},children:[{type:c,value:H}]},{type:a,tag:i,props:{code:w,language:r},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:c,value:w}]}]}]},{type:a,tag:i,props:{code:x,language:I},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:c,value:x}]}]}]},{type:a,tag:q,props:{id:y},children:[{type:c,value:z}]},{type:a,tag:n,props:{},children:[{type:c,value:J}]},{type:a,tag:K,props:{},children:[{type:a,tag:L,props:{},children:[{type:c,value:M}]}]},{type:a,tag:i,props:{code:A,language:r},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:c,value:A}]}]}]}]},body:{type:D,children:[{type:a,tag:n,props:{},children:[{type:c,value:E},{type:a,tag:F,props:{href:p},children:[{type:c,value:p}]},{type:c,value:G}]},{type:a,tag:q,props:{id:u},children:[{type:c,value:v}]},{type:a,tag:n,props:{},children:[{type:c,value:H}]},{type:a,tag:i,props:{code:w,language:r},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" --entrypoint htpasswd registry:2 \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" -Bbn user mypassword "}]},{type:a,tag:b,props:{class:"ct-4db34e"},children:[{type:c,value:"\u003E"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" auth\u002Fregistry.password"}]}]}]}]}]},{type:a,tag:i,props:{code:x,language:I},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"version"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"3\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"services"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"registry"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"docker__registry"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"registry:2"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"5000:5000"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:U}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=\u002Fdata"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_AUTH=htpasswd"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_AUTH_HTPASSWD_REALM=Registry"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_AUTH_HTPASSWD_PATH=\u002Fauth\u002Fregistry.password"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_HTTP_SECRET=password"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_STORAGE_DELETE_ENABLED=true"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"volumes"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:".\u002Fregistry\u002Fauth:\u002Fauth"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:".\u002Fregistry\u002Fdata:\u002Fdata"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"ui"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"docker__ui"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"parabuzzle\u002Fcraneoperator:latest"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"80:80"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:U}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_HOST=registry"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_PORT=5000"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_PROTOCOL=http"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"ALLOW_REGISTRY_LOGIN=true"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"REGISTRY_ALLOW_DELETE=true"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"USERNAME=registry"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PASSWORD=password"}]}]}]}]}]},{type:a,tag:q,props:{id:y},children:[{type:c,value:z}]},{type:a,tag:n,props:{},children:[{type:c,value:J}]},{type:a,tag:K,props:{},children:[{type:a,tag:L,props:{},children:[{type:c,value:M}]}]},{type:a,tag:i,props:{code:A,language:r},children:[{type:a,tag:o,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:W},children:[{type:c,value:"# Try this first"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" --rm anoxis\u002Fregistry-cli \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" -r https:\u002F\u002Fregistry.url \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" -l user:password \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" --delete \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" --num 2"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:W},children:[{type:c,value:"# Then this "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"docker run -it \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" -v \u002Fpath\u002Fto\u002Fregistry\u002Fdata:\u002Fregistry \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" -e REGISTRY_URL=https:\u002F\u002Fregistry.url \\"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" -e DRY_RUN="}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"false\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" -e REGISTRY_AUTH="}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"user:password\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:X}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" mortensrasmussen\u002Fdocker-registry-manifest-cleanup"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-94dce8{color:#8B949E}.ct-ab8ffd{color:#A5D6FF}.ct-540e92{color:#7EE787}.ct-4db34e{color:#FF7B72}.ct-6431bf{color:#C9D1D9}.light .ct-6431bf{color:#657B83}.light .ct-4db34e{color:#859900}.light .ct-540e92{color:#268BD2}.light .ct-ab8ffd{color:#2AA198}.light .ct-94dce8{color:#93A1A1}"}]}],toc:{title:l,searchDepth:s,depth:s,links:[{id:u,depth:s,text:v},{id:y,depth:s,text:z}]}},_type:"markdown",_id:"content:Docker:Private docker registry.md",_source:"content",_file:"Docker\u002FPrivate docker registry.md",_extension:"md"}},prerenderedAt:1667450791143}}("element","span","text","ct-6431bf","line","ct-ab8ffd","ct-540e92"," - ","code"," ",":","",": ","p","pre","Drone-ci","h2","shell",2,false,"sample-docker-compose-for-custom-docker-registry","Sample docker-compose for custom docker registry","docker run \\\n --entrypoint htpasswd registry:2 \\\n -Bbn user mypassword \u003E auth\u002Fregistry.password\n","version: \"3\"\nservices:\n registry:\n container_name: docker__registry\n image: registry:2\n ports:\n - 5000:5000\n restart: always\n environment:\n - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=\u002Fdata\n - REGISTRY_AUTH=htpasswd\n - REGISTRY_AUTH_HTPASSWD_REALM=Registry\n - REGISTRY_AUTH_HTPASSWD_PATH=\u002Fauth\u002Fregistry.password\n - REGISTRY_HTTP_SECRET=password\n - REGISTRY_STORAGE_DELETE_ENABLED=true\n volumes:\n - .\u002Fregistry\u002Fauth:\u002Fauth\n - .\u002Fregistry\u002Fdata:\u002Fdata\n ui:\n container_name: docker__ui\n image: parabuzzle\u002Fcraneoperator:latest\n ports:\n - 80:80\n restart: always\n environment:\n - REGISTRY_HOST=registry\n - REGISTRY_PORT=5000\n - REGISTRY_PROTOCOL=http\n - ALLOW_REGISTRY_LOGIN=true\n - REGISTRY_ALLOW_DELETE=true\n - USERNAME=registry\n - PASSWORD=password\n","squash-layers-on-registry","Squash layers on registry","# Try this first\ndocker run \\\n --rm anoxis\u002Fregistry-cli \\\n -r https:\u002F\u002Fregistry.url \\\n -l user:password \\\n --delete \\\n --num 2\n\n# Then this \ndocker run -it \\\n -v \u002Fpath\u002Fto\u002Fregistry\u002Fdata:\u002Fregistry \\\n -e REGISTRY_URL=https:\u002F\u002Fregistry.url \\\n -e DRY_RUN=\"false\" \\\n -e REGISTRY_AUTH=\"user:password\" \\\n mortensrasmussen\u002Fdocker-registry-manifest-cleanup\n","Private Docker Registry","\u002Fdocker\u002Fprivate-docker-registry","root","Suitable to work with ","a"," for hosting private #docker images.","This one brings up private docker registry with ui. First you'll need to generate password for it:","yaml","Sometimes you need to squash all layers in docker registry to free up disk space.","ol","li","Run this command to mark oldest layers","docker run \\"," ","container_name","image","ports"," - ","restart","always","environment","ct-94dce8"," \\")) \ No newline at end of file diff --git a/docker/private-docker-registry/index.html b/docker/private-docker-registry/index.html new file mode 100644 index 0000000..7856770 --- /dev/null +++ b/docker/private-docker-registry/index.html @@ -0,0 +1,6 @@ + + +Private Docker Registry • Obsidian Garden +

Private Docker Registry

Suitable to work with Drone-ci for hosting private #docker images.

Sample docker-compose for custom docker registry

This one brings up private docker registry with ui. First you'll need to generate password for it:

docker run \  --entrypoint htpasswd registry:2 \  -Bbn user mypassword > auth/registry.password
version: "3"services:  registry:    container_name: docker__registry    image: registry:2    ports:    - 5000:5000    restart: always    environment:      - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data      - REGISTRY_AUTH=htpasswd      - REGISTRY_AUTH_HTPASSWD_REALM=Registry      - REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password      - REGISTRY_HTTP_SECRET=password      - REGISTRY_STORAGE_DELETE_ENABLED=true    volumes:      - ./registry/auth:/auth      - ./registry/data:/data  ui:    container_name: docker__ui    image: parabuzzle/craneoperator:latest    ports:    - 80:80    restart: always    environment:      - REGISTRY_HOST=registry      - REGISTRY_PORT=5000      - REGISTRY_PROTOCOL=http      - ALLOW_REGISTRY_LOGIN=true      - REGISTRY_ALLOW_DELETE=true      - USERNAME=registry      - PASSWORD=password

Squash layers on registry

Sometimes you need to squash all layers in docker registry to free up disk space.

  1. Run this command to mark oldest layers
# Try this firstdocker run \  --rm anoxis/registry-cli \  -r https://registry.url \  -l user:password \  --delete \  --num 2# Then this docker run -it \    -v /path/to/registry/data:/registry \    -e REGISTRY_URL=https://registry.url \    -e DRY_RUN="false" \    -e REGISTRY_AUTH="user:password" \    mortensrasmussen/docker-registry-manifest-cleanup
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/docker/refresh-containers-on-pull/_payload.js b/docker/refresh-containers-on-pull/_payload.js new file mode 100644 index 0000000..b22070c --- /dev/null +++ b/docker/refresh-containers-on-pull/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:t,_path:u},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-8eno4meLw0":{_path:u,_dir:"docker",_draft:n,_partial:n,_locale:"en",_empty:n,title:t,description:k,excerpt:{type:v,children:[{type:a,tag:w,props:{id:o},children:[{type:b,value:p}]},{type:a,tag:x,props:{},children:[{type:a,tag:h,props:{href:y,rel:[z]},children:[{type:b,value:A}]},{type:b,value:B},{type:a,tag:h,props:{href:C},children:[{type:b,value:D}]},{type:b,value:E},{type:a,tag:h,props:{href:l},children:[{type:b,value:l}]},{type:b,value:F}]},{type:a,tag:m,props:{code:q,language:G},children:[{type:a,tag:H,props:{},children:[{type:a,tag:m,props:{__ignoreMap:k},children:[{type:b,value:q}]}]}]}]},body:{type:v,children:[{type:a,tag:w,props:{id:o},children:[{type:b,value:p}]},{type:a,tag:x,props:{},children:[{type:a,tag:h,props:{href:y,rel:[z]},children:[{type:b,value:A}]},{type:b,value:B},{type:a,tag:h,props:{href:C},children:[{type:b,value:D}]},{type:b,value:E},{type:a,tag:h,props:{href:l},children:[{type:b,value:l}]},{type:b,value:F}]},{type:a,tag:m,props:{code:q,language:G},children:[{type:a,tag:H,props:{},children:[{type:a,tag:m,props:{__ignoreMap:k},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"version"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"3\""}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"services"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" "}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"watchtower"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"container_name"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"docker__watchtower"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"image"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"v2tec\u002Fwatchtower"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"restart"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"always"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"volumes"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:I}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:I}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\u002Fhome\u002Fuser\u002F.docker\u002Fconfig.json:\u002Fconfig.json"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"command"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"--interval 60 image_1 image_2"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-2bd4b1{color:#A5D6FF}.ct-3b812b{color:#C9D1D9}.ct-b7ea0d{color:#7EE787}.light .ct-b7ea0d{color:#268BD2}.light .ct-3b812b{color:#657B83}.light .ct-2bd4b1{color:#2AA198}"}]}],toc:{title:k,searchDepth:s,depth:s,links:[{id:o,depth:s,text:p}]}},_type:"markdown",_id:"content:Docker:Refresh containers on pull.md",_source:"content",_file:"Docker\u002FRefresh containers on pull.md",_extension:"md"}},prerenderedAt:1667450791203}}("element","text","span","ct-3b812b","line","ct-b7ea0d","ct-2bd4b1","a",": "," ","","Drone-ci","code",false,"setting-up-watchtower","Setting up watchtower","version: \"3\"\n\nservices:\n watchtower:\n container_name: docker__watchtower\n image: v2tec\u002Fwatchtower\n restart: always\n volumes:\n - \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock\n - \u002Fhome\u002Fuser\u002F.docker\u002Fconfig.json:\u002Fconfig.json\n command: --interval 60 image_1 image_2\n",":",2,"Refresh Containers On Pull","\u002Fdocker\u002Frefresh-containers-on-pull","root","h2","p","https:\u002F\u002Fcontainrrr.dev\u002Fwatchtower\u002F","nofollow","Watchtower"," will automatically pull updated #docker containers. Can be used with ","Private%20docker%20registry","Private docker registry"," and ",".","yaml","pre"," - ")) \ No newline at end of file diff --git a/docker/refresh-containers-on-pull/index.html b/docker/refresh-containers-on-pull/index.html new file mode 100644 index 0000000..8495f11 --- /dev/null +++ b/docker/refresh-containers-on-pull/index.html @@ -0,0 +1,6 @@ + + +Refresh Containers On Pull • Obsidian Garden +

Refresh Containers On Pull

Setting up watchtower

Watchtower will automatically pull updated #docker containers. Can be used with Private docker registry and Drone-ci.

version: "3"services:  watchtower:    container_name: docker__watchtower    image: v2tec/watchtower    restart: always    volumes:      - /var/run/docker.sock:/var/run/docker.sock      - /home/user/.docker/config.json:/config.json    command: --interval 60 image_1 image_2
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/docker/seed-dump-inside-docker/_payload.js b/docker/seed-dump-inside-docker/_payload.js new file mode 100644 index 0000000..54a71bc --- /dev/null +++ b/docker/seed-dump-inside-docker/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:o,_path:p},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-TQfPEagSjQ":{_path:p,_dir:"docker",_draft:j,_partial:j,_locale:"en",_empty:j,title:o,description:"If you need to seed .sql dump in #docker container, just run this command. Also you can try to rsync file with SSH to get it from remote host.",excerpt:{type:q,children:[{type:a,tag:r,props:{},children:[{type:b,value:s},{type:a,tag:t,props:{},children:[{type:b,value:u}]},{type:b,value:v},{type:a,tag:w,props:{href:x},children:[{type:b,value:y}]},{type:b,value:z}]},{type:a,tag:i,props:{code:k,language:A},children:[{type:a,tag:B,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:b,value:k}]}]}]}]},body:{type:q,children:[{type:a,tag:r,props:{},children:[{type:b,value:s},{type:a,tag:t,props:{},children:[{type:b,value:u}]},{type:b,value:v},{type:a,tag:w,props:{href:x},children:[{type:b,value:y}]},{type:b,value:z}]},{type:a,tag:i,props:{code:k,language:A},children:[{type:a,tag:B,props:{},children:[{type:a,tag:i,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:C}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:"# usage: .\u002Fscript.sh \"\u002Fpath\u002Fto\u002Fdump.sql\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:C}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"DUMP_PATH="}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"1"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"CONTAINER="}]},{type:a,tag:c,props:{class:n},children:[{type:b,value:"\"db\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"USER=root"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"PASSWORD=password"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"DB=database"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"cat "}]},{type:a,tag:c,props:{class:n},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"DUMP_PATH"}]},{type:a,tag:c,props:{class:n},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:"ct-9072b0"},children:[{type:b,value:"|"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" docker "}]},{type:a,tag:c,props:{class:"ct-6ff593"},children:[{type:b,value:"exec"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" -i "}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"CONTAINER"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" mysql -u"}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"USER"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" -p"}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"PASSWORD"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"DB"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-6ff593{color:#79C0FF}.ct-9072b0{color:#FF7B72}.ct-56be54{color:#A5D6FF}.ct-833fcb{color:#C9D1D9}.ct-b9da81{color:#C9D1D9}.ct-ced384{color:#C9D1D9}.ct-f99778{color:#8B949E}.light .ct-f99778{color:#93A1A1}.light .ct-ced384{color:#657B83}.light .ct-b9da81{color:#859900}.light .ct-833fcb{color:#268BD2}.light .ct-56be54{color:#2AA198}.light .ct-9072b0{color:#859900}.light .ct-6ff593{color:#268BD2}"}]}],toc:{title:l,searchDepth:F,depth:F,links:[]}},_type:"markdown",_id:"content:Docker:Seed dump inside docker.md",_source:"content",_file:"Docker\u002FSeed dump inside docker.md",_extension:"md"}},prerenderedAt:1667450791246}}("element","text","span","ct-ced384","line","ct-b9da81","$","ct-833fcb","code",false,"#####\n# usage: .\u002Fscript.sh \"\u002Fpath\u002Fto\u002Fdump.sql\"\n#####\n\nDUMP_PATH=$1\nCONTAINER=\"db\"\nUSER=root\nPASSWORD=password\nDB=database\n\ncat \"$DUMP_PATH\" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB\n","","ct-f99778","ct-56be54","Seed Dump Inside Docker","\u002Fdocker\u002Fseed-dump-inside-docker","root","p","If you need to seed ","code-inline",".sql"," dump in #docker container, just run this command. Also you can try to ","a","\u002Flinux\u002FRsync%20file%20with%20SSH","rsync file with SSH"," to get it from remote host.","shell","pre","#####","\""," ",2)) \ No newline at end of file diff --git a/docker/seed-dump-inside-docker/index.html b/docker/seed-dump-inside-docker/index.html new file mode 100644 index 0000000..2157eaf --- /dev/null +++ b/docker/seed-dump-inside-docker/index.html @@ -0,0 +1,6 @@ + + +Seed Dump Inside Docker • Obsidian Garden +

Seed Dump Inside Docker

If you need to seed .sql dump in #docker container, just run this command. Also you can try to rsync file with SSH to get it from remote host.

###### usage: ./script.sh "/path/to/dump.sql"#####DUMP_PATH=$1CONTAINER="db"USER=rootPASSWORD=passwordDB=databasecat "$DUMP_PATH" | docker exec -i $CONTAINER mysql -u$USER -p$PASSWORD $DB
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/docker/wait-for-mysql/_payload.js b/docker/wait-for-mysql/_payload.js new file mode 100644 index 0000000..0ba3d2d --- /dev/null +++ b/docker/wait-for-mysql/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:z,_path:A},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-LRHpXC9dvS":{_path:A,_dir:"docker",_draft:r,_partial:r,_locale:"en",_empty:r,title:z,description:"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections",excerpt:{type:B,children:[{type:a,tag:i,props:{},children:[{type:a,tag:m,props:{href:C,rel:[D]},children:[{type:c,value:E}]},{type:c,value:F}]},{type:a,tag:i,props:{},children:[{type:c,value:G}]},{type:a,tag:i,props:{},children:[{type:c,value:H},{type:a,tag:I,props:{},children:[{type:c,value:J}]},{type:c,value:K}]},{type:a,tag:n,props:{code:s,language:L},children:[{type:a,tag:M,props:{},children:[{type:a,tag:n,props:{__ignoreMap:t},children:[{type:c,value:s}]}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:m,props:{href:N},children:[{type:c,value:O}]}]}]},body:{type:B,children:[{type:a,tag:i,props:{},children:[{type:a,tag:m,props:{href:C,rel:[D]},children:[{type:c,value:E}]},{type:c,value:F}]},{type:a,tag:i,props:{},children:[{type:c,value:G}]},{type:a,tag:i,props:{},children:[{type:c,value:H},{type:a,tag:I,props:{},children:[{type:c,value:J}]},{type:c,value:K}]},{type:a,tag:n,props:{code:s,language:L},children:[{type:a,tag:M,props:{},children:[{type:a,tag:n,props:{__ignoreMap:t},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"# Waits for mysql to become actually available"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:"ct-e9e727"},children:[{type:c,value:"wait_for_mysql"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"() {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" query="}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"SELECT count(*) FROM users\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" timeout=180 "}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:"# 3 minutes limit"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" i=0"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"while"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"!"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" docker "}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"exec"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" -it "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" mysql --user="}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"2"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" -e "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"query"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"do"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" sleep 1"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" i="}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"$(("}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"+"}]},{type:a,tag:b,props:{class:"ct-52c063"},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"))"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"if"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" [[ "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"-ge"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"timeout"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ]]"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"then"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"echo"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"[Error] can't properly query MySQL after "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" secs\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"exit"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" 1"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"fi"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"done"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:u},children:[{type:c,value:"# usage: wait_for_mysql miin-mysql-dev root password database"}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:m,props:{href:N},children:[{type:c,value:O}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-52c063{color:#79C0FF}.ct-62f297{color:#C9D1D9}.ct-cc8827{color:#C9D1D9}.ct-440d95{color:#79C0FF}.ct-741c1f{color:#FF7B72}.ct-c5795a{color:#A5D6FF}.ct-68b7cc{color:#C9D1D9}.ct-e9e727{color:#D2A8FF}.ct-dd550d{color:#8B949E}.light .ct-dd550d{color:#93A1A1}.light .ct-e9e727{color:#268BD2}.light .ct-68b7cc{color:#657B83}.light .ct-c5795a{color:#2AA198}.light .ct-741c1f{color:#859900}.light .ct-440d95{color:#268BD2}.light .ct-cc8827{color:#859900}.light .ct-62f297{color:#268BD2}.light .ct-52c063{color:#D33682}"}]}],toc:{title:t,searchDepth:S,depth:S,links:[]}},_type:"markdown",_id:"content:Docker:Wait for mysql.md",_source:"content",_file:"Docker\u002FWait for mysql.md",_extension:"md"}},prerenderedAt:1667450791280}}("element","span","text","ct-68b7cc","line","ct-c5795a","ct-741c1f","ct-cc8827","p","\"","ct-62f297"," ","a","code"," ","$","}",false,"# Waits for mysql to become actually available\nwait_for_mysql() {\n query=\"SELECT count(*) FROM users\"\n \n timeout=180 # 3 minutes limit\n i=0\n \n while ! docker exec -it \"$1\" mysql --user=\"$2\" --password=\"$3\" -e \"$query\" $4 \u003E\u002Fdev\u002Fnull 2\u003E&1; do\n sleep 1;\n\n i=$(($i+1))\n if [[ ${i} -ge ${timeout} ]]; then\n echo \"[Error] can't properly query MySQL after ${i} secs\"\n exit 1;\n fi\n done\n}\n\n# usage: wait_for_mysql miin-mysql-dev root password database\n","","ct-dd550d","ct-440d95",";","i","${","Wait For Mysql","\u002Fdocker\u002Fwait-for-mysql","root","https:\u002F\u002Fgithub.com\u002Fvishnubob\u002Fwait-for-it","nofollow","wait-for-it.sh"," doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections","This script waits for first successful query from database or exits with non-zero status after timeout.","Don't forget to change ","code-inline","$query"," for the actually working one.","shell","pre","Wait%20for%20redis","Wait for redis","1"," "," ",2)) \ No newline at end of file diff --git a/docker/wait-for-mysql/index.html b/docker/wait-for-mysql/index.html new file mode 100644 index 0000000..ce36a92 --- /dev/null +++ b/docker/wait-for-mysql/index.html @@ -0,0 +1,6 @@ + + +Wait For Mysql • Obsidian Garden +

Wait For Mysql

wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before #mysql is ready to accept connections

This script waits for first successful query from database or exits with non-zero status after timeout.

Don't forget to change $query for the actually working one.

# Waits for mysql to become actually availablewait_for_mysql() {  query="SELECT count(*) FROM users"    timeout=180 # 3 minutes limit  i=0    while ! docker exec -it "$1" mysql --user="$2"" -e "$query" do    sleep 1;    i=$(($i+1))    if [[ ${i} -ge ${timeout} ]]; then      echo "[Error] can't properly query MySQL after ${i} secs"      exit 1;    fi  done}# usage: wait_for_mysql miin-mysql-dev root password database

Wait for redis

btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/docker/wait-for-redis/_payload.js b/docker/wait-for-redis/_payload.js new file mode 100644 index 0000000..a22ad49 --- /dev/null +++ b/docker/wait-for-redis/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:y,_path:z}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-Wzyty7vOmU":{_path:z,_dir:"docker",_draft:p,_partial:p,_locale:"en",_empty:p,title:y,description:"wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections",excerpt:{type:A,children:[{type:a,tag:j,props:{},children:[{type:a,tag:l,props:{href:B,rel:[C]},children:[{type:c,value:D}]},{type:c,value:E}]},{type:a,tag:j,props:{},children:[{type:c,value:F}]},{type:a,tag:m,props:{code:q,language:G},children:[{type:a,tag:H,props:{},children:[{type:a,tag:m,props:{__ignoreMap:r},children:[{type:c,value:q}]}]}]},{type:a,tag:j,props:{},children:[{type:a,tag:l,props:{href:I},children:[{type:c,value:J}]}]}]},body:{type:A,children:[{type:a,tag:j,props:{},children:[{type:a,tag:l,props:{href:B,rel:[C]},children:[{type:c,value:D}]},{type:c,value:E}]},{type:a,tag:j,props:{},children:[{type:c,value:F}]},{type:a,tag:m,props:{code:q,language:G},children:[{type:a,tag:H,props:{},children:[{type:a,tag:m,props:{__ignoreMap:r},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:"# Waits for redis to become actually available"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:"ct-bba05c"},children:[{type:c,value:"wait_for_redis"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"() {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" timeout=180 "}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:"# 3 minutes"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" i=0"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"while"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"!"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" docker "}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"exec"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" -it "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" redis-cli -h localhost -p 6379 -a "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"2"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ping "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"|"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" grep "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"PONG\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\u003E"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u002Fdev\u002Fnull "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"2\u003E&1;"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"do"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" sleep 1"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" i="}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"$(("}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"+"}]},{type:a,tag:b,props:{class:"ct-01c6f0"},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"))"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"if"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" [[ "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"-ge"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"timeout"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ]]"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"then"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"echo"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"[Error] can't properly ping Redis container after "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:" secs\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:"exit"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" 1"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"fi"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"done"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:"# usage: wait_for_redis miin-redis-dev password"}]}]}]}]}]},{type:a,tag:j,props:{},children:[{type:a,tag:l,props:{href:I},children:[{type:c,value:J}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-01c6f0{color:#79C0FF}.ct-c4e6a2{color:#C9D1D9}.ct-df5458{color:#C9D1D9}.ct-1b814a{color:#A5D6FF}.ct-be9606{color:#79C0FF}.ct-c5def4{color:#FF7B72}.ct-333854{color:#C9D1D9}.ct-bba05c{color:#D2A8FF}.ct-b7589c{color:#8B949E}.light .ct-b7589c{color:#93A1A1}.light .ct-bba05c{color:#268BD2}.light .ct-333854{color:#657B83}.light .ct-c5def4{color:#859900}.light .ct-be9606{color:#268BD2}.light .ct-1b814a{color:#2AA198}.light .ct-df5458{color:#859900}.light .ct-c4e6a2{color:#268BD2}.light .ct-01c6f0{color:#D33682}"}]}],toc:{title:r,searchDepth:O,depth:O,links:[]}},_type:"markdown",_id:"content:Docker:Wait for redis.md",_source:"content",_file:"Docker\u002FWait for redis.md",_extension:"md"}},prerenderedAt:1667450791318}}("element","span","text","ct-333854","line","ct-c5def4","ct-1b814a","ct-df5458"," ","p","ct-c4e6a2","a","code","\"","}",false,"# Waits for redis to become actually available\nwait_for_redis() {\n timeout=180 # 3 minutes\n i=0\n while ! docker exec -it \"$1\" redis-cli -h localhost -p 6379 -a \"$2\" ping | grep \"PONG\" \u003E\u002Fdev\u002Fnull 2\u003E&1; do\n sleep 1;\n\n i=$(($i+1))\n if [[ ${i} -ge ${timeout} ]]; then\n echo \"[Error] can't properly ping Redis container after ${i} secs\"\n exit 1;\n fi\n done\n}\n\n# usage: wait_for_redis miin-redis-dev password\n","","ct-b7589c","ct-be9606","$",";","i","${","Wait For Redis","\u002Fdocker\u002Fwait-for-redis","root","https:\u002F\u002Fgithub.com\u002Fvishnubob\u002Fwait-for-it","nofollow","wait-for-it.sh"," doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections","This script waits for first successful ping or exits with non-zero status after 3 minutes.","shell","pre","Wait%20for%20mysql","Wait for mysql"," ","1"," "," ",2)) \ No newline at end of file diff --git a/docker/wait-for-redis/index.html b/docker/wait-for-redis/index.html new file mode 100644 index 0000000..2f9f0ee --- /dev/null +++ b/docker/wait-for-redis/index.html @@ -0,0 +1,6 @@ + + +Wait For Redis • Obsidian Garden +

Wait For Redis

wait-for-it.sh doing a great job of waiting for different services to become alive, but on #MacOs #docker is binding port on container start, seconds before redis is ready to accept connections

This script waits for first successful ping or exits with non-zero status after 3 minutes.

# Waits for redis to become actually availablewait_for_redis() {  timeout=180 # 3 minutes  i=0  while ! docker exec -it "$1" redis-cli -h localhost -p 6379 -a "$2" ping | grep "PONG" >/dev/null 2>&1; do    sleep 1;    i=$(($i+1))    if [[ ${i} -ge ${timeout} ]]; then      echo "[Error] can't properly ping Redis container after ${i} secs"      exit 1;    fi  done}# usage: wait_for_redis miin-redis-dev password

Wait for mysql

btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/public/favicon.ico b/favicon.ico similarity index 100% rename from public/favicon.ico rename to favicon.ico diff --git a/frontend/react-native/oauth2-login/_payload.js b/frontend/react-native/oauth2-login/_payload.js new file mode 100644 index 0000000..ad6f064 --- /dev/null +++ b/frontend/react-native/oauth2-login/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:U,_path:V},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-zuvbG5OO4q":{_path:V,_dir:"react-native",_draft:A,_partial:A,_locale:"en",_empty:A,title:U,description:B,excerpt:{type:W,children:[{type:a,tag:l,props:{},children:[{type:b,value:B}]},{type:a,tag:r,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:l,props:{},children:[{type:b,value:X},{type:a,tag:m,props:{href:s},children:[{type:b,value:s}]},{type:b,value:Y},{type:a,tag:Z,props:{},children:[{type:b,value:_}]},{type:b,value:E}]},{type:a,tag:t,props:{id:F},children:[{type:b,value:G}]},{type:a,tag:k,props:{code:H,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:b,value:H}]}]}]},{type:a,tag:t,props:{id:I},children:[{type:b,value:J}]},{type:a,tag:k,props:{code:K,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:b,value:K}]}]}]},{type:a,tag:r,props:{id:L},children:[{type:b,value:M}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:$,rel:[w]},children:[{type:b,value:aa}]},{type:b,value:ab},{type:a,tag:m,props:{href:ac,rel:[w]},children:[{type:b,value:ad}]},{type:b,value:ae}]}]},body:{type:W,children:[{type:a,tag:l,props:{},children:[{type:b,value:B}]},{type:a,tag:r,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:l,props:{},children:[{type:b,value:X},{type:a,tag:m,props:{href:s},children:[{type:b,value:s}]},{type:b,value:Y},{type:a,tag:Z,props:{},children:[{type:b,value:_}]},{type:b,value:E}]},{type:a,tag:t,props:{id:F},children:[{type:b,value:G}]},{type:a,tag:k,props:{code:H,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:i},children:[{type:b,value:"import"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" { "}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:O}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" } "}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:"from"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'react-native-app-auth'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:af}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:P}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:Q},children:[{type:b,value:"\u002F\u002F ..."}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:R}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:ag}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:S},children:[{type:b,value:O}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:ah}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" issuer: "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'https:\u002F\u002Faccounts.google.com'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ai}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aj}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:af}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}.apps.googleusercontent.com`"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ak}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"`com.yourapp:\u002Foauth2redirect\u002Fgoogle`"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:al}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'openid'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:am}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'profile'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:an}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ao}]},{type:a,tag:c,props:{class:ap},children:[{type:b,value:aq}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ar}]}]}]}]}]},{type:a,tag:t,props:{id:I},children:[{type:b,value:J}]},{type:a,tag:k,props:{code:K,language:u},children:[{type:a,tag:v,props:{},children:[{type:a,tag:k,props:{__ignoreMap:q},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:P}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:as}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:P}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"; "}]},{type:a,tag:c,props:{class:Q},children:[{type:b,value:"\u002F\u002F better hide it somehow"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'com.yourapp'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:x}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:n},children:[{type:b,value:o}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:R}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:ag}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:S},children:[{type:b,value:O}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:ah}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" serviceConfiguration: {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" authorizationEndpoint: "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"`https:\u002F\u002Foauth.yandex.ru\u002Fauthorize?response_type=code&client_id=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}&redirect_uri=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:at}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" "}]},{type:a,tag:c,props:{class:Q},children:[{type:b,value:"\u002F\u002F TODO: replace it with your own backend to secure client_secret:"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" tokenEndpoint: "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"`https:\u002F\u002Foauth.yandex.ru\u002Ftoken?grant_type=authorization_code&client_id=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}&client_secret=${"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:as}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"}`"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" },"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ai}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:y}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ak}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:aj}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:at}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:al}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'login:info'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:am}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"'login:avatar'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:an}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ao}]},{type:a,tag:c,props:{class:ap},children:[{type:b,value:aq}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:j}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:ar}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:S},children:[{type:b,value:"callback"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"("}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:R}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:"accessToken"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:");"}]}]}]}]}]},{type:a,tag:r,props:{id:L},children:[{type:b,value:M}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:$,rel:[w]},children:[{type:b,value:aa}]},{type:b,value:ab},{type:a,tag:m,props:{href:ac,rel:[w]},children:[{type:b,value:ad}]},{type:b,value:ae}]},{type:a,tag:"style",children:[{type:b,value:".ct-18c609{color:#79C0FF}.ct-696c41{color:#D2A8FF}.ct-f1b659{color:#8B949E}.ct-7cf54e{color:#79C0FF}.ct-3bfb45{color:#FF7B72}.ct-5e7163{color:#A5D6FF}.ct-bd1253{color:#C9D1D9}.ct-268c77{color:#C9D1D9}.ct-109d53{color:#FF7B72}.light .ct-109d53{color:#859900}.light .ct-268c77{color:#657B83}.light .ct-bd1253{color:#268BD2}.light .ct-5e7163{color:#2AA198}.light .ct-3bfb45{color:#073642}.light .ct-7cf54e{color:#268BD2}.light .ct-f1b659{color:#93A1A1}.light .ct-696c41{color:#268BD2}.light .ct-18c609{color:#B58900}"}]}],toc:{title:q,searchDepth:z,depth:z,links:[{id:C,depth:z,text:D,children:[{id:F,depth:au,text:G},{id:I,depth:au,text:J}]},{id:L,depth:z,text:M}]}},_type:"markdown",_id:"content:Frontend:React Native:OAuth2 login.md",_source:"content",_file:"Frontend\u002FReact Native\u002FOAuth2 login.md",_extension:"md"}},prerenderedAt:1667450791398}}("element","text","span","ct-268c77","line"," ","ct-5e7163","ct-7cf54e","ct-109d53",",","code","p","a","ct-3bfb45","const","=","","h2","react-native-app-auth","h3","typescript","pre","nofollow",";","YANDEX_OAUTH_CLIENT",2,false,"Use #oauth2 login with React-Native","common-oauth2-providers","Common OAuth2 providers",".","example-for-google","Example for #Google","import { authorize } from 'react-native-app-auth';\n\nconst GOOGLE_OAUTH_CLIENT = '...';\n\n\u002F\u002F ...\nconst authState = await authorize({\n issuer: 'https:\u002F\u002Faccounts.google.com',\n clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,\n redirectUrl: `com.yourapp:\u002Foauth2redirect\u002Fgoogle`,\n scopes: ['openid', 'profile'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n","example-for-yandex","Example for #Yandex","const YANDEX_OAUTH_CLIENT = '...';\nconst YANDEX_OAUTH_SECRET = '...'; \u002F\u002F better hide it somehow\nconst APP_ID = 'com.yourapp';\n\nconst authState = await authorize({\n serviceConfiguration: {\n authorizationEndpoint: `https:\u002F\u002Foauth.yandex.ru\u002Fauthorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:\u002Foauth2redirect`,\n \u002F\u002F TODO: replace it with your own backend to secure client_secret:\n tokenEndpoint: `https:\u002F\u002Foauth.yandex.ru\u002Ftoken?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,\n },\n clientId: YANDEX_OAUTH_CLIENT,\n redirectUrl: `${APP_ID}:\u002Foauth2redirect`,\n scopes: ['login:info', 'login:avatar'],\n dangerouslyAllowInsecureHttpRequests: true,\n});\n\ncallback(authState.accessToken);\n","apple-id-login","Apple ID login","ct-bd1253","authorize","'...'","ct-f1b659","authState","ct-696c41","APP_ID","OAuth2 Login","\u002Ffrontend\u002Freact-native\u002Foauth2-login","root","Can be handled by "," by redirecting to url ","code-inline","com.yourapp:\u002F\u002Foauth2provider","https:\u002F\u002Fgithub.com\u002Finvertase\u002Freact-native-apple-authentication","react-native-apple-authentication"," has its own ","https:\u002F\u002Fgithub.com\u002Finvertase\u002Freact-native-apple-authentication\u002Ftree\u002Fmain\u002Fdocs","documentation"," on setting up OAuth using Apple ID.","GOOGLE_OAUTH_CLIENT","await","({"," clientId: ","`${"," redirectUrl: "," scopes: [",", ","],"," dangerouslyAllowInsecureHttpRequests: ","ct-18c609","true","});","YANDEX_OAUTH_SECRET","}:\u002Foauth2redirect`",3)) \ No newline at end of file diff --git a/frontend/react-native/oauth2-login/index.html b/frontend/react-native/oauth2-login/index.html new file mode 100644 index 0000000..8710c1e --- /dev/null +++ b/frontend/react-native/oauth2-login/index.html @@ -0,0 +1,6 @@ + + +OAuth2 Login • Obsidian Garden +

OAuth2 Login

Use #oauth2 login with React-Native

Common OAuth2 providers

Can be handled by react-native-app-auth by redirecting to url com.yourapp://oauth2provider.

Example for #Google

import { authorize } from 'react-native-app-auth';const GOOGLE_OAUTH_CLIENT = '...';// ...const authState = await authorize({  issuer: 'https://accounts.google.com',  clientId: `${GOOGLE_OAUTH_CLIENT}.apps.googleusercontent.com`,  redirectUrl: `com.yourapp:/oauth2redirect/google`,  scopes: ['openid', 'profile'],  dangerouslyAllowInsecureHttpRequests: true,});

Example for #Yandex

const YANDEX_OAUTH_CLIENT = '...';const YANDEX_OAUTH_SECRET = '...'; // better hide it somehowconst APP_ID = 'com.yourapp';const authState = await authorize({  serviceConfiguration: {    authorizationEndpoint: `https://oauth.yandex.ru/authorize?response_type=code&client_id=${YANDEX_OAUTH_CLIENT}&redirect_uri=${APP_ID}:/oauth2redirect`,    // TODO: replace it with your own backend to secure client_secret:    tokenEndpoint: `https://oauth.yandex.ru/token?grant_type=authorization_code&client_id=${YANDEX_OAUTH_CLIENT}&client_secret=${YANDEX_OAUTH_SECRET}`,  },  clientId: YANDEX_OAUTH_CLIENT,  redirectUrl: `${APP_ID}:/oauth2redirect`,  scopes: ['login:info', 'login:avatar'],  dangerouslyAllowInsecureHttpRequests: true,});callback(authState.accessToken);

Apple ID login

react-native-apple-authentication has its own documentation on setting up OAuth using Apple ID.

btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/_payload.js b/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/_payload.js new file mode 100644 index 0000000..d7c3c43 --- /dev/null +++ b/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:$,_path:aa},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-Rv2z2spCBs":{_path:aa,_dir:"react-native",_draft:M,_partial:M,_locale:"en",_empty:M,title:$,description:"Sometimes you need to keep scroll position of FlatList in React Native after some user interactions.",excerpt:{type:ab,children:[{type:a,tag:ac,props:{},children:[{type:c,value:ad},{type:a,tag:ae,props:{},children:[{type:c,value:N}]},{type:c,value:af}]},{type:a,tag:C,props:{code:O,language:ag},children:[{type:a,tag:ah,props:{},children:[{type:a,tag:C,props:{__ignoreMap:P},children:[{type:c,value:O}]}]}]}]},body:{type:ab,children:[{type:a,tag:ac,props:{},children:[{type:c,value:ad},{type:a,tag:ae,props:{},children:[{type:c,value:N}]},{type:c,value:af}]},{type:a,tag:C,props:{code:O,language:ag},children:[{type:a,tag:ah,props:{},children:[{type:a,tag:C,props:{__ignoreMap:P},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:D},children:[{type:c,value:"\u002F\u002F interact() is doing some stuff, that changes FlatList scroll size"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:n},children:[{type:c,value:"type"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-143e9a"},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" { "}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" () "}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-1c1580"},children:[{type:c,value:"void"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"; }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:x},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:"SomeList"}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:E},children:[{type:c,value:"FC"}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:E},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"\u003E "}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:" ({ "}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:" }) "}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:D},children:[{type:c,value:"\u002F\u002F set it to `true` before interaction and back to `false` right after"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:J},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:" ("}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:E},children:[{type:c,value:"NativeSyntheticEvent"}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:E},children:[{type:c,value:"NativeScrollEvent"}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"\u003E) "}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"nativeEvent"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"contentOffset"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"y"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:al}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" [],"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:am}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-c6e208"},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"(("}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"_"}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:an},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:", "}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:t},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:an},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:") "}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"if"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"!"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:") {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"?."}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"scrollToOffset"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" offset: "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"+"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"-"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" animated: "}]},{type:a,tag:b,props:{class:J},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:","}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" });"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }, []);"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:D},children:[{type:c,value:"\u002F\u002F onInteraction wraps interaction to preserve scroll position"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:r}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:"onInteraction"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" () "}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:J},children:[{type:c,value:"true"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"();"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:J},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:"500"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:al}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" ["}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"setSelectedSubThemes"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"],"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:am}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:"ct-d12798"},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:D},children:[{type:c,value:"\u002F\u002F ...required FlatList options"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"\u002F\u003E"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" )"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-d12798{color:#FFA657}.ct-169751{color:#79C0FF}.ct-c6e208{color:#79C0FF}.ct-34bf83{color:#C9D1D9}.ct-8fcdb5{color:#79C0FF}.ct-3a6b54{color:#79C0FF}.ct-2ed460{color:#79C0FF}.ct-194cdd{color:#FFA657}.ct-72292b{color:#FFA657}.ct-b249b4{color:#FF7B72}.ct-7e17fd{color:#D2A8FF}.ct-e44bc7{color:#C9D1D9}.ct-37c6e0{color:#FF7B72}.ct-1c1580{color:#79C0FF}.ct-089a5a{color:#D2A8FF}.ct-04d162{color:#FF7B72}.ct-143e9a{color:#FFA657}.ct-4643a0{color:#C9D1D9}.ct-74ea31{color:#FF7B72}.ct-23639f{color:#8B949E}.light .ct-23639f{color:#93A1A1}.light .ct-74ea31{color:#073642}.light .ct-4643a0{color:#657B83}.light .ct-143e9a{color:#268BD2}.light .ct-04d162{color:#859900}.light .ct-089a5a{color:#268BD2}.light .ct-1c1580{color:#859900}.light .ct-37c6e0{color:#073642}.light .ct-e44bc7{color:#657B83}.light .ct-7e17fd{color:#268BD2}.light .ct-b249b4{color:#859900}.light .ct-72292b{color:#268BD2}.light .ct-194cdd{color:#657B83}.light .ct-2ed460{color:#268BD2}.light .ct-3a6b54{color:#D33682}.light .ct-8fcdb5{color:#B58900}.light .ct-34bf83{color:#268BD2}.light .ct-c6e208{color:#268BD2}.light .ct-169751{color:#859900}.light .ct-d12798{color:#657B83}"}]}],toc:{title:P,searchDepth:av,depth:av,links:[]}},_type:"markdown",_id:"content:Frontend:React Native:Preserve FlatList scroll position in React Native.md",_source:"content",_file:"Frontend\u002FReact Native\u002FPreserve FlatList scroll position in React Native.md",_extension:"md"}},prerenderedAt:1667450791502}}("element","span","text","ct-4643a0","line"," ","ct-34bf83","ct-04d162","ct-e44bc7","=","."," "," ","ct-74ea31","current","ct-089a5a","=\u003E","const","ct-2ed460","ct-b249b4"," {",";",":","ct-37c6e0","(",");"," ","}","code","ct-23639f","ct-72292b","ct-194cdd","ct-3a6b54","scrollHeight","shouldKeepScrollPosition","ct-8fcdb5","h","{",false,"FlatList","\u002F\u002F interact() is doing some stuff, that changes FlatList scroll size\ntype Props = { interact: () =\u003E void; }\n\nconst SomeList: FC\u003CProps\u003E = ({ interact }) =\u003E {\n const scrollPosition = useRef(0);\n const scrollHeight = useRef(0);\n \n \u002F\u002F set it to `true` before interaction and back to `false` right after\n const shouldKeepScrollPosition = useRef(false);\n\n const onScroll = useCallback(\n (event: NativeSyntheticEvent\u003CNativeScrollEvent\u003E) =\u003E {\n scrollPosition.current = event.nativeEvent.contentOffset.y;\n },\n [],\n );\n\n const onContentSizeChange = useCallback((_: number, h: number) =\u003E {\n if (!shouldKeepScrollPosition.current) {\n scrollHeight.current = h;\n return;\n }\n\n ref.current?.scrollToOffset({\n offset: scrollPosition.current + (h - scrollHeight.current),\n animated: false,\n });\n\n scrollHeight.current = h;\n }, []);\n\n \u002F\u002F onInteraction wraps interaction to preserve scroll position\n const onInteraction = useCallback(\n () =\u003E {\n shouldKeepScrollPosition.current = true;\n\n setTimeout(() =\u003E {\n interact();\n }, 0);\n\n setTimeout(() =\u003E {\n shouldKeepScrollPosition.current = false;\n }, 500);\n },\n [setSelectedSubThemes],\n );\n \n return (\n \u003CFlatList\n \u002F\u002F ...required FlatList options\n ref={ref}\n onContentSizeChange={onContentSizeChange}\n onRefresh={onRefresh}\n onScroll={onScroll}\n \u002F\u003E\n )\n}\n","","interact","\u003C","scrollPosition","useRef","0","false","onScroll","useCallback","onContentSizeChange"," (","ref","Preserve FlatList Scroll Position In React Native","\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native","root","p","Sometimes you need to keep scroll position of ","code-inline"," in React Native after some user interactions.","typescript","pre","Props","ct-7e17fd","event"," },"," );","ct-169751","number","return","setTimeout","(() "," "," }, ","onRefresh",2)) \ No newline at end of file diff --git a/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/index.html b/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/index.html new file mode 100644 index 0000000..730f43c --- /dev/null +++ b/frontend/react-native/preserve-flatlist-scroll-position-in-react-native/index.html @@ -0,0 +1,6 @@ + + +Preserve FlatList Scroll Position In React Native • Obsidian Garden +

Preserve FlatList Scroll Position In React Native

Sometimes you need to keep scroll position of FlatList in React Native after some user interactions.

// interact() is doing some stuff, that changes FlatList scroll sizetype Props = { interact: () => void; }const SomeList: FC<Props> = ({ interact }) => {  const scrollPosition = useRef(0);  const scrollHeight = useRef(0);    // set it to `true` before interaction and back to `false` right after  const shouldKeepScrollPosition = useRef(false);  const onScroll = useCallback(    (event: NativeSyntheticEvent<NativeScrollEvent>) => {      scrollPosition.current = event.nativeEvent.contentOffset.y;    },    [],  );  const onContentSizeChange = useCallback((_: number, h: number) => {    if (!shouldKeepScrollPosition.current) {      scrollHeight.current = h;      return;    }    ref.current?.scrollToOffset({      offset: scrollPosition.current + (h - scrollHeight.current),      animated: false,    });    scrollHeight.current = h;  }, []);  // onInteraction wraps interaction to preserve scroll position  const onInteraction = useCallback(    () => {      shouldKeepScrollPosition.current = true;      setTimeout(() => {        interact();      }, 0);      setTimeout(() => {        shouldKeepScrollPosition.current = false;      }, 500);    },    [setSelectedSubThemes],  );    return (    <FlatList      // ...required FlatList options      ref={ref}      onContentSizeChange={onContentSizeChange}      onRefresh={onRefresh}      onScroll={onScroll}    />  )}
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/frontend/react-native/react-native-app-auth/_payload.js b/frontend/react-native/react-native-app-auth/_payload.js new file mode 100644 index 0000000..50fda54 --- /dev/null +++ b/frontend/react-native/react-native-app-auth/_payload.js @@ -0,0 +1 @@ +export default {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-Ul5QREg0An":null},prerenderedAt:1667450792698} \ No newline at end of file diff --git a/frontend/react-native/react-native-app-auth/index.html b/frontend/react-native/react-native-app-auth/index.html new file mode 100644 index 0000000..b4a6e40 --- /dev/null +++ b/frontend/react-native/react-native-app-auth/index.html @@ -0,0 +1,6 @@ + + +Obsidian Garden + + \ No newline at end of file diff --git a/frontend/react-native/useful-comands/_payload.js b/frontend/react-native/useful-comands/_payload.js new file mode 100644 index 0000000..57d8b78 --- /dev/null +++ b/frontend/react-native/useful-comands/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:X,_path:Y}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-90RMToCghI":{_path:Y,_dir:"react-native",_draft:y,_partial:y,_locale:"en",_empty:y,title:X,description:g,excerpt:{type:Z,children:[{type:a,tag:i,props:{id:z},children:[{type:b,value:A}]},{type:a,tag:f,props:{code:B,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:B}]}]}]},{type:a,tag:i,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:f,props:{code:E,language:_},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:E}]}]}]},{type:a,tag:i,props:{id:F},children:[{type:b,value:G}]},{type:a,tag:$,props:{},children:[{type:b,value:aa}]},{type:a,tag:f,props:{code:H,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:H}]}]}]},{type:a,tag:i,props:{id:I},children:[{type:b,value:J}]},{type:a,tag:f,props:{code:K,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:K}]}]}]},{type:a,tag:i,props:{id:L},children:[{type:b,value:M}]},{type:a,tag:ab,props:{},children:[{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:r,rel:[n]},children:[{type:b,value:r}]}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:s,rel:[n]},children:[{type:b,value:s}]}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:t,rel:[n]},children:[{type:b,value:t}]}]}]},{type:a,tag:u,props:{id:N},children:[{type:b,value:O}]},{type:a,tag:f,props:{code:P,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:P}]}]}]},{type:a,tag:u,props:{id:Q},children:[{type:b,value:R}]},{type:a,tag:f,props:{code:S,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:b,value:S}]}]}]}]},body:{type:Z,children:[{type:a,tag:i,props:{id:z},children:[{type:b,value:A}]},{type:a,tag:f,props:{code:B,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"adb logcat com.application:I "}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:"\"*:S\""}]}]}]}]}]},{type:a,tag:i,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:f,props:{code:E,language:_},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"keytool -printcert -jarfile "}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:ac}]},{type:a,tag:c,props:{class:o},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:ac}]}]}]}]}]},{type:a,tag:i,props:{id:F},children:[{type:b,value:G}]},{type:a,tag:$,props:{},children:[{type:b,value:aa}]},{type:a,tag:f,props:{code:H,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"npx react-native bundle \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:" --platform android \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:" --dev "}]},{type:a,tag:c,props:{class:U},children:[{type:b,value:"false"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:V}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:" --entry-file index.js \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:" --bundle-output android\u002Fapp\u002Fsrc\u002Fmain\u002Fassets\u002Findex.android.bundle \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:" --assets-dest android\u002Fapp\u002Fsrc\u002Fmain\u002Fres\u002F"}]}]},{type:a,tag:c,props:{class:d},children:[]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:U},children:[{type:b,value:ad}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" android "}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:x}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" .\u002Fgradlew assembleDebug"}]}]},{type:a,tag:c,props:{class:d},children:[]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:W},children:[{type:b,value:"# do your stuff"}]}]},{type:a,tag:c,props:{class:d},children:[]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:".\u002Fgradlew clean"}]}]}]}]}]},{type:a,tag:i,props:{id:I},children:[{type:b,value:J}]},{type:a,tag:f,props:{code:K,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:U},children:[{type:b,value:ad}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" .\u002Fandroid \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:ae}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:x}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" .\u002Fgradlew assembleRelease \\"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:ae}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:x}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" adb install .\u002Fapp\u002Fbuild\u002Foutputs\u002Fapk\u002Frelease\u002Fapp-release.apk"}]}]}]}]}]},{type:a,tag:i,props:{id:L},children:[{type:b,value:M}]},{type:a,tag:ab,props:{},children:[{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:r,rel:[n]},children:[{type:b,value:r}]}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:s,rel:[n]},children:[{type:b,value:s}]}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{href:t,rel:[n]},children:[{type:b,value:t}]}]}]},{type:a,tag:u,props:{id:N},children:[{type:b,value:O}]},{type:a,tag:f,props:{code:P,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:W},children:[{type:b,value:"# ios "}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"xcrun simctl openurl booted "}]},{type:a,tag:c,props:{class:o},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:T}]}]},{type:a,tag:c,props:{class:d},children:[]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:W},children:[{type:b,value:"# android"}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"adb shell am start -W -a android.intent.action.VIEW -d "}]},{type:a,tag:c,props:{class:o},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:T}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:V}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"com.application"}]}]}]}]}]},{type:a,tag:u,props:{id:Q},children:[{type:b,value:R}]},{type:a,tag:f,props:{code:S,language:j},children:[{type:a,tag:h,props:{},children:[{type:a,tag:f,props:{__ignoreMap:g},children:[{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"PACKAGE="}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:"\"com.application\""}]}]},{type:a,tag:c,props:{class:d},children:[]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"adb shell pm set-app-links --package "}]},{type:a,tag:c,props:{class:o},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:af}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" 0 all "}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:x}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:V}]}]},{type:a,tag:c,props:{class:d},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:" adb shell pm verify-app-links --re-verify "}]},{type:a,tag:c,props:{class:o},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:af}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-662dda{color:#8B949E}.ct-5f27d7{color:#FF7B72}.ct-75854a{color:#79C0FF}.ct-a5dd1b{color:#C9D1D9}.ct-d5cc7b{color:#C9D1D9}.ct-8c8ca9{color:#A5D6FF}.ct-a1e55a{color:#C9D1D9}.light .ct-a1e55a{color:#657B83}.light .ct-8c8ca9{color:#2AA198}.light .ct-d5cc7b{color:#859900}.light .ct-a5dd1b{color:#268BD2}.light .ct-75854a{color:#268BD2}.light .ct-5f27d7{color:#859900}.light .ct-662dda{color:#93A1A1}"}]}],toc:{title:g,searchDepth:k,depth:k,links:[{id:z,depth:k,text:A},{id:C,depth:k,text:D},{id:F,depth:k,text:G},{id:I,depth:k,text:J},{id:L,depth:k,text:M,children:[{id:N,depth:ag,text:O},{id:Q,depth:ag,text:R}]}]}},_type:"markdown",_id:"content:Frontend:React Native:Useful comands.md",_source:"content",_file:"Frontend\u002FReact Native\u002FUseful comands.md",_extension:"md"}},prerenderedAt:1667450791569}}("element","text","span","line","ct-a1e55a","code","","pre","h2","shell",2,"li","a","nofollow","ct-d5cc7b","$","ct-a5dd1b","https:\u002F\u002Fzarah.dev\u002F2022\u002F02\u002F08\u002Fandroid12-deeplinks.html","https:\u002F\u002Fdeveloper.android.com\u002Ftraining\u002Fapp-links\u002Fverify-site-associations#invoke-domain-verification","https:\u002F\u002Fdigitalassetlinks.googleapis.com\u002Fv1\u002Fstatements:list?source.web.site=https:\u002F\u002Fmiin.ru&relation=delegate_permission\u002Fcommon.handle_all_urls","h3","ct-8c8ca9","ct-5f27d7","&&",false,"show-android-logcat","Show android logcat","adb logcat com.application:I \"*:S\"\n","get-apks-sha-256","Get .apk's SHA-256","keytool -printcert -jarfile \"$1\"\n","assemble-debug-release-on-android","Assemble debug release on Android","npx react-native bundle \\\n --platform android \\\n --dev false \\\n --entry-file index.js \\\n --bundle-output android\u002Fapp\u002Fsrc\u002Fmain\u002Fassets\u002Findex.android.bundle \\\n --assets-dest android\u002Fapp\u002Fsrc\u002Fmain\u002Fres\u002F\n\ncd android && .\u002Fgradlew assembleDebug\n\n# do your stuff\n\n.\u002Fgradlew clean\n","send-release-to-android-device","Send release to Android device","cd .\u002Fandroid \\\n && .\u002Fgradlew assembleRelease \\\n && adb install .\u002Fapp\u002Fbuild\u002Foutputs\u002Fapk\u002Frelease\u002Fapp-release.apk\n","deep-links","Deep links","open-deep-links","Open deep links","# ios \nxcrun simctl openurl booted $1\n\n# android\nadb shell am start -W -a android.intent.action.VIEW -d $1 \\\ncom.application\n","reverify-links-on-android","Reverify links on Android","PACKAGE=\"com.application\"\n\nadb shell pm set-app-links --package $PACKAGE 0 all && \\\n adb shell pm verify-app-links --re-verify $PACKAGE\n","1","ct-75854a"," \\","ct-662dda","Useful Comands","\u002Ffrontend\u002Freact-native\u002Fuseful-comands","root","bash","p","Packages release with bundled resources.","ul","\"","cd"," ","PACKAGE",3)) \ No newline at end of file diff --git a/frontend/react-native/useful-comands/index.html b/frontend/react-native/useful-comands/index.html new file mode 100644 index 0000000..47f80c5 --- /dev/null +++ b/frontend/react-native/useful-comands/index.html @@ -0,0 +1,6 @@ + + +Useful Comands • Obsidian Garden +

Useful Comands

Show android logcat

adb logcat com.application:I "*:S"

Get .apk's SHA-256

keytool -printcert -jarfile "$1"

Assemble debug release on Android

Packages release with bundled resources.

npx react-native bundle \  --platform android \  --dev false \  --entry-file index.js \  --bundle-output android/app/src/main/assets/index.android.bundle \  --assets-dest android/app/src/main/res/cd android && ./gradlew assembleDebug# do your stuff./gradlew clean

Send release to Android device

cd ./android \  && ./gradlew assembleRelease \  && adb install ./app/build/outputs/apk/release/app-release.apk
# ios xcrun simctl openurl booted $1# androidadb shell am start -W -a android.intent.action.VIEW -d $1 \com.application
PACKAGE="com.application"adb shell pm set-app-links --package $PACKAGE 0 all && \  adb shell pm verify-app-links --re-verify $PACKAGE
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/frontend/react/axios-refresh-token-on-react/_payload.js b/frontend/react/axios-refresh-token-on-react/_payload.js new file mode 100644 index 0000000..c1f7c44 --- /dev/null +++ b/frontend/react/axios-refresh-token-on-react/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a_,a$,ba,bb){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:ae,_path:"\u002Ffrontend\u002Freact",children:[{title:af,_path:ag},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-lzTEE4EzmV":{_path:ag,_dir:"react",_draft:U,_partial:U,_locale:"en",_empty:U,title:af,description:"\u003CApiProvider \u002F\u003E component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props.",excerpt:{type:ah,children:[{type:a,tag:ai,props:{},children:[{type:a,tag:aj,props:{},children:[{type:c,value:ak}]},{type:c,value:al}]},{type:a,tag:M,props:{code:V,language:am},children:[{type:a,tag:an,props:{},children:[{type:a,tag:M,props:{__ignoreMap:W},children:[{type:c,value:V}]}]}]}]},body:{type:ah,children:[{type:a,tag:ai,props:{},children:[{type:a,tag:aj,props:{},children:[{type:c,value:ak}]},{type:c,value:al}]},{type:a,tag:M,props:{code:V,language:am},children:[{type:a,tag:an,props:{},children:[{type:a,tag:M,props:{__ignoreMap:W},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"\"axios\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:", {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:av}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"} "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"\"react\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:w},children:[{type:c,value:"interface"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-005a6c"},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:"extends"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-cb2db9"},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:ay},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:"void"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" client: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" baseURL: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"});"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aF}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:aG},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aH}]},{type:a,tag:b,props:{class:aG},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u003E "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ({ "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aI}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"}) "}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" baseURL: "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aC}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aD}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" )."}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"current"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u003C() "}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u003E(() "}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:"\u002F\u002F TODO: implement me"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"throw"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"new"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:"Error"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"\"not implemented\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }, []);"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:av}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"(() "}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aK}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:"\u002F\u002F append `access` token to all requests"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:aL}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aM}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:aN}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" Authorization: "}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"`Bearer ${"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:"ct-63ec24"},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"}`"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aP}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:aQ}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:aR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aS}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aT}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aU}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:"\u002F\u002F refreshing interceptor"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aM}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:aQ}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aP}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:aN}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:w},children:[{type:c,value:"function"}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"status"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"==="}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-30ee2f"},children:[{type:c,value:"401"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"&&"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aK}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aW}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aW}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-6fcf02"},children:[{type:c,value:"true"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:u},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aY}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" headers: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aY}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aO}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" Authorization: "}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"\"Bearer \""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"+"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"();"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:H},children:[{type:c,value:aR}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aS}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aT}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aU}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:r}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aZ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aL}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ab}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:aZ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }, ["}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"]);"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aH}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:a_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"value"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"{{ "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" }}"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:a$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:" {"}]},{type:a,tag:b,props:{class:x},children:[{type:c,value:aI}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aA}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"\u003C\u002F"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:a_}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:a$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" );"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"};"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ba}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"useAPI"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:")."}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:ba}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" { "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aF}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" };"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-6fcf02{color:#79C0FF}.ct-30ee2f{color:#79C0FF}.ct-63ec24{color:#A5D6FF}.ct-8069ea{color:#8B949E}.ct-9af740{color:#FFA657}.ct-62a4b7{color:#79C0FF}.ct-f8ba82{color:#79C0FF}.ct-35cf76{color:#FF7B72}.ct-fddbd1{color:#D2A8FF}.ct-f0eff0{color:#79C0FF}.ct-afc73c{color:#FF7B72}.ct-74e615{color:#FFA657}.ct-cb2db9{color:#79C0FF}.ct-005a6c{color:#FFA657}.ct-70c1b9{color:#C9D1D9}.ct-4ea82c{color:#FF7B72}.ct-cdcb1e{color:#A5D6FF}.ct-a0bdfd{color:#C9D1D9}.ct-59620a{color:#C9D1D9}.ct-7a9050{color:#FF7B72}.light .ct-7a9050{color:#859900}.light .ct-59620a{color:#657B83}.light .ct-a0bdfd{color:#268BD2}.light .ct-cdcb1e{color:#2AA198}.light .ct-4ea82c{color:#073642}.light .ct-70c1b9{color:#657B83}.light .ct-005a6c{color:#268BD2}.light .ct-cb2db9{color:#657B83}.light .ct-74e615{color:#657B83}.light .ct-afc73c{color:#859900}.light .ct-f0eff0{color:#859900}.light .ct-fddbd1{color:#268BD2}.light .ct-35cf76{color:#073642}.light .ct-f8ba82{color:#859900}.light .ct-62a4b7{color:#268BD2}.light .ct-9af740{color:#268BD2}.light .ct-8069ea{color:#93A1A1}.light .ct-63ec24{color:#657B83}.light .ct-30ee2f{color:#D33682}.light .ct-6fcf02{color:#B58900}"}]}],toc:{title:W,searchDepth:bb,depth:bb,links:[]}},_type:"markdown",_id:"content:Frontend:React:Axios refresh token on React.md",_source:"content",_file:"Frontend\u002FReact\u002FAxios refresh token on React.md",_extension:"md"}},prerenderedAt:1667450791621}}("element","span","text","ct-59620a","line","ct-a0bdfd"," ","ct-7a9050",".","ct-70c1b9","ct-fddbd1"," ","ct-35cf76",",",";"," ","="," {","=\u003E","const","ct-62a4b7","(","ct-4ea82c","ct-74e615"," ","return","axios","ct-cdcb1e","tokens",", ","client","error",":","ct-f8ba82",");"," ("," ","originalRequest","code","access","logout","APIContext","({","interceptors","config","response",false,"import axios from \"axios\";\nimport React, {\n createContext,\n FC,\n PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from \"react\";\n\ninterface APIProviderProps extends PropsWithChildren {\n tokens: {\n access: string;\n refresh: string;\n };\n logout: () =\u003E void;\n}\n\nconst APIContext = createContext({\n client: axios.create({\n baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n }),\n});\n\nconst APIProvider: FC\u003CAPIProviderProps\u003E = ({ \n tokens, \n logout, \n children,\n}) =\u003E {\n const client = useRef(\n axios.create({\n baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,\n })\n ).current;\n\n const refreshTokens = useCallback\u003C() =\u003E string\u003E(() =\u003E {\n \u002F\u002F TODO: implement me\n throw new Error(\"not implemented\");\n }, []);\n\n useEffect(() =\u003E {\n if (!tokens.access) {\n return;\n }\n\n \u002F\u002F append `access` token to all requests\n const req = client.interceptors.request.use(\n async (config) =\u003E {\n config.headers = {\n Authorization: `Bearer ${tokens.access}`,\n };\n return config;\n },\n (error) =\u003E {\n Promise.reject(error);\n }\n );\n\n \u002F\u002F refreshing interceptor\n const resp = client.interceptors.response.use(\n (response) =\u003E {\n return response;\n },\n async function (error) {\n const originalRequest = error.config;\n\n if (error.response.status === 401 && !originalRequest._retry) {\n originalRequest._retry = true;\n\n const newToken = refreshTokens;\n\n return axios({\n ...originalRequest,\n headers: {\n ...originalRequest.headers,\n Authorization: \"Bearer \" + newToken,\n },\n });\n }\n\n logout();\n return Promise.reject(error);\n }\n );\n\n return () =\u003E {\n axios.interceptors.request.eject(req);\n axios.interceptors.request.eject(resp);\n };\n }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);\n\n return (\n \u003CAPIContext.Provider value={{ client }}\u003E\n {children}\n \u003C\u002FAPIContext.Provider\u003E\n );\n};\n\nexport const useAPI = () =\u003E useContext(APIContext).client;\n\nexport { APIProvider };\n","","ct-afc73c","string"," () ","refreshTokens","ct-8069ea",") {","request",") "," ","React","Axios Refresh Token On React","\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react","root","p","code-inline","\u003CApiProvider \u002F\u003E"," component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props.","typescript","pre","import","from","createContext","FC","PropsWithChildren","useCallback","useContext","useEffect","useRef","APIProviderProps","ct-f0eff0","refresh","}","create","process","env","NEXT_PUBLIC_API_ENDPOINT","APIProvider","ct-9af740","\u003C","children","if","!","req","use","async","headers"," },"," (","Promise","reject"," }"," );","resp","_retry","newToken","...","eject","Provider","\u003E","export",2)) \ No newline at end of file diff --git a/frontend/react/axios-refresh-token-on-react/index.html b/frontend/react/axios-refresh-token-on-react/index.html new file mode 100644 index 0000000..81d9a27 --- /dev/null +++ b/frontend/react/axios-refresh-token-on-react/index.html @@ -0,0 +1,6 @@ + + +Axios Refresh Token On React • Obsidian Garden +

Axios Refresh Token On React

<ApiProvider /> component, that will handle token refresh if needed. Refresh function should, probably, be passed through component props.

import axios from "axios";import React, {  createContext,  FC,  PropsWithChildren,  useCallback,  useContext,  useEffect,  useRef,} from "react";interface APIProviderProps extends PropsWithChildren {  tokens: {    access: string;    refresh: string;  };  logout: () => void;}const APIContext = createContext({  client: axios.create({    baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,  }),});const APIProvider: FC<APIProviderProps> = ({     tokens,     logout,     children,}) => {  const client = useRef(    axios.create({      baseURL: process.env.NEXT_PUBLIC_API_ENDPOINT,    })  ).current;  const refreshTokens = useCallback<() => string>(() => {    // TODO: implement me    throw new Error("not implemented");  }, []);  useEffect(() => {    if (!tokens.access) {      return;    }    // append `access` token to all requests    const req = client.interceptors.request.use(      async (config) => {        config.headers = {          Authorization: `Bearer ${tokens.access}`,        };        return config;      },      (error) => {        Promise.reject(error);      }    );    // refreshing interceptor    const resp = client.interceptors.response.use(      (response) => {        return response;      },      async function (error) {        const originalRequest = error.config;        if (error.response.status === 401 && !originalRequest._retry) {          originalRequest._retry = true;          const newToken = refreshTokens;          return axios({            ...originalRequest,            headers: {              ...originalRequest.headers,              Authorization: "Bearer " + newToken,            },          });        }        logout();        return Promise.reject(error);      }    );    return () => {      axios.interceptors.request.eject(req);      axios.interceptors.request.eject(resp);    };  }, [client, tokens.access, tokens.refresh, refreshTokens, logout]);  return (    <APIContext.Provider value={{ client }}>        {children}    </APIContext.Provider>  );};export const useAPI = () => useContext(APIContext).client;export { APIProvider };
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/frontend/react/axios-with-abortcontroller/_payload.js b/frontend/react/axios-with-abortcontroller/_payload.js new file mode 100644 index 0000000..a59be86 --- /dev/null +++ b/frontend/react/axios-with-abortcontroller/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:G,_path:H}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-9RFKZoeNNl":{_path:H,_dir:"react",_draft:u,_partial:u,_locale:"en",_empty:u,title:G,description:"If you need to cancel some request, use axios with AbortController. Previously axios used cancellation token, but now it's deprecated.",excerpt:{type:I,children:[{type:a,tag:r,props:{},children:[{type:c,value:J},{type:a,tag:K,props:{href:L,rel:[M]},children:[{type:c,value:N}]},{type:c,value:O}]},{type:a,tag:r,props:{},children:[{type:a,tag:P,props:{},children:[{type:c,value:s}]},{type:c,value:Q}]},{type:a,tag:t,props:{code:v,language:R},children:[{type:a,tag:S,props:{},children:[{type:a,tag:t,props:{__ignoreMap:w},children:[{type:c,value:v}]}]}]}]},body:{type:I,children:[{type:a,tag:r,props:{},children:[{type:c,value:J},{type:a,tag:K,props:{href:L,rel:[M]},children:[{type:c,value:N}]},{type:c,value:O}]},{type:a,tag:r,props:{},children:[{type:a,tag:P,props:{},children:[{type:c,value:s}]},{type:c,value:Q}]},{type:a,tag:t,props:{code:v,language:R},children:[{type:a,tag:S,props:{},children:[{type:a,tag:t,props:{__ignoreMap:w},children:[{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" } "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:"\"react\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:"'axios'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:f},children:[]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"create"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:f},children:[]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"export"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"useGetUsers"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"());"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"async"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"await"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:"\"\u002F\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:", {"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" "}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:"\u002F\u002F params and props here"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" signal: "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"signal"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:","}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" });"}]}]},{type:a,tag:b,props:{class:f},children:[]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"data"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }, []);"}]}]},{type:a,tag:b,props:{class:f},children:[]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:o},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"(() "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"abort"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:"\u002F\u002F controller should be rewritten or all requests will fail"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }, ["}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"]);"}]}]},{type:a,tag:b,props:{class:f},children:[]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" };"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"};"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-90eb0e{color:#8B949E}.ct-24254f{color:#D2A8FF}.ct-ffae3f{color:#79C0FF}.ct-e623bb{color:#FF7B72}.ct-c6e561{color:#A5D6FF}.ct-c8d839{color:#C9D1D9}.ct-f54e97{color:#C9D1D9}.ct-ca69a5{color:#FF7B72}.light .ct-ca69a5{color:#859900}.light .ct-f54e97{color:#657B83}.light .ct-c8d839{color:#268BD2}.light .ct-c6e561{color:#2AA198}.light .ct-e623bb{color:#073642}.light .ct-ffae3f{color:#268BD2}.light .ct-24254f{color:#268BD2}.light .ct-90eb0e{color:#93A1A1}"}]}],toc:{title:w,searchDepth:ae,depth:ae,links:[]}},_type:"markdown",_id:"content:Frontend:React:Axios with AbortController.md",_source:"content",_file:"Frontend\u002FReact\u002FAxios with AbortController.md",_extension:"md"}},prerenderedAt:1667450791709}}("element","span","text","ct-f54e97"," ","line","ct-ca69a5","ct-c8d839","ct-e623bb","ct-24254f",".","=","const"," ","ct-ffae3f"," ","controller","p","AbortController","code",false,"import { useCallback, useRef } from \"react\";\nimport axios from 'axios';\n\nconst client = axios.create();\n\nexport const useGetUsers = () =\u003E {\n const controller = useRef(new AbortController());\n \n const get = useCallback(async () =\u003E {\n const result = await client.get(\"\u002F\", {\n \u002F\u002F params and props here\n signal: controller.current.signal,\n });\n\n return result.data;\n }, []);\n\n const cancel = useCallback(() =\u003E {\n controller.current.abort();\n \n \u002F\u002F controller should be rewritten or all requests will fail\n controller.current = new AbortController();\n }, [controller]);\n\n return { get, cancel };\n};\n","","useCallback","ct-c6e561",";","();","=\u003E"," {","(","get","current","Axios With AbortController","\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller","root","If you need to cancel some request, use ","a","https:\u002F\u002Faxios-http.com\u002Fdocs\u002Fcancellation","nofollow","axios with AbortController",". Previously axios used cancellation token, but now it's deprecated.","code-inline"," can be used with a multiple requests to cancel them at once.","typescript","pre","import"," { ",", ","useRef","from","axios","client"," () ","new","result","ct-90eb0e","return","cancel",2)) \ No newline at end of file diff --git a/frontend/react/axios-with-abortcontroller/index.html b/frontend/react/axios-with-abortcontroller/index.html new file mode 100644 index 0000000..8faa28b --- /dev/null +++ b/frontend/react/axios-with-abortcontroller/index.html @@ -0,0 +1,6 @@ + + +Axios With AbortController • Obsidian Garden +

Axios With AbortController

If you need to cancel some request, use axios with AbortController. Previously axios used cancellation token, but now it's deprecated.

AbortController can be used with a multiple requests to cancel them at once.

import { useCallback, useRef } from "react";import axios from 'axios';const client = axios.create();export const useGetUsers = () => {  const controller = useRef(new AbortController());    const get = useCallback(async () => {    const result = await client.get("/", {        // params and props here        signal: controller.current.signal,    });    return result.data;  }, []);  const cancel = useCallback(() => {    controller.current.abort();        // controller should be rewritten or all requests will fail    controller.current = new AbortController();  }, [controller]);  return { get, cancel };};
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/frontend/vue/add-global-variable-to-window/_payload.js b/frontend/vue/add-global-variable-to-window/_payload.js new file mode 100644 index 0000000..1efbf59 --- /dev/null +++ b/frontend/vue/add-global-variable-to-window/_payload.js @@ -0,0 +1 @@ +export default {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-gf0FmfUQhH":null},prerenderedAt:1667450792748} \ No newline at end of file diff --git a/frontend/vue/add-global-variable-to-window/index.html b/frontend/vue/add-global-variable-to-window/index.html new file mode 100644 index 0000000..feec23c --- /dev/null +++ b/frontend/vue/add-global-variable-to-window/index.html @@ -0,0 +1,6 @@ + + +Obsidian Garden + + \ No newline at end of file diff --git a/frontend/vue/adding-global-properties-to-component/_payload.js b/frontend/vue/adding-global-properties-to-component/_payload.js new file mode 100644 index 0000000..7c46c4b --- /dev/null +++ b/frontend/vue/adding-global-properties-to-component/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:q,_path:r},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-gHURXJrO3C":{_path:r,_dir:"vue",_draft:l,_partial:l,_locale:"en",_empty:l,title:q,description:"The topic's fully covered in the official documentation and in Add global variable to window.",excerpt:{type:s,children:[{type:a,tag:h,props:{},children:[{type:b,value:t},{type:a,tag:i,props:{href:u,rel:[v]},children:[{type:b,value:w}]},{type:b,value:x},{type:a,tag:i,props:{href:y},children:[{type:b,value:z}]},{type:b,value:A}]},{type:a,tag:h,props:{},children:[{type:b,value:B},{type:a,tag:j,props:{},children:[{type:b,value:C}]},{type:b,value:D},{type:a,tag:j,props:{},children:[{type:b,value:m}]},{type:b,value:E}]},{type:a,tag:k,props:{code:n,language:F},children:[{type:a,tag:G,props:{},children:[{type:a,tag:k,props:{__ignoreMap:o},children:[{type:b,value:n}]}]}]}]},body:{type:s,children:[{type:a,tag:h,props:{},children:[{type:b,value:t},{type:a,tag:i,props:{href:u,rel:[v]},children:[{type:b,value:w}]},{type:b,value:x},{type:a,tag:i,props:{href:y},children:[{type:b,value:z}]},{type:b,value:A}]},{type:a,tag:h,props:{},children:[{type:b,value:B},{type:a,tag:j,props:{},children:[{type:b,value:C}]},{type:b,value:D},{type:a,tag:j,props:{},children:[{type:b,value:m}]},{type:b,value:E}]},{type:a,tag:k,props:{code:n,language:F},children:[{type:a,tag:G,props:{},children:[{type:a,tag:k,props:{__ignoreMap:o},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:"ct-ba2647"},children:[{type:b,value:"\u002F\u002F ~\u002Findex.d.ts or ~\u002Fcustom.d.ts"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:H},children:[{type:b,value:"import"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:"ct-1ce920"},children:[{type:b,value:"axios"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:H},children:[{type:b,value:"from"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:"'axios'"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:p},children:[{type:b,value:"declare"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:p},children:[{type:b,value:"module"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:"'vue'"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:J}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" "}]},{type:a,tag:c,props:{class:p},children:[{type:b,value:"interface"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:"ct-a8d69f"},children:[{type:b,value:"ComponentCustomProperties"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:J}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:f}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:g},children:[{type:b,value:" "}]},{type:a,tag:c,props:{class:"ct-5cb2bd"},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:K},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:" ("}]},{type:a,tag:c,props:{class:"ct-71e141"},children:[{type:b,value:"key"}]},{type:a,tag:c,props:{class:K},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:M},children:[{type:b,value:N}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:") "}]},{type:a,tag:c,props:{class:"ct-242aba"},children:[{type:b,value:"=\u003E"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:f}]},{type:a,tag:c,props:{class:M},children:[{type:b,value:N}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" }"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"}"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-242aba{color:#FF7B72}.ct-2c3ffd{color:#79C0FF}.ct-71e141{color:#FFA657}.ct-e04799{color:#FF7B72}.ct-5cb2bd{color:#D2A8FF}.ct-08507f{color:#C9D1D9}.ct-a8d69f{color:#FFA657}.ct-4fa168{color:#FF7B72}.ct-03d1bd{color:#A5D6FF}.ct-1ce920{color:#C9D1D9}.ct-ce3805{color:#C9D1D9}.ct-b38898{color:#FF7B72}.ct-ba2647{color:#8B949E}.light .ct-ba2647{color:#93A1A1}.light .ct-b38898{color:#859900}.light .ct-ce3805{color:#657B83}.light .ct-1ce920{color:#268BD2}.light .ct-03d1bd{color:#2AA198}.light .ct-4fa168{color:#073642}.light .ct-a8d69f{color:#268BD2}.light .ct-08507f{color:#657B83}.light .ct-5cb2bd{color:#268BD2}.light .ct-e04799{color:#859900}.light .ct-71e141{color:#657B83}.light .ct-2c3ffd{color:#859900}.light .ct-242aba{color:#073642}"}]}],toc:{title:o,searchDepth:O,depth:O,links:[]}},_type:"markdown",_id:"content:Frontend:Vue:Adding global properties to component.md",_source:"content",_file:"Frontend\u002FVue\u002FAdding global properties to component.md",_extension:"md"}},prerenderedAt:1667450791756}}("element","text","span","ct-ce3805","line"," ","ct-08507f","p","a","code-inline","code",false,"$translate","\u002F\u002F ~\u002Findex.d.ts or ~\u002Fcustom.d.ts\n\nimport axios from 'axios'\n\ndeclare module 'vue' {\n interface ComponentCustomProperties {\n $http: typeof axios\n $translate: (key: string) =\u003E string\n }\n}\n","","ct-4fa168","Adding Global Properties To Component","\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component","root","The topic's fully covered in the ","https:\u002F\u002Fvuejs.org\u002Fguide\u002Ftypescript\u002Foptions-api.html#augmenting-global-properties","nofollow","official documentation"," and in ","Add%20global%20variable%20to%20window","Add global variable to window",".","For example, you want to add global ","$http"," and "," services to all of project's components:","typescript","pre","ct-b38898","ct-03d1bd"," {","ct-e04799",":","ct-2c3ffd","string",2)) \ No newline at end of file diff --git a/frontend/vue/adding-global-properties-to-component/index.html b/frontend/vue/adding-global-properties-to-component/index.html new file mode 100644 index 0000000..bc6151c --- /dev/null +++ b/frontend/vue/adding-global-properties-to-component/index.html @@ -0,0 +1,6 @@ + + +Adding Global Properties To Component • Obsidian Garden +

Adding Global Properties To Component

The topic's fully covered in the official documentation and in Add global variable to window.

For example, you want to add global $http and $translate services to all of project's components:

// ~/index.d.ts or ~/custom.d.tsimport axios from 'axios'declare module 'vue' {  interface ComponentCustomProperties {      $translate: (key: string) => string  }}
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/frontend/vue/make-nuxt-handle-obsidian-highlights/_payload.js b/frontend/vue/make-nuxt-handle-obsidian-highlights/_payload.js new file mode 100644 index 0000000..03f8f77 --- /dev/null +++ b/frontend/vue/make-nuxt-handle-obsidian-highlights/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:u,_path:v}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-JZY9J7Y59r":{_path:v,_dir:"vue",_draft:m,_partial:m,_locale:"en",_empty:m,title:u,description:"By default Nuxt Content Plugin not handling \u003Cspan class=\"highlight\"\u003Ehighlight\u003C\u002Fspan\u003E links. To fix that we will create Nitro plugin:",excerpt:{type:w,children:[{type:a,tag:x,props:{},children:[{type:b,value:y},{type:a,tag:z,props:{href:A,rel:[B]},children:[{type:b,value:C}]},{type:b,value:D},{type:a,tag:k,props:{},children:[{type:b,value:E}]},{type:b,value:F},{type:a,tag:k,props:{},children:[{type:b,value:G}]},{type:b,value:H}]},{type:a,tag:l,props:{code:n,language:I},children:[{type:a,tag:J,props:{},children:[{type:a,tag:l,props:{__ignoreMap:o},children:[{type:b,value:n}]}]}]}]},body:{type:w,children:[{type:a,tag:x,props:{},children:[{type:b,value:y},{type:a,tag:z,props:{href:A,rel:[B]},children:[{type:b,value:C}]},{type:b,value:D},{type:a,tag:k,props:{},children:[{type:b,value:E}]},{type:b,value:F},{type:a,tag:k,props:{},children:[{type:b,value:G}]},{type:b,value:H}]},{type:a,tag:l,props:{code:n,language:I},children:[{type:a,tag:J,props:{},children:[{type:a,tag:l,props:{__ignoreMap:o},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:"ct-d44533"},children:[{type:b,value:"\u002F\u002F ~\u002Fserver\u002Fplugins\u002Fhighlight.ts"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:K},children:[{type:b,value:"export"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:K},children:[{type:b,value:"default"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:"ct-587ef2"},children:[{type:b,value:"defineNitroPlugin"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:"((nitroApp) "}]},{type:a,tag:c,props:{class:"ct-fe84d3"},children:[{type:b,value:"=\u003E"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:p},children:[{type:b,value:"{"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" "}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"nitroApp"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"hooks"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:"hook"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:s},children:[{type:b,value:"\"content:file:beforeParse\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" "}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"if"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" ("}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"_id"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:"endsWith"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:s},children:[{type:b,value:"\".md\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:")) {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" "}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"="}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:i}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:g}]},{type:a,tag:c,props:{class:q},children:[{type:b,value:"replace"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:M}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:"\u002F==("}]},{type:a,tag:c,props:{class:O},children:[{type:b,value:"["}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"^"}]},{type:a,tag:c,props:{class:O},children:[{type:b,value:"=]"}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"+"}]},{type:a,tag:c,props:{class:N},children:[{type:b,value:")==\u002F"}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"gs"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:","}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:M}]},{type:a,tag:c,props:{class:s},children:[{type:b,value:"`\u003Cspan class=\"highlight\"\u003E$1\u003C\u002Fspan\u003E`"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" );"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" }"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" });"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:p},children:[{type:b,value:"}"}]},{type:a,tag:c,props:{class:h},children:[{type:b,value:")"}]},{type:a,tag:c,props:{class:p},children:[{type:b,value:";"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-d418a6{color:#79C0FF}.ct-709a0e{color:#A5D6FF}.ct-ad76ea{color:#FF7B72}.ct-a56f94{color:#A5D6FF}.ct-1e6537{color:#D2A8FF}.ct-98eece{color:#C9D1D9}.ct-356b04{color:#C9D1D9}.ct-aaf06c{color:#C9D1D9}.ct-fe84d3{color:#FF7B72}.ct-587ef2{color:#D2A8FF}.ct-0aa45e{color:#FFA657}.ct-009f14{color:#FF7B72}.ct-d44533{color:#8B949E}.light .ct-d44533{color:#93A1A1}.light .ct-009f14{color:#859900}.light .ct-0aa45e{color:#657B83}.light .ct-587ef2{color:#268BD2}.light .ct-fe84d3{color:#073642}.light .ct-aaf06c{color:#657B83}.light .ct-356b04{color:#657B83}.light .ct-98eece{color:#268BD2}.light .ct-1e6537{color:#268BD2}.light .ct-a56f94{color:#2AA198}.light .ct-ad76ea{color:#859900}.light .ct-709a0e{color:#D30102}.light .ct-d418a6{color:#CB4B16}"}]}],toc:{title:o,searchDepth:P,depth:P,links:[]}},_type:"markdown",_id:"content:Frontend:Vue:Make Nuxt handle Obsidian highlights.md",_source:"content",_file:"Frontend\u002FVue\u002FMake Nuxt handle Obsidian highlights.md",_extension:"md"}},prerenderedAt:1667450791789}}("element","text","span","ct-356b04","line","ct-98eece",".","ct-0aa45e"," ","ct-ad76ea","code-inline","code",false,"\u002F\u002F ~\u002Fserver\u002Fplugins\u002Fhighlight.ts\nexport default defineNitroPlugin((nitroApp) =\u003E {\n nitroApp.hooks.hook(\"content:file:beforeParse\", (file) =\u003E {\n if (file._id.endsWith(\".md\")) {\n file.body = file.body.replace(\n \u002F==([^=]+)==\u002Fgs,\n `\u003Cspan class=\"highlight\"\u003E$1\u003C\u002Fspan\u003E`\n );\n }\n });\n});\n","","ct-aaf06c","ct-1e6537","(","ct-a56f94","file","Make Nuxt Handle Obsidian Highlights","\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights","root","p","By default ","a","https:\u002F\u002Fcontent.nuxtjs.org","nofollow","Nuxt Content Plugin"," not handling ","\u003Cspan class=\"highlight\"\u003Ehighlight\u003C\u002Fspan\u003E"," links. To fix that we will create ","Nitro"," plugin:","typescript","pre","ct-009f14","body"," ","ct-709a0e","ct-d418a6",2)) \ No newline at end of file diff --git a/frontend/vue/make-nuxt-handle-obsidian-highlights/index.html b/frontend/vue/make-nuxt-handle-obsidian-highlights/index.html new file mode 100644 index 0000000..a0d8e8c --- /dev/null +++ b/frontend/vue/make-nuxt-handle-obsidian-highlights/index.html @@ -0,0 +1,6 @@ + + +Make Nuxt Handle Obsidian Highlights • Obsidian Garden +

Make Nuxt Handle Obsidian Highlights

By default Nuxt Content Plugin not handling <span class="highlight">highlight</span> links. To fix that we will create Nitro plugin:

// ~/server/plugins/highlight.tsexport default defineNitroPlugin((nitroApp) => {  nitroApp.hooks.hook("content:file:beforeParse"    if (file._id.endsWith(".md")) {      file.body = file.body.replace(        /==([^=]+)==/gs,        `<span class="highlight">$1</span>`      );    }  });});
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/git/force-git-to-use-https/_payload.js b/git/force-git-to-use-https/_payload.js new file mode 100644 index 0000000..c869a98 --- /dev/null +++ b/git/force-git-to-use-https/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:k,_path:l},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-atqGqeweL2":{_path:l,_dir:"git",_draft:g,_partial:g,_locale:"en",_empty:g,title:k,description:h,excerpt:{type:m,children:[{type:a,tag:d,props:{},children:[{type:b,value:h}]},{type:a,tag:d,props:{},children:[{type:b,value:n},{type:a,tag:o,props:{},children:[{type:b,value:p}]},{type:b,value:q}]},{type:a,tag:e,props:{code:i,language:r},children:[{type:a,tag:s,props:{},children:[{type:a,tag:e,props:{__ignoreMap:j},children:[{type:b,value:i}]}]}]}]},body:{type:m,children:[{type:a,tag:d,props:{},children:[{type:b,value:h}]},{type:a,tag:d,props:{},children:[{type:b,value:n},{type:a,tag:o,props:{},children:[{type:b,value:p}]},{type:b,value:q}]},{type:a,tag:e,props:{code:i,language:r},children:[{type:a,tag:s,props:{},children:[{type:a,tag:e,props:{__ignoreMap:j},children:[{type:a,tag:c,props:{class:t},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:"[url "}]},{type:a,tag:c,props:{class:"ct-528a2e"},children:[{type:b,value:"\"https:\u002F\u002Fgithub.com\""}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:"]"}]}]},{type:a,tag:c,props:{class:t},children:[{type:a,tag:c,props:{class:f},children:[{type:b,value:" insteadOf "}]},{type:a,tag:c,props:{class:"ct-fa8b57"},children:[{type:b,value:"="}]},{type:a,tag:c,props:{class:f},children:[{type:b,value:" git:"}]},{type:a,tag:c,props:{class:"ct-3930f2"},children:[{type:b,value:"\u002F\u002Fgithub.com"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-3930f2{color:#8B949E}.ct-fa8b57{color:#FF7B72}.ct-528a2e{color:#A5D6FF}.ct-35ce96{color:#C9D1D9}.light .ct-35ce96{color:#657B83}.light .ct-528a2e{color:#2AA198}.light .ct-fa8b57{color:#859900}.light .ct-3930f2{color:#93A1A1}"}]}],toc:{title:j,searchDepth:u,depth:u,links:[]}},_type:"markdown",_id:"content:Git:Force git to use HTTPS.md",_source:"content",_file:"Git\u002FForce git to use HTTPS.md",_extension:"md"}},prerenderedAt:1667450791828}}("element","text","span","p","code","ct-35ce96",false,"Forces #git to use https even if remote url is #SSH. Useful for the networks with blocked #ssh protocol.","[url \"https:\u002F\u002Fgithub.com\"]\n insteadOf = git:\u002F\u002Fgithub.com\n","","Force Git To Use HTTPS","\u002Fgit\u002Fforce-git-to-use-https","root","Put this inside your ","code-inline","~\u002F.gitconfig",":","c","pre","line",2)) \ No newline at end of file diff --git a/git/force-git-to-use-https/index.html b/git/force-git-to-use-https/index.html new file mode 100644 index 0000000..f75fa76 --- /dev/null +++ b/git/force-git-to-use-https/index.html @@ -0,0 +1,6 @@ + + +Force Git To Use HTTPS • Obsidian Garden + + \ No newline at end of file diff --git a/git/git-aliases-and-useful-commands/_payload.js b/git/git-aliases-and-useful-commands/_payload.js new file mode 100644 index 0000000..d903e3e --- /dev/null +++ b/git/git-aliases-and-useful-commands/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:t,_path:u}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-VrJO0uSyzq":{_path:u,_dir:"git",_draft:q,_partial:q,_locale:"en",_empty:q,title:t,description:"Shorthands for #git commands can be specified. Should be placed at ~\u002F.gitconfig.",excerpt:{type:v,children:[{type:a,tag:w,props:{},children:[{type:b,value:x},{type:a,tag:h,props:{},children:[{type:b,value:y}]},{type:b,value:z}]},{type:a,tag:n,props:{code:r,language:A},children:[{type:a,tag:B,props:{},children:[{type:a,tag:n,props:{__ignoreMap:s},children:[{type:b,value:r}]}]}]},{type:a,tag:C,props:{},children:[{type:a,tag:D,props:{},children:[{type:a,tag:i,props:{},children:[{type:a,tag:o,props:{align:e},children:[{type:a,tag:p,props:{},children:[{type:b,value:E}]}]},{type:a,tag:o,props:{align:e},children:[{type:a,tag:p,props:{},children:[{type:b,value:F}]}]}]}]},{type:a,tag:G,props:{},children:[{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:H}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:I}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:J}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:K}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:L}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:M}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:N}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:O}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:P}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:Q}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:R}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:S}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:T}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:U}]}]}]}]}]},body:{type:v,children:[{type:a,tag:w,props:{},children:[{type:b,value:x},{type:a,tag:h,props:{},children:[{type:b,value:y}]},{type:b,value:z}]},{type:a,tag:n,props:{code:r,language:A},children:[{type:a,tag:B,props:{},children:[{type:a,tag:n,props:{__ignoreMap:s},children:[{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"[alias]"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" flush "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" git clean"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"branches branch "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:V}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" grep "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"v master "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:V}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" xargs git branch "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"D"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" lol "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" log "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"oneline "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"graph"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" l "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" lol"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" c "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:W}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:X}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" cv "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:W}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"no"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"verify "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:X}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" p "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" push"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" pf "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" p "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"force"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"with"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"lease"}]}]},{type:a,tag:c,props:{class:k},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" ignore"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"now "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:l}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" update"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"index "}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:m}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"skip"}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:j}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"worktree"}]}]}]}]}]},{type:a,tag:C,props:{},children:[{type:a,tag:D,props:{},children:[{type:a,tag:i,props:{},children:[{type:a,tag:o,props:{align:e},children:[{type:a,tag:p,props:{},children:[{type:b,value:E}]}]},{type:a,tag:o,props:{align:e},children:[{type:a,tag:p,props:{},children:[{type:b,value:F}]}]}]}]},{type:a,tag:G,props:{},children:[{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:H}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:I}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:J}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:K}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:L}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:M}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:N}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:O}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:P}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:Q}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:R}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:S}]}]},{type:a,tag:i,props:{},children:[{type:a,tag:f,props:{align:e},children:[{type:a,tag:h,props:{},children:[{type:b,value:T}]}]},{type:a,tag:f,props:{align:e},children:[{type:b,value:U}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-cc76b1{color:#FF7B72}.ct-487bf9{color:#C9D1D9}.light .ct-487bf9{color:#657B83}.light .ct-cc76b1{color:#859900}"}]}],toc:{title:s,searchDepth:Y,depth:Y,links:[]}},_type:"markdown",_id:"content:Git:Git aliases and useful commands.md",_source:"content",_file:"Git\u002FGit aliases and useful commands.md",_extension:"md"}},prerenderedAt:1667450791858}}("element","text","span","ct-487bf9",null,"td","ct-cc76b1","code-inline","tr","-","line","=","--","code","th","strong",false,"[alias]\n flush = git clean-branches branch | grep -v master | xargs git branch -D\n lol = log --oneline --graph\n l = lol\n c = commit -am\n cv = commit --no-verify -am\n p = push\n pf = p --force-with-lease\n ignore-now = update-index --skip-worktree\n","","Git Aliases And Useful Commands","\u002Fgit\u002Fgit-aliases-and-useful-commands","root","p","Shorthands for #git commands can be specified. Should be placed at ","~\u002F.gitconfig",".","c","pre","table","thead","command","description","tbody","git flush","drops all branches, except master","git lol","shows log","git c","commits with message","git cv","commits without hooks","git p","pushes","git pf","push with --force and additional check","git ignore-now","starts ignoring file from now on","|"," commit ","am",2)) \ No newline at end of file diff --git a/git/git-aliases-and-useful-commands/index.html b/git/git-aliases-and-useful-commands/index.html new file mode 100644 index 0000000..41ea05c --- /dev/null +++ b/git/git-aliases-and-useful-commands/index.html @@ -0,0 +1,6 @@ + + +Git Aliases And Useful Commands • Obsidian Garden +

Git Aliases And Useful Commands

Shorthands for #git commands can be specified. Should be placed at ~/.gitconfig.

[alias]    flush = git clean-branches branch | grep -v master | xargs git branch -D    lol = log --oneline --graph    l = lol    c = commit -am    cv = commit --no-verify -am    p = push    pf = p --force-with-lease    ignore-now = update-index --skip-worktree
commanddescription
git flushdrops all branches, except master
git lolshows log
git ccommits with message
git cvcommits without hooks
git ppushes
git pfpush with --force and additional check
git ignore-nowstarts ignoring file from now on
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/graphql/apollo-client-pagination/_payload.js b/graphql/apollo-client-pagination/_payload.js new file mode 100644 index 0000000..0a3a014 --- /dev/null +++ b/graphql/apollo-client-pagination/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:ab,_path:ac},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-k91xxFGA5Y":{_path:ac,_dir:R,_draft:S,_partial:S,_locale:"en",_empty:S,title:ab,description:"Say, we have gql response like this and we wan't to have pagination with it. Let's merge it as it specified in official documentation",excerpt:{type:ad,children:[{type:a,tag:v,props:{},children:[{type:c,value:ae},{type:a,tag:o,props:{},children:[{type:c,value:af}]},{type:c,value:ag},{type:a,tag:ah,props:{href:ai,rel:[aj]},children:[{type:c,value:ak}]}]},{type:a,tag:k,props:{code:T,language:R},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:c,value:T}]}]}]},{type:a,tag:v,props:{},children:[{type:c,value:al},{type:a,tag:o,props:{},children:[{type:c,value:I}]},{type:c,value:am},{type:a,tag:o,props:{},children:[{type:c,value:J}]},{type:c,value:an}]},{type:a,tag:k,props:{code:U,language:K},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:c,value:U}]}]}]},{type:a,tag:v,props:{},children:[{type:c,value:ao},{type:a,tag:o,props:{},children:[{type:c,value:L}]},{type:c,value:ap}]},{type:a,tag:k,props:{code:V,language:K},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:c,value:V}]}]}]}]},body:{type:ad,children:[{type:a,tag:v,props:{},children:[{type:c,value:ae},{type:a,tag:o,props:{},children:[{type:c,value:af}]},{type:c,value:ag},{type:a,tag:ah,props:{href:ai,rel:[aj]},children:[{type:c,value:ak}]}]},{type:a,tag:k,props:{code:T,language:R},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"query"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:"listItems"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:W}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"filter"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"sort"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"limit"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"): "}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"input"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:at},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"name"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:at},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:": ["}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"Item"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"]"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"Int"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]}]}]}]}]},{type:a,tag:v,props:{},children:[{type:c,value:al},{type:a,tag:o,props:{},children:[{type:c,value:I}]},{type:c,value:am},{type:a,tag:o,props:{},children:[{type:c,value:J}]},{type:c,value:an}]},{type:a,tag:k,props:{code:U,language:K},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"import"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" { "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:av}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" } "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"from"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"'@apollo\u002Fclient'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aw}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:N},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:O},children:[{type:c,value:"client"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ay}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" cache: "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ax}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:M},children:[{type:c,value:av}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"({ "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" }),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ay}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"});"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:"export"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:N},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:O},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:":"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-65ec34"},children:[{type:c,value:"TypePolicies"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" Query: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" fields: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F query name"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" listItems: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F apollo will serialize and use keyArgs as unique"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F identifier in cache for every query"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F consider choosing the right fields, "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F i.e. limit and offset won't work here"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" keyArgs: ["}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"'sort'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F primitive type"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"'filter'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:", ["}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"'name'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"'type'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"] "}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F nested fields of `filter`"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" ],"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" merge: "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Z}]}]}]}]}]},{type:a,tag:v,props:{},children:[{type:c,value:ao},{type:a,tag:o,props:{},children:[{type:c,value:L}]},{type:c,value:ap}]},{type:a,tag:k,props:{code:V,language:K},children:[{type:a,tag:w,props:{},children:[{type:a,tag:k,props:{__ignoreMap:r},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F** merges all sources with { items: unknown[], totalCount: number } *\u002F"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:aA},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-2475bf"},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:", { "}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:" }) "}]},{type:a,tag:b,props:{class:aA},children:[{type:c,value:"=\u003E"}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F no existing data"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"."}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:Y}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\u003C"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aC}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F If hook was called multiple times"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aC}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F merge cache and incoming data"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:N},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:O},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" ["}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"\u002F\u002F apply latest result for totalCount"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:N},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:O},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aw}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:n}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aa}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:C}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" };"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-2475bf{color:#D2A8FF}.ct-e01c7c{color:#FF7B72}.ct-65ec34{color:#FFA657}.ct-e7587d{color:#8B949E}.ct-a79fb4{color:#79C0FF}.ct-f7d317{color:#FF7B72}.ct-14b519{color:#A5D6FF}.ct-192d1f{color:#C9D1D9}.ct-e81a6c{color:#FF7B72}.ct-082859{color:#79C0FF}.ct-f83671{color:#79C0FF}.ct-56ec43{color:#FFA657}.ct-0a9f15{color:#C9D1D9}.ct-a704c0{color:#D2A8FF}.ct-3586e7{color:#C9D1D9}.ct-a8ff12{color:#FF7B72}.light .ct-a8ff12{color:#859900}.light .ct-3586e7{color:#657B83}.light .ct-a704c0{color:#268BD2}.light .ct-0a9f15{color:#657B83}.light .ct-56ec43{color:#657B83}.light .ct-f83671{color:#859900}.light .ct-082859{color:#859900}.light .ct-e81a6c{color:#859900}.light .ct-192d1f{color:#268BD2}.light .ct-14b519{color:#2AA198}.light .ct-f7d317{color:#073642}.light .ct-a79fb4{color:#268BD2}.light .ct-e7587d{color:#93A1A1}.light .ct-65ec34{color:#268BD2}.light .ct-e01c7c{color:#073642}.light .ct-2475bf{color:#268BD2}"}]}],toc:{title:r,searchDepth:aF,depth:aF,links:[]}},_type:"markdown",_id:"content:GraphQL:Apollo Client pagination.md",_source:"content",_file:"GraphQL\u002FApollo Client pagination.md",_extension:"md"}},prerenderedAt:1667450791953}}("element","span","text","ct-3586e7","line"," ","ct-a8ff12","ct-0a9f15","ct-192d1f","ct-e7587d","code","ct-56ec43"," "," ","code-inline","ct-f83671","!","",": ","existing","||","p","pre",",","ct-e81a6c"," ","?.",", "," {","items","totalCount","ct-14b519","const","=","ApolloClient","typePolicies","typescript","mergeItemsWithTotalCount","ct-a704c0","ct-f7d317","ct-a79fb4"," ","incoming","graphql",false,"query listItems(\n filter: Filter, \n sort: String,\n limit: Number,\n offset: Number,\n): ItemList!\n\ninput Filter {\n name: String!\n type: String!\n}\n\ntype ItemList {\n items: [Item!]!\n totalCount: Int!\n}\n","import { ApolloClient, InMemoryCache } from '@apollo\u002Fclient';\n\nconst client = new ApolloClient({\n \u002F\u002F ...\n cache: new InMemoryCache({ typePolicies }),\n \u002F\u002F ...\n});\n\nexport const typePolicies: TypePolicies = {\n Query: {\n fields: {\n \u002F\u002F query name\n listItems: {\n \u002F\u002F apollo will serialize and use keyArgs as unique\n \u002F\u002F identifier in cache for every query\n \u002F\u002F consider choosing the right fields, \n \u002F\u002F i.e. limit and offset won't work here\n keyArgs: [\n 'sort', \u002F\u002F primitive type\n 'filter', ['name', 'type'] \u002F\u002F nested fields of `filter`\n ],\n merge: mergeItemsWithTotalCount,\n },\n }\n}\n","\u002F** merges all sources with { items: unknown[], totalCount: number } *\u002F\nconst mergeItemsWithTotalCount = (existing, incoming, { args }) =\u003E {\n \u002F\u002F no existing data\n if (!existing || !args?.offset || args.offset \u003C existing.length) {\n return incoming || [];\n }\n\n \u002F\u002F If hook was called multiple times\n if (existing?.items?.length && args?.offset \u003C existing.items.length) {\n return existing || [];\n }\n\n \u002F\u002F merge cache and incoming data\n const items = [...(existing?.items || []), ...(incoming?.items || [])];\n\n \u002F\u002F apply latest result for totalCount\n const totalCount = incoming?.totalCount || existing?.totalCount;\n\n return {\n ...(incoming || existing || {}),\n items,\n totalCount,\n };\n };\n","(","String","offset","}"," (","args","return","Apollo Client Pagination","\u002Fgraphql\u002Fapollo-client-pagination","root","Say, we have ","gql"," response like this and we wan't to have pagination with it. Let's merge it as it specified in ","a","https:\u002F\u002Fwww.apollographql.com\u002Fdocs\u002Freact\u002Fcaching\u002Fcache-field-behavior\u002F#the-merge-function","nofollow","official documentation","We will setup "," with "," to merge incoming data in cache:","We will need merge function ",", which will join results of query and cached data for specific key:","Filter","Number","ItemList","ct-082859","type","InMemoryCache",";","new","\u002F\u002F ..."," ","ct-e01c7c","if"," [];"," }","...",2)) \ No newline at end of file diff --git a/graphql/apollo-client-pagination/index.html b/graphql/apollo-client-pagination/index.html new file mode 100644 index 0000000..aed779e --- /dev/null +++ b/graphql/apollo-client-pagination/index.html @@ -0,0 +1,6 @@ + + +Apollo Client Pagination • Obsidian Garden +

Apollo Client Pagination

Say, we have gql response like this and we wan't to have pagination with it. Let's merge it as it specified in official documentation

query listItems(  filter: Filter,   sort: String,  limit: Number,  offset: Number,): ItemList!input Filter {  name: String!  type: String!}type ItemList {  items: [Item!]!  totalCount: Int!}

We will setup ApolloClient with typePolicies to merge incoming data in cache:

import { ApolloClient, InMemoryCache } from '@apollo/client';const client = new ApolloClient({  // ...  cache: new InMemoryCache({ typePolicies }),  // ...});export const typePolicies: TypePolicies = {  Query: {    fields: {      // query name      listItems: {        // apollo will serialize and use keyArgs as unique        // identifier in cache for every query        // consider choosing the right fields,         // i.e. limit and offset won't work here        keyArgs: [          'sort', // primitive type          'filter', ['name', 'type'] // nested fields of `filter`        ],        merge: mergeItemsWithTotalCount,      },  }}

We will need merge function mergeItemsWithTotalCount, which will join results of query and cached data for specific key:

/** merges all sources with { items: unknown[], totalCount: number } */const mergeItemsWithTotalCount = (existing, incoming, { args }) => {    // no existing data    if (!existing || !args?.offset || args.offset < existing      return incoming || [];    }    // If hook was called multiple times    if (existing?.items?.      return existing || [];    }    // merge cache and incoming data    const items = [...(existing?.items ||     // apply latest result for totalCount    const totalCount = incoming?.totalCount || existing?.totalCount;    return {      ...(incoming ||       items,      totalCount,    };  };
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/graphql/refresh-token-in-apollo-client/_payload.js b/graphql/refresh-token-in-apollo-client/_payload.js new file mode 100644 index 0000000..de90971 --- /dev/null +++ b/graphql/refresh-token-in-apollo-client/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a_,a$,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,bA,bB){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:aN,_path:aO}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-4TVlzFXfLi":{_path:aO,_dir:"graphql",_draft:at,_partial:at,_locale:"en",_empty:at,title:aN,description:au,excerpt:{type:aP,children:[{type:a,tag:ag,props:{},children:[{type:c,value:au}]},{type:a,tag:E,props:{code:av,language:ah},children:[{type:a,tag:ai,props:{},children:[{type:a,tag:E,props:{__ignoreMap:Y},children:[{type:c,value:av}]}]}]},{type:a,tag:ag,props:{},children:[{type:c,value:aQ},{type:a,tag:aj,props:{},children:[{type:c,value:ak}]},{type:c,value:aR},{type:a,tag:aj,props:{},children:[{type:c,value:Z}]},{type:c,value:aS}]},{type:a,tag:E,props:{code:aw,language:ah},children:[{type:a,tag:ai,props:{},children:[{type:a,tag:E,props:{__ignoreMap:Y},children:[{type:c,value:aw}]}]}]}]},body:{type:aP,children:[{type:a,tag:ag,props:{},children:[{type:c,value:au}]},{type:a,tag:E,props:{code:av,language:ah},children:[{type:a,tag:ai,props:{},children:[{type:a,tag:E,props:{__ignoreMap:Y},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:aT}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"createApolloClient"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:aU}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:aW}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:" { "}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:aX}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:" },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:ax},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:" { "}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:ay}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aY}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:aA}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:aZ}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" \u003E,"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"ApolloClientBase"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:a_}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:a$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" link: "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"ApolloLink"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"from"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"(["}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:a$}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:"setContext"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:"_"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:", { "}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:" }) "}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" headers: {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aW}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"(),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" },"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ba}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bb}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"HttpLink"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:a_}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" uri: "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aU}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" fetch: "}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:bc}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bb}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" ]),"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bd}]}]}]}]}]},{type:a,tag:ag,props:{},children:[{type:c,value:aQ},{type:a,tag:aj,props:{},children:[{type:c,value:ak}]},{type:c,value:aR},{type:a,tag:aj,props:{},children:[{type:c,value:Z}]},{type:c,value:aS}]},{type:a,tag:E,props:{code:aw,language:ah},children:[{type:a,tag:ai,props:{},children:[{type:a,tag:E,props:{__ignoreMap:Y},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F** Global singleton for refreshing promise *\u002F"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:k},children:[{type:c,value:"let"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:ax},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F** Checks if GraphQl errors has unauthenticated error *\u002F"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:be}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\u003C{ "}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:"?:"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:"ErrorCode"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:" }\u003E)"}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:be}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"isArray"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aC}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"some"}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"error"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"status"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bf}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:"ct-afc978"},children:[{type:c,value:"401"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F Distinguish unauthorized error here"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bd}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F** Detects if customFetch is sending refresh request *\u002F"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:s},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:bg}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"try"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:bh}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:bh}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"operationName"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bf}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:"'RefreshToken'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" } "}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"e"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:"false"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"};"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo *\u002F"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:h},children:[{type:c,value:aT}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:bc}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" ("}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bi}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aV}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bi}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" { accessToken: "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:az}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aY}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aA}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:aZ}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"\u003E"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" ) "}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:bg}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aF}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:"Response"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F already refreshing token, wait for it and then use refreshed token"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F or use empty authorization if refreshing failed"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aC}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aC}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" ("}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:"as"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:ax},children:[{type:c,value:"Record"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u003E)?."}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aX}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" ) {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bj}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aG}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bk}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:bl}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:bm}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bn}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aH}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" authorization: "}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" };"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aI}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:")."}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aJ}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:c}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bj}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:bo}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:c}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bp}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:$},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F check for unauthorized errors, if not present, just return result"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:Z}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aK}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:_}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aF}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" ) {"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:bo}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" ok: "}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:"true"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:"unknown"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:br}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:c}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aE}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:bq}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:c}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:br}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ba}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bs}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F If unauthorized, refresh token and try again"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"()"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:bt}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:aJ}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:aL}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aF}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:Q},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:aB}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aL}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aK}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ay}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aD}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bu}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" }"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:aL}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aK}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ay}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bt}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bk}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:X},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:P}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F can't refresh token. logging out"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:al}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bp}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:bu}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:G},children:[{type:c,value:bv}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:bw}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aM}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bs}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F success or any non-auth error"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:M}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:g},children:[{type:c,value:aG}]},{type:a,tag:b,props:{class:S},children:[{type:c,value:aJ}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:y}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:z},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:s},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"\u002F\u002F wait for other request's refreshing query to finish, when retry"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aI}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bx}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:by}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aH}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bA}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aM}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" })"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aG}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:bl}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:aI}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:bx}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:by}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:f}]},{type:a,tag:b,props:{class:h},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aH}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bz}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:bm}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bA}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:aM}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:bn}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" });"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" };"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-d171d6{color:#A5D6FF}.ct-7561ef{color:#79C0FF}.ct-afc978{color:#79C0FF}.ct-7c5470{color:#FFA657}.ct-db5c41{color:#79C0FF}.ct-936d89{color:#C9D1D9}.ct-8f9c91{color:#8B949E}.ct-a6207a{color:#FFA657}.ct-824036{color:#FF7B72}.ct-6ef29e{color:#D2A8FF}.ct-8aeb6e{color:#79C0FF}.ct-a7487c{color:#79C0FF}.ct-74e54e{color:#FF7B72}.ct-859173{color:#FFA657}.ct-c1c1d0{color:#C9D1D9}.ct-d62d0f{color:#D2A8FF}.ct-51f5f2{color:#FF7B72}.ct-40f337{color:#C9D1D9}.ct-633375{color:#FF7B72}.light .ct-633375{color:#859900}.light .ct-40f337{color:#657B83}.light .ct-51f5f2{color:#073642}.light .ct-d62d0f{color:#268BD2}.light .ct-c1c1d0{color:#657B83}.light .ct-859173{color:#657B83}.light .ct-74e54e{color:#859900}.light .ct-a7487c{color:#859900}.light .ct-8aeb6e{color:#859900}.light .ct-6ef29e{color:#268BD2}.light .ct-824036{color:#073642}.light .ct-a6207a{color:#268BD2}.light .ct-8f9c91{color:#93A1A1}.light .ct-936d89{color:#268BD2}.light .ct-db5c41{color:#B58900}.light .ct-7c5470{color:#268BD2}.light .ct-afc978{color:#D33682}.light .ct-7561ef{color:#268BD2}.light .ct-d171d6{color:#2AA198}"}]}],toc:{title:Y,searchDepth:bB,depth:bB,links:[]}},_type:"markdown",_id:"content:GraphQL:Refresh token in Apollo client.md",_source:"content",_file:"GraphQL\u002FRefresh token in Apollo client.md",_extension:"md"}},prerenderedAt:1667450792019}}("element","span","text","ct-40f337","line"," ","ct-c1c1d0","ct-633375","ct-936d89","ct-d62d0f","ct-51f5f2","=\u003E","(","ct-74e54e",":","ct-8f9c91"," ","ct-859173","ct-824036"," {","string","=",","," "," (","ct-a7487c"," ",".","options","return","code"," ","ct-8aeb6e"," ","const","async"," ","...","refreshingPromise","\u003C","headers",";","ct-7c5470"," () ","ct-6ef29e","refreshToken","Promise",") ","new","ct-db5c41","","isRefreshRequestOptions","errors","ct-7561ef",");","ct-d171d6","!","||","json"," ","p","typescript","pre","code-inline","hasUnauthorizedError","logout",", ","null","catch","uri","if","newAccessToken","resolve",false,"If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client.","export const createApolloClient = (\n url: string,\n logout: () =\u003E void,\n getAuthorizationData: () =\u003E { authorization: string },\n refreshToken: () =\u003E Promise\u003C\n { accessToken: string; refreshToken: string } | undefined\n \u003E,\n) =\u003E\n new ApolloClientBase({\n \u002F\u002F ...other options\n link: ApolloLink.from([\n \u002F\u002F ...other options\n setContext(async (_, { headers }) =\u003E {\n return {\n headers: {\n ...headers,\n ...getAuthorizationData(),\n },\n };\n }),\n new HttpLink({\n uri: url,\n fetch: fetchWithTokenRefresh(logout, refreshToken),\n }),\n ]),\n });\n","\u002F** Global singleton for refreshing promise *\u002F\nlet refreshingPromise: Promise\u003Cstring\u003E | null = null;\n\n\u002F** Checks if GraphQl errors has unauthenticated error *\u002F\nconst hasUnauthorizedError = (errors: Array\u003C{ code?: ErrorCode }\u003E): boolean =\u003E\n Array.isArray(errors) &&\n errors.some(error =\u003E {\n return error.status === 401; \u002F\u002F Distinguish unauthorized error here\n });\n\n\u002F** Detects if customFetch is sending refresh request *\u002F\nconst isRefreshRequestOptions = (options: RequestInit) =\u003E {\n try {\n const body = JSON.parse(options?.body as string);\n return body.operationName === 'RefreshToken';\n } catch (e) {\n return false;\n }\n};\n\n\u002F** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo *\u002F\nexport const fetchWithTokenRefresh =\n (\n logout: () =\u003E void,\n refreshToken: () =\u003E Promise\u003C\n { accessToken: string; refreshToken: string } | undefined\n \u003E,\n ) =\u003E\n async (uri: string, options: RequestInit): Promise\u003CResponse\u003E =\u003E {\n \u002F\u002F already refreshing token, wait for it and then use refreshed token\n \u002F\u002F or use empty authorization if refreshing failed\n if (\n !isRefreshRequestOptions(options) &&\n refreshingPromise &&\n (options.headers as Record\u003Cstring, string\u003E)?.authorization\n ) {\n const newAccessToken = await refreshingPromise\n .catch(() =\u003E {\n \u002F\u002F refreshing token from other request failed, retry without authorization\n return '';\n });\n \n options.headers = {\n ...(options.headers || {}),\n authorization: newAccessToken,\n };\n }\n\n return fetch(uri, options).then(async response =\u003E {\n const text = await response.text();\n const json = JSON.parse(text);\n\n \u002F\u002F check for unauthorized errors, if not present, just return result\n if (\n isRefreshRequestOptions(options) ||\n !json?.errors ||\n !Array.isArray(json.errors) ||\n !hasUnauthorizedError(json.errors)\n ) {\n return {\n ...response,\n ok: true,\n json: async () =\u003E\n new Promise\u003Cunknown\u003E(resolve =\u003E {\n resolve(json);\n }),\n text: async () =\u003E\n new Promise\u003Cstring\u003E(resolve =\u003E {\n resolve(text);\n }),\n };\n }\n\n \u002F\u002F If unauthorized, refresh token and try again\n if (!refreshingPromise) {\n refreshingPromise = refreshToken()\n .then(async (tokens): Promise\u003Cstring\u003E =\u003E {\n refreshingPromise = null;\n\n if (!tokens?.accessToken) {\n throw new Error('Session expired');\n }\n\n return tokens?.accessToken;\n })\n .catch(() =\u003E {\n refreshingPromise = null;\n\n \u002F\u002F can't refresh token. logging out\n logout();\n throw new Error('Session expired');\n });\n }\n\n \u002F\u002F success or any non-auth error\n return refreshingPromise\n .then(async (newAccessToken: string) =\u003E {\n \u002F\u002F wait for other request's refreshing query to finish, when retry\n\n return fetch(uri, {\n ...options,\n headers: {\n ...(options.headers || {}),\n authorization: newAccessToken,\n },\n });\n })\n .catch(async () =\u003E {\n \u002F\u002F refreshing token from other request failed, retry without authorization\n\n return fetch(uri, {\n ...options,\n headers: {\n ...(options.headers || {}),\n authorization: '',\n },\n });\n });\n });\n };\n\n","ct-a6207a","accessToken","; ","|","\u003E ","&&",") {",": ",")"," ."," {}),","fetch","then","?.","tokens"," });","Refresh Token In Apollo Client","\u002Fgraphql\u002Frefresh-token-in-apollo-client","root","Custom fetch function for this request. You should tune "," and\n"," to match your api.","export","url","void","getAuthorizationData","authorization"," } ","undefined","({","\u002F\u002F ...other options"," };"," }),","fetchWithTokenRefresh"," });","Array","===","RequestInit","body",": () ","await","(() ","\u002F\u002F refreshing token from other request failed, retry without authorization","''"," });","response","();","\u003E("," }),"," }"," .","throw","Error","'Session expired'",", {"," headers: {"," authorization: "," },",2)) \ No newline at end of file diff --git a/graphql/refresh-token-in-apollo-client/index.html b/graphql/refresh-token-in-apollo-client/index.html new file mode 100644 index 0000000..a6a5e2b --- /dev/null +++ b/graphql/refresh-token-in-apollo-client/index.html @@ -0,0 +1,7 @@ + + +Refresh Token In Apollo Client • Obsidian Garden +

Refresh Token In Apollo Client

If your GraphQL api needs token refresh option, you can pass custom fetch function for Apollo Client.

export const createApolloClient = (  url: string,  logout: () => void,  getAuthorizationData: () => { authorization: string },  refreshToken: () => Promise<    { accessToken: string; refreshToken: string } | undefined  >,) =>  new ApolloClientBase({    // ...other options    link: ApolloLink.from([      // ...other options      setContext(async (_, { headers }) => {        return {          headers: {            ...headers,            ...getAuthorizationData(),          },        };      }),      new HttpLink({        uri: url,        fetch: fetchWithTokenRefresh(logout, refreshToken),      }),    ]),  });

Custom fetch function for this request. You should tune hasUnauthorizedError and +isRefreshRequestOptions to match your api.

/** Global singleton for refreshing promise */let refreshingPromise: Promise<string> | null = null;/** Checks if GraphQl errors has unauthenticated error */const hasUnauthorizedError = (errors: Array<{ code?: ErrorCode }>): =>  Array.isArray(errors) &&  errors.some=> {    return error.status === 401; // Distinguish unauthorized error here  });/** Detects if customFetch is sending refresh request */const isRefreshRequestOptions = (options: RequestInit) => {  try {    const body = string);    return body.operationName === 'RefreshToken';  } catch (e) {    return false;  }};/** fetchWithTokenRefresh is a custom fetch function with token refresh for apollo */export const fetchWithTokenRefresh =  (    logout: () => void,    refreshToken: () =>       { accessToken: string; refreshToken: string } | undefined    >,  ) =>  async (uri: string, options: RequestInit): Promise<Response> => {    // already refreshing token, wait for it and then use refreshed token    // or use empty authorization if refreshing failed    if (      !isRefreshRequestOptions(options) &&      refreshingPromise &&      (options.headers as Record<string, string>)?.authorization    ) {      const newAccessToken = await refreshingPromise        .catch(() => {          // refreshing token from other request failed, retry without authorization          return '';        });            options.headers = {        ...(options.headers || {}),        authorization: newAccessToken,      };    }    return fetch(uri, options).then(async      const text = await response.text();      const json =      // check for unauthorized errors, if not present, just return result      if (        isRefreshRequestOptions(options) ||        !json?.errors ||                !hasUnauthorizedError(json.errors)      ) {        return {          ...response,          ok: true,          json: async () =>            new Promise<unknown>(resolve => {              resolve(json);            }),          text: async () =>            new Promise<string>(resolve => {              resolve(text);            }),        };      }      // If unauthorized, refresh token and try again      if (!refreshingPromise) {        refreshingPromise = refreshToken()          .then(async (tokens): Promise<string> => {            refreshingPromise = null;            if (!tokens?.accessToken) {              throw new Error('Session expired');            }            return tokens?.accessToken;          })          .catch(() => {            refreshingPromise = null;            // can't refresh token. logging out            logout();            throw new Error('Session expired');          });      }      // success or any non-auth error      return refreshingPromise        .then(async (newAccessToken: string) => {          // wait for other request's refreshing query to finish, when retry          return fetch(uri, {            ...options,            headers: {              ...(options.headers || {}),              authorization: newAccessToken,            },          });        })        .catch(async () => {          // refreshing token from other request failed, retry without authorization          return fetch(uri, {            ...options,            headers: {              ...(options.headers || {}),              authorization: '',            },          });        });    });  };
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..2db6db3 --- /dev/null +++ b/index.html @@ -0,0 +1,6 @@ + + +Obsidian Garden + + \ No newline at end of file diff --git a/layouts/content.vue b/layouts/content.vue deleted file mode 100644 index c5b9d97..0000000 --- a/layouts/content.vue +++ /dev/null @@ -1,54 +0,0 @@ - - - diff --git a/layouts/default.vue b/layouts/default.vue deleted file mode 100644 index 578c950..0000000 --- a/layouts/default.vue +++ /dev/null @@ -1,165 +0,0 @@ - - - - - diff --git a/linux/gitea-for-git-hosting/_payload.js b/linux/gitea-for-git-hosting/_payload.js new file mode 100644 index 0000000..7aae296 --- /dev/null +++ b/linux/gitea-for-git-hosting/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:t,_path:u},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-t1CslyFV8V":{_path:u,_dir:"linux",_draft:n,_partial:n,_locale:"en",_empty:n,title:t,description:"Self-hosted #git repositories with gitea and #docker.",excerpt:{type:v,children:[{type:a,tag:w,props:{},children:[{type:c,value:x},{type:a,tag:y,props:{href:z,rel:[A]},children:[{type:c,value:k}]},{type:c,value:B}]},{type:a,tag:C,props:{id:o},children:[{type:c,value:p}]},{type:a,tag:m,props:{code:q,language:D},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:r},children:[{type:c,value:q}]}]}]}]},body:{type:v,children:[{type:a,tag:w,props:{},children:[{type:c,value:x},{type:a,tag:y,props:{href:z,rel:[A]},children:[{type:c,value:k}]},{type:c,value:B}]},{type:a,tag:C,props:{id:o},children:[{type:c,value:p}]},{type:a,tag:m,props:{code:q,language:D},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:r},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"version"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"3\""}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:k}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"external"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:"ct-b5d663"},children:[{type:c,value:"false"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"services"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"server"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"image"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"gitea\u002Fgitea:latest"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"container_name"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"environment"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"USER_UID=1000"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"USER_GID=1000"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"restart"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"always"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:F}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"volumes"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:".\u002Fvar\u002Flib\u002Fgitea:\u002Fdata"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:".\u002Fetc\u002Fgitea:\u002Fetc\u002Fgitea"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\u002Fetc\u002Ftimezone:\u002Fetc\u002Ftimezone:ro"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\u002Fetc\u002Flocaltime:\u002Fetc\u002Flocaltime:ro"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"ports"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"3000:3000\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"222:22\""}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-b5d663{color:#79C0FF}.ct-385a1d{color:#A5D6FF}.ct-1fc9a0{color:#C9D1D9}.ct-d9b4de{color:#7EE787}.light .ct-d9b4de{color:#268BD2}.light .ct-1fc9a0{color:#657B83}.light .ct-385a1d{color:#2AA198}.light .ct-b5d663{color:#B58900}"}]}],toc:{title:r,searchDepth:s,depth:s,links:[{id:o,depth:s,text:p}]}},_type:"markdown",_id:"content:Linux:Gitea for git hosting.md",_source:"content",_file:"Linux\u002FGitea for git hosting.md",_extension:"md"}},prerenderedAt:1667450792129}}("element","span","text","ct-1fc9a0","line","ct-d9b4de","ct-385a1d"," - ",":"," ","gitea",": ","code",false,"setting-up-with-docker-compose","Setting up with docker-compose","version: \"3\"\n\nnetworks:\n gitea:\n external: false\nservices:\n server:\n image: gitea\u002Fgitea:latest\n container_name: gitea\n environment:\n - USER_UID=1000\n - USER_GID=1000\n restart: always\n networks:\n - gitea\n volumes:\n - .\u002Fvar\u002Flib\u002Fgitea:\u002Fdata\n - .\u002Fetc\u002Fgitea:\u002Fetc\u002Fgitea\n - \u002Fetc\u002Ftimezone:\u002Fetc\u002Ftimezone:ro\n - \u002Fetc\u002Flocaltime:\u002Fetc\u002Flocaltime:ro\n ports:\n - \"3000:3000\"\n - \"222:22\"\n","",2,"Gitea For Git Hosting","\u002Flinux\u002Fgitea-for-git-hosting","root","p","Self-hosted #git repositories with ","a","https:\u002F\u002Fgitea.io\u002Fru-ru\u002F","nofollow"," and #docker.","h2","yaml","pre","networks"," ")) \ No newline at end of file diff --git a/linux/gitea-for-git-hosting/index.html b/linux/gitea-for-git-hosting/index.html new file mode 100644 index 0000000..f477e60 --- /dev/null +++ b/linux/gitea-for-git-hosting/index.html @@ -0,0 +1,6 @@ + + +Gitea For Git Hosting • Obsidian Garden +

Gitea For Git Hosting

Self-hosted #git repositories with gitea and #docker.

Setting up with docker-compose

version: "3"networks:  gitea:    external: falseservices:  server:    image: gitea/gitea:latest    container_name: gitea    environment:      - USER_UID=1000      - USER_GID=1000    restart: always    networks:      - gitea    volumes:      - ./var/lib/gitea:/data      - ./etc/gitea:/etc/gitea      - /etc/timezone:/etc/timezone:ro      - /etc/localtime:/etc/localtime:ro    ports:      - "3000:3000"      - "222:22"
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/linux/google-photos-alternative-with-photoprism/_payload.js b/linux/google-photos-alternative-with-photoprism/_payload.js new file mode 100644 index 0000000..fee9f03 --- /dev/null +++ b/linux/google-photos-alternative-with-photoprism/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:C,_path:D},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-N7FETNtB3c":{_path:D,_dir:"linux",_draft:v,_partial:v,_locale:"en",_empty:v,title:C,description:"Photo Prism is a free alternative to Google photos, can be set up with #docker.",excerpt:{type:E,children:[{type:a,tag:r,props:{},children:[{type:a,tag:n,props:{href:F,rel:[o]},children:[{type:c,value:G}]},{type:c,value:H}]},{type:a,tag:I,props:{id:w},children:[{type:c,value:x}]},{type:a,tag:r,props:{},children:[{type:c,value:J},{type:a,tag:n,props:{href:K,rel:[o]},children:[{type:c,value:L}]},{type:c,value:M},{type:a,tag:n,props:{href:N,rel:[o]},children:[{type:c,value:O}]},{type:c,value:P}]},{type:a,tag:s,props:{code:y,language:Q},children:[{type:a,tag:R,props:{},children:[{type:a,tag:s,props:{__ignoreMap:z},children:[{type:c,value:y}]}]}]}]},body:{type:E,children:[{type:a,tag:r,props:{},children:[{type:a,tag:n,props:{href:F,rel:[o]},children:[{type:c,value:G}]},{type:c,value:H}]},{type:a,tag:I,props:{id:w},children:[{type:c,value:x}]},{type:a,tag:r,props:{},children:[{type:c,value:J},{type:a,tag:n,props:{href:K,rel:[o]},children:[{type:c,value:L}]},{type:c,value:M},{type:a,tag:n,props:{href:N,rel:[o]},children:[{type:c,value:O}]},{type:c,value:P}]},{type:a,tag:s,props:{code:y,language:Q},children:[{type:a,tag:R,props:{},children:[{type:a,tag:s,props:{__ignoreMap:z},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"version"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"'3.5'"}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"services"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:" "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:A}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"photoprism__app"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"photoprism\u002Fphotoprism:latest"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"depends_on"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:U}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"ports"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"2342:2342"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:_},children:[{type:c,value:"# HTTP port (host:container)"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_ADMIN_PASSWORD"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"password\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_SITE_URL"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"https:\u002F\u002Fservice.url\u002F\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_ORIGINALS_LIMIT"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:"ct-981ffc"},children:[{type:c,value:"5000"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_HTTP_COMPRESSION"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"gzip\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DEBUG"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_PUBLIC"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_READONLY"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_EXPERIMENTAL"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_CHOWN"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_WEBDAV"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_SETTINGS"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_TENSORFLOW"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_FACES"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DISABLE_CLASSIFICATION"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DARKTABLE_PRESETS"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:aa}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DETECT_NSFW"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_UPLOAD_NSFW"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"true\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DATABASE_DRIVER"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"mysql\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DATABASE_SERVER"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"mariadb:3306\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DATABASE_NAME"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"photoprism\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:l}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DATABASE_USER"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"root\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_DATABASE_PASSWORD"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"insecure\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_SITE_TITLE"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"PhotoPrism\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_SITE_CAPTION"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\"Browse Your Life\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_SITE_DESCRIPTION"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"PHOTOPRISM_SITE_AUTHOR"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ab}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"HOME"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ac}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"working_dir"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ac}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\".\u002Fdata\u002Foriginals:\u002Fphotoprism\u002Foriginals\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"    "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\".\u002Fdata\u002Fimports:\u002Fphotoprism\u002Fimport\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\".\u002Fdata\u002Fstorage:\u002Fphotoprism\u002Fstorage\""}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"  "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"photoprism__db"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:W}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"mariadb:10.6"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:X}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Y}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:Z}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"command"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ad}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"\".\u002Fdatabase:\u002Fvar\u002Flib\u002Fmysql\""}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:_},children:[{type:c,value:"# Important, don't remove"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:m}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:$}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:k}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"MYSQL_ROOT_PASSWORD"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ae}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"MYSQL_DATABASE"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"MYSQL_USER"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:A}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"MYSQL_PASSWORD"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ae}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-981ffc{color:#79C0FF}.ct-2164ab{color:#8B949E}.ct-8e1c2e{color:#A5D6FF}.ct-3b7f9c{color:#C9D1D9}.ct-dba52a{color:#7EE787}.light .ct-dba52a{color:#268BD2}.light .ct-3b7f9c{color:#657B83}.light .ct-8e1c2e{color:#2AA198}.light .ct-2164ab{color:#93A1A1}.light .ct-981ffc{color:#D33682}"}]}],toc:{title:z,searchDepth:B,depth:B,links:[{id:w,depth:B,text:x}]}},_type:"markdown",_id:"content:Linux:Google photos alternative with Photoprism.md",_source:"content",_file:"Linux\u002FGoogle photos alternative with Photoprism.md",_extension:"md"}},prerenderedAt:1667450792162}}("element","span","text","ct-3b7f9c","line","ct-dba52a","ct-8e1c2e",": "," ","\"false\"",":"," ","    ","a","nofollow","      ","      - ","p","code"," - "," ",false,"docker-compose-file-to-run-it","Docker compose file to run it","version: '3.5'\n\nservices:\n photoprism:\n container_name: photoprism__app\n image: photoprism\u002Fphotoprism:latest\n depends_on:\n - mariadb\n restart: unless-stopped\n security_opt:\n - seccomp:unconfined\n - apparmor:unconfined\n ports:\n - 2342:2342 # HTTP port (host:container)\n environment:\n PHOTOPRISM_ADMIN_PASSWORD: \"password\"\n PHOTOPRISM_SITE_URL: \"https:\u002F\u002Fservice.url\u002F\"\n PHOTOPRISM_ORIGINALS_LIMIT: 5000\n PHOTOPRISM_HTTP_COMPRESSION: \"gzip\"\n PHOTOPRISM_DEBUG: \"false\" \n PHOTOPRISM_PUBLIC: \"false\" \n PHOTOPRISM_READONLY: \"false\" \n PHOTOPRISM_EXPERIMENTAL: \"false\"\n PHOTOPRISM_DISABLE_CHOWN: \"false\"\n PHOTOPRISM_DISABLE_WEBDAV: \"false\" \n PHOTOPRISM_DISABLE_SETTINGS: \"false\"\n PHOTOPRISM_DISABLE_TENSORFLOW: \"false\"\n PHOTOPRISM_DISABLE_FACES: \"false\" \n PHOTOPRISM_DISABLE_CLASSIFICATION: \"false\"\n PHOTOPRISM_DARKTABLE_PRESETS: \"false\" \n PHOTOPRISM_DETECT_NSFW: \"false\" \n PHOTOPRISM_UPLOAD_NSFW: \"true\" \n PHOTOPRISM_DATABASE_DRIVER: \"mysql\" \n PHOTOPRISM_DATABASE_SERVER: \"mariadb:3306\"\n PHOTOPRISM_DATABASE_NAME: \"photoprism\" \n PHOTOPRISM_DATABASE_USER: \"root\" \n PHOTOPRISM_DATABASE_PASSWORD: \"insecure\" \n PHOTOPRISM_SITE_TITLE: \"PhotoPrism\"\n PHOTOPRISM_SITE_CAPTION: \"Browse Your Life\"\n PHOTOPRISM_SITE_DESCRIPTION: \"\"\n      PHOTOPRISM_SITE_AUTHOR: \"\"\n      HOME: \"\u002Fphotoprism\"\n    working_dir: \"\u002Fphotoprism\"\n    volumes:\n      - \".\u002Fdata\u002Foriginals:\u002Fphotoprism\u002Foriginals\"    \n      - \".\u002Fdata\u002Fimports:\u002Fphotoprism\u002Fimport\"\n      - \".\u002Fdata\u002Fstorage:\u002Fphotoprism\u002Fstorage\"\n  mariadb:\n    container_name: photoprism__db\n    restart: unless-stopped\n    image: mariadb:10.6\n    security_opt:\n      - seccomp:unconfined\n      - apparmor:unconfined\n    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120\n    volumes:\n      - \".\u002Fdatabase:\u002Fvar\u002Flib\u002Fmysql\" # Important, don't remove\n    environment:\n      MYSQL_ROOT_PASSWORD: insecure\n      MYSQL_DATABASE: photoprism\n      MYSQL_USER: photoprism\n      MYSQL_PASSWORD: insecure\n","","photoprism",2,"Google Photos Alternative With Photoprism","\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism","root","https:\u002F\u002Fphotoprism.app\u002F","Photo Prism"," is a free alternative to Google photos, can be set up with #docker.","h2","Check out current ","https:\u002F\u002Fdl.photoprism.app\u002Fdocker\u002Fdocker-compose.yml","example"," at photoprism's ","https:\u002F\u002Fdocs.photoprism.app\u002Fgetting-started\u002Fdocker-compose\u002F","documentation",".","yaml","pre","container_name","image","mariadb","restart","unless-stopped","security_opt","seccomp:unconfined","apparmor:unconfined","ct-2164ab","environment"," ","\"\"","\"\u002Fphotoprism\"","volumes","insecure")) \ No newline at end of file diff --git a/linux/google-photos-alternative-with-photoprism/index.html b/linux/google-photos-alternative-with-photoprism/index.html new file mode 100644 index 0000000..29e615b --- /dev/null +++ b/linux/google-photos-alternative-with-photoprism/index.html @@ -0,0 +1,6 @@ + + +Google Photos Alternative With Photoprism • Obsidian Garden +

Google Photos Alternative With Photoprism

Photo Prism is a free alternative to Google photos, can be set up with #docker.

Docker compose file to run it

Check out current example at photoprism's documentation.

version: '3.5'services:  photoprism:    container_name: photoprism__app    image: photoprism/photoprism:latest    depends_on:      - mariadb    restart: unless-stopped    security_opt:      - seccomp:unconfined      - apparmor:unconfined    ports:      - 2342:2342 # HTTP port (host:container)    environment:      PHOTOPRISM_ADMIN_PASSWORD: "password"      PHOTOPRISM_SITE_URL: "https://service.url/"      PHOTOPRISM_ORIGINALS_LIMIT: 5000      PHOTOPRISM_HTTP_COMPRESSION: "gzip"      PHOTOPRISM_DEBUG: "false"                PHOTOPRISM_PUBLIC: "false"            PHOTOPRISM_READONLY: "false"          PHOTOPRISM_EXPERIMENTAL: "false"      PHOTOPRISM_DISABLE_CHOWN: "false"      PHOTOPRISM_DISABLE_WEBDAV: "false"       PHOTOPRISM_DISABLE_SETTINGS: "false"      PHOTOPRISM_DISABLE_TENSORFLOW: "false"      PHOTOPRISM_DISABLE_FACES: "false"           PHOTOPRISM_DISABLE_CLASSIFICATION: "false"      PHOTOPRISM_DARKTABLE_PRESETS: "false"           PHOTOPRISM_DETECT_NSFW: "false"                 PHOTOPRISM_UPLOAD_NSFW: "true"                  PHOTOPRISM_DATABASE_DRIVER: "mysql"             PHOTOPRISM_DATABASE_SERVER: "mariadb:3306"      PHOTOPRISM_DATABASE_NAME: "photoprism"          PHOTOPRISM_DATABASE_USER: "root"               PHOTOPRISM_DATABASE_PASSWORD: "insecure"       PHOTOPRISM_SITE_TITLE: "PhotoPrism"      PHOTOPRISM_SITE_CAPTION: "Browse Your Life"      PHOTOPRISM_SITE_DESCRIPTION: ""      PHOTOPRISM_SITE_AUTHOR: ""      HOME: "/photoprism"    working_dir: "/photoprism"    volumes:      - "./data/originals:/photoprism/originals"          - "./data/imports:/photoprism/import"      - "./data/storage:/photoprism/storage"  mariadb:    container_name: photoprism__db    restart: unless-stopped    image: mariadb:10.6    security_opt:      - seccomp:unconfined      - apparmor:unconfined    command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120    volumes:      - "./database:/var/lib/mysql" # Important, don't remove    environment:      MYSQL_ROOT_PASSWORD: insecure      MYSQL_DATABASE: photoprism      MYSQL_USER: photoprism      MYSQL_PASSWORD: insecure
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/linux/resume-or-start-screen-session/_payload.js b/linux/resume-or-start-screen-session/_payload.js new file mode 100644 index 0000000..0f6eab9 --- /dev/null +++ b/linux/resume-or-start-screen-session/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:j,_path:k},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-KZPaWw5ajQ":{_path:k,_dir:"linux",_draft:f,_partial:f,_locale:"en",_empty:f,title:j,description:"Running this script will enter currently running screen session or will start new one.",excerpt:{type:l,children:[{type:a,tag:m,props:{},children:[{type:b,value:n},{type:a,tag:o,props:{},children:[{type:b,value:p}]},{type:b,value:q}]},{type:a,tag:d,props:{code:g,language:r},children:[{type:a,tag:s,props:{},children:[{type:a,tag:d,props:{__ignoreMap:h},children:[{type:b,value:g}]}]}]}]},body:{type:l,children:[{type:a,tag:m,props:{},children:[{type:b,value:n},{type:a,tag:o,props:{},children:[{type:b,value:p}]},{type:b,value:q}]},{type:a,tag:d,props:{code:g,language:r},children:[{type:a,tag:s,props:{},children:[{type:a,tag:d,props:{__ignoreMap:h},children:[{type:a,tag:c,props:{class:"line"},children:[{type:a,tag:c,props:{class:e},children:[{type:b,value:"( screen -r bash "}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" ( screen -d bash "}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:"&&"}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" screen -r bash "}]},{type:a,tag:c,props:{class:i},children:[{type:b,value:t}]},{type:a,tag:c,props:{class:e},children:[{type:b,value:" screen -SAm bash bash ) )"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-35a9ce{color:#FF7B72}.ct-ac822e{color:#C9D1D9}.light .ct-ac822e{color:#657B83}.light .ct-35a9ce{color:#859900}"}]}],toc:{title:h,searchDepth:u,depth:u,links:[]}},_type:"markdown",_id:"content:Linux:Resume or start screen session.md",_source:"content",_file:"Linux\u002FResume or start screen session.md",_extension:"md"}},prerenderedAt:1667450792223}}("element","text","span","code","ct-ac822e",false,"( screen -r bash || ( screen -d bash && screen -r bash || screen -SAm bash bash ) )\n","","ct-35a9ce","Resume Or Start Screen Session","\u002Flinux\u002Fresume-or-start-screen-session","root","p","Running this script will enter currently running ","code-inline","screen"," session or will start new one.","shell","pre","||",2)) \ No newline at end of file diff --git a/linux/resume-or-start-screen-session/index.html b/linux/resume-or-start-screen-session/index.html new file mode 100644 index 0000000..785a511 --- /dev/null +++ b/linux/resume-or-start-screen-session/index.html @@ -0,0 +1,6 @@ + + +Resume Or Start Screen Session • Obsidian Garden + + \ No newline at end of file diff --git a/linux/rsync-file-with-ssh/_payload.js b/linux/rsync-file-with-ssh/_payload.js new file mode 100644 index 0000000..07ead2e --- /dev/null +++ b/linux/rsync-file-with-ssh/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:p,_path:q},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-3kXgAF354y":{_path:q,_dir:"linux",_draft:l,_partial:l,_locale:"en",_empty:l,title:p,description:m,excerpt:{type:r,children:[{type:a,tag:s,props:{},children:[{type:c,value:m}]},{type:a,tag:k,props:{code:n,language:t},children:[{type:a,tag:u,props:{},children:[{type:a,tag:k,props:{__ignoreMap:o},children:[{type:c,value:n}]}]}]}]},body:{type:r,children:[{type:a,tag:s,props:{},children:[{type:c,value:m}]},{type:a,tag:k,props:{code:n,language:t},children:[{type:a,tag:u,props:{},children:[{type:a,tag:k,props:{__ignoreMap:o},children:[{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:"ct-ef439a"},children:[{type:c,value:"#!\u002Fbin\u002Fbash"}]}]},{type:a,tag:b,props:{class:d},children:[]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"PORT=22"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"USER=user"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"HOST=example.com"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"REMOTE_PATH=\u002Ftmp"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"REMOTE_FILE=sample.text"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"DEST_PATH=.\u002F"}]}]},{type:a,tag:b,props:{class:d},children:[]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:"rsync -a -e "}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\"ssh -p "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"PORT"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:e},children:[{type:c,value:" -P -v \\"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"USER"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"@"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"HOST"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:":"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"REMOTE_PATH"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"\u002F"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"REMOTE_FILE"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:e},children:[{type:c,value:" \\"}]}]},{type:a,tag:b,props:{class:d},children:[{type:a,tag:b,props:{class:e},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:h}]},{type:a,tag:b,props:{class:i},children:[{type:c,value:"DEST_PATH"}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:j}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-604d9c{color:#C9D1D9}.ct-f4aa73{color:#C9D1D9}.ct-e38ba3{color:#A5D6FF}.ct-952492{color:#C9D1D9}.ct-ef439a{color:#8B949E}.light .ct-ef439a{color:#93A1A1}.light .ct-952492{color:#657B83}.light .ct-e38ba3{color:#2AA198}.light .ct-f4aa73{color:#859900}.light .ct-604d9c{color:#268BD2}"}]}],toc:{title:o,searchDepth:w,depth:w,links:[]}},_type:"markdown",_id:"content:Linux:Rsync file with SSH.md",_source:"content",_file:"Linux\u002FRsync file with SSH.md",_extension:"md"}},prerenderedAt:1667450792250}}("element","span","text","line","ct-952492","ct-e38ba3","ct-f4aa73","$","ct-604d9c","\"","code",false,"Downloads file from #SSH with rsync and puts it in current folder.","#!\u002Fbin\u002Fbash\n\nPORT=22\nUSER=user\nHOST=example.com\nREMOTE_PATH=\u002Ftmp\nREMOTE_FILE=sample.text\nDEST_PATH=.\u002F\n\nrsync -a -e \"ssh -p $PORT\" -P -v \\\n \"$USER@$HOST:$REMOTE_PATH\u002F$REMOTE_FILE\" \\\n \"$DEST_PATH\"\n","","Rsync File With SSH","\u002Flinux\u002Frsync-file-with-ssh","root","p","bash","pre"," ",2)) \ No newline at end of file diff --git a/linux/rsync-file-with-ssh/index.html b/linux/rsync-file-with-ssh/index.html new file mode 100644 index 0000000..a5766d5 --- /dev/null +++ b/linux/rsync-file-with-ssh/index.html @@ -0,0 +1,6 @@ + + +Rsync File With SSH • Obsidian Garden +

Rsync File With SSH

Downloads file from #SSH with rsync and puts it in current folder.

#!/bin/bashPORT=22USER=userHOST=example.comREMOTE_PATH=/tmpREMOTE_FILE=sample.textDEST_PATH=./rsync -a -e "ssh -p $PORT" -P -v \    "$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE" \    "$DEST_PATH"
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/linux/setting-up-nginx/_payload.js b/linux/setting-up-nginx/_payload.js new file mode 100644 index 0000000..cf76816 --- /dev/null +++ b/linux/setting-up-nginx/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:P,_path:Q},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-jVEFIZPtgx":{_path:Q,_dir:"linux",_draft:C,_partial:C,_locale:"en",_empty:C,title:P,description:j,excerpt:{type:R,children:[{type:a,tag:l,props:{id:D},children:[{type:c,value:E}]},{type:a,tag:h,props:{code:F,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:c,value:F}]}]}]},{type:a,tag:l,props:{id:G},children:[{type:c,value:H}]},{type:a,tag:h,props:{code:I,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:c,value:I}]}]}]},{type:a,tag:l,props:{id:J},children:[{type:c,value:K}]},{type:a,tag:S,props:{},children:[{type:c,value:T},{type:a,tag:o,props:{},children:[{type:c,value:U}]},{type:c,value:V},{type:a,tag:o,props:{},children:[{type:c,value:W}]},{type:c,value:X},{type:a,tag:o,props:{},children:[{type:c,value:Y}]},{type:c,value:Z},{type:a,tag:_,props:{href:s,rel:[$]},children:[{type:c,value:s}]},{type:c,value:aa}]},{type:a,tag:h,props:{code:L,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:c,value:L}]}]}]}]},body:{type:R,children:[{type:a,tag:l,props:{id:D},children:[{type:c,value:E}]},{type:a,tag:h,props:{code:F,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:t},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:ad},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"# First attempt to serve request as file, then"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:M}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"# as directory, then fall back to displaying a 404."}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:"ct-98243f"},children:[{type:c,value:g}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ag}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]}]}]}]},{type:a,tag:l,props:{id:G},children:[{type:c,value:H}]},{type:a,tag:h,props:{code:I,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:t},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" client_max_body_size "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"200M;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:w}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]}]}]}]},{type:a,tag:l,props:{id:J},children:[{type:c,value:K}]},{type:a,tag:S,props:{},children:[{type:c,value:T},{type:a,tag:o,props:{},children:[{type:c,value:U}]},{type:c,value:V},{type:a,tag:o,props:{},children:[{type:c,value:W}]},{type:c,value:X},{type:a,tag:o,props:{},children:[{type:c,value:Y}]},{type:c,value:Z},{type:a,tag:_,props:{href:s,rel:[$]},children:[{type:c,value:s}]},{type:c,value:aa}]},{type:a,tag:h,props:{code:L,language:m},children:[{type:a,tag:n,props:{},children:[{type:a,tag:h,props:{__ignoreMap:j},children:[{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:t},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"80;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"return"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:"ct-a384e4"},children:[{type:c,value:"301"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" https:\u002F\u002Fnext.vault48.org"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:A},children:[{type:c,value:"request_uri"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]},{type:a,tag:b,props:{class:e},children:[]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:t},children:[{type:c,value:u}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:v}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"443 ssl http2;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:N}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"[::]:443 ssl http2;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"# managed by Certbot"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" ssl_certificate "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Ffullchain.pem; "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" ssl_certificate_key "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Fprivkey.pem; "}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" ssl_trusted_certificate "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Fchain.pem;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:ah}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ai}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:p},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:ab},children:[{type:c,value:ac}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:g}]},{type:a,tag:b,props:{class:ad},children:[{type:c,value:ae}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:af}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" proxy_redirect "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"off;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"Host "}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:A},children:[{type:c,value:"host"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"X-Real-IP "}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:A},children:[{type:c,value:"remote_addr"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"X-Forwarded-For "}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:z}]},{type:a,tag:b,props:{class:A},children:[{type:c,value:"proxy_add_x_forwarded_for"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:B}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:M}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:" proxy_pass "}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"http:\u002F\u002F127.0.0.1:8080;"}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:ag}]}]},{type:a,tag:b,props:{class:e},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-b94b63{color:#C9D1D9}.ct-f5033a{color:#C9D1D9}.ct-a384e4{color:#79C0FF}.ct-14047d{color:#FF7B72}.ct-98243f{color:#FF7B72}.ct-3285a1{color:#FFA657}.ct-1d8091{color:#FF7B72}.ct-833e46{color:#C9D1D9}.ct-664979{color:#8B949E}.ct-ca6963{color:#C9D1D9}.ct-25ac06{color:#FF7B72}.light .ct-25ac06{color:#073642}.light .ct-ca6963{color:#657B83}.light .ct-664979{color:#93A1A1}.light .ct-833e46{color:#657B83}.light .ct-1d8091{color:#073642}.light .ct-3285a1{color:#657B83}.light .ct-98243f{color:#657B83}.light .ct-14047d{color:#859900}.light .ct-a384e4{color:#D33682}.light .ct-f5033a{color:#859900}.light .ct-b94b63{color:#268BD2}"}]}],toc:{title:j,searchDepth:r,depth:r,links:[{id:D,depth:r,text:E},{id:G,depth:r,text:H},{id:J,depth:r,text:K}]}},_type:"markdown",_id:"content:Linux:Setting up NGINX.md",_source:"content",_file:"Linux\u002FSetting up NGINX.md",_extension:"md"}},prerenderedAt:1667450792287}}("element","span","text","ct-ca6963","line","ct-14047d"," ","code"," ","","ct-664979","h2","nginx","pre","code-inline","ct-833e46"," ",2,"https:\u002F\u002Fnext.vault48.org","ct-25ac06","server"," {","# ...","}","ct-f5033a","$","ct-b94b63",";",false,"fallback-url-for-spa-s","Fallback url for SPA-s","server {\n # ...\n location \u002F {\n # First attempt to serve request as file, then\n # as directory, then fall back to displaying a 404.\n try_files $uri $uri\u002F =404;\n }\n # ...\n}\n","set-up-for-uploads","Set up for uploads","server {\n # ...\n client_max_body_size 200M;\n # ...\n}\n","reverse-proxy-for-https","Reverse proxy for https","server {\n listen 80;\n server_name next.vault48.org;\n return 301 https:\u002F\u002Fnext.vault48.org$request_uri;\n}\n\nserver {\n listen 443 ssl http2;\n listen [::]:443 ssl http2;\n \n # managed by Certbot\n ssl_certificate \u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Ffullchain.pem; \n ssl_certificate_key \u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Fprivkey.pem; \n ssl_trusted_certificate \u002Fetc\u002Fletsencrypt\u002Flive\u002Fvault48.org\u002Fchain.pem;\n \n server_name next.vault48.org;\n \n location \u002F {\n proxy_redirect off;\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n \n proxy_pass http:\u002F\u002F127.0.0.1:8080;\n }\n}\n"," "," listen "," proxy_set_header ","Setting Up NGINX","\u002Flinux\u002Fsetting-up-nginx","root","p","Given config forwards ","https"," traffic to ","http"," on port ","8080"," for ","a","nofollow","\nwith http2 support if possible.","ct-1d8091","location","ct-3285a1","\u002F ","{"," }"," server_name ","next.vault48.org;")) \ No newline at end of file diff --git a/linux/setting-up-nginx/index.html b/linux/setting-up-nginx/index.html new file mode 100644 index 0000000..00d2890 --- /dev/null +++ b/linux/setting-up-nginx/index.html @@ -0,0 +1,7 @@ + + +Setting Up NGINX • Obsidian Garden +

Setting Up NGINX

Fallback url for SPA-s

server {  # ...  location / {    # First attempt to serve request as file, then    # as directory, then fall back to displaying a 404.      }  # ...}

Set up for uploads

server {  # ...  client_max_body_size 200M;  # ...}

Reverse proxy for https

Given config forwards https traffic to http on port 8080 for https://next.vault48.org +with http2 support if possible.

server {  listen 80;  server_name next.vault48.org;  return 301 https://next.vault48.org$request_uri;}server {  listen 443 ssl http2;  listen [::]:443 ssl http2;    # managed by Certbot  ssl_certificate /etc/letsencrypt/live/vault48.org/fullchain.pem;   ssl_certificate_key /etc/letsencrypt/live/vault48.org/privkey.pem;   ssl_trusted_certificate /etc/letsencrypt/live/vault48.org/chain.pem;    server_name next.vault48.org;    location / {    proxy_redirect off;    proxy_set_header Host $host;    proxy_set_header X-Real-IP $remote_addr;    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;        proxy_pass http://127.0.0.1:8080;  }}
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/linux/ssh/_payload.js b/linux/ssh/_payload.js new file mode 100644 index 0000000..d4adc40 --- /dev/null +++ b/linux/ssh/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:k,_path:l}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-501XFnutIe":{_path:l,_dir:"linux",_draft:f,_partial:f,_locale:"en",_empty:f,title:k,description:c,excerpt:{type:m,children:[{type:a,tag:n,props:{id:g},children:[{type:b,value:h}]},{type:a,tag:o,props:{},children:[{type:b,value:p},{type:a,tag:d,props:{},children:[{type:b,value:q}]},{type:b,value:r},{type:a,tag:d,props:{},children:[{type:b,value:s}]},{type:b,value:t}]},{type:a,tag:e,props:{code:i},children:[{type:a,tag:u,props:{},children:[{type:a,tag:e,props:{__ignoreMap:c},children:[{type:b,value:i}]}]}]}]},body:{type:m,children:[{type:a,tag:n,props:{id:g},children:[{type:b,value:h}]},{type:a,tag:o,props:{},children:[{type:b,value:p},{type:a,tag:d,props:{},children:[{type:b,value:q}]},{type:b,value:r},{type:a,tag:d,props:{},children:[{type:b,value:s}]},{type:b,value:t}]},{type:a,tag:e,props:{code:i},children:[{type:a,tag:u,props:{},children:[{type:a,tag:e,props:{__ignoreMap:c},children:[{type:a,tag:v,props:{class:"line"},children:[{type:a,tag:v,props:{},children:[{type:b,value:"Host router\n HostName 192.168.0.1\n IdentityFile ~\u002F.ssh\u002Fid_rsa\n User root\n Port 22522"}]}]}]}]}]}],toc:{title:c,searchDepth:j,depth:j,links:[{id:g,depth:j,text:h}]}},_type:"markdown",_id:"content:Linux:SSH.md",_source:"content",_file:"Linux\u002FSSH.md",_extension:"md"}},prerenderedAt:1667450792331}}("element","text","","code-inline","code",false,"config-aliases-for-ssh-hosts","Config aliases for #SSH hosts","Host router\n HostName 192.168.0.1\n IdentityFile ~\u002F.ssh\u002Fid_rsa\n User root\n Port 22522\n",2,"SSH","\u002Flinux\u002Fssh","root","h2","p","#SSH config can be used to made aliases for different hosts. Should be put at ","~\u002F.ssh\u002Fconfig",". To simply call ","ssh router"," without parameters, use this:","pre","span")) \ No newline at end of file diff --git a/linux/ssh/index.html b/linux/ssh/index.html new file mode 100644 index 0000000..94961b0 --- /dev/null +++ b/linux/ssh/index.html @@ -0,0 +1,10 @@ + + +SSH • Obsidian Garden + + \ No newline at end of file diff --git a/nuxt.config.ts b/nuxt.config.ts deleted file mode 100644 index 8ade04c..0000000 --- a/nuxt.config.ts +++ /dev/null @@ -1,50 +0,0 @@ -export default defineNuxtConfig({ - alias: { - "~": "/", - }, - modules: ["@nuxt/content", "@nuxtjs/color-mode"], - typescript: { - shim: false, - typeCheck: true, - }, - content: { - navigation: { - fields: ["blblblb"], - }, - highlight: { - theme: { - default: "github-dark", - light: "solarized-light", - }, - preload: [ - "shell", - "c", - "go", - "graphql", - "scss", - "shell", - "sh", - "docker", - "typescript", - "javascript", - "nginx", - "bash", - "yaml", - "sh", - ], - }, - }, - target: "static", - css: ["@/assets/css/main.scss"], - head: { - link: [{ rel: "icon", type: "image/png", href: "/favicon.png" }], - }, - colorMode: { - preference: "dark", - classSuffix: "", - storageKey: "nuxt-color-mode", - }, - app: { - buildAssetsDir: "nuxt/", - }, -}); diff --git a/nuxt/ArrowRight.b397e6a8.js b/nuxt/ArrowRight.b397e6a8.js new file mode 100644 index 0000000..2cadbe6 --- /dev/null +++ b/nuxt/ArrowRight.b397e6a8.js @@ -0,0 +1 @@ +import{k as e,o as t,e as o,f as s}from"./entry.9584492c.js";const n={},_={xmlns:"http://www.w3.org/2000/svg",height:"48",width:"48",viewBox:"0 0 48 48"},c=s("path",{d:"m24 40-2.1-2.15L34.25 25.5H8v-3h26.25L21.9 10.15 24 8l16 16Z"},null,-1),r=[c];function a(h,d){return t(),o("svg",_,r)}const l=e(n,[["render",a]]);export{l as default}; diff --git a/nuxt/BioHeading.968f8c96.js b/nuxt/BioHeading.968f8c96.js new file mode 100644 index 0000000..273df05 --- /dev/null +++ b/nuxt/BioHeading.968f8c96.js @@ -0,0 +1 @@ +import{k as t,o as a,e as n,f as e,h as s,V as r,W as c}from"./entry.9584492c.js";const d=""+new URL("howdy.824e8e62.svg",import.meta.url).href,i={},l=e("div",null,[e("img",{src:d})],-1),m=c("

Howdy!

My name is Fedor Katurov, I'm a fullstack developer from Siberia.

I develop frontend applications with React, Vue and numerous other frameworks for the most of my time, but I'm also capable of doing Typescript and Golang backend.

I've started coding more than 15 years ago as a hobby and still love doing that on my work and free time.

",4),p=[m];function _(o,f){return a(),n("section",{class:s(o.$style.grid)},[l,e("div",{class:s(o.$style.text)},p,2)],2)}const b={$style:r},u=t(i,[["render",_],["__cssModules",b]]);export{u as default}; diff --git a/nuxt/BioProjects.096d71eb.js b/nuxt/BioProjects.096d71eb.js new file mode 100644 index 0000000..ab45ec7 --- /dev/null +++ b/nuxt/BioProjects.096d71eb.js @@ -0,0 +1 @@ +import{s as o}from"./ContentNavigation.3feae645.js";import{k as t,o as i,e as r,h as a,f as s}from"./entry.9584492c.js";import"./navigation.d66e160d.js";import"./ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js";import"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js";import"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";import"./ContentList.ac186f34.js";import"./ContentSlot.2a654c2d.js";import"./DocumentDrivenEmpty.d3ab28ab.js";import"./DocumentDrivenNotFound.47713d66.js";import"./Markdown.273e7520.js";const c={},m=s("h2",null,"My Projects",-1),n=s("p",null," Lorem ipsum dolor sit amet consectetur adipisicing elit. Quaerat natus perspiciatis ad voluptatum nisi saepe, molestiae autem dolores est modi quod inventore similique omnis asperiores. Qui beatae magnam ab consequatur. ",-1),p=[m,n];function l(e,d){return i(),r("section",{class:a(e.$style.projects)},p,2)}const u={$style:o},v=t(c,[["render",l],["__cssModules",u]]);export{v as default}; diff --git a/nuxt/BioSkills.59f5dd5b.js b/nuxt/BioSkills.59f5dd5b.js new file mode 100644 index 0000000..29b68cb --- /dev/null +++ b/nuxt/BioSkills.59f5dd5b.js @@ -0,0 +1 @@ +import l from"./SkillsCard.a4048079.js";import{a as c,o,e as n,f as t,R as a,S as p,c as d,w as g,u as m,h as u,k as h,X as v}from"./entry.9584492c.js";import"./UiStars.f9df0828.js";import"./IconStar.3b3b3476.js";const f=""+new URL("react-logo.8351f38f.svg",import.meta.url).href,L=""+new URL("react-native-logo.bdbaa7c9.svg",import.meta.url).href,_=""+new URL("react-ssr-logo.3593105e.svg",import.meta.url).href,R=""+new URL("ts-logo.5847c362.svg",import.meta.url).href,w=""+new URL("golang-logo.f772e478.svg",import.meta.url).href,S=""+new URL("html-logo.1f694231.svg",import.meta.url).href,x=""+new URL("arch-logo.838efbc7.svg",import.meta.url).href,k=""+new URL("gql-logo.1e66e5b3.svg",import.meta.url).href,b=""+new URL("swagger-logo.b314537c.svg",import.meta.url).href,U=""+new URL("vue-logo.17ff892a.svg",import.meta.url).href,C=""+new URL("postgres-logo.d981f813.svg",import.meta.url).href,y=""+new URL("docker-logo.7f942bd1.svg",import.meta.url).href,B=[{title:"React",description:"Classes and FC-s, hooks, context, redux, redux-saga, mobx",level:5,icon:f},{title:"Typescript",description:"For both frontend and backend development: generics, guards, infers",level:4,icon:R},{title:"SSR (Next, Gatsby)",description:"Automated generation, incremental, static, and dynamic rendering",level:4,icon:_},{title:"Vue.js & Nuxt",description:"Common SPA-s and SSR blogs like this one, with composition API, and Vuex",level:3,icon:U},{title:"React Native",description:"Basic developing and releasing experience without native modules",level:3,icon:L},{title:"Golang",description:"Monolith and microservice apps with REST, GraphQL, and GRPC",level:2,icon:w},{title:"Docker",description:"Docker, docker-compose, private registries, gitlab-ci, and drone-ci",level:4,icon:y},{title:"HTML, CSS, SVG",description:"Adaptive markup, all modern techniques, preprocessors, and CSS-in-JS",level:5,icon:S},{title:"Linux Shell",description:"Linux user since 2003, can write scripts to automate my work. BTW, I use Arch!",level:4,icon:x},{title:"GraphQL",description:"Both server- and client-side. Queries, mutations, cache manipulation",level:4,icon:k},{title:"REST API",description:"With Axios, fetch, express, gorilla-mux, and gin-gonic",level:4,icon:b},{title:"SQL",description:"Base queries, JOIN-s, indexes and simpl query optimizations",level:2,icon:C}],A=t("h1",null,"Skills",-1),G=["src"],T=c({__name:"BioSkills",setup(M){return(s,P)=>{const r=l;return o(),n("div",null,[A,t("div",{class:u(s.$style.list)},[(o(!0),n(a,null,p(m(B),e=>{var i;return o(),d(r,{title:e.title,level:e.level,description:(i=e.description)!=null?i:"",key:e.title},{default:g(()=>[t("img",{src:e.icon,width:"48",height:"48"},null,8,G)]),_:2},1032,["title","level","description"])}),128))],2)])}}}),N={$style:v},D=h(T,[["__cssModules",N]]);export{D as default}; diff --git a/nuxt/ContentList.ac186f34.js b/nuxt/ContentList.ac186f34.js new file mode 100644 index 0000000..50dfc97 --- /dev/null +++ b/nuxt/ContentList.ac186f34.js @@ -0,0 +1 @@ +import{a as i,l as m,m as f,p as c}from"./entry.9584492c.js";const l=i({name:"ContentList",props:{path:{type:String,required:!1,default:void 0},query:{type:Object,required:!1,default:void 0}},render(o){const e=m(),{path:p,query:a}=o,r={...a||{},path:p||(a==null?void 0:a.path)||"/"},u=(t,n)=>f("pre",null,JSON.stringify({message:"You should use slots with ",slot:t,data:n},null,2));return f(c,r,{default:e!=null&&e.default?({data:t,refresh:n,isPartial:d})=>e==null?void 0:e.default({list:t,refresh:n,isPartial:d,...this.$attrs}):({data:t})=>u("default",t),empty:t=>e!=null&&e.empty?e.empty(t):({data:n})=>u("default",n),"not-found":t=>{var n;return e!=null&&e["not-found"]?(n=e==null?void 0:e["not-found"])==null?void 0:n.call(e,t):({data:d})=>u("not-found",d)}})}});export{l as default}; diff --git a/nuxt/ContentNavigation.3feae645.js b/nuxt/ContentNavigation.3feae645.js new file mode 100644 index 0000000..ff9d802 --- /dev/null +++ b/nuxt/ContentNavigation.3feae645.js @@ -0,0 +1 @@ +import{a as l,q as E,s as g,v as O,e as T,x as L,m as f,y as P,z as I,d as e,_ as r,A as y,B as D,C as R,D as V,E as b,l as B,b as x}from"./entry.9584492c.js";import{f as N}from"./navigation.d66e160d.js";import"./ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js";import"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js";import"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";import"./ContentList.ac186f34.js";import"./ContentSlot.2a654c2d.js";import"./DocumentDrivenEmpty.d3ab28ab.js";import"./DocumentDrivenNotFound.47713d66.js";import"./Markdown.273e7520.js";const j="_projects_1y2ci_1",pt={projects:j};const C=l({emits:{error(t){return!0}},setup(t,{slots:i,emit:o}){const n=E(null),_=g();return O(a=>{if(!_.isHydrating)return o("error",a),n.value=a,!1}),()=>{var a,u;return n.value?(a=i.error)==null?void 0:a.call(i,{error:n}):(u=i.default)==null?void 0:u.call(i)}}}),q=Object.freeze(Object.defineProperty({__proto__:null,default:C},Symbol.toStringTag,{value:"Module"})),z=l({name:"ServerPlaceholder",render(){return T("div")}}),M=Object.freeze(Object.defineProperty({__proto__:null,default:z},Symbol.toStringTag,{value:"Module"})),k=l({name:"NuxtLoadingIndicator",props:{throttle:{type:Number,default:200},duration:{type:Number,default:2e3},height:{type:Number,default:3},color:{type:String,default:"repeating-linear-gradient(to right,#00dc82 0%,#34cdfe 50%,#0047e1 100%)"}},setup(t,{slots:i}){const o=H({duration:t.duration,throttle:t.throttle}),n=g();return n.hook("page:start",o.start),n.hook("page:finish",o.finish),L(()=>o.clear),()=>f("div",{class:"nuxt-loading-indicator",style:{position:"fixed",top:0,right:0,left:0,pointerEvents:"none",width:`${o.progress.value}%`,height:`${t.height}px`,opacity:o.isLoading.value?1:0,background:t.color,backgroundSize:`${100/o.progress.value*100}% auto`,transition:"width 0.1s, height 0.4s, opacity 0.4s",zIndex:999999}},i)}});function H(t){const i=E(0),o=E(!1),n=P(()=>1e4/t.duration);let _=null,a=null;function u(){p(),i.value=0,o.value=!0,t.throttle?a=setTimeout(v,t.throttle):v()}function h(){i.value=100,c()}function p(){clearInterval(_),clearTimeout(a),_=null,a=null}function S(A){i.value=Math.min(100,i.value+A)}function c(){p(),setTimeout(()=>{o.value=!1,setTimeout(()=>{i.value=0},400)},500)}function v(){_=setInterval(()=>{S(n.value)},100)}return{progress:i,isLoading:o,start:u,finish:h,clear:p}}const $=Object.freeze(Object.defineProperty({__proto__:null,default:k},Symbol.toStringTag,{value:"Module"})),w=t=>Object.fromEntries(Object.entries(t).filter(([,i])=>i!==void 0)),d=(t,i)=>(o,n)=>(I(()=>t({...w(o),...n.attrs},n)),()=>{var _,a;return i?(a=(_=n.slots).default)==null?void 0:a.call(_):null}),s={accesskey:String,autocapitalize:String,autofocus:{type:Boolean,default:void 0},class:String,contenteditable:{type:Boolean,default:void 0},contextmenu:String,dir:String,draggable:{type:Boolean,default:void 0},enterkeyhint:String,exportparts:String,hidden:{type:Boolean,default:void 0},id:String,inputmode:String,is:String,itemid:String,itemprop:String,itemref:String,itemscope:String,itemtype:String,lang:String,nonce:String,part:String,slot:String,spellcheck:{type:Boolean,default:void 0},style:String,tabindex:String,title:String,translate:String},U=l({name:"Script",inheritAttrs:!1,props:{...s,async:Boolean,crossorigin:{type:[Boolean,String],default:void 0},defer:Boolean,fetchpriority:String,integrity:String,nomodule:Boolean,nonce:String,referrerpolicy:String,src:String,type:String,charset:String,language:String,body:Boolean,renderPriority:[String,Number]},setup:d((t,{slots:i})=>{var _;const o={...t},n=(((_=i.default)==null?void 0:_.call(i))||[]).filter(({children:a})=>a).map(({children:a})=>a).join("");return n&&(o.children=n),{script:[o]}})}),F=l({name:"NoScript",inheritAttrs:!1,props:{...s,title:String,body:Boolean,renderPriority:[String,Number]},setup:d((t,{slots:i})=>{var _;const o={...t},n=(((_=i.default)==null?void 0:_.call(i))||[]).filter(({children:a})=>a).map(({children:a})=>a).join("");return n&&(o.children=n),{noscript:[o]}})}),G=l({name:"Link",inheritAttrs:!1,props:{...s,as:String,crossorigin:String,disabled:Boolean,fetchpriority:String,href:String,hreflang:String,imagesizes:String,imagesrcset:String,integrity:String,media:String,prefetch:{type:Boolean,default:void 0},referrerpolicy:String,rel:String,sizes:String,title:String,type:String,methods:String,target:String,body:Boolean,renderPriority:[String,Number]},setup:d(t=>({link:[t]}))}),J=l({name:"Base",inheritAttrs:!1,props:{...s,href:String,target:String},setup:d(t=>({base:t}))}),K=l({name:"Title",inheritAttrs:!1,setup:d((t,{slots:i})=>{var n,_,a;return{title:((a=(_=(n=i.default)==null?void 0:n.call(i))==null?void 0:_[0])==null?void 0:a.children)||null}})}),Q=l({name:"Meta",inheritAttrs:!1,props:{...s,charset:String,content:String,httpEquiv:String,name:String,body:Boolean,renderPriority:[String,Number]},setup:d(t=>{const i={...t};return i.httpEquiv&&(i["http-equiv"]=i.httpEquiv,delete i.httpEquiv),{meta:[i]}})}),W=l({name:"Style",inheritAttrs:!1,props:{...s,type:String,media:String,nonce:String,title:String,scoped:{type:Boolean,default:void 0},body:Boolean,renderPriority:[String,Number]},setup:d((t,{slots:i})=>{var _,a,u;const o={...t},n=(u=(a=(_=i.default)==null?void 0:_.call(i))==null?void 0:a[0])==null?void 0:u.children;return n&&(o.children=n),{style:[o]}})}),X=l({name:"Head",inheritAttrs:!1,setup:(t,i)=>()=>{var o,n;return(n=(o=i.slots).default)==null?void 0:n.call(o)}}),Y=l({name:"Html",inheritAttrs:!1,props:{...s,manifest:String,version:String,xmlns:String,renderPriority:[String,Number]},setup:d(t=>({htmlAttrs:t}),!0)}),Z=l({name:"Body",inheritAttrs:!1,props:{...s,renderPriority:[String,Number]},setup:d(t=>({bodyAttrs:t}),!0)}),m=Object.freeze(Object.defineProperty({__proto__:null,Script:U,NoScript:F,Link:G,Base:J,Title:K,Meta:Q,Style:W,Head:X,Html:Y,Body:Z},Symbol.toStringTag,{value:"Module"}));e(()=>r(()=>import("./ProseA.7eadd880.js"),["ProseA.7eadd880.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseCode.217ed266.js"),["ProseCode.217ed266.js","UiIconCopy.eae3960f.js","entry.9584492c.js","entry.9c0c7058.css","ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js","ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./BioHeading.968f8c96.js"),["BioHeading.968f8c96.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./BioProjects.096d71eb.js"),["BioProjects.096d71eb.js","entry.9584492c.js","entry.9c0c7058.css","navigation.d66e160d.js","ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js","ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css","ContentList.ac186f34.js","ContentSlot.2a654c2d.js","DocumentDrivenEmpty.d3ab28ab.js","DocumentDrivenNotFound.47713d66.js","Markdown.273e7520.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./BioSkills.59f5dd5b.js"),["BioSkills.59f5dd5b.js","SkillsCard.a4048079.js","UiStars.f9df0828.js","IconStar.3b3b3476.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./HomeContentList.228cf2a1.js"),["HomeContentList.228cf2a1.js","entry.9584492c.js","entry.9c0c7058.css","navigation.d66e160d.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./HomeHeader.fc13ef44.js"),["HomeHeader.fc13ef44.js","entry.9584492c.js","entry.9c0c7058.css","ArrowRight.b397e6a8.js","UiActionButton.bb3c8fbb.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./HomeReference.7471fc48.js"),["HomeReference.7471fc48.js","entry.9584492c.js","entry.9c0c7058.css","navigation.d66e160d.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ArrowRight.b397e6a8.js"),["ArrowRight.b397e6a8.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./IconStar.3b3b3476.js"),["IconStar.3b3b3476.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js").then(t=>t.M),["LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js").then(t=>t.S),["LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutFooter.163a17fa.js"),["LayoutFooter.163a17fa.js","entry.9584492c.js","entry.9c0c7058.css","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutMainMenu.06c3729f.js"),["LayoutMainMenu.06c3729f.js","entry.9584492c.js","entry.9c0c7058.css","navigation.d66e160d.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.9584492c.js").then(t=>t.as),["entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutMainMenuToggle.7c76ad2a.js"),["LayoutMainMenuToggle.7c76ad2a.js","entry.9584492c.js","entry.9c0c7058.css","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutThemeToggle.9b30b6e6.js"),["LayoutThemeToggle.9b30b6e6.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./SkillsCard.a4048079.js"),["SkillsCard.a4048079.js","UiStars.f9df0828.js","IconStar.3b3b3476.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./UiActionButton.bb3c8fbb.js"),["UiActionButton.bb3c8fbb.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./UiIconCopy.eae3960f.js"),["UiIconCopy.eae3960f.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./UiStars.f9df0828.js"),["UiStars.f9df0828.js","IconStar.3b3b3476.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.9584492c.js").then(t=>t.ar),["entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ContentList.ac186f34.js"),["ContentList.ac186f34.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>Promise.resolve().then(()=>et),void 0,import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.9584492c.js").then(t=>t.aq),["entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.9584492c.js").then(t=>t.ap),["entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.9584492c.js").then(t=>t.ao),["entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ContentSlot.2a654c2d.js"),["ContentSlot.2a654c2d.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./DocumentDrivenEmpty.d3ab28ab.js"),["DocumentDrivenEmpty.d3ab28ab.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./DocumentDrivenNotFound.47713d66.js"),["DocumentDrivenNotFound.47713d66.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./Markdown.273e7520.js"),["Markdown.273e7520.js","ContentSlot.2a654c2d.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseBlockquote.4eddfa24.js"),["ProseBlockquote.4eddfa24.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseCodeInline.653dfd51.js"),["ProseCodeInline.653dfd51.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseEm.fcc3e08f.js"),["ProseEm.fcc3e08f.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH1.4206edd4.js"),["ProseH1.4206edd4.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH2.6e168f26.js"),["ProseH2.6e168f26.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH3.e750c3fc.js"),["ProseH3.e750c3fc.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH4.9ba7c7c7.js"),["ProseH4.9ba7c7c7.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH5.38d08c0e.js"),["ProseH5.38d08c0e.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseH6.9eecf9ec.js"),["ProseH6.9eecf9ec.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseHr.084d3715.js"),["ProseHr.084d3715.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseImg.100f8c70.js"),["ProseImg.100f8c70.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseLi.7b97d062.js"),["ProseLi.7b97d062.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseOl.6038eab9.js"),["ProseOl.6038eab9.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseP.4bffa454.js"),["ProseP.4bffa454.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseStrong.0550a54f.js"),["ProseStrong.0550a54f.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseTable.2942e3d1.js"),["ProseTable.2942e3d1.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseTbody.dcbbf441.js"),["ProseTbody.dcbbf441.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseTd.c34b65be.js"),["ProseTd.c34b65be.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseTh.e56b19e7.js"),["ProseTh.e56b19e7.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseThead.24261552.js"),["ProseThead.24261552.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseTr.e844d968.js"),["ProseTr.e844d968.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./ProseUl.536bb57e.js"),["ProseUl.536bb57e.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./welcome.14964f1a.js"),["welcome.14964f1a.js","entry.9584492c.js","entry.9c0c7058.css","navigation.d66e160d.js","ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js","ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css","ContentList.ac186f34.js","ContentSlot.2a654c2d.js","DocumentDrivenEmpty.d3ab28ab.js","DocumentDrivenNotFound.47713d66.js","Markdown.273e7520.js"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.9584492c.js").then(t=>t.at),["entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>Promise.resolve().then(()=>q),void 0,import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js").then(t=>t.c),["LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>Promise.resolve().then(()=>M),void 0,import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.9584492c.js").then(t=>t.an),["entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>Promise.resolve().then(()=>$),void 0,import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./component.vue3.04db831c.js"),["component.vue3.04db831c.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>import("./entry.9584492c.js").then(t=>t.au),["entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(t=>t.default||t));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Script));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.NoScript));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Link));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Base));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Title));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Meta));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Style));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Head));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Html));e(()=>r(()=>Promise.resolve().then(()=>m),void 0,import.meta.url).then(t=>t.Body));const tt=l({name:"ContentNavigation",props:{query:{type:Object,required:!1,default:void 0}},async setup(t){const{query:i}=y(t),o=P(()=>{var _;return typeof((_=i.value)==null?void 0:_.params)=="function"?i.value.params():i.value});if(!o.value&&D("dd-navigation").value){const{navigation:_}=R();return{navigation:_}}const{data:n}=await V(`content-navigation-${b(o.value)}`,()=>N(o.value));return{navigation:n}},render(t){const i=B(),{navigation:o}=t,n=u=>f(x,{to:u._path},()=>u.title),_=(u,h)=>f("ul",h?{"data-level":h}:null,u.map(p=>p.children?f("li",null,[n(p),_(p.children,h+1)]):f("li",null,n(p)))),a=u=>_(u,0);return i!=null&&i.default?i.default({navigation:o,...this.$attrs}):a(o)}}),et=Object.freeze(Object.defineProperty({__proto__:null,default:tt},Symbol.toStringTag,{value:"Module"}));export{et as C,pt as s}; diff --git a/nuxt/ContentNavigation.82aba83b.css b/nuxt/ContentNavigation.82aba83b.css new file mode 100644 index 0000000..e002791 --- /dev/null +++ b/nuxt/ContentNavigation.82aba83b.css @@ -0,0 +1 @@ +._projects_1y2ci_1{text-align:center}.spotlight[data-v-25102a06]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-40vh;filter:blur(20vh);height:50vh}.spotlight-wrapper[data-v-25102a06]{opacity:.5;transition:opacity .4s ease-in}.nuxt-logo:hover~.spotlight-wrapper[data-v-25102a06]{opacity:.95}.gradient-border[data-v-25102a06]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:.5rem;position:relative;width:100%}@media (prefers-color-scheme:light){.gradient-border[data-v-25102a06]{background-color:#ffffff4d}.gradient-border[data-v-25102a06]:before{background:linear-gradient(90deg,#e2e2e2,#e2e2e2 25%,#00dc82 50%,#36e4da 75%,#0047e1)}}@media (prefers-color-scheme:dark){.gradient-border[data-v-25102a06]{background-color:#1414144d}.gradient-border[data-v-25102a06]:before{background:linear-gradient(90deg,#303030,#303030 25%,#00dc82 50%,#36e4da 75%,#0047e1)}}.gradient-border[data-v-25102a06]:before{background-position:0 0;background-size:400% auto;border-radius:.5rem;bottom:0;content:"";left:0;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.5;padding:2px;position:absolute;right:0;top:0;transition:background-position .3s ease-in-out,opacity .2s ease-in-out;width:100%}.gradient-border[data-v-25102a06]:hover:before{background-position:-50% 0;opacity:1}.bg-white[data-v-25102a06]{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-gray-100[data-v-25102a06]{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.rounded[data-v-25102a06]{border-radius:.25rem}.cursor-pointer[data-v-25102a06]{cursor:pointer}.flex[data-v-25102a06]{display:flex}.grid[data-v-25102a06]{display:grid}.flex-col[data-v-25102a06]{flex-direction:column}.place-content-center[data-v-25102a06]{place-content:center}.items-end[data-v-25102a06]{align-items:flex-end}.items-center[data-v-25102a06]{align-items:center}.justify-end[data-v-25102a06]{justify-content:flex-end}.justify-center[data-v-25102a06]{justify-content:center}.justify-between[data-v-25102a06]{justify-content:space-between}.font-sans[data-v-25102a06]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-mono[data-v-25102a06]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-medium[data-v-25102a06]{font-weight:500}.font-bold[data-v-25102a06]{font-weight:700}.font-semibold[data-v-25102a06]{font-weight:600}.text-xl[data-v-25102a06]{font-size:1.25rem;line-height:1.75rem}.text-sm[data-v-25102a06]{font-size:.875rem;line-height:1.25rem}.text-2xl[data-v-25102a06]{font-size:1.5rem;line-height:2rem}.mb-2[data-v-25102a06]{margin-bottom:.5rem}.mb-4[data-v-25102a06]{margin-bottom:1rem}.mt-4[data-v-25102a06]{margin-top:1rem}.mt-2[data-v-25102a06]{margin-top:.5rem}.max-w-5xl[data-v-25102a06]{max-width:64rem}.min-h-screen[data-v-25102a06]{min-height:100vh}.p-4[data-v-25102a06]{padding:1rem}.p-8[data-v-25102a06]{padding:2rem}.p-1[data-v-25102a06]{padding:.25rem}.pb-1[data-v-25102a06]{padding-bottom:.25rem}.fixed[data-v-25102a06]{position:fixed}.left-0[data-v-25102a06]{left:0}.right-0[data-v-25102a06]{right:0}.text-black[data-v-25102a06]{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.antialiased[data-v-25102a06]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.w-full[data-v-25102a06]{width:100%}.w-40[data-v-25102a06]{width:10rem}.z-10[data-v-25102a06]{z-index:10}.z-20[data-v-25102a06]{z-index:20}.gap-4[data-v-25102a06]{grid-gap:1rem;gap:1rem}.grid-cols-3[data-v-25102a06]{grid-template-columns:repeat(3,minmax(0,1fr))}.col-span-3[data-v-25102a06]{-ms-grid-column-span:span 3/span 3;grid-column:span 3/span 3}@media (min-width:640px){.sm\:text-base[data-v-25102a06]{font-size:1rem;line-height:1.5rem}.sm\:pb-2[data-v-25102a06]{padding-bottom:.5rem}.sm\:col-span-1[data-v-25102a06]{-ms-grid-column-span:span 1/span 1;grid-column:span 1/span 1}}@media (min-width:768px){.md\:gap-8[data-v-25102a06]{grid-gap:2rem;gap:2rem}}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-25102a06]{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.dark\:bg-white\/10[data-v-25102a06]{--tw-bg-opacity:.1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.dark\:text-white[data-v-25102a06]{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}} diff --git a/nuxt/ContentSlot.2a654c2d.js b/nuxt/ContentSlot.2a654c2d.js new file mode 100644 index 0000000..e38e5a1 --- /dev/null +++ b/nuxt/ContentSlot.2a654c2d.js @@ -0,0 +1 @@ +import{a as g,l as h,y,m as p,K as c,L as w}from"./entry.9584492c.js";const C=g({name:"ContentSlot",functional:!0,props:{use:{type:Function,default:void 0},unwrap:{type:[Boolean,String],default:!1}},setup(e){const{parent:u}=w(),{between:o,default:l}=h(),i=y(()=>typeof e.unwrap=="string"?e.unwrap.split(" "):["*"]);return{fallbackSlot:l,tags:i,between:o,parent:u}},render({use:e,unwrap:u,fallbackSlot:o,between:l,tags:i,parent:n}){var f;try{let r=e;if(typeof e=="string"&&(r=(n==null?void 0:n.slots[e])||((f=n==null?void 0:n.parent)==null?void 0:f.slots[e]),console.warn(`Please set :use="$slots.${e}" in component to enable reactivity`)),!r)return o?o():p("div");if(!u)return[r()];const{flatUnwrap:d}=c(),a=d(r(),i);return l?a.flatMap((t,s)=>s===0?[t]:[l(),t]):a.reduce((t,s)=>(typeof s.children=="string"?typeof t[t.length-1]=="string"?t[t.length-1]+=s.children:t.push(s.children):t.push(s),t),[])}catch{return p("div")}}});export{C as default}; diff --git a/nuxt/DocumentDrivenEmpty.d3ab28ab.js b/nuxt/DocumentDrivenEmpty.d3ab28ab.js new file mode 100644 index 0000000..8615092 --- /dev/null +++ b/nuxt/DocumentDrivenEmpty.d3ab28ab.js @@ -0,0 +1 @@ +import{a as n,m as e}from"./entry.9584492c.js";const r=n({name:"DocumentDrivenEmpty",props:{value:{type:Object,required:!0}},render({value:t}){return e("div",void 0,[e("p","Document is empty"),e("p",`Add content to it by opening ${t._source}/${t._file} file.`)])}});export{r as default}; diff --git a/nuxt/DocumentDrivenNotFound.47713d66.js b/nuxt/DocumentDrivenNotFound.47713d66.js new file mode 100644 index 0000000..91cbebc --- /dev/null +++ b/nuxt/DocumentDrivenNotFound.47713d66.js @@ -0,0 +1 @@ +import{a as n,m as e}from"./entry.9584492c.js";const t=n({name:"DocumentDrivenNotFound",render(){return e("div","Document not found")}});export{t as default}; diff --git a/nuxt/HomeContentList.228cf2a1.js b/nuxt/HomeContentList.228cf2a1.js new file mode 100644 index 0000000..4c680a9 --- /dev/null +++ b/nuxt/HomeContentList.228cf2a1.js @@ -0,0 +1 @@ +import{k as c,Q as _,D as i,a2 as u,o as m,c as p,w as d,f as h,h as f,i as y,u as w,a3 as v,a4 as x}from"./entry.9584492c.js";import{f as C}from"./navigation.d66e160d.js";const g={__name:"HomeContentList",async setup(M){let e,n;const{data:a}=([e,n]=_(()=>i("navigation",()=>C())),e=await e,n(),e),o=a.value.filter(t=>t.children&&Array.isArray(t.children)&&t.children.length>0);return(t,k)=>{const r=x,l=u("masonry-wall");return m(),p(l,{items:w(o),"ssr-columns":1,"column-width":300,gap:10},{default:d(({item:s})=>[h("div",{class:f(t.$style.row)},[y(r,{title:s.title,url:s.url,children:s.children},null,8,["title","url","children"])],2)]),_:1},8,["items"])}}},A={$style:v},$=c(g,[["__cssModules",A]]);export{$ as default}; diff --git a/nuxt/HomeHeader.fc13ef44.js b/nuxt/HomeHeader.fc13ef44.js new file mode 100644 index 0000000..cc5bb05 --- /dev/null +++ b/nuxt/HomeHeader.fc13ef44.js @@ -0,0 +1 @@ +import{k as r,o as _,e as m,f as t,h as s,i as o,w as n,T as a,a1 as d,b as u}from"./entry.9584492c.js";import h from"./ArrowRight.b397e6a8.js";import p from"./UiActionButton.bb3c8fbb.js";const f=""+new URL("obsidian.8dc2a844.svg",import.meta.url).href,g=""+new URL("desk.fcd75862.svg",import.meta.url).href,b={},y=t("img",{src:f,alt:"",width:"14",height:"14"},null,-1);function k(e,$){const i=u,c=h,l=p;return _(),m("section",null,[t("div",{class:s(e.$style.grid)},[t("div",{class:s(e.$style.text)},[t("h1",{class:s(e.$style.title)},"Welcome to\xA0my Obsidian\xA0Garden",2),t("p",{class:s(e.$style.subtitle)},[y,o(i,{to:"https://obsidian.md",target:"_blank"},{default:n(()=>[a("Obsidian")]),_:1}),a(" is a note-taking app, that I use to store chunks of code and technical documentation. ")],2),t("div",{class:s(e.$style.buttons)},[o(l,{href:"https://github.com/muerwre",target:"_blank",variant:"outline"},{suffix:n(()=>[o(c,{width:"22",height:"22",fill:"currentColor"})]),default:n(()=>[a(" Visit my Github ")]),_:1})],2)],2),t("div",{class:s(e.$style.image)},[t("img",{src:g,class:s(e.$style.desk),alt:"It's me, muerwre"},null,2)],2)],2)])}const w={$style:d},N=r(b,[["render",k],["__cssModules",w]]);export{N as default}; diff --git a/nuxt/HomeReference.7471fc48.js b/nuxt/HomeReference.7471fc48.js new file mode 100644 index 0000000..70db9f2 --- /dev/null +++ b/nuxt/HomeReference.7471fc48.js @@ -0,0 +1 @@ +import{a as x,Q as k,o as r,e as c,f as C,t as f,u as i,h as N,R as v,S as w,i as D,w as V,T as B,j as A,D as L,b as M,k as R,U as S}from"./entry.9584492c.js";import{f as T}from"./navigation.d66e160d.js";const $=x({__name:"HomeReference",props:{url:null},async setup(p){let a,u;const h=p,_=(n,e)=>{var s;const t=n.find(l=>l._path.endsWith(e[0]));return!t||e.length>1&&!((s=t.children)!=null&&s.length)?null:e.length===1?t:_(t.children,e.slice(1,e.length))},{data:g}=([a,u]=k(()=>L("navigation",()=>T())),a=await a,u(),a),y=h.url.split("/").filter(n=>n),o=_(g.value,y);return(n,e)=>{var s,l,m;const t=M;return r(),c("article",null,[C("h1",null,f((s=i(o))==null?void 0:s.title),1),(m=(l=i(o))==null?void 0:l.children)!=null&&m.length?(r(),c("ul",{key:0,class:N(n.$style.list)},[(r(!0),c(v,null,w(i(o).children,d=>(r(),c("li",{key:i(o)._id},[D(t,{to:d._path},{default:V(()=>[B(f(d.title),1)]),_:2},1032,["to"])]))),128))],2)):A("",!0)])}}}),b={$style:S},E=R($,[["__cssModules",b]]);export{E as default}; diff --git a/nuxt/IconStar.3b3b3476.js b/nuxt/IconStar.3b3b3476.js new file mode 100644 index 0000000..6c1b4ad --- /dev/null +++ b/nuxt/IconStar.3b3b3476.js @@ -0,0 +1 @@ +import{k as e,o as t,e as o,f as s}from"./entry.9584492c.js";const n={},_={xmlns:"http://www.w3.org/2000/svg",height:"48",width:"48",viewBox:"0 0 48 48"},c=s("path",{d:"m11.65 44 3.25-14.05L4 20.5l14.4-1.25L24 6l5.6 13.25L44 20.5l-10.9 9.45L36.35 44 24 36.55Z"},null,-1),r=[c];function a(l,d){return t(),o("svg",_,r)}const i=e(n,[["render",a]]);export{i as default}; diff --git a/nuxt/LayoutFooter.163a17fa.js b/nuxt/LayoutFooter.163a17fa.js new file mode 100644 index 0000000..f6ed013 --- /dev/null +++ b/nuxt/LayoutFooter.163a17fa.js @@ -0,0 +1 @@ +import{k as n,o as l,e as r,f as t,h as s,T as a,t as c,i as _,w as i,b as u}from"./entry.9584492c.js";import{a as d}from"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js";const m={},f=t("div",null,"btw, have a nice day",-1);function p(e,w){const o=u;return l(),r("footer",{class:s([e.$style.footer,e.$attrs.class])},[f,t("div",{class:s(e.$style.filler)},null,2),t("div",null,[a(" (2018 - "+c(new Date().getFullYear())+") ",1),_(o,{to:"https://github.com/muerwre/",target:"_blank"},{default:i(()=>[a("muerwre")]),_:1})])],2)}const h={$style:d},x=n(m,[["render",p],["__cssModules",h]]);export{x as default}; diff --git a/nuxt/LayoutMainMenu.06c3729f.js b/nuxt/LayoutMainMenu.06c3729f.js new file mode 100644 index 0000000..71571fb --- /dev/null +++ b/nuxt/LayoutMainMenu.06c3729f.js @@ -0,0 +1 @@ +import{k as m,Q as p,D as h,o,e as l,f as a,i,w as y,h as t,R as f,S as v,u as w,b as $,a4 as g}from"./entry.9584492c.js";import{f as M}from"./navigation.d66e160d.js";import{a as k}from"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";const C={__name:"LayoutMainMenu",async setup(x){let s,r;const{data:c}=([s,r]=p(()=>h("navigation",()=>M())),s=await s,r(),s),_=c.value.filter(e=>e.children&&Array.isArray(e.children)&&e.children.length>0);return(e,A)=>{const u=$,d=g;return o(),l("nav",null,[a("div",{class:t(e.$style.logo)},[i(u,{to:"/"},{default:y(()=>[a("div",{class:t(e.$style.title)},"Obsidian Garden",2),a("div",{class:t(e.$style.subtitle)},"by muerwre",2)]),_:1})],2),a("div",{class:t(e.$style.section_title)},"Cheatsheet",2),(o(!0),l(f,null,v(w(_),n=>(o(),l("div",{key:"item._path",class:t(e.$style.row)},[i(d,{title:n.title,url:n._path,children:n.children},null,8,["title","url","children"])],2))),128))])}}},b={$style:k},D=m(C,[["__cssModules",b]]);export{D as default}; diff --git a/nuxt/LayoutMainMenuToggle.7c76ad2a.js b/nuxt/LayoutMainMenuToggle.7c76ad2a.js new file mode 100644 index 0000000..d747c72 --- /dev/null +++ b/nuxt/LayoutMainMenuToggle.7c76ad2a.js @@ -0,0 +1 @@ +import{a as l,o as s,e as o,h as a,f as e,k as c}from"./entry.9584492c.js";import{s as i}from"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";const r=e("rect",{x:"0",y:"3",width:"24",height:"2"},null,-1),h=e("rect",{x:"0",y:"11",width:"24",height:"2"},null,-1),_=e("rect",{x:"0",y:"19",width:"24",height:"2"},null,-1),u=[r,h,_],f=l({__name:"LayoutMainMenuToggle",props:{active:{type:Boolean}},setup(n){return(t,m)=>(s(),o("button",{class:a([t.$attrs.class,t.$style.button])},[(s(),o("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"#ffffff",class:a([t.$style.hamburger,{[t.$style.active]:n.active}])},u,2))],2))}}),d={$style:i},y=c(f,[["__cssModules",d]]);export{y as default}; diff --git a/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css b/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css new file mode 100644 index 0000000..8790289 --- /dev/null +++ b/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css @@ -0,0 +1 @@ +._section_title_fvpir_1{font-family:var(--family-roboto-slab);font-size:1.6rem;font-weight:600;margin:2rem 0 1.5rem}._logo_fvpir_8{background:url(./logo.d91c5032.svg) no-repeat 50% 50%;background-size:contain;display:flex;padding:30px 0 15px;text-shadow:var(--color-menu-background) 3px 3px,var(--color-menu-background) -3px -3px}._logo_fvpir_8 a{color:inherit;text-decoration:none;width:100%}._logo_image_fvpir_21{width:100%}._row_fvpir_25{margin-bottom:15px}._title_fvpir_29{font-family:var(--family-roboto-slab);font-size:2rem;font-weight:700}._subtitle_fvpir_35{color:var(--color-text-secondary);font-size:.8rem}._button_5opgq_1{align-items:center;display:flex;height:40px;justify-content:center;width:40px}._hamburger_5opgq_9{fill:var(--color-text);cursor:pointer;transition:all .25s}._hamburger_5opgq_9:hover{fill:var(--color-link)}._hamburger_5opgq_9>rect{transition:transform .25s}._hamburger_5opgq_9._active_5opgq_20>rect:first-child{transform:rotate(45deg);transform-origin:2px 8px}._hamburger_5opgq_9._active_5opgq_20>rect:nth-child(2){transform:scaleX(0);transform-origin:13px 0;transition-delay:.1s}._hamburger_5opgq_9._active_5opgq_20>rect:nth-child(3){transform:rotate(-45deg);transform-origin:3px 16px;transition-delay:50ms} diff --git a/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js b/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js new file mode 100644 index 0000000..5ff4c09 --- /dev/null +++ b/nuxt/LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js @@ -0,0 +1 @@ +const t="_section_title_fvpir_1",o="_logo_fvpir_8",_="_logo_image_fvpir_21",e="_row_fvpir_25",i="_title_fvpir_29",s="_subtitle_fvpir_35",r={section_title:t,logo:o,logo_image:_,row:e,title:i,subtitle:s},c="_button_5opgq_1",l="_hamburger_5opgq_9",n="_active_5opgq_20",g={button:c,hamburger:l,active:n};export{r as a,g as s}; diff --git a/nuxt/LayoutThemeToggle.9b30b6e6.js b/nuxt/LayoutThemeToggle.9b30b6e6.js new file mode 100644 index 0000000..f03fca7 --- /dev/null +++ b/nuxt/LayoutThemeToggle.9b30b6e6.js @@ -0,0 +1 @@ +import{_ as s,s as o}from"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js";import{k as t}from"./entry.9584492c.js";const _={$style:o},a=t(s,[["__cssModules",_]]);export{a as default}; diff --git a/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css b/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css new file mode 100644 index 0000000..fa6c085 --- /dev/null +++ b/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css @@ -0,0 +1 @@ +._footer_ogxvf_1{color:var(--color-text-secondary);display:flex;flex-direction:row;font-size:.8rem;width:100%}._filler_ogxvf_9{flex:1}._button_jz7in_1{color:var(--color-text-secondary);cursor:pointer;transform:scale(0) rotate(180deg);transition:all .25s ease-out}._button_jz7in_1._visible_jz7in_7{transform:scale(1) rotate(0)}._button_jz7in_1:hover{color:var(--color-text)} diff --git a/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js b/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js new file mode 100644 index 0000000..9b11133 --- /dev/null +++ b/nuxt/LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js @@ -0,0 +1,4 @@ +import{k as v,o as i,e as d,f as u,a as h,q as p,J as q,m as _,i as M,w as T,c as g,j as m,h as $}from"./entry.9584492c.js";const w={},Q={xmlns:"http://www.w3.org/2000/svg",height:"48",width:"48",viewBox:"0 0 48 48"},Z=u("path",{d:"M17.85 7.55q-.7 0-1.45.075t-1.3.125q3.05 3.45 4.675 7.6Q21.4 19.5 21.4 24t-1.625 8.65Q18.15 36.8 15.15 40.2q.5.1 1.225.175.725.075 1.525.075 6.8 0 11.6-4.775T34.3 24q0-6.9-4.825-11.675T17.85 7.55Zm.25-1.5q3.6 0 6.85 1.375 3.25 1.375 5.65 3.8 2.4 2.425 3.8 5.7 1.4 3.275 1.4 7.025 0 3.75-1.425 7.05t-3.8 5.75Q28.2 39.2 24.95 40.575t-6.9 1.375q-1.65 0-3.125-.275t-2.675-.725q3.65-3.35 5.65-7.725 2-4.375 2-9.225 0-4.75-2-9.175-2-4.425-5.65-7.775 1.15-.45 2.675-.725Q16.45 6.05 18.1 6.05ZM21.4 24Z"},null,-1),C=[Z];function O(l,e){return i(),d("svg",Q,C)}const b=v(w,[["render",O]]),E=Object.freeze(Object.defineProperty({__proto__:null,default:b},Symbol.toStringTag,{value:"Module"})),j={},S={xmlns:"http://www.w3.org/2000/svg",height:"48",width:"48",viewBox:"0 0 48 48"},z=u("path",{d:"M24 30.45q2.65 0 4.55-1.875T30.45 24q0-2.65-1.875-4.55T24 17.55q-2.65 0-4.55 1.875T17.55 24q0 2.65 1.875 4.55T24 30.45ZM24 32q-3.35 0-5.675-2.325Q16 27.35 16 24q0-3.35 2.325-5.675Q20.65 16 24 16q3.35 0 5.675 2.325Q32 20.65 32 24q0 3.35-2.325 5.675Q27.35 32 24 32ZM3.75 24.75q-.3 0-.525-.225Q3 24.3 3 24q0-.35.225-.55.225-.2.525-.2h5.5q.3 0 .525.225Q10 23.7 10 24q0 .35-.225.55-.225.2-.525.2Zm35 0q-.3 0-.525-.225Q38 24.3 38 24q0-.35.225-.55.225-.2.525-.2h5.5q.3 0 .525.225Q45 23.7 45 24q0 .35-.225.55-.225.2-.525.2ZM24 10q-.35 0-.55-.225-.2-.225-.2-.525v-5.5q0-.3.225-.525Q23.7 3 24 3q.35 0 .55.225.2.225.2.525v5.5q0 .3-.225.525Q24.3 10 24 10Zm0 35q-.35 0-.55-.225-.2-.225-.2-.525v-5.5q0-.3.225-.525Q23.7 38 24 38q.35 0 .55.225.2.225.2.525v5.5q0 .3-.225.525Q24.3 45 24 45ZM13.05 14.05l-3.2-3.1q-.25-.2-.225-.525.025-.325.225-.575.25-.25.55-.25.3 0 .55.25L14.1 13q.25.25.25.55 0 .3-.25.55-.2.2-.5.2t-.55-.25Zm24 24.1L33.9 35q-.25-.25-.25-.55 0-.3.3-.55.15-.25.45-.225.3.025.55.275l3.2 3.1q.25.2.225.525-.025.325-.225.575-.25.25-.55.25-.3 0-.55-.25ZM33.9 14.1q-.25-.2-.225-.5.025-.3.275-.55l3.1-3.2q.2-.25.525-.225.325.025.575.225.25.25.25.55 0 .3-.25.55L35 14.1q-.25.25-.55.25-.3 0-.55-.25ZM9.85 38.15q-.25-.25-.25-.55 0-.3.25-.55L13 33.9q.25-.25.55-.25.3 0 .55.25.2.2.2.5t-.25.55l-3.1 3.2q-.25.25-.55.25-.3 0-.55-.25ZM24 24Z"},null,-1),B=[z];function P(l,e){return i(),d("svg",S,B)}const y=v(j,[["render",P]]),J=Object.freeze(Object.defineProperty({__proto__:null,default:y},Symbol.toStringTag,{value:"Module"})),L="_footer_ogxvf_1",x="_filler_ogxvf_9",W={footer:L,filler:x},k=h({name:"ClientOnly",props:["fallback","placeholder","placeholderTag","fallbackTag"],setup(l,{slots:e}){const t=p(!1);return q(()=>{t.value=!0}),r=>{var c;if(t.value)return(c=e.default)==null?void 0:c.call(e);const o=e.fallback||e.placeholder;if(o)return o();const n=r.fallback||r.placeholder||"",s=r.fallbackTag||r.placeholderTag||"span";return d(s,null,n)}}}),f=new WeakMap;function F(l){if(f.has(l))return f.get(l);const e={...l};return e.render?e.render=(t,...r)=>{var o;if(t.mounted$){const n=l.render(t,...r);return n.children===null||typeof n.children=="string"?u(n.type,n.props,n.children,n.patchFlag,n.dynamicProps,n.shapeFlag):_(n)}else return _("div",(o=t.$attrs)!=null?o:t._.attrs)}:e.template&&(e.template=` + + + `),e.setup=(t,r)=>{var n;const o=p(!1);return q(()=>{o.value=!0}),Promise.resolve(((n=l.setup)==null?void 0:n.call(l,t,r))||{}).then(s=>typeof s!="function"?{...s,mounted$:o}:(...c)=>{if(o.value){const a=s(...c);return a.children===null||typeof a.children=="string"?u(a.type,a.props,a.children,a.patchFlag,a.dynamicProps,a.shapeFlag):_(a)}else return _("div",r.attrs)})},f.set(l,e),e}const A=Object.freeze(Object.defineProperty({__proto__:null,default:k,createClientOnly:F},Symbol.toStringTag,{value:"Module"})),D=h({methods:{toggleTheme(){this.$colorMode.preference=this.$colorMode.preference==="dark"?"light":"dark"}},computed:{isDark(){return this.$colorMode.preference==="dark"}}}),G=h({...D,__name:"LayoutThemeToggle",setup(l){const e=p(!1);return q(()=>{e.value=!0}),(t,r)=>{const o=b,n=y,s=k;return i(),d("button",{onClick:r[0]||(r[0]=(...c)=>t.toggleTheme&&t.toggleTheme(...c)),class:$([t.$attrs.class,t.$style.button,{[t.$style.visible]:e.value}])},[M(s,null,{default:T(()=>[t.isDark?(i(),g(o,{key:0,fill:"currentColor",width:"32",height:"32"})):m("",!0),t.isDark?m("",!0):(i(),g(n,{key:1,fill:"currentColor",width:"32",height:"32"}))]),_:1})],2)}}}),N="_button_jz7in_1",V="_visible_jz7in_7",H={button:N,visible:V};export{E as M,J as S,G as _,W as a,k as b,A as c,H as s}; diff --git a/nuxt/Markdown.273e7520.js b/nuxt/Markdown.273e7520.js new file mode 100644 index 0000000..ab1f7b9 --- /dev/null +++ b/nuxt/Markdown.273e7520.js @@ -0,0 +1 @@ +import r from"./ContentSlot.2a654c2d.js";import{a as o,l as u,y as f,L as c}from"./entry.9584492c.js";const i=o({name:"Markdown",extends:r,setup(t){const{parent:e}=c(),{between:n,default:a}=u(),s=f(()=>typeof t.unwrap=="string"?t.unwrap.split(" "):["*"]);return{fallbackSlot:a,tags:s,between:n,parent:e}}});export{i as default}; diff --git a/nuxt/ProseA.7eadd880.js b/nuxt/ProseA.7eadd880.js new file mode 100644 index 0000000..972e98c --- /dev/null +++ b/nuxt/ProseA.7eadd880.js @@ -0,0 +1 @@ +import{a as o,o as l,c as s,w as c,r as f,b as u}from"./entry.9584492c.js";const i=o({__name:"ProseA",props:{href:{default:""},blank:{type:Boolean,default:!1}},setup(t){const a=e=>!e.match(/^\w+\:\/\//),n=e=>a(e)?e.toLowerCase().replaceAll("%20"," ").replace(/\d+/g,"").trim().replaceAll(" ","-"):e;return(e,p)=>{const r=u;return l(),s(r,{href:n(t.href),target:a(t.href)?"":"_blank"},{default:c(()=>[f(e.$slots,"default")]),_:3},8,["href","target"])}}});export{i as default}; diff --git a/nuxt/ProseBlockquote.4eddfa24.js b/nuxt/ProseBlockquote.4eddfa24.js new file mode 100644 index 0000000..21a5d19 --- /dev/null +++ b/nuxt/ProseBlockquote.4eddfa24.js @@ -0,0 +1 @@ +import{k as o,o as r,e as t,r as c}from"./entry.9584492c.js";const s={};function n(e,l){return r(),t("blockquote",null,[c(e.$slots,"default")])}const f=o(s,[["render",n]]);export{f as default}; diff --git a/nuxt/ProseCode.217ed266.js b/nuxt/ProseCode.217ed266.js new file mode 100644 index 0000000..ff58eea --- /dev/null +++ b/nuxt/ProseCode.217ed266.js @@ -0,0 +1 @@ +import i from"./UiIconCopy.eae3960f.js";import{a as u,o as t,e as a,f as n,h as s,i as d,t as p,j as m,r as f,k as g}from"./entry.9584492c.js";import{s as _}from"./ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js";const h={key:0},y=u({__name:"ProseCode",props:{code:null,language:{default:null},filename:{default:null},highlights:{default:()=>[]}},setup(o){const l=o,r=()=>{navigator.clipboard.writeText(l.code)};return(e,k)=>{const c=i;return t(),a("div",{class:s(e.$style.wrapper)},[n("button",{class:s(e.$style.language),onClick:r},[n("span",{class:s(e.$style.icon)},[d(c,{width:"12",height:"12",fill:"currentColor"})],2),o.language?(t(),a("span",h,p(o.language),1)):m("",!0)],2),f(e.$slots,"default")],2)}}}),C={$style:_},N=g(y,[["__cssModules",C]]);export{N as default}; diff --git a/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css b/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css new file mode 100644 index 0000000..41f22c3 --- /dev/null +++ b/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css @@ -0,0 +1 @@ +pre code .line{display:block;min-height:1rem}._wrapper_1pe7v_1{position:relative}._icon_1pe7v_5{margin:0 4px -2px 0}._language_1pe7v_9{align-items:center;background:var(--color-code-language-background);border-radius:0 4px;color:var(--color-code-language-name);cursor:pointer;display:flex;font-size:.75rem;font-weight:400;justify-content:center;opacity:0;padding:4px 8px;position:absolute;right:0;text-transform:uppercase;top:0;transition:all .25s;-webkit-user-select:none;-moz-user-select:none;user-select:none}._wrapper_1pe7v_1:hover ._language_1pe7v_9{opacity:.7}._wrapper_1pe7v_1:hover ._language_1pe7v_9:hover{opacity:1}._language_1pe7v_9:active{opacity:1;transform:scale(1.1)} diff --git a/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js b/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js new file mode 100644 index 0000000..5c3a9aa --- /dev/null +++ b/nuxt/ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js @@ -0,0 +1 @@ +const e="_wrapper_1pe7v_1",_="_icon_1pe7v_5",n="_language_1pe7v_9",a={wrapper:e,icon:_,language:n};export{a as s}; diff --git a/nuxt/ProseCodeInline.653dfd51.js b/nuxt/ProseCodeInline.653dfd51.js new file mode 100644 index 0000000..dfc710a --- /dev/null +++ b/nuxt/ProseCodeInline.653dfd51.js @@ -0,0 +1 @@ +import{k as o,o as r,e as n,r as s}from"./entry.9584492c.js";const t={};function c(e,a){return r(),n("code",null,[s(e.$slots,"default")])}const d=o(t,[["render",c]]);export{d as default}; diff --git a/nuxt/ProseEm.fcc3e08f.js b/nuxt/ProseEm.fcc3e08f.js new file mode 100644 index 0000000..565ed81 --- /dev/null +++ b/nuxt/ProseEm.fcc3e08f.js @@ -0,0 +1 @@ +import{k as r,o,e as s,r as t}from"./entry.9584492c.js";const n={};function c(e,a){return o(),s("em",null,[t(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default}; diff --git a/nuxt/ProseH1.4206edd4.js b/nuxt/ProseH1.4206edd4.js new file mode 100644 index 0000000..d48ebc1 --- /dev/null +++ b/nuxt/ProseH1.4206edd4.js @@ -0,0 +1 @@ +import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.9584492c.js";const r=["id"],c=["href"],p=i({__name:"ProseH1",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=1&&!(e!=null&&e.exclude.includes(1));return(n,h)=>(s(),o("h1",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default}; diff --git a/nuxt/ProseH2.6e168f26.js b/nuxt/ProseH2.6e168f26.js new file mode 100644 index 0000000..ce19961 --- /dev/null +++ b/nuxt/ProseH2.6e168f26.js @@ -0,0 +1 @@ +import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.9584492c.js";const r=["id"],c=["href"],p=i({__name:"ProseH2",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=2&&!(e!=null&&e.exclude.includes(2));return(n,h)=>(s(),o("h2",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default}; diff --git a/nuxt/ProseH3.e750c3fc.js b/nuxt/ProseH3.e750c3fc.js new file mode 100644 index 0000000..b7df1c1 --- /dev/null +++ b/nuxt/ProseH3.e750c3fc.js @@ -0,0 +1 @@ +import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.9584492c.js";const r=["id"],c=["href"],p=i({__name:"ProseH3",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=3&&!(e!=null&&e.exclude.includes(3));return(n,h)=>(s(),o("h3",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default}; diff --git a/nuxt/ProseH4.9ba7c7c7.js b/nuxt/ProseH4.9ba7c7c7.js new file mode 100644 index 0000000..97de9ea --- /dev/null +++ b/nuxt/ProseH4.9ba7c7c7.js @@ -0,0 +1 @@ +import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.9584492c.js";const r=["id"],c=["href"],p=i({__name:"ProseH4",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=4&&!(e!=null&&e.exclude.includes(4));return(n,h)=>(s(),o("h4",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default}; diff --git a/nuxt/ProseH5.38d08c0e.js b/nuxt/ProseH5.38d08c0e.js new file mode 100644 index 0000000..f98e902 --- /dev/null +++ b/nuxt/ProseH5.38d08c0e.js @@ -0,0 +1 @@ +import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.9584492c.js";const r=["id"],c=["href"],p=i({__name:"ProseH5",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=5&&!(e!=null&&e.exclude.includes(5));return(n,h)=>(s(),o("h5",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default}; diff --git a/nuxt/ProseH6.9eecf9ec.js b/nuxt/ProseH6.9eecf9ec.js new file mode 100644 index 0000000..80f3665 --- /dev/null +++ b/nuxt/ProseH6.9eecf9ec.js @@ -0,0 +1 @@ +import{a as i,M as l,o as s,e as o,u,r as d}from"./entry.9584492c.js";const r=["id"],c=["href"],p=i({__name:"ProseH6",props:{id:null},setup(t){const{anchorLinks:e}=l().public.content,a=(e==null?void 0:e.depth)>=6&&!(e!=null&&e.exclude.includes(6));return(n,h)=>(s(),o("h6",{id:t.id},[u(a)?(s(),o("a",{key:0,href:`#${t.id}`},[d(n.$slots,"default")],8,c)):d(n.$slots,"default",{key:1})],8,r))}});export{p as default}; diff --git a/nuxt/ProseHr.084d3715.js b/nuxt/ProseHr.084d3715.js new file mode 100644 index 0000000..f50ef8b --- /dev/null +++ b/nuxt/ProseHr.084d3715.js @@ -0,0 +1 @@ +import{k as e,o as r,e as c}from"./entry.9584492c.js";const o={};function t(n,s){return r(),c("hr")}const _=e(o,[["render",t]]);export{_ as default}; diff --git a/nuxt/ProseImg.100f8c70.js b/nuxt/ProseImg.100f8c70.js new file mode 100644 index 0000000..3eab205 --- /dev/null +++ b/nuxt/ProseImg.100f8c70.js @@ -0,0 +1 @@ +import{a as e,o as i,e as a}from"./entry.9584492c.js";const r=["src","alt","width","height"],c=e({__name:"ProseImg",props:{src:{type:String,default:""},alt:{type:String,default:""},width:{type:[String,Number],default:void 0},height:{type:[String,Number],default:void 0}},setup(t){return(n,h)=>(i(),a("img",{src:t.src,alt:t.alt,width:t.width,height:t.height},null,8,r))}});export{c as default}; diff --git a/nuxt/ProseLi.7b97d062.js b/nuxt/ProseLi.7b97d062.js new file mode 100644 index 0000000..2708840 --- /dev/null +++ b/nuxt/ProseLi.7b97d062.js @@ -0,0 +1 @@ +import{k as r,o,e as s,r as t}from"./entry.9584492c.js";const n={};function c(e,a){return o(),s("li",null,[t(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default}; diff --git a/nuxt/ProseOl.6038eab9.js b/nuxt/ProseOl.6038eab9.js new file mode 100644 index 0000000..715715c --- /dev/null +++ b/nuxt/ProseOl.6038eab9.js @@ -0,0 +1 @@ +import{k as o,o as r,e as s,r as t}from"./entry.9584492c.js";const n={};function c(e,l){return r(),s("ol",null,[t(e.$slots,"default")])}const f=o(n,[["render",c]]);export{f as default}; diff --git a/nuxt/ProseP.4bffa454.js b/nuxt/ProseP.4bffa454.js new file mode 100644 index 0000000..6d66ddb --- /dev/null +++ b/nuxt/ProseP.4bffa454.js @@ -0,0 +1 @@ +import{k as r,o,e as s,r as t}from"./entry.9584492c.js";const n={};function c(e,a){return o(),s("p",null,[t(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default}; diff --git a/nuxt/ProseStrong.0550a54f.js b/nuxt/ProseStrong.0550a54f.js new file mode 100644 index 0000000..2a6fb25 --- /dev/null +++ b/nuxt/ProseStrong.0550a54f.js @@ -0,0 +1 @@ +import{k as r,o,e as t,r as n}from"./entry.9584492c.js";const s={};function c(e,a){return o(),t("strong",null,[n(e.$slots,"default")])}const f=r(s,[["render",c]]);export{f as default}; diff --git a/nuxt/ProseTable.2942e3d1.js b/nuxt/ProseTable.2942e3d1.js new file mode 100644 index 0000000..8637f71 --- /dev/null +++ b/nuxt/ProseTable.2942e3d1.js @@ -0,0 +1 @@ +import{k as r,o,e as t,r as s}from"./entry.9584492c.js";const a={};function n(e,c){return o(),t("table",null,[s(e.$slots,"default")])}const f=r(a,[["render",n]]);export{f as default}; diff --git a/nuxt/ProseTbody.dcbbf441.js b/nuxt/ProseTbody.dcbbf441.js new file mode 100644 index 0000000..db68841 --- /dev/null +++ b/nuxt/ProseTbody.dcbbf441.js @@ -0,0 +1 @@ +import{k as o,o as r,e as t,r as s}from"./entry.9584492c.js";const n={};function c(e,a){return r(),t("tbody",null,[s(e.$slots,"default")])}const d=o(n,[["render",c]]);export{d as default}; diff --git a/nuxt/ProseTd.c34b65be.js b/nuxt/ProseTd.c34b65be.js new file mode 100644 index 0000000..791a0a8 --- /dev/null +++ b/nuxt/ProseTd.c34b65be.js @@ -0,0 +1 @@ +import{k as r,o,e as t,r as s}from"./entry.9584492c.js";const n={};function c(e,a){return o(),t("td",null,[s(e.$slots,"default")])}const d=r(n,[["render",c]]);export{d as default}; diff --git a/nuxt/ProseTh.e56b19e7.js b/nuxt/ProseTh.e56b19e7.js new file mode 100644 index 0000000..8175b78 --- /dev/null +++ b/nuxt/ProseTh.e56b19e7.js @@ -0,0 +1 @@ +import{k as r,o,e as t,r as s}from"./entry.9584492c.js";const n={};function c(e,a){return o(),t("th",null,[s(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default}; diff --git a/nuxt/ProseThead.24261552.js b/nuxt/ProseThead.24261552.js new file mode 100644 index 0000000..e6f22f4 --- /dev/null +++ b/nuxt/ProseThead.24261552.js @@ -0,0 +1 @@ +import{k as r,o,e as t,r as s}from"./entry.9584492c.js";const a={};function n(e,c){return o(),t("thead",null,[s(e.$slots,"default")])}const d=r(a,[["render",n]]);export{d as default}; diff --git a/nuxt/ProseTr.e844d968.js b/nuxt/ProseTr.e844d968.js new file mode 100644 index 0000000..b1b223a --- /dev/null +++ b/nuxt/ProseTr.e844d968.js @@ -0,0 +1 @@ +import{k as r,o,e as t,r as s}from"./entry.9584492c.js";const n={};function c(e,a){return o(),t("tr",null,[s(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default}; diff --git a/nuxt/ProseUl.536bb57e.js b/nuxt/ProseUl.536bb57e.js new file mode 100644 index 0000000..ee09209 --- /dev/null +++ b/nuxt/ProseUl.536bb57e.js @@ -0,0 +1 @@ +import{k as r,o,e as s,r as t}from"./entry.9584492c.js";const n={};function c(e,l){return o(),s("ul",null,[t(e.$slots,"default")])}const f=r(n,[["render",c]]);export{f as default}; diff --git a/nuxt/SkillsCard.a4048079.js b/nuxt/SkillsCard.a4048079.js new file mode 100644 index 0000000..d308886 --- /dev/null +++ b/nuxt/SkillsCard.a4048079.js @@ -0,0 +1 @@ +import a from"./UiStars.f9df0828.js";import{a as i,o as c,e as r,f as t,h as e,r as d,t as o,i as u,k as m,Y as p}from"./entry.9584492c.js";import"./IconStar.3b3b3476.js";const y=i({__name:"SkillsCard",props:{title:null,description:null,level:null},setup(l){return(s,$)=>{const n=a;return c(),r("div",{class:e(s.$style.card)},[t("div",{class:e(s.$style.grid)},[t("div",{class:e(s.$style.icon)},[d(s.$slots,"default")],2),t("div",{class:e(s.$style.text)},[t("h3",{class:e(s.$style.title)},o(l.title),3),u(n,{count:l.level},null,8,["count"])],2)],2),t("div",{class:e(s.$style.description)},o(l.description),3)],2)}}}),_={$style:p},S=m(y,[["__cssModules",_]]);export{S as default}; diff --git a/nuxt/UiActionButton.bb3c8fbb.js b/nuxt/UiActionButton.bb3c8fbb.js new file mode 100644 index 0000000..af3d817 --- /dev/null +++ b/nuxt/UiActionButton.bb3c8fbb.js @@ -0,0 +1 @@ +import{a as f,o as a,c as i,w as u,e as o,r as l,h as e,j as n,f as $,b as p,k as d,a5 as m}from"./entry.9584492c.js";const y=f({__name:"UiActionButton",props:{href:null,size:{default:"md"},variant:{default:"outline"}},setup(t){return(s,k)=>{const r=p;return a(),i(r,{class:e([s.$style.button,s.$attrs.style,s.$style[`variant-${t.variant}`],s.$style[`size-${t.size}`],{[s.$style.prefixed]:s.$slots.prefix,[s.$style.suffixed]:s.$slots.suffix}]),to:t.href},{default:u(()=>[s.$slots.prefix?(a(),o("span",{key:0,class:e(s.$style.prefix)},[l(s.$slots,"prefix")],2)):n("",!0),$("span",{class:e(s.$style.title)},[l(s.$slots,"default")],2),s.$slots.suffix?(a(),o("span",{key:1,class:e(s.$style.suffix)},[l(s.$slots,"suffix")],2)):n("",!0)]),_:3},8,["class","to"])}}}),c={$style:m},B=d(y,[["__cssModules",c]]);export{B as default}; diff --git a/nuxt/UiIconCopy.eae3960f.js b/nuxt/UiIconCopy.eae3960f.js new file mode 100644 index 0000000..596c2b8 --- /dev/null +++ b/nuxt/UiIconCopy.eae3960f.js @@ -0,0 +1 @@ +import{k as e,o,e as c,f as t}from"./entry.9584492c.js";const n={},s={xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#ffffff"},_=t("path",{d:"M0 0h24v24H0z",fill:"none"},null,-1),h=t("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},null,-1),f=[_,h];function a(l,r){return o(),c("svg",s,f)}const d=e(n,[["render",a]]);export{d as default}; diff --git a/nuxt/UiStars.f9df0828.js b/nuxt/UiStars.f9df0828.js new file mode 100644 index 0000000..0bb4f80 --- /dev/null +++ b/nuxt/UiStars.f9df0828.js @@ -0,0 +1 @@ +import r from"./IconStar.3b3b3476.js";import{a as c,o as e,e as t,R as _,S as u,i,h as n,k as m,Z as p}from"./entry.9584492c.js";const d=c({__name:"UiStars",props:{count:null},setup(o){return(s,h)=>{const a=r;return e(),t("div",{class:n(s.$style.rating)},[(e(),t(_,null,u(5,l=>i(a,{width:22,height:"22",class:n([s.$style.star,{[s.$style.filled]:l>o.count}])},null,8,["class"])),64))],2)}}}),f={$style:p},g=m(d,[["__cssModules",f]]);export{g as default}; diff --git a/nuxt/_...slug_.b28b1004.js b/nuxt/_...slug_.b28b1004.js new file mode 100644 index 0000000..e78d485 --- /dev/null +++ b/nuxt/_...slug_.b28b1004.js @@ -0,0 +1 @@ +import{a as _,z as c,o as u,e as i,i as t,w as o,O as m,f as a,t as p,P as d}from"./entry.9584492c.js";import f from"./HomeReference.7471fc48.js";import"./navigation.d66e160d.js";const x={scrollToTop:!0},b=_({...x,__name:"[...slug]",setup(B){return c({titleTemplate:n=>n?`${n} \u2022 Obsidian Garden`:"Obsidian Garden"}),(n,C)=>{const l=d,s=f,r=m;return u(),i("main",null,[t(r,null,{default:o(({doc:e})=>[a("h1",null,p(e.title),1),a("article",null,[t(l,{value:e},null,8,["value"])])]),"not-found":o(({props:{path:e}})=>[t(s,{url:e},null,8,["url"])]),_:1})])}}});export{b as default}; diff --git a/assets/svg/arch-logo.svg b/nuxt/arch-logo.838efbc7.svg similarity index 100% rename from assets/svg/arch-logo.svg rename to nuxt/arch-logo.838efbc7.svg diff --git a/nuxt/bio.1700b615.css b/nuxt/bio.1700b615.css new file mode 100644 index 0000000..1f75272 --- /dev/null +++ b/nuxt/bio.1700b615.css @@ -0,0 +1 @@ +._content_1plgx_1{padding:40px 0 0}._section_1plgx_5{padding:40px 0}._section_1plgx_5:not(:last-child){border-bottom:2px solid var(--color-line)} diff --git a/nuxt/bio.2dd61c27.js b/nuxt/bio.2dd61c27.js new file mode 100644 index 0000000..003a991 --- /dev/null +++ b/nuxt/bio.2dd61c27.js @@ -0,0 +1 @@ +import _ from"./BioHeading.968f8c96.js";import a from"./BioSkills.59f5dd5b.js";import{a as i,o as l,e as r,f as e,i as s,h as t,k as p}from"./entry.9584492c.js";import"./SkillsCard.a4048079.js";import"./UiStars.f9df0828.js";import"./IconStar.3b3b3476.js";const m=i({__name:"bio",setup(B){return(o,k)=>{const n=_,c=a;return l(),r("article",{class:t(o.$style.content)},[e("section",{class:t(o.$style.section)},[s(n)],2),e("section",{class:t(o.$style.section)},[s(c)],2)],2)}}}),f="_content_1plgx_1",u="_section_1plgx_5",d={content:f,section:u},y={$style:d},M=p(m,[["__cssModules",y]]);export{M as default}; diff --git a/nuxt/client-db.2d7ab389.js b/nuxt/client-db.2d7ab389.js new file mode 100644 index 0000000..a42f2e7 --- /dev/null +++ b/nuxt/client-db.2d7ab389.js @@ -0,0 +1 @@ +import{a8 as S,a9 as M,aa as E,ab as A,ac as U,ad as j,ae as z,af as N,ag as W,ah as T,M as K,I as H,ai as J,s as R,aj as q}from"./entry.9584492c.js";const B=()=>{const n=new Map;return{hasItem(t){return n.has(t)},getItem(t){return n.get(t)||null},setItem(t,e){n.set(t,e)},removeItem(t){n.delete(t)},getKeys(){return Array.from(n.keys())},clear(){n.clear()},dispose(){n.clear()}}};function G(n){return!n||typeof n.then!="function"?Promise.resolve(n):n}function p(n,...t){try{return G(n(...t))}catch(e){return Promise.reject(e)}}function Z(n){const t=typeof n;return n===null||t!=="object"&&t!=="function"}function k(n){return Z(n)?n+"":JSON.stringify(n)}const b=()=>{const n=new Map;return{hasItem(t){return n.has(t)},getItem(t){return n.get(t)||null},setItem(t,e){n.set(t,e)},removeItem(t){n.delete(t)},getKeys(){return Array.from(n.keys())},clear(){n.clear()},dispose(){n.clear()}}},F=["hasItem","getItem","setItem","removeItem","getMeta","setMeta","removeMeta","getKeys","clear","mount","unmount"];function Q(n,t){if(t=I(t),!t)return n;const e={...n};for(const a of F)e[a]=(i="",...s)=>n[a](t+i,...s);return e.getKeys=(a="",...i)=>n.getKeys(t+a,...i).then(s=>s.map(o=>o.substr(t.length))),e}function g(n){return n?n.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function I(n){return n=g(n),n?n+":":""}function V(n={}){const t={mounts:{"":n.driver||b()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},e=r=>{for(const u of t.mountpoints)if(r.startsWith(u))return{relativeKey:r.substring(u.length),driver:t.mounts[u]};return{relativeKey:r,driver:t.mounts[""]}},a=(r,u)=>t.mountpoints.filter(c=>c.startsWith(r)||u&&r.startsWith(c)).map(c=>({relativeBase:r.length>c.length?r.substring(c.length):void 0,mountpoint:c,driver:t.mounts[c]})),i=(r,u)=>{if(!!t.watching){u=g(u);for(const c of t.watchListeners)c(r,u)}},s=async()=>{if(!t.watching){t.watching=!0;for(const r in t.mounts)t.unwatch[r]=await C(t.mounts[r],i,r)}},o=async()=>{if(!!t.watching){for(const r in t.unwatch)await t.unwatch[r]();t.unwatch={},t.watching=!1}},h={hasItem(r){r=g(r);const{relativeKey:u,driver:c}=e(r);return p(c.hasItem,u)},getItem(r){r=g(r);const{relativeKey:u,driver:c}=e(r);return p(c.getItem,u).then(l=>S(l))},async setItem(r,u){if(u===void 0)return h.removeItem(r);r=g(r);const{relativeKey:c,driver:l}=e(r);!l.setItem||(await p(l.setItem,c,k(u)),l.watch||i("update",r))},async removeItem(r,u=!0){r=g(r);const{relativeKey:c,driver:l}=e(r);!l.removeItem||(await p(l.removeItem,c),u&&await p(l.removeItem,c+"$"),l.watch||i("remove",r))},async getMeta(r,u){r=g(r);const{relativeKey:c,driver:l}=e(r),m=Object.create(null);if(l.getMeta&&Object.assign(m,await p(l.getMeta,c)),!u){const f=await p(l.getItem,c+"$").then(d=>S(d));f&&typeof f=="object"&&(typeof f.atime=="string"&&(f.atime=new Date(f.atime)),typeof f.mtime=="string"&&(f.mtime=new Date(f.mtime)),Object.assign(m,f))}return m},setMeta(r,u){return this.setItem(r+"$",u)},removeMeta(r){return this.removeItem(r+"$")},async getKeys(r){r=I(r);const u=a(r,!0);let c=[];const l=[];for(const m of u){const d=(await p(m.driver.getKeys,m.relativeBase)).map(y=>m.mountpoint+g(y)).filter(y=>!c.find(w=>y.startsWith(w)));l.push(...d),c=[m.mountpoint].concat(c.filter(y=>!y.startsWith(m.mountpoint)))}return r?l.filter(m=>m.startsWith(r)&&!m.endsWith("$")):l.filter(m=>!m.endsWith("$"))},async clear(r){r=I(r),await Promise.all(a(r,!1).map(async u=>{if(u.driver.clear)return p(u.driver.clear);if(u.driver.removeItem){const c=await u.driver.getKeys();return Promise.all(c.map(l=>u.driver.removeItem(l)))}}))},async dispose(){await Promise.all(Object.values(t.mounts).map(r=>x(r)))},async watch(r){return await s(),t.watchListeners.push(r),async()=>{t.watchListeners=t.watchListeners.filter(u=>u!==r),t.watchListeners.length===0&&await o()}},async unwatch(){t.watchListeners=[],await o()},mount(r,u){if(r=I(r),r&&t.mounts[r])throw new Error(`already mounted at ${r}`);return r&&(t.mountpoints.push(r),t.mountpoints.sort((c,l)=>l.length-c.length)),t.mounts[r]=u,t.watching&&Promise.resolve(C(u,i,r)).then(c=>{t.unwatch[r]=c}).catch(console.error),h},async unmount(r,u=!0){r=I(r),!(!r||!t.mounts[r])&&(t.watching&&r in t.unwatch&&(t.unwatch[r](),delete t.unwatch[r]),u&&await x(t.mounts[r]),t.mountpoints=t.mountpoints.filter(c=>c!==r),delete t.mounts[r])}};return h}function C(n,t,e){return n.watch?n.watch((a,i)=>t(a,e+i)):()=>{}}async function x(n){typeof n.dispose=="function"&&await p(n.dispose)}function X(n={}){const t=ee(e,n.operators);function e(a,i){return typeof i!="object"||i instanceof RegExp?t.$eq(a,i):Object.keys(i||{}).every(s=>{const o=i[s];if(s.startsWith("$")&&t[s]){const h=t[s];return typeof h=="function"?h(a,o):!1}return e(M(a,s),o)})}return e}function ee(n,t={}){return{$match:(e,a)=>n(e,a),$eq:(e,a)=>a instanceof RegExp?a.test(e):e===a,$ne:(e,a)=>a instanceof RegExp?!a.test(e):e!==a,$not:(e,a)=>!n(e,a),$and:(e,a)=>(E(a,"$and requires an array as condition"),a.every(i=>n(e,i))),$or:(e,a)=>(E(a,"$or requires an array as condition"),a.some(i=>n(e,i))),$in:(e,a)=>A(a).some(i=>Array.isArray(e)?n(e,{$contains:i}):n(e,i)),$contains:(e,a)=>(e=Array.isArray(e)?e:String(e),A(a).every(i=>e.includes(i))),$icontains:(e,a)=>{if(typeof a!="string")throw new TypeError("$icontains requires a string, use $contains instead");return e=String(e).toLocaleLowerCase(),A(a).every(i=>e.includes(i.toLocaleLowerCase()))},$containsAny:(e,a)=>(E(a,"$containsAny requires an array as condition"),e=Array.isArray(e)?e:String(e),a.some(i=>e.includes(i))),$exists:(e,a)=>a?typeof e<"u":typeof e>"u",$type:(e,a)=>typeof e===String(a),$regex:(e,a)=>{if(!(a instanceof RegExp)){const i=String(a).match(/\/(.*)\/([dgimsuy]*)$/);a=i?new RegExp(i[1],i[2]||""):new RegExp(a)}return a.test(String(e||""))},$lt:(e,a)=>ee<=a,$gt:(e,a)=>e>a,$gte:(e,a)=>e>=a,...t||{}}}function P(n){const t=X(),e=(i,{query:s,before:o,after:h})=>{const r=typeof s=="string"?{_path:s}:s,u=i.findIndex(l=>t(l,r));o=o||1,h=h||1;const c=new Array(o+h).fill(null,0);return u===-1?c:c.map((l,m)=>i[u-o+m+Number(m>=o)]||null)},a=[(i,s)=>i.filter(o=>A(s.where).every(h=>t(o,h))),(i,s)=>A(s.sort).forEach(o=>U(i,o)),(i,s)=>s.surround?e(i,s.surround):i,(i,s)=>s.skip?i.slice(s.skip):i,(i,s)=>s.limit?i.slice(0,s.limit):i,(i,s)=>j(z(s.without))(i),(i,s)=>j(N(s.only))(i),(i,s)=>s.first?i[0]:i];return async i=>{const s=await n();return a.reduce((o,h)=>h(o,i.params())||o,s)}}var te={exports:{}};(function(n,t){(function(e,a,i){n.exports=i(),n.exports.default=i()})("slugify",W,function(){var e=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`),a=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');function i(s,o){if(typeof s!="string")throw new Error("slugify: string argument expected");o=typeof o=="string"?{replacement:o}:o||{};var h=a[o.locale]||{},r=o.replacement===void 0?"-":o.replacement,u=o.trim===void 0?!0:o.trim,c=s.normalize().split("").reduce(function(l,m){var f=h[m]||e[m]||m;return f===r&&(f=" "),l+f.replace(o.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return o.strict&&(c=c.replace(/[^A-Za-z0-9\s]/g,"")),u&&(c=c.trim()),c=c.replace(/\s+/g,r),o.lower&&(c=c.toLowerCase()),c}return i.extend=function(s){Object.assign(e,s)},i})})(te);const re=n=>n.split(/[\s-]/g).map(T).join(" ");function ne(n,t){const{navigation:e}=K().content,a=s=>({...ie(["title",...e.fields])(s),...se(s==null?void 0:s.navigation)?s.navigation:{}}),i=n.sort((s,o)=>s._path.localeCompare(o._path)).reduce((s,o)=>{const h=o._path.substring(1).split("/"),r=o._id.split(":").slice(1),u=!!r[r.length-1].match(/([1-9][0-9]*\.)?index.md/g),c=f=>({title:f.title,_path:f._path,_file:f._file,children:[],...a(f),...f._draft?{_draft:!0}:{}}),l=c(o);if(u){const f=t[l._path];if(typeof(f==null?void 0:f.navigation)<"u"&&!(f!=null&&f.navigation))return s;if(o._path!=="/"){const d=c(o);l.children.push(d)}Object.assign(l,a(f))}return h.length===1?(s.push(l),s):(h.slice(0,-1).reduce((f,d,y)=>{const w="/"+h.slice(0,y+1).join("/"),v=t[w];if(typeof(v==null?void 0:v.navigation)<"u"&&!v.navigation)return[];let O=f.find(Y=>Y._path===w);return O||(O={title:re(d),_path:w,_file:o._file,children:[],...a(v)},f.push(O)),O.children},s).push(l),s)},[]);return D(i)}const ae=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function D(n){const t=n.sort((e,a)=>ae.compare(e._file,a._file));for(const e of t)e.children.length?D(e.children):delete e.children,delete e._file;return n}function ie(n){return t=>(t=t||{},n&&n.length?n.filter(e=>typeof t[e]<"u").reduce((e,a)=>Object.assign(e,{[a]:t[a]}),{}):t)}function se(n){return Object.prototype.toString.call(n)==="[object Object]"}const oe=n=>q(n,"/api/"+K().public.content.base),ce=Q(V({driver:B()}),"@content"),L=()=>H("previewToken").value;function ue(n){async function t(){const e=new Set(await n.getKeys("cache:")),a=L();if(a){(await n.getItem(`${a}$`).then(r=>r||{})).ignoreBuiltContents&&e.clear();const o=await n.getKeys(`${a}:`),h=await Promise.all(o.map(r=>n.getItem(r)));for(const r of h)e.delete(`cache:${r._id}`),r.__deleted||e.add(`${a}:${r._id}`)}return await Promise.all(Array.from(e).map(s=>n.getItem(s)))}return{storage:n,fetch:P(t),query:e=>J(P(t),e)}}let _,$;async function le(){return $?await $:_||($=fe(),_=await $),_}async function fe(){const n=R(),{clientDB:t}=K().public.content,e=ue(ce),a=await e.storage.getItem("integrity");if(t.integrity!==+a){const{contents:i,navigation:s}=await $fetch(oe("cache.json"));await Promise.all(i.map(o=>e.storage.setItem(`cache:${o._id}`,o))),await e.storage.setItem("navigation",s),await e.storage.setItem("integrity",t.integrity)}return await n.callHook("content:storage",e.storage),e}async function me(n){const t=await le();if(!L()&&Object.keys(n||{}).length===0)return t.storage.getItem("navigation");const e=await t.query(n).where({_partial:!1,navigation:{$ne:!1}}).find(),i=(await t.query().where({_path:/\/_dir$/i,_partial:!0}).find()).reduce((s,o)=>{o.title.toLowerCase()==="dir"&&(o.title=void 0);const h=o._path.split("/").slice(0,-1).join("/")||"/";return s[h]={...o,...o.body},s},{});return ne(e,i)}export{ce as contentStorage,ue as createDB,me as generateNavigation,L as getPreview,le as useContentDatabase}; diff --git a/nuxt/component.vue3.04db831c.js b/nuxt/component.vue3.04db831c.js new file mode 100644 index 0000000..4fd0255 --- /dev/null +++ b/nuxt/component.vue3.04db831c.js @@ -0,0 +1 @@ +import{b as a}from"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js";import{k as n,am as r,o as c,c as l,w as p,r as s}from"./entry.9584492c.js";const _={name:r,props:{placeholder:String,tag:{type:String,default:"span"}}};function d(t,m,e,f,i,u){const o=a;return c(),l(o,{placeholder:e.placeholder,"placeholder-tag":e.tag},{default:p(()=>[s(t.$slots,"default")]),_:3},8,["placeholder","placeholder-tag"])}const x=n(_,[["render",d]]);export{x as default}; diff --git a/nuxt/content.2c0ca7e0.css b/nuxt/content.2c0ca7e0.css new file mode 100644 index 0000000..6227ee7 --- /dev/null +++ b/nuxt/content.2c0ca7e0.css @@ -0,0 +1 @@ +._wrapper_1hfaq_1{display:flex;flex-direction:column;height:100%}._content_1hfaq_7{flex:1;padding:40px 120px}@media (max-width:1024px){._content_1hfaq_7{padding:40px 40px 20px}}@media (max-width:768px){._content_1hfaq_7{padding:40px 20px 20px}}._footer_1hfaq_22{border-top:1px solid var(--color-line);margin-top:60px;padding:10px}._theme_toggle_1hfaq_28{stroke:currentColor;stroke-width:.5px;position:absolute;right:20px;top:20px}@media (max-width:768px){._theme_toggle_1hfaq_28{stroke-width:1.5px;right:16px;top:16px}} diff --git a/nuxt/content.c14c0a2c.js b/nuxt/content.c14c0a2c.js new file mode 100644 index 0000000..c583683 --- /dev/null +++ b/nuxt/content.c14c0a2c.js @@ -0,0 +1 @@ +import r from"./LayoutThemeToggle.9b30b6e6.js";import a from"./LayoutFooter.163a17fa.js";import{k as c,o as _,e as l,f as m,i as t,h as o,r as p}from"./entry.9584492c.js";import"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js";const f="_wrapper_1hfaq_1",u="_content_1hfaq_7",d="_footer_1hfaq_22",h="_theme_toggle_1hfaq_28",g={wrapper:f,content:u,footer:d,theme_toggle:h},i={};function y(e,q){const s=r,n=a;return _(),l("div",{class:o(e.$style.wrapper)},[m("div",{class:o(e.$style.content)},[t(s,{class:o(e.$style.theme_toggle)},null,8,["class"]),p(e.$slots,"default")],2),t(n,{class:o(e.$style.footer)},null,8,["class"])],2)}const $={$style:g},L=c(i,[["render",y],["__cssModules",$]]);export{L as default}; diff --git a/nuxt/default.98ce27f1.css b/nuxt/default.98ce27f1.css new file mode 100644 index 0000000..ff84a36 --- /dev/null +++ b/nuxt/default.98ce27f1.css @@ -0,0 +1 @@ +._grid_bdvnl_1{display:grid;grid-template-columns:360px auto;width:100vw}@media (max-width:1024px){._grid_bdvnl_1{grid-template-columns:33vw auto}}@media (max-width:768px){._grid_bdvnl_1{grid-template-columns:auto}}._main_bdvnl_17{display:flex;flex-direction:column;min-width:0;position:relative;z-index:1}._sidebar_bdvnl_25{background-color:var(--color-menu-background)}@media (max-width:768px){._sidebar_bdvnl_25{background-color:var(--color-menu-overlay-background);opacity:0;position:fixed;transition:opacity .5s;visibility:hidden;width:100%;z-index:2}._sidebar_bdvnl_25._active_bdvnl_38{opacity:1;visibility:visible}}._menu_bdvnl_44{background-color:var(--color-menu-background);height:100vh;max-width:400px;min-width:0;overflow:auto;padding:40px 30px;position:sticky;top:0}@media (max-width:768px){._menu_bdvnl_44{transform:translate(-40px);transition:transform .25s .1s}._active_bdvnl_38 ._menu_bdvnl_44{transform:translate(0)}}._menu_toggle_bdvnl_64{border-radius:0 0 8px;left:13px;position:fixed;top:13px;transform:translate(0);transition:all .25s;visibility:hidden;z-index:4}@media (max-width:768px){._menu_toggle_bdvnl_64{right:0;transform:translate(0);visibility:visible}}._menu_toggle_bdvnl_64._active_bdvnl_38,._menu_toggle_bdvnl_64._shifted_bdvnl_81{transform:translate(-13px,-13px)}._menu_toggle_bdvnl_64._shifted_bdvnl_81{background:var(--color-menu-background)}._footer_bdvnl_88{margin-top:40px} diff --git a/nuxt/default.be8f54bd.js b/nuxt/default.be8f54bd.js new file mode 100644 index 0000000..1a72d11 --- /dev/null +++ b/nuxt/default.be8f54bd.js @@ -0,0 +1 @@ +import T from"./LayoutMainMenuToggle.7c76ad2a.js";import $ from"./LayoutMainMenu.06c3729f.js";import{k as M,a as B,q as P,J as L,a6 as V,y as A,a7 as k,o as C,e as E,i as m,h as l,f as y,w as H,r as I,a0 as D}from"./entry.9584492c.js";import"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";import"./navigation.d66e160d.js";function O(o){if(Array.isArray(o)){for(var e=0,t=Array(o.length);e1),r=[],c=!1,g=-1,d=void 0,s=void 0,a=void 0,b=function(e){return r.some(function(t){return!!(t.options.allowTouchMove&&t.options.allowTouchMove(e))})},f=function(e){var t=e||window.event;return b(t.target)||t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)},F=function(e){if(a===void 0){var t=!!e&&e.reserveScrollBarGap===!0,i=window.innerWidth-document.documentElement.clientWidth;if(t&&i>0){var n=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);a=document.body.style.paddingRight,document.body.style.paddingRight=n+i+"px"}}d===void 0&&(d=document.body.style.overflow,document.body.style.overflow="hidden")},R=function(){a!==void 0&&(document.body.style.paddingRight=a,a=void 0),d!==void 0&&(document.body.style.overflow=d,d=void 0)},Y=function(){return window.requestAnimationFrame(function(){if(s===void 0){s={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var e=window,t=e.scrollY,i=e.scrollX,n=e.innerHeight;document.body.style.position="fixed",document.body.style.top=-t,document.body.style.left=-i,setTimeout(function(){return window.requestAnimationFrame(function(){var v=n-window.innerHeight;v&&t>=n&&(document.body.style.top=-(t+v))})},300)}})},q=function(){if(s!==void 0){var e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);document.body.style.position=s.position,document.body.style.top=s.top,document.body.style.left=s.left,window.scrollTo(t,e),s=void 0}},N=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},W=function(e,t){var i=e.targetTouches[0].clientY-g;return b(e.target)?!1:t&&t.scrollTop===0&&i>0||N(t)&&i<0?f(e):(e.stopPropagation(),!0)},z=function(e,t){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!r.some(function(n){return n.targetElement===e})){var i={targetElement:e,options:t||{}};r=[].concat(O(r),[i]),u?Y():F(t),u&&(e.ontouchstart=function(n){n.targetTouches.length===1&&(g=n.targetTouches[0].clientY)},e.ontouchmove=function(n){n.targetTouches.length===1&&W(n,e)},c||(document.addEventListener("touchmove",f,p?{passive:!1}:void 0),c=!0))}},J=function(){u&&(r.forEach(function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null}),c&&(document.removeEventListener("touchmove",f,p?{passive:!1}:void 0),c=!1),g=-1),u?q():R(),r=[]};const U="_grid_bdvnl_1",X="_main_bdvnl_17",j="_sidebar_bdvnl_25",x="_active_bdvnl_38",G="_menu_bdvnl_44",K="_menu_toggle_bdvnl_64",Q="_shifted_bdvnl_81",Z="_footer_bdvnl_88",ee={grid:U,main:X,sidebar:j,active:x,menu:G,menu_toggle:K,shifted:Q,footer:Z},oe=B({setup(){const o=P(0),e=()=>{o.value=window.scrollY};return L(()=>addEventListener("scroll",e)),V(()=>removeEventListener("scroll",e)),{menuShifted:A(()=>o.value>60),scrollTop:o}},data(){return{menuVisible:!1}},methods:{toggleMenu(){this.$data.menuVisible=!this.$data.menuVisible}},watch:{$route(){!this.menuVisible||k(()=>this.toggleMenu())},menuVisible(o){o&&z(this.$refs.sidebar),J()}}});function te(o,e,t,i,n,v){const w=T,_=$,S=D;return C(),E("div",{class:l(o.$style.grid)},[m(w,{active:o.menuVisible,class:l([o.$style.menu_toggle,{[o.$style.shifted]:o.menuShifted,[o.$style.active]:o.menuVisible}]),onClick:o.toggleMenu},null,8,["active","class","onClick"]),y("div",{class:l([o.$style.sidebar,{[o.$style.active]:o.menuVisible}]),ref:"sidebar"},[y("div",{class:l(o.$style.menu)},[m(_)],2)],2),y("div",{class:l(o.$style.main)},[m(S,{name:"content"},{default:H(()=>[I(o.$slots,"default")]),_:3})],2)],2)}const ne={$style:ee},ae=M(oe,[["render",te],["__cssModules",ne]]);export{ae as default}; diff --git a/assets/svg/desk.svg b/nuxt/desk.fcd75862.svg similarity index 100% rename from assets/svg/desk.svg rename to nuxt/desk.fcd75862.svg diff --git a/assets/svg/docker-logo.svg b/nuxt/docker-logo.7f942bd1.svg similarity index 100% rename from assets/svg/docker-logo.svg rename to nuxt/docker-logo.7f942bd1.svg diff --git a/nuxt/entry.9584492c.js b/nuxt/entry.9584492c.js new file mode 100644 index 0000000..47cfaf7 --- /dev/null +++ b/nuxt/entry.9584492c.js @@ -0,0 +1,7 @@ +function Ho(e,t){const n=Object.create(null),r=e.split(",");for(let o=0;o!!n[o.toLowerCase()]:o=>!!n[o]}const tu="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",nu=Ho(tu);function Nl(e){return!!e||e===""}function un(e){if(Y(e)){const t={};for(let n=0;n{if(n){const r=n.split(ou);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function dt(e){let t="";if(we(e))t=e;else if(Y(e))for(let n=0;nwe(e)?e:e==null?"":Y(e)||he(e)&&(e.toString===Ul||!X(e.toString))?JSON.stringify(e,jl,2):String(e),jl=(e,t)=>t&&t.__v_isRef?jl(e,t.value):nn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o])=>(n[`${r} =>`]=o,n),{})}:Fl(t)?{[`Set(${t.size})`]:[...t.values()]}:he(t)&&!Y(t)&&!ql(t)?String(t):t,de={},tn=[],Ze=()=>{},lu=()=>!1,iu=/^on[^a-z]/,Vn=e=>iu.test(e),No=e=>e.startsWith("onUpdate:"),Se=Object.assign,jo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},au=Object.prototype.hasOwnProperty,re=(e,t)=>au.call(e,t),Y=Array.isArray,nn=e=>Cr(e)==="[object Map]",Fl=e=>Cr(e)==="[object Set]",X=e=>typeof e=="function",we=e=>typeof e=="string",Fo=e=>typeof e=="symbol",he=e=>e!==null&&typeof e=="object",Uo=e=>he(e)&&X(e.then)&&X(e.catch),Ul=Object.prototype.toString,Cr=e=>Ul.call(e),uu=e=>Cr(e).slice(8,-1),ql=e=>Cr(e)==="[object Object]",qo=e=>we(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ln=Ho(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),xr=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},cu=/-(\w)/g,it=xr(e=>e.replace(cu,(t,n)=>n?n.toUpperCase():"")),fu=/\B([A-Z])/g,yn=xr(e=>e.replace(fu,"-$1").toLowerCase()),Rr=xr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Fr=xr(e=>e?`on${Rr(e)}`:""),jn=(e,t)=>!Object.is(e,t),Mn=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Ko=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let vs;const du=()=>vs||(vs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let rt;class pu{constructor(t=!1){this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=rt,!t&&rt&&(this.index=(rt.scopes||(rt.scopes=[])).push(this)-1)}run(t){if(this.active){const n=rt;try{return rt=this,t()}finally{rt=n}}}on(){rt=this}off(){rt=this.parent}stop(t){if(this.active){let n,r;for(n=0,r=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},Kl=e=>(e.w&Tt)>0,zl=e=>(e.n&Tt)>0,mu=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{(u==="length"||u>=r)&&i.push(a)});else switch(n!==void 0&&i.push(l.get(n)),t){case"add":Y(e)?qo(n)&&i.push(l.get("length")):(i.push(l.get(Kt)),nn(e)&&i.push(l.get(uo)));break;case"delete":Y(e)||(i.push(l.get(Kt)),nn(e)&&i.push(l.get(uo)));break;case"set":nn(e)&&i.push(l.get(Kt));break}if(i.length===1)i[0]&&co(i[0]);else{const a=[];for(const u of i)u&&a.push(...u);co(zo(a))}}function co(e,t){const n=Y(e)?e:[...e];for(const r of n)r.computed&&ws(r);for(const r of n)r.computed||ws(r)}function ws(e,t){(e!==Xe||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const yu=Ho("__proto__,__v_isRef,__isVue"),Yl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Fo)),_u=Wo(),vu=Wo(!1,!0),bu=Wo(!0),Es=wu();function wu(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=le(this);for(let s=0,l=this.length;s{e[t]=function(...n){_n();const r=le(this)[t].apply(this,n);return vn(),r}}),e}function Wo(e=!1,t=!1){return function(r,o,s){if(o==="__v_isReactive")return!e;if(o==="__v_isReadonly")return e;if(o==="__v_isShallow")return t;if(o==="__v_raw"&&s===(e?t?Bu:Gl:t?Zl:Xl).get(r))return r;const l=Y(r);if(!e&&l&&re(Es,o))return Reflect.get(Es,o,s);const i=Reflect.get(r,o,s);return(Fo(o)?Yl.has(o):yu(o))||(e||Fe(r,"get",o),t)?i:Re(i)?l&&qo(o)?i:i.value:he(i)?e?ei(i):et(i):i}}const Eu=Ql(),Cu=Ql(!0);function Ql(e=!1){return function(n,r,o,s){let l=n[r];if(cn(l)&&Re(l)&&!Re(o))return!1;if(!e&&(!cr(o)&&!cn(o)&&(l=le(l),o=le(o)),!Y(n)&&Re(l)&&!Re(o)))return l.value=o,!0;const i=Y(n)&&qo(r)?Number(r)e,Pr=e=>Reflect.getPrototypeOf(e);function Zn(e,t,n=!1,r=!1){e=e.__v_raw;const o=le(e),s=le(t);n||(t!==s&&Fe(o,"get",t),Fe(o,"get",s));const{has:l}=Pr(o),i=r?Yo:n?Xo:Fn;if(l.call(o,t))return i(e.get(t));if(l.call(o,s))return i(e.get(s));e!==o&&e.get(t)}function Gn(e,t=!1){const n=this.__v_raw,r=le(n),o=le(e);return t||(e!==o&&Fe(r,"has",e),Fe(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function er(e,t=!1){return e=e.__v_raw,!t&&Fe(le(e),"iterate",Kt),Reflect.get(e,"size",e)}function Cs(e){e=le(e);const t=le(this);return Pr(t).has.call(t,e)||(t.add(e),pt(t,"add",e,e)),this}function xs(e,t){t=le(t);const n=le(this),{has:r,get:o}=Pr(n);let s=r.call(n,e);s||(e=le(e),s=r.call(n,e));const l=o.call(n,e);return n.set(e,t),s?jn(t,l)&&pt(n,"set",e,t):pt(n,"add",e,t),this}function Rs(e){const t=le(this),{has:n,get:r}=Pr(t);let o=n.call(t,e);o||(e=le(e),o=n.call(t,e)),r&&r.call(t,e);const s=t.delete(e);return o&&pt(t,"delete",e,void 0),s}function Ps(){const e=le(this),t=e.size!==0,n=e.clear();return t&&pt(e,"clear",void 0,void 0),n}function tr(e,t){return function(r,o){const s=this,l=s.__v_raw,i=le(l),a=t?Yo:e?Xo:Fn;return!e&&Fe(i,"iterate",Kt),l.forEach((u,c)=>r.call(o,a(u),a(c),s))}}function nr(e,t,n){return function(...r){const o=this.__v_raw,s=le(o),l=nn(s),i=e==="entries"||e===Symbol.iterator&&l,a=e==="keys"&&l,u=o[e](...r),c=n?Yo:t?Xo:Fn;return!t&&Fe(s,"iterate",a?uo:Kt),{next(){const{value:f,done:p}=u.next();return p?{value:f,done:p}:{value:i?[c(f[0]),c(f[1])]:c(f),done:p}},[Symbol.iterator](){return this}}}}function _t(e){return function(...t){return e==="delete"?!1:this}}function Au(){const e={get(s){return Zn(this,s)},get size(){return er(this)},has:Gn,add:Cs,set:xs,delete:Rs,clear:Ps,forEach:tr(!1,!1)},t={get(s){return Zn(this,s,!1,!0)},get size(){return er(this)},has:Gn,add:Cs,set:xs,delete:Rs,clear:Ps,forEach:tr(!1,!0)},n={get(s){return Zn(this,s,!0)},get size(){return er(this,!0)},has(s){return Gn.call(this,s,!0)},add:_t("add"),set:_t("set"),delete:_t("delete"),clear:_t("clear"),forEach:tr(!0,!1)},r={get(s){return Zn(this,s,!0,!0)},get size(){return er(this,!0)},has(s){return Gn.call(this,s,!0)},add:_t("add"),set:_t("set"),delete:_t("delete"),clear:_t("clear"),forEach:tr(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=nr(s,!1,!1),n[s]=nr(s,!0,!1),t[s]=nr(s,!1,!0),r[s]=nr(s,!0,!0)}),[e,n,t,r]}const[Tu,Ou,Lu,Mu]=Au();function Qo(e,t){const n=t?e?Mu:Lu:e?Ou:Tu;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(re(n,o)&&o in r?n:r,o,s)}const Du={get:Qo(!1,!1)},Iu={get:Qo(!1,!0)},$u={get:Qo(!0,!1)},Xl=new WeakMap,Zl=new WeakMap,Gl=new WeakMap,Bu=new WeakMap;function Hu(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Nu(e){return e.__v_skip||!Object.isExtensible(e)?0:Hu(uu(e))}function et(e){return cn(e)?e:Jo(e,!1,Jl,Du,Xl)}function ju(e){return Jo(e,!1,Su,Iu,Zl)}function ei(e){return Jo(e,!0,ku,$u,Gl)}function Jo(e,t,n,r,o){if(!he(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const l=Nu(e);if(l===0)return e;const i=new Proxy(e,l===2?r:n);return o.set(e,i),i}function rn(e){return cn(e)?rn(e.__v_raw):!!(e&&e.__v_isReactive)}function cn(e){return!!(e&&e.__v_isReadonly)}function cr(e){return!!(e&&e.__v_isShallow)}function ti(e){return rn(e)||cn(e)}function le(e){const t=e&&e.__v_raw;return t?le(t):e}function ni(e){return ur(e,"__v_skip",!0),e}const Fn=e=>he(e)?et(e):e,Xo=e=>he(e)?ei(e):e;function ri(e){kt&&Xe&&(e=le(e),Wl(e.dep||(e.dep=zo())))}function oi(e,t){e=le(e),e.dep&&co(e.dep)}function Re(e){return!!(e&&e.__v_isRef===!0)}function ze(e){return si(e,!1)}function fo(e){return si(e,!0)}function si(e,t){return Re(e)?e:new Fu(e,t)}class Fu{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:le(t),this._value=n?t:Fn(t)}get value(){return ri(this),this._value}set value(t){const n=this.__v_isShallow||cr(t)||cn(t);t=n?t:le(t),jn(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:Fn(t),oi(this))}}function be(e){return Re(e)?e.value:e}const Uu={get:(e,t,n)=>be(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Re(o)&&!Re(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function li(e){return rn(e)?e:new Proxy(e,Uu)}function ii(e){const t=Y(e)?new Array(e.length):{};for(const n in e)t[n]=Zo(e,n);return t}class qu{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}}function Zo(e,t,n){const r=e[t];return Re(r)?r:new qu(e,t,n)}var ai;class Ku{constructor(t,n,r,o){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[ai]=!1,this._dirty=!0,this.effect=new Vo(t,()=>{this._dirty||(this._dirty=!0,oi(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=r}get value(){const t=le(this);return ri(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}ai="__v_isReadonly";function zu(e,t,n=!1){let r,o;const s=X(e);return s?(r=e,o=Ze):(r=e.get,o=e.set),new Ku(r,o,s||!o,n)}function St(e,t,n,r){let o;try{o=r?e(...r):e()}catch(s){bn(s,t,n)}return o}function Ve(e,t,n,r){if(X(e)){const s=St(e,t,n,r);return s&&Uo(s)&&s.catch(l=>{bn(l,t,n)}),s}const o=[];for(let s=0;s>>1;qn(Te[r])st&&Te.splice(t,1)}function fi(e){Y(e)?on.push(...e):(!ft||!ft.includes(e,e.allowRecurse?Ut+1:Ut))&&on.push(e),ci()}function ks(e,t=Un?st+1:0){for(;tqn(n)-qn(r)),Ut=0;Ute.id==null?1/0:e.id,Qu=(e,t)=>{const n=qn(e)-qn(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function di(e){po=!1,Un=!0,Te.sort(Qu);const t=Ze;try{for(st=0;stm.trim())),f&&(o=n.map(Ko))}let i,a=r[i=Fr(t)]||r[i=Fr(it(t))];!a&&s&&(a=r[i=Fr(yn(t))]),a&&Ve(a,e,6,o);const u=r[i+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,Ve(u,e,6,o)}}function pi(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let l={},i=!1;if(!X(e)){const a=u=>{const c=pi(u,t,!0);c&&(i=!0,Se(l,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!s&&!i?(he(e)&&r.set(e,null),null):(Y(s)?s.forEach(a=>l[a]=null):Se(l,s),he(e)&&r.set(e,l),l)}function Sr(e,t){return!e||!Vn(t)?!1:(t=t.slice(2).replace(/Once$/,""),re(e,t[0].toLowerCase()+t.slice(1))||re(e,yn(t))||re(e,t))}let De=null,Ar=null;function dr(e){const t=De;return De=e,Ar=e&&e.type.__scopeId||null,t}function Ng(e){Ar=e}function jg(){Ar=null}function Tr(e,t=De,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&Ns(-1);const s=dr(t);let l;try{l=e(...o)}finally{dr(s),r._d&&Ns(1)}return l};return r._n=!0,r._c=!0,r._d=!0,r}function Ur(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:s,propsOptions:[l],slots:i,attrs:a,emit:u,render:c,renderCache:f,data:p,setupState:m,ctx:_,inheritAttrs:C}=e;let R,y;const h=dr(e);try{if(n.shapeFlag&4){const w=o||r;R=qe(c.call(w,w,f,s,m,p,_)),y=a}else{const w=t;R=qe(w.length>1?w(s,{attrs:a,slots:i,emit:u}):w(s,null)),y=t.props?a:Zu(a)}}catch(w){In.length=0,bn(w,e,1),R=me(Ie)}let v=R;if(y&&C!==!1){const w=Object.keys(y),{shapeFlag:T}=v;w.length&&T&7&&(l&&w.some(No)&&(y=Gu(y,l)),v=mt(v,y))}return n.dirs&&(v=mt(v),v.dirs=v.dirs?v.dirs.concat(n.dirs):n.dirs),n.transition&&(v.transition=n.transition),R=v,dr(h),R}function Xu(e){let t;for(let n=0;n{let t;for(const n in e)(n==="class"||n==="style"||Vn(n))&&((t||(t={}))[n]=e[n]);return t},Gu=(e,t)=>{const n={};for(const r in e)(!No(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function ec(e,t,n){const{props:r,children:o,component:s}=e,{props:l,children:i,patchFlag:a}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return r?Ss(r,l,u):!!l;if(a&8){const c=t.dynamicProps;for(let f=0;fe.__isSuspense,tc={name:"Suspense",__isSuspense:!0,process(e,t,n,r,o,s,l,i,a,u){e==null?nc(t,n,r,o,s,l,i,a,u):rc(e,t,n,r,o,l,i,a,u)},hydrate:oc,create:ts,normalize:sc},mi=tc;function Kn(e,t){const n=e.props&&e.props[t];X(n)&&n()}function nc(e,t,n,r,o,s,l,i,a){const{p:u,o:{createElement:c}}=a,f=c("div"),p=e.suspense=ts(e,o,r,t,f,n,s,l,i,a);u(null,p.pendingBranch=e.ssContent,f,null,r,p,s,l),p.deps>0?(Kn(e,"onPending"),Kn(e,"onFallback"),u(null,e.ssFallback,t,n,r,null,s,l),sn(p,e.ssFallback)):p.resolve()}function rc(e,t,n,r,o,s,l,i,{p:a,um:u,o:{createElement:c}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const p=t.ssContent,m=t.ssFallback,{activeBranch:_,pendingBranch:C,isInFallback:R,isHydrating:y}=f;if(C)f.pendingBranch=p,lt(p,C)?(a(C,p,f.hiddenContainer,null,o,f,s,l,i),f.deps<=0?f.resolve():R&&(a(_,m,n,r,o,null,s,l,i),sn(f,m))):(f.pendingId++,y?(f.isHydrating=!1,f.activeBranch=C):u(C,o,f),f.deps=0,f.effects.length=0,f.hiddenContainer=c("div"),R?(a(null,p,f.hiddenContainer,null,o,f,s,l,i),f.deps<=0?f.resolve():(a(_,m,n,r,o,null,s,l,i),sn(f,m))):_&<(p,_)?(a(_,p,n,r,o,f,s,l,i),f.resolve(!0)):(a(null,p,f.hiddenContainer,null,o,f,s,l,i),f.deps<=0&&f.resolve()));else if(_&<(p,_))a(_,p,n,r,o,f,s,l,i),sn(f,p);else if(Kn(t,"onPending"),f.pendingBranch=p,f.pendingId++,a(null,p,f.hiddenContainer,null,o,f,s,l,i),f.deps<=0)f.resolve();else{const{timeout:h,pendingId:v}=f;h>0?setTimeout(()=>{f.pendingId===v&&f.fallback(m)},h):h===0&&f.fallback(m)}}function ts(e,t,n,r,o,s,l,i,a,u,c=!1){const{p:f,m:p,um:m,n:_,o:{parentNode:C,remove:R}}=u,y=Ko(e.props&&e.props.timeout),h={vnode:e,parent:t,parentComponent:n,isSVG:l,container:r,hiddenContainer:o,anchor:s,deps:0,pendingId:0,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:c,isUnmounted:!1,effects:[],resolve(v=!1){const{vnode:w,activeBranch:T,pendingBranch:O,pendingId:I,effects:k,parentComponent:U,container:F}=h;if(h.isHydrating)h.isHydrating=!1;else if(!v){const Z=T&&O.transition&&O.transition.mode==="out-in";Z&&(T.transition.afterLeave=()=>{I===h.pendingId&&p(O,F,j,0)});let{anchor:j}=h;T&&(j=_(T),m(T,U,h,!0)),Z||p(O,F,j,0)}sn(h,O),h.pendingBranch=null,h.isInFallback=!1;let W=h.parent,H=!1;for(;W;){if(W.pendingBranch){W.effects.push(...k),H=!0;break}W=W.parent}H||fi(k),h.effects=[],Kn(w,"onResolve")},fallback(v){if(!h.pendingBranch)return;const{vnode:w,activeBranch:T,parentComponent:O,container:I,isSVG:k}=h;Kn(w,"onFallback");const U=_(T),F=()=>{!h.isInFallback||(f(null,v,I,U,O,null,k,i,a),sn(h,v))},W=v.transition&&v.transition.mode==="out-in";W&&(T.transition.afterLeave=F),h.isInFallback=!0,m(T,O,null,!0),W||F()},move(v,w,T){h.activeBranch&&p(h.activeBranch,v,w,T),h.container=v},next(){return h.activeBranch&&_(h.activeBranch)},registerDep(v,w){const T=!!h.pendingBranch;T&&h.deps++;const O=v.vnode.el;v.asyncDep.catch(I=>{bn(I,v,0)}).then(I=>{if(v.isUnmounted||h.isUnmounted||h.pendingId!==v.suspenseId)return;v.asyncResolved=!0;const{vnode:k}=v;bo(v,I,!1),O&&(k.el=O);const U=!O&&v.subTree.el;w(v,k,C(O||v.subTree.el),O?null:_(v.subTree),h,l,a),U&&R(U),es(v,k.el),T&&--h.deps===0&&h.resolve()})},unmount(v,w){h.isUnmounted=!0,h.activeBranch&&m(h.activeBranch,n,v,w),h.pendingBranch&&m(h.pendingBranch,n,v,w)}};return h}function oc(e,t,n,r,o,s,l,i,a){const u=t.suspense=ts(t,r,n,e.parentNode,document.createElement("div"),null,o,s,l,i,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,s,l);return u.deps===0&&u.resolve(),c}function sc(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=As(r?n.default:n),e.ssFallback=r?As(n.fallback):me(Ie)}function As(e){let t;if(X(e)){const n=fn&&e._c;n&&(e._d=!1,Oe()),e=e(),n&&(e._d=!0,t=Ke,$i())}return Y(e)&&(e=Xu(e)),e=qe(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function gi(e,t){t&&t.pendingBranch?Y(e)?t.effects.push(...e):t.effects.push(e):fi(e)}function sn(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e,o=n.el=t.el;r&&r.subTree===n&&(r.vnode.el=o,es(r,o))}function ln(e,t){if(Ee){let n=Ee.provides;const r=Ee.parent&&Ee.parent.provides;r===n&&(n=Ee.provides=Object.create(r)),n[e]=t}}function Ge(e,t,n=!1){const r=Ee||De;if(r){const o=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&X(t)?t.call(r.proxy):t}}function lc(e,t){return ns(e,null,t)}const Ts={};function je(e,t,n){return ns(e,t,n)}function ns(e,t,{immediate:n,deep:r,flush:o,onTrack:s,onTrigger:l}=de){const i=Ee;let a,u=!1,c=!1;if(Re(e)?(a=()=>e.value,u=cr(e)):rn(e)?(a=()=>e,r=!0):Y(e)?(c=!0,u=e.some(y=>rn(y)||cr(y)),a=()=>e.map(y=>{if(Re(y))return y.value;if(rn(y))return en(y);if(X(y))return St(y,i,2)})):X(e)?t?a=()=>St(e,i,2):a=()=>{if(!(i&&i.isUnmounted))return f&&f(),Ve(e,i,3,[p])}:a=Ze,t&&r){const y=a;a=()=>en(y())}let f,p=y=>{f=R.onStop=()=>{St(y,i,4)}};if(pn)return p=Ze,t?n&&Ve(t,i,3,[a(),c?[]:void 0,p]):a(),Ze;let m=c?[]:Ts;const _=()=>{if(!!R.active)if(t){const y=R.run();(r||u||(c?y.some((h,v)=>jn(h,m[v])):jn(y,m)))&&(f&&f(),Ve(t,i,3,[y,m===Ts?void 0:m,p]),m=y)}else R.run()};_.allowRecurse=!!t;let C;o==="sync"?C=_:o==="post"?C=()=>Pe(_,i&&i.suspense):(_.pre=!0,i&&(_.id=i.uid),C=()=>kr(_));const R=new Vo(a,C);return t?n?_():m=R.run():o==="post"?Pe(R.run.bind(R),i&&i.suspense):R.run(),()=>{R.stop(),i&&i.scope&&jo(i.scope.effects,R)}}function ic(e,t,n){const r=this.proxy,o=we(e)?e.includes(".")?yi(r,e):()=>r[e]:e.bind(r,r);let s;X(t)?s=t:(s=t.handler,n=t);const l=Ee;Ot(this);const i=ns(o,s.bind(r),n);return l?Ot(l):At(),i}function yi(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o{en(n,t)});else if(ql(e))for(const n in e)en(e[n],t);return e}function ac(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Yn(()=>{e.isMounted=!0}),En(()=>{e.isUnmounting=!0}),e}const Ue=[Function,Array],uc={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ue,onEnter:Ue,onAfterEnter:Ue,onEnterCancelled:Ue,onBeforeLeave:Ue,onLeave:Ue,onAfterLeave:Ue,onLeaveCancelled:Ue,onBeforeAppear:Ue,onAppear:Ue,onAfterAppear:Ue,onAppearCancelled:Ue},setup(e,{slots:t}){const n=yt(),r=ac();let o;return()=>{const s=t.default&&bi(t.default(),!0);if(!s||!s.length)return;let l=s[0];if(s.length>1){for(const C of s)if(C.type!==Ie){l=C;break}}const i=le(e),{mode:a}=i;if(r.isLeaving)return qr(l);const u=Os(l);if(!u)return qr(l);const c=ho(u,i,r,n);pr(u,c);const f=n.subTree,p=f&&Os(f);let m=!1;const{getTransitionKey:_}=u.type;if(_){const C=_();o===void 0?o=C:C!==o&&(o=C,m=!0)}if(p&&p.type!==Ie&&(!lt(u,p)||m)){const C=ho(p,i,r,n);if(pr(p,C),a==="out-in")return r.isLeaving=!0,C.afterLeave=()=>{r.isLeaving=!1,n.update()},qr(l);a==="in-out"&&u.type!==Ie&&(C.delayLeave=(R,y,h)=>{const v=vi(r,p);v[String(p.key)]=p,R._leaveCb=()=>{y(),R._leaveCb=void 0,delete c.delayedLeave},c.delayedLeave=h})}return l}}},_i=uc;function vi(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function ho(e,t,n,r){const{appear:o,mode:s,persisted:l=!1,onBeforeEnter:i,onEnter:a,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:f,onLeave:p,onAfterLeave:m,onLeaveCancelled:_,onBeforeAppear:C,onAppear:R,onAfterAppear:y,onAppearCancelled:h}=t,v=String(e.key),w=vi(n,e),T=(k,U)=>{k&&Ve(k,r,9,U)},O=(k,U)=>{const F=U[1];T(k,U),Y(k)?k.every(W=>W.length<=1)&&F():k.length<=1&&F()},I={mode:s,persisted:l,beforeEnter(k){let U=i;if(!n.isMounted)if(o)U=C||i;else return;k._leaveCb&&k._leaveCb(!0);const F=w[v];F&<(e,F)&&F.el._leaveCb&&F.el._leaveCb(),T(U,[k])},enter(k){let U=a,F=u,W=c;if(!n.isMounted)if(o)U=R||a,F=y||u,W=h||c;else return;let H=!1;const Z=k._enterCb=j=>{H||(H=!0,j?T(W,[k]):T(F,[k]),I.delayedLeave&&I.delayedLeave(),k._enterCb=void 0)};U?O(U,[k,Z]):Z()},leave(k,U){const F=String(e.key);if(k._enterCb&&k._enterCb(!0),n.isUnmounting)return U();T(f,[k]);let W=!1;const H=k._leaveCb=Z=>{W||(W=!0,U(),Z?T(_,[k]):T(m,[k]),k._leaveCb=void 0,w[F]===e&&delete w[F])};w[F]=e,p?O(p,[k,H]):H()},clone(k){return ho(k,t,n,r)}};return I}function qr(e){if(Wn(e))return e=mt(e),e.children=null,e}function Os(e){return Wn(e)?e.children?e.children[0]:void 0:e}function pr(e,t){e.shapeFlag&6&&e.component?pr(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function bi(e,t=!1,n){let r=[],o=0;for(let s=0;s1)for(let s=0;s!!e.type.__asyncLoader;function ne(e){X(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:o=200,timeout:s,suspensible:l=!0,onError:i}=e;let a=null,u,c=0;const f=()=>(c++,a=null,p()),p=()=>{let m;return a||(m=a=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),i)return new Promise((C,R)=>{i(_,()=>C(f()),()=>R(_),c+1)});throw _}).then(_=>m!==a&&a?a:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),u=_,_)))};return Le({name:"AsyncComponentWrapper",__asyncLoader:p,get __asyncResolved(){return u},setup(){const m=Ee;if(u)return()=>Kr(u,m);const _=h=>{a=null,bn(h,m,13,!r)};if(l&&m.suspense||pn)return p().then(h=>()=>Kr(h,m)).catch(h=>(_(h),()=>r?me(r,{error:h}):null));const C=ze(!1),R=ze(),y=ze(!!o);return o&&setTimeout(()=>{y.value=!1},o),s!=null&&setTimeout(()=>{if(!C.value&&!R.value){const h=new Error(`Async component timed out after ${s}ms.`);_(h),R.value=h}},s),p().then(()=>{C.value=!0,m.parent&&Wn(m.parent.vnode)&&kr(m.parent.update)}).catch(h=>{_(h),R.value=h}),()=>{if(C.value&&u)return Kr(u,m);if(R.value&&r)return me(r,{error:R.value});if(n&&!y.value)return me(n)}}})}function Kr(e,{vnode:{ref:t,props:n,children:r,shapeFlag:o},parent:s}){const l=me(e,n,r);return l.ref=t,l}const Wn=e=>e.type.__isKeepAlive,cc={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=yt(),r=n.ctx;if(!r.renderer)return()=>{const h=t.default&&t.default();return h&&h.length===1?h[0]:h};const o=new Map,s=new Set;let l=null;const i=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:f}}}=r,p=f("div");r.activate=(h,v,w,T,O)=>{const I=h.component;u(h,v,w,0,i),a(I.vnode,h,v,w,I,i,T,h.slotScopeIds,O),Pe(()=>{I.isDeactivated=!1,I.a&&Mn(I.a);const k=h.props&&h.props.onVnodeMounted;k&&Be(k,I.parent,h)},i)},r.deactivate=h=>{const v=h.component;u(h,p,null,1,i),Pe(()=>{v.da&&Mn(v.da);const w=h.props&&h.props.onVnodeUnmounted;w&&Be(w,v.parent,h),v.isDeactivated=!0},i)};function m(h){zr(h),c(h,n,i,!0)}function _(h){o.forEach((v,w)=>{const T=wo(v.type);T&&(!h||!h(T))&&C(w)})}function C(h){const v=o.get(h);!l||v.type!==l.type?m(v):l&&zr(l),o.delete(h),s.delete(h)}je(()=>[e.include,e.exclude],([h,v])=>{h&&_(w=>Tn(h,w)),v&&_(w=>!Tn(v,w))},{flush:"post",deep:!0});let R=null;const y=()=>{R!=null&&o.set(R,Vr(n.subTree))};return Yn(y),Ci(y),En(()=>{o.forEach(h=>{const{subTree:v,suspense:w}=n,T=Vr(v);if(h.type===T.type){zr(T);const O=T.component.da;O&&Pe(O,w);return}m(h)})}),()=>{if(R=null,!t.default)return null;const h=t.default(),v=h[0];if(h.length>1)return l=null,h;if(!dn(v)||!(v.shapeFlag&4)&&!(v.shapeFlag&128))return l=null,v;let w=Vr(v);const T=w.type,O=wo(zt(w)?w.type.__asyncResolved||{}:T),{include:I,exclude:k,max:U}=e;if(I&&(!O||!Tn(I,O))||k&&O&&Tn(k,O))return l=w,v;const F=w.key==null?T:w.key,W=o.get(F);return w.el&&(w=mt(w),v.shapeFlag&128&&(v.ssContent=w)),R=F,W?(w.el=W.el,w.component=W.component,w.transition&&pr(w,w.transition),w.shapeFlag|=512,s.delete(F),s.add(F)):(s.add(F),U&&s.size>parseInt(U,10)&&C(s.values().next().value)),w.shapeFlag|=256,l=w,hi(v.type)?v:w}}},fc=cc;function Tn(e,t){return Y(e)?e.some(n=>Tn(n,t)):we(e)?e.split(",").includes(t):e.test?e.test(t):!1}function dc(e,t){wi(e,"a",t)}function pc(e,t){wi(e,"da",t)}function wi(e,t,n=Ee){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Or(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Wn(o.parent.vnode)&&hc(r,t,n,o),o=o.parent}}function hc(e,t,n,r){const o=Or(t,e,r,!0);hr(()=>{jo(r[t],o)},n)}function zr(e){let t=e.shapeFlag;t&256&&(t-=256),t&512&&(t-=512),e.shapeFlag=t}function Vr(e){return e.shapeFlag&128?e.ssContent:e}function Or(e,t,n=Ee,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...l)=>{if(n.isUnmounted)return;_n(),Ot(n);const i=Ve(t,n,e,l);return At(),vn(),i});return r?o.unshift(s):o.push(s),s}}const gt=e=>(t,n=Ee)=>(!pn||e==="sp")&&Or(e,(...r)=>t(...r),n),Ei=gt("bm"),Yn=gt("m"),mc=gt("bu"),Ci=gt("u"),En=gt("bum"),hr=gt("um"),gc=gt("sp"),yc=gt("rtg"),_c=gt("rtc");function xi(e,t=Ee){Or("ec",e,t)}function ot(e,t,n,r){const o=e.dirs,s=t&&t.dirs;for(let l=0;lt(l,i,void 0,s&&s[i]));else{const l=Object.keys(e);o=new Array(l.length);for(let i=0,a=l.length;idn(t)?!(t.type===Ie||t.type===ke&&!Pi(t.children)):!0)?e:null}const go=e=>e?Ni(e)?ls(e)||e.proxy:go(e.parent):null,mr=Se(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>go(e.parent),$root:e=>go(e.root),$emit:e=>e.emit,$options:e=>rs(e),$forceUpdate:e=>e.f||(e.f=()=>kr(e.update)),$nextTick:e=>e.n||(e.n=wn.bind(e.proxy)),$watch:e=>ic.bind(e)}),Ec={get({_:e},t){const{ctx:n,setupState:r,data:o,props:s,accessCache:l,type:i,appContext:a}=e;let u;if(t[0]!=="$"){const m=l[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(r!==de&&re(r,t))return l[t]=1,r[t];if(o!==de&&re(o,t))return l[t]=2,o[t];if((u=e.propsOptions[0])&&re(u,t))return l[t]=3,s[t];if(n!==de&&re(n,t))return l[t]=4,n[t];yo&&(l[t]=0)}}const c=mr[t];let f,p;if(c)return t==="$attrs"&&Fe(e,"get",t),c(e);if((f=i.__cssModules)&&(f=f[t]))return f;if(n!==de&&re(n,t))return l[t]=4,n[t];if(p=a.config.globalProperties,re(p,t))return p[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return o!==de&&re(o,t)?(o[t]=n,!0):r!==de&&re(r,t)?(r[t]=n,!0):re(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},l){let i;return!!n[l]||e!==de&&re(e,l)||t!==de&&re(t,l)||(i=s[0])&&re(i,l)||re(r,l)||re(mr,l)||re(o.config.globalProperties,l)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:re(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let yo=!0;function Cc(e){const t=rs(e),n=e.proxy,r=e.ctx;yo=!1,t.beforeCreate&&Ms(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:l,watch:i,provide:a,inject:u,created:c,beforeMount:f,mounted:p,beforeUpdate:m,updated:_,activated:C,deactivated:R,beforeDestroy:y,beforeUnmount:h,destroyed:v,unmounted:w,render:T,renderTracked:O,renderTriggered:I,errorCaptured:k,serverPrefetch:U,expose:F,inheritAttrs:W,components:H,directives:Z,filters:j}=t;if(u&&xc(u,r,null,e.appContext.config.unwrapInjectedRef),l)for(const ce in l){const ae=l[ce];X(ae)&&(r[ce]=ae.bind(n))}if(o){const ce=o.call(n,n);he(ce)&&(e.data=et(ce))}if(yo=!0,s)for(const ce in s){const ae=s[ce],Ye=X(ae)?ae.bind(n,n):X(ae.get)?ae.get.bind(n,n):Ze,Mt=!X(ae)&&X(ae.set)?ae.set.bind(n):Ze,Qe=xe({get:Ye,set:Mt});Object.defineProperty(r,ce,{enumerable:!0,configurable:!0,get:()=>Qe.value,set:$e=>Qe.value=$e})}if(i)for(const ce in i)ki(i[ce],r,n,ce);if(a){const ce=X(a)?a.call(n):a;Reflect.ownKeys(ce).forEach(ae=>{ln(ae,ce[ae])})}c&&Ms(c,e,"c");function oe(ce,ae){Y(ae)?ae.forEach(Ye=>ce(Ye.bind(n))):ae&&ce(ae.bind(n))}if(oe(Ei,f),oe(Yn,p),oe(mc,m),oe(Ci,_),oe(dc,C),oe(pc,R),oe(xi,k),oe(_c,O),oe(yc,I),oe(En,h),oe(hr,w),oe(gc,U),Y(F))if(F.length){const ce=e.exposed||(e.exposed={});F.forEach(ae=>{Object.defineProperty(ce,ae,{get:()=>n[ae],set:Ye=>n[ae]=Ye})})}else e.exposed||(e.exposed={});T&&e.render===Ze&&(e.render=T),W!=null&&(e.inheritAttrs=W),H&&(e.components=H),Z&&(e.directives=Z)}function xc(e,t,n=Ze,r=!1){Y(e)&&(e=_o(e));for(const o in e){const s=e[o];let l;he(s)?"default"in s?l=Ge(s.from||o,s.default,!0):l=Ge(s.from||o):l=Ge(s),Re(l)&&r?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>l.value,set:i=>l.value=i}):t[o]=l}}function Ms(e,t,n){Ve(Y(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function ki(e,t,n,r){const o=r.includes(".")?yi(n,r):()=>n[r];if(we(e)){const s=t[e];X(s)&&je(o,s)}else if(X(e))je(o,e.bind(n));else if(he(e))if(Y(e))e.forEach(s=>ki(s,t,n,r));else{const s=X(e.handler)?e.handler.bind(n):t[e.handler];X(s)&&je(o,s,e)}}function rs(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:l}}=e.appContext,i=s.get(t);let a;return i?a=i:!o.length&&!n&&!r?a=t:(a={},o.length&&o.forEach(u=>gr(a,u,l,!0)),gr(a,t,l)),he(t)&&s.set(t,a),a}function gr(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&gr(e,s,n,!0),o&&o.forEach(l=>gr(e,l,n,!0));for(const l in t)if(!(r&&l==="expose")){const i=Rc[l]||n&&n[l];e[l]=i?i(e[l],t[l]):t[l]}return e}const Rc={data:Ds,props:Ft,emits:Ft,methods:Ft,computed:Ft,beforeCreate:Me,created:Me,beforeMount:Me,mounted:Me,beforeUpdate:Me,updated:Me,beforeDestroy:Me,beforeUnmount:Me,destroyed:Me,unmounted:Me,activated:Me,deactivated:Me,errorCaptured:Me,serverPrefetch:Me,components:Ft,directives:Ft,watch:kc,provide:Ds,inject:Pc};function Ds(e,t){return t?e?function(){return Se(X(e)?e.call(this,this):e,X(t)?t.call(this,this):t)}:t:e}function Pc(e,t){return Ft(_o(e),_o(t))}function _o(e){if(Y(e)){const t={};for(let n=0;n0)&&!(l&16)){if(l&8){const c=e.vnode.dynamicProps;for(let f=0;f{a=!0;const[p,m]=Ai(f,t,!0);Se(l,p),m&&i.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!a)return he(e)&&r.set(e,tn),tn;if(Y(s))for(let c=0;c-1,m[1]=C<0||_-1||re(m,"default"))&&i.push(f)}}}const u=[l,i];return he(e)&&r.set(e,u),u}function Is(e){return e[0]!=="$"}function $s(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function Bs(e,t){return $s(e)===$s(t)}function Hs(e,t){return Y(t)?t.findIndex(n=>Bs(n,e)):X(t)&&Bs(t,e)?0:-1}const Ti=e=>e[0]==="_"||e==="$stable",os=e=>Y(e)?e.map(qe):[qe(e)],Tc=(e,t,n)=>{if(t._n)return t;const r=Tr((...o)=>os(t(...o)),n);return r._c=!1,r},Oi=(e,t,n)=>{const r=e._ctx;for(const o in e){if(Ti(o))continue;const s=e[o];if(X(s))t[o]=Tc(o,s,r);else if(s!=null){const l=os(s);t[o]=()=>l}}},Li=(e,t)=>{const n=os(t);e.slots.default=()=>n},Oc=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=le(t),ur(t,"_",n)):Oi(t,e.slots={})}else e.slots={},t&&Li(e,t);ur(e.slots,Mr,1)},Lc=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,l=de;if(r.shapeFlag&32){const i=t._;i?n&&i===1?s=!1:(Se(o,t),!n&&i===1&&delete o._):(s=!t.$stable,Oi(t,o)),l=t}else t&&(Li(e,t),l={default:1});if(s)for(const i in o)!Ti(i)&&!(i in l)&&delete o[i]};function Mi(){return{app:null,config:{isNativeTag:lu,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Mc=0;function Dc(e,t){return function(r,o=null){X(r)||(r=Object.assign({},r)),o!=null&&!he(o)&&(o=null);const s=Mi(),l=new Set;let i=!1;const a=s.app={_uid:Mc++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:Xc,get config(){return s.config},set config(u){},use(u,...c){return l.has(u)||(u&&X(u.install)?(l.add(u),u.install(a,...c)):X(u)&&(l.add(u),u(a,...c))),a},mixin(u){return s.mixins.includes(u)||s.mixins.push(u),a},component(u,c){return c?(s.components[u]=c,a):s.components[u]},directive(u,c){return c?(s.directives[u]=c,a):s.directives[u]},mount(u,c,f){if(!i){const p=me(r,o);return p.appContext=s,c&&t?t(p,u):e(p,u,f),i=!0,a._container=u,u.__vue_app__=a,ls(p.component)||p.component.proxy}},unmount(){i&&(e(null,a._container),delete a._container.__vue_app__)},provide(u,c){return s.provides[u]=c,a}};return a}}function yr(e,t,n,r,o=!1){if(Y(e)){e.forEach((p,m)=>yr(p,t&&(Y(t)?t[m]:t),n,r,o));return}if(zt(r)&&!o)return;const s=r.shapeFlag&4?ls(r.component)||r.component.proxy:r.el,l=o?null:s,{i,r:a}=e,u=t&&t.r,c=i.refs===de?i.refs={}:i.refs,f=i.setupState;if(u!=null&&u!==a&&(we(u)?(c[u]=null,re(f,u)&&(f[u]=null)):Re(u)&&(u.value=null)),X(a))St(a,i,12,[l,c]);else{const p=we(a),m=Re(a);if(p||m){const _=()=>{if(e.f){const C=p?re(f,a)?f[a]:c[a]:a.value;o?Y(C)&&jo(C,s):Y(C)?C.includes(s)||C.push(s):p?(c[a]=[s],re(f,a)&&(f[a]=c[a])):(a.value=[s],e.k&&(c[e.k]=a.value))}else p?(c[a]=l,re(f,a)&&(f[a]=l)):m&&(a.value=l,e.k&&(c[e.k]=l))};l?(_.id=-1,Pe(_,n)):_()}}}let vt=!1;const rr=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",or=e=>e.nodeType===8;function Ic(e){const{mt:t,p:n,o:{patchProp:r,createText:o,nextSibling:s,parentNode:l,remove:i,insert:a,createComment:u}}=e,c=(y,h)=>{if(!h.hasChildNodes()){n(null,y,h),fr(),h._vnode=y;return}vt=!1,f(h.firstChild,y,null,null,null),fr(),h._vnode=y,vt&&console.error("Hydration completed but contains mismatches.")},f=(y,h,v,w,T,O=!1)=>{const I=or(y)&&y.data==="[",k=()=>C(y,h,v,w,T,I),{type:U,ref:F,shapeFlag:W,patchFlag:H}=h;let Z=y.nodeType;h.el=y,H===-2&&(O=!1,h.dynamicChildren=null);let j=null;switch(U){case ht:Z!==3?h.children===""?(a(h.el=o(""),l(y),y),j=y):j=k():(y.data!==h.children&&(vt=!0,y.data=h.children),j=s(y));break;case Ie:Z!==8||I?j=k():j=s(y);break;case Dn:if(I&&(y=s(y),Z=y.nodeType),Z===1||Z===3){j=y;const Ae=!h.children.length;for(let oe=0;oe{O=O||!!h.dynamicChildren;const{type:I,props:k,patchFlag:U,shapeFlag:F,dirs:W}=h,H=I==="input"&&W||I==="option";if(H||U!==-1){if(W&&ot(h,null,v,"created"),k)if(H||!O||U&48)for(const j in k)(H&&j.endsWith("value")||Vn(j)&&!Ln(j))&&r(y,j,null,k[j],!1,void 0,v);else k.onClick&&r(y,"onClick",null,k.onClick,!1,void 0,v);let Z;if((Z=k&&k.onVnodeBeforeMount)&&Be(Z,v,h),W&&ot(h,null,v,"beforeMount"),((Z=k&&k.onVnodeMounted)||W)&&gi(()=>{Z&&Be(Z,v,h),W&&ot(h,null,v,"mounted")},w),F&16&&!(k&&(k.innerHTML||k.textContent))){let j=m(y.firstChild,h,y,v,w,T,O);for(;j;){vt=!0;const Ae=j;j=j.nextSibling,i(Ae)}}else F&8&&y.textContent!==h.children&&(vt=!0,y.textContent=h.children)}return y.nextSibling},m=(y,h,v,w,T,O,I)=>{I=I||!!h.dynamicChildren;const k=h.children,U=k.length;for(let F=0;F{const{slotScopeIds:I}=h;I&&(T=T?T.concat(I):I);const k=l(y),U=m(s(y),h,k,v,w,T,O);return U&&or(U)&&U.data==="]"?s(h.anchor=U):(vt=!0,a(h.anchor=u("]"),k,U),U)},C=(y,h,v,w,T,O)=>{if(vt=!0,h.el=null,O){const U=R(y);for(;;){const F=s(y);if(F&&F!==U)i(F);else break}}const I=s(y),k=l(y);return i(y),n(null,h,k,I,v,w,rr(k),T),I},R=y=>{let h=0;for(;y;)if(y=s(y),y&&or(y)&&(y.data==="["&&h++,y.data==="]")){if(h===0)return s(y);h--}return y};return[c,f]}const Pe=gi;function $c(e){return Di(e)}function Bc(e){return Di(e,Ic)}function Di(e,t){const n=du();n.__VUE__=!0;const{insert:r,remove:o,patchProp:s,createElement:l,createText:i,createComment:a,setText:u,setElementText:c,parentNode:f,nextSibling:p,setScopeId:m=Ze,insertStaticContent:_}=e,C=(d,g,b,E=null,P=null,M=null,B=!1,L=null,D=!!g.dynamicChildren)=>{if(d===g)return;d&&!lt(d,g)&&(E=$(d),$e(d,P,M,!0),d=null),g.patchFlag===-2&&(D=!1,g.dynamicChildren=null);const{type:S,ref:z,shapeFlag:q}=g;switch(S){case ht:R(d,g,b,E);break;case Ie:y(d,g,b,E);break;case Dn:d==null&&h(g,b,E,B);break;case ke:H(d,g,b,E,P,M,B,L,D);break;default:q&1?T(d,g,b,E,P,M,B,L,D):q&6?Z(d,g,b,E,P,M,B,L,D):(q&64||q&128)&&S.process(d,g,b,E,P,M,B,L,D,se)}z!=null&&P&&yr(z,d&&d.ref,M,g||d,!g)},R=(d,g,b,E)=>{if(d==null)r(g.el=i(g.children),b,E);else{const P=g.el=d.el;g.children!==d.children&&u(P,g.children)}},y=(d,g,b,E)=>{d==null?r(g.el=a(g.children||""),b,E):g.el=d.el},h=(d,g,b,E)=>{[d.el,d.anchor]=_(d.children,g,b,E,d.el,d.anchor)},v=({el:d,anchor:g},b,E)=>{let P;for(;d&&d!==g;)P=p(d),r(d,b,E),d=P;r(g,b,E)},w=({el:d,anchor:g})=>{let b;for(;d&&d!==g;)b=p(d),o(d),d=b;o(g)},T=(d,g,b,E,P,M,B,L,D)=>{B=B||g.type==="svg",d==null?O(g,b,E,P,M,B,L,D):U(d,g,P,M,B,L,D)},O=(d,g,b,E,P,M,B,L)=>{let D,S;const{type:z,props:q,shapeFlag:V,transition:Q,dirs:te}=d;if(D=d.el=l(d.type,M,q&&q.is,q),V&8?c(D,d.children):V&16&&k(d.children,D,null,E,P,M&&z!=="foreignObject",B,L),te&&ot(d,null,E,"created"),q){for(const ue in q)ue!=="value"&&!Ln(ue)&&s(D,ue,null,q[ue],M,d.children,E,P,N);"value"in q&&s(D,"value",null,q.value),(S=q.onVnodeBeforeMount)&&Be(S,E,d)}I(D,d,d.scopeId,B,E),te&&ot(d,null,E,"beforeMount");const fe=(!P||P&&!P.pendingBranch)&&Q&&!Q.persisted;fe&&Q.beforeEnter(D),r(D,g,b),((S=q&&q.onVnodeMounted)||fe||te)&&Pe(()=>{S&&Be(S,E,d),fe&&Q.enter(D),te&&ot(d,null,E,"mounted")},P)},I=(d,g,b,E,P)=>{if(b&&m(d,b),E)for(let M=0;M{for(let S=D;S{const L=g.el=d.el;let{patchFlag:D,dynamicChildren:S,dirs:z}=g;D|=d.patchFlag&16;const q=d.props||de,V=g.props||de;let Q;b&&Dt(b,!1),(Q=V.onVnodeBeforeUpdate)&&Be(Q,b,g,d),z&&ot(g,d,b,"beforeUpdate"),b&&Dt(b,!0);const te=P&&g.type!=="foreignObject";if(S?F(d.dynamicChildren,S,L,b,E,te,M):B||ae(d,g,L,null,b,E,te,M,!1),D>0){if(D&16)W(L,g,q,V,b,E,P);else if(D&2&&q.class!==V.class&&s(L,"class",null,V.class,P),D&4&&s(L,"style",q.style,V.style,P),D&8){const fe=g.dynamicProps;for(let ue=0;ue{Q&&Be(Q,b,g,d),z&&ot(g,d,b,"updated")},E)},F=(d,g,b,E,P,M,B)=>{for(let L=0;L{if(b!==E){if(b!==de)for(const L in b)!Ln(L)&&!(L in E)&&s(d,L,b[L],null,B,g.children,P,M,N);for(const L in E){if(Ln(L))continue;const D=E[L],S=b[L];D!==S&&L!=="value"&&s(d,L,S,D,B,g.children,P,M,N)}"value"in E&&s(d,"value",b.value,E.value)}},H=(d,g,b,E,P,M,B,L,D)=>{const S=g.el=d?d.el:i(""),z=g.anchor=d?d.anchor:i("");let{patchFlag:q,dynamicChildren:V,slotScopeIds:Q}=g;Q&&(L=L?L.concat(Q):Q),d==null?(r(S,b,E),r(z,b,E),k(g.children,b,z,P,M,B,L,D)):q>0&&q&64&&V&&d.dynamicChildren?(F(d.dynamicChildren,V,b,P,M,B,L),(g.key!=null||P&&g===P.subTree)&&Ii(d,g,!0)):ae(d,g,b,z,P,M,B,L,D)},Z=(d,g,b,E,P,M,B,L,D)=>{g.slotScopeIds=L,d==null?g.shapeFlag&512?P.ctx.activate(g,b,E,B,D):j(g,b,E,P,M,B,D):Ae(d,g,D)},j=(d,g,b,E,P,M,B)=>{const L=d.component=zc(d,E,P);if(Wn(d)&&(L.ctx.renderer=se),Vc(L),L.asyncDep){if(P&&P.registerDep(L,oe),!d.el){const D=L.subTree=me(Ie);y(null,D,g,b)}return}oe(L,d,g,b,P,M,B)},Ae=(d,g,b)=>{const E=g.component=d.component;if(ec(d,g,b))if(E.asyncDep&&!E.asyncResolved){ce(E,g,b);return}else E.next=g,Yu(E.update),E.update();else g.el=d.el,E.vnode=g},oe=(d,g,b,E,P,M,B)=>{const L=()=>{if(d.isMounted){let{next:z,bu:q,u:V,parent:Q,vnode:te}=d,fe=z,ue;Dt(d,!1),z?(z.el=te.el,ce(d,z,B)):z=te,q&&Mn(q),(ue=z.props&&z.props.onVnodeBeforeUpdate)&&Be(ue,Q,z,te),Dt(d,!0);const _e=Ur(d),Je=d.subTree;d.subTree=_e,C(Je,_e,f(Je.el),$(Je),d,P,M),z.el=_e.el,fe===null&&es(d,_e.el),V&&Pe(V,P),(ue=z.props&&z.props.onVnodeUpdated)&&Pe(()=>Be(ue,Q,z,te),P)}else{let z;const{el:q,props:V}=g,{bm:Q,m:te,parent:fe}=d,ue=zt(g);if(Dt(d,!1),Q&&Mn(Q),!ue&&(z=V&&V.onVnodeBeforeMount)&&Be(z,fe,g),Dt(d,!0),q&&ee){const _e=()=>{d.subTree=Ur(d),ee(q,d.subTree,d,P,null)};ue?g.type.__asyncLoader().then(()=>!d.isUnmounted&&_e()):_e()}else{const _e=d.subTree=Ur(d);C(null,_e,b,E,d,P,M),g.el=_e.el}if(te&&Pe(te,P),!ue&&(z=V&&V.onVnodeMounted)){const _e=g;Pe(()=>Be(z,fe,_e),P)}(g.shapeFlag&256||fe&&zt(fe.vnode)&&fe.vnode.shapeFlag&256)&&d.a&&Pe(d.a,P),d.isMounted=!0,g=b=E=null}},D=d.effect=new Vo(L,()=>kr(S),d.scope),S=d.update=()=>D.run();S.id=d.uid,Dt(d,!0),S()},ce=(d,g,b)=>{g.component=d;const E=d.vnode.props;d.vnode=g,d.next=null,Ac(d,g.props,E,b),Lc(d,g.children,b),_n(),ks(),vn()},ae=(d,g,b,E,P,M,B,L,D=!1)=>{const S=d&&d.children,z=d?d.shapeFlag:0,q=g.children,{patchFlag:V,shapeFlag:Q}=g;if(V>0){if(V&128){Mt(S,q,b,E,P,M,B,L,D);return}else if(V&256){Ye(S,q,b,E,P,M,B,L,D);return}}Q&8?(z&16&&N(S,P,M),q!==S&&c(b,q)):z&16?Q&16?Mt(S,q,b,E,P,M,B,L,D):N(S,P,M,!0):(z&8&&c(b,""),Q&16&&k(q,b,E,P,M,B,L,D))},Ye=(d,g,b,E,P,M,B,L,D)=>{d=d||tn,g=g||tn;const S=d.length,z=g.length,q=Math.min(S,z);let V;for(V=0;Vz?N(d,P,M,!0,!1,q):k(g,b,E,P,M,B,L,D,q)},Mt=(d,g,b,E,P,M,B,L,D)=>{let S=0;const z=g.length;let q=d.length-1,V=z-1;for(;S<=q&&S<=V;){const Q=d[S],te=g[S]=D?Ct(g[S]):qe(g[S]);if(lt(Q,te))C(Q,te,b,null,P,M,B,L,D);else break;S++}for(;S<=q&&S<=V;){const Q=d[q],te=g[V]=D?Ct(g[V]):qe(g[V]);if(lt(Q,te))C(Q,te,b,null,P,M,B,L,D);else break;q--,V--}if(S>q){if(S<=V){const Q=V+1,te=QV)for(;S<=q;)$e(d[S],P,M,!0),S++;else{const Q=S,te=S,fe=new Map;for(S=te;S<=V;S++){const He=g[S]=D?Ct(g[S]):qe(g[S]);He.key!=null&&fe.set(He.key,S)}let ue,_e=0;const Je=V-te+1;let Jt=!1,gs=0;const Pn=new Array(Je);for(S=0;S=Je){$e(He,P,M,!0);continue}let nt;if(He.key!=null)nt=fe.get(He.key);else for(ue=te;ue<=V;ue++)if(Pn[ue-te]===0&<(He,g[ue])){nt=ue;break}nt===void 0?$e(He,P,M,!0):(Pn[nt-te]=S+1,nt>=gs?gs=nt:Jt=!0,C(He,g[nt],b,null,P,M,B,L,D),_e++)}const ys=Jt?Hc(Pn):tn;for(ue=ys.length-1,S=Je-1;S>=0;S--){const He=te+S,nt=g[He],_s=He+1{const{el:M,type:B,transition:L,children:D,shapeFlag:S}=d;if(S&6){Qe(d.component.subTree,g,b,E);return}if(S&128){d.suspense.move(g,b,E);return}if(S&64){B.move(d,g,b,se);return}if(B===ke){r(M,g,b);for(let q=0;qL.enter(M),P);else{const{leave:q,delayLeave:V,afterLeave:Q}=L,te=()=>r(M,g,b),fe=()=>{q(M,()=>{te(),Q&&Q()})};V?V(M,te,fe):fe()}else r(M,g,b)},$e=(d,g,b,E=!1,P=!1)=>{const{type:M,props:B,ref:L,children:D,dynamicChildren:S,shapeFlag:z,patchFlag:q,dirs:V}=d;if(L!=null&&yr(L,null,b,d,!0),z&256){g.ctx.deactivate(d);return}const Q=z&1&&V,te=!zt(d);let fe;if(te&&(fe=B&&B.onVnodeBeforeUnmount)&&Be(fe,g,d),z&6)x(d.component,b,E);else{if(z&128){d.suspense.unmount(b,E);return}Q&&ot(d,null,g,"beforeUnmount"),z&64?d.type.remove(d,g,b,P,se,E):S&&(M!==ke||q>0&&q&64)?N(S,g,b,!1,!0):(M===ke&&q&384||!P&&z&16)&&N(D,g,b),E&&Qt(d)}(te&&(fe=B&&B.onVnodeUnmounted)||Q)&&Pe(()=>{fe&&Be(fe,g,d),Q&&ot(d,null,g,"unmounted")},b)},Qt=d=>{const{type:g,el:b,anchor:E,transition:P}=d;if(g===ke){Xn(b,E);return}if(g===Dn){w(d);return}const M=()=>{o(b),P&&!P.persisted&&P.afterLeave&&P.afterLeave()};if(d.shapeFlag&1&&P&&!P.persisted){const{leave:B,delayLeave:L}=P,D=()=>B(b,M);L?L(d.el,M,D):D()}else M()},Xn=(d,g)=>{let b;for(;d!==g;)b=p(d),o(d),d=b;o(g)},x=(d,g,b)=>{const{bum:E,scope:P,update:M,subTree:B,um:L}=d;E&&Mn(E),P.stop(),M&&(M.active=!1,$e(B,d,g,b)),L&&Pe(L,g),Pe(()=>{d.isUnmounted=!0},g),g&&g.pendingBranch&&!g.isUnmounted&&d.asyncDep&&!d.asyncResolved&&d.suspenseId===g.pendingId&&(g.deps--,g.deps===0&&g.resolve())},N=(d,g,b,E=!1,P=!1,M=0)=>{for(let B=M;Bd.shapeFlag&6?$(d.component.subTree):d.shapeFlag&128?d.suspense.next():p(d.anchor||d.el),K=(d,g,b)=>{d==null?g._vnode&&$e(g._vnode,null,null,!0):C(g._vnode||null,d,g,null,null,null,b),ks(),fr(),g._vnode=d},se={p:C,um:$e,m:Qe,r:Qt,mt:j,mc:k,pc:ae,pbc:F,n:$,o:e};let ge,ee;return t&&([ge,ee]=t(se)),{render:K,hydrate:ge,createApp:Dc(K,ge)}}function Dt({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Ii(e,t,n=!1){const r=e.children,o=t.children;if(Y(r)&&Y(o))for(let s=0;s>1,e[n[i]]0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,l=n[s-1];s-- >0;)n[s]=l,l=t[l];return n}const Nc=e=>e.__isTeleport,ke=Symbol(void 0),ht=Symbol(void 0),Ie=Symbol(void 0),Dn=Symbol(void 0),In=[];let Ke=null;function Oe(e=!1){In.push(Ke=e?null:[])}function $i(){In.pop(),Ke=In[In.length-1]||null}let fn=1;function Ns(e){fn+=e}function Bi(e){return e.dynamicChildren=fn>0?Ke||tn:null,$i(),fn>0&&Ke&&Ke.push(e),e}function Pt(e,t,n,r,o,s){return Bi(_r(e,t,n,r,o,s,!0))}function Vt(e,t,n,r,o){return Bi(me(e,t,n,r,o,!0))}function dn(e){return e?e.__v_isVNode===!0:!1}function lt(e,t){return e.type===t.type&&e.key===t.key}const Mr="__vInternal",Hi=({key:e})=>e!=null?e:null,ir=({ref:e,ref_key:t,ref_for:n})=>e!=null?we(e)||Re(e)||X(e)?{i:De,r:e,k:t,f:!!n}:e:null;function _r(e,t=null,n=null,r=0,o=null,s=e===ke?0:1,l=!1,i=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Hi(t),ref:t&&ir(t),scopeId:Ar,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null};return i?(ss(a,n),s&128&&e.normalize(a)):n&&(a.shapeFlag|=we(n)?8:16),fn>0&&!l&&Ke&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&Ke.push(a),a}const me=jc;function jc(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===vc)&&(e=Ie),dn(e)){const i=mt(e,t,!0);return n&&ss(i,n),fn>0&&!s&&Ke&&(i.shapeFlag&6?Ke[Ke.indexOf(e)]=i:Ke.push(i)),i.patchFlag|=-2,i}if(Qc(e)&&(e=e.__vccOpts),t){t=Fc(t);let{class:i,style:a}=t;i&&!we(i)&&(t.class=dt(i)),he(a)&&(ti(a)&&!Y(a)&&(a=Se({},a)),t.style=un(a))}const l=we(e)?1:hi(e)?128:Nc(e)?64:he(e)?4:X(e)?2:0;return _r(e,t,n,r,o,l,s,!0)}function Fc(e){return e?ti(e)||Mr in e?Se({},e):e:null}function mt(e,t,n=!1){const{props:r,ref:o,patchFlag:s,children:l}=e,i=t?Uc(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:i,key:i&&Hi(i),ref:t&&t.ref?n&&o?Y(o)?o.concat(ir(t)):[o,ir(t)]:ir(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ke?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&mt(e.ssContent),ssFallback:e.ssFallback&&mt(e.ssFallback),el:e.el,anchor:e.anchor}}function Dr(e=" ",t=0){return me(ht,null,e,t)}function Fg(e,t){const n=me(Dn,null,e);return n.staticCount=t,n}function Ug(e="",t=!1){return t?(Oe(),Vt(Ie,null,e)):me(Ie,null,e)}function qe(e){return e==null||typeof e=="boolean"?me(Ie):Y(e)?me(ke,null,e.slice()):typeof e=="object"?Ct(e):me(ht,null,String(e))}function Ct(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:mt(e)}function ss(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Y(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),ss(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!(Mr in t)?t._ctx=De:o===3&&De&&(De.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else X(t)?(t={default:t,_ctx:De},n=32):(t=String(t),r&64?(n=16,t=[Dr(t)]):n=8);e.children=t,e.shapeFlag|=n}function Uc(...e){const t={};for(let n=0;nEe||De,Ot=e=>{Ee=e,e.scope.on()},At=()=>{Ee&&Ee.scope.off(),Ee=null};function Ni(e){return e.vnode.shapeFlag&4}let pn=!1;function Vc(e,t=!1){pn=t;const{props:n,children:r}=e.vnode,o=Ni(e);Sc(e,n,o,t),Oc(e,r);const s=o?Wc(e,t):void 0;return pn=!1,s}function Wc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=ni(new Proxy(e.ctx,Ec));const{setup:r}=n;if(r){const o=e.setupContext=r.length>1?Fi(e):null;Ot(e),_n();const s=St(r,e,0,[e.props,o]);if(vn(),At(),Uo(s)){if(s.then(At,At),t)return s.then(l=>{bo(e,l,t)}).catch(l=>{bn(l,e,0)});e.asyncDep=s}else bo(e,s,t)}else ji(e,t)}function bo(e,t,n){X(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:he(t)&&(e.setupState=li(t)),ji(e,n)}let js;function ji(e,t,n){const r=e.type;if(!e.render){if(!t&&js&&!r.render){const o=r.template||rs(e).template;if(o){const{isCustomElement:s,compilerOptions:l}=e.appContext.config,{delimiters:i,compilerOptions:a}=r,u=Se(Se({isCustomElement:s,delimiters:i},l),a);r.render=js(o,u)}}e.render=r.render||Ze}Ot(e),_n(),Cc(e),vn(),At()}function Yc(e){return new Proxy(e.attrs,{get(t,n){return Fe(e,"get","$attrs"),t[n]}})}function Fi(e){const t=r=>{e.exposed=r||{}};let n;return{get attrs(){return n||(n=Yc(e))},slots:e.slots,emit:e.emit,expose:t}}function ls(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(li(ni(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mr)return mr[n](e)}}))}function wo(e,t=!0){return X(e)?e.displayName||e.name:e.name||t&&e.__name}function Qc(e){return X(e)&&"__vccOpts"in e}const xe=(e,t)=>zu(e,t,pn);function is(){return Jc().slots}function Jc(){const e=yt();return e.setupContext||(e.setupContext=Fi(e))}function qg(e){const t=yt();let n=e();return At(),Uo(n)&&(n=n.catch(r=>{throw Ot(t),r})),[n,()=>Ot(t)]}function ye(e,t,n){const r=arguments.length;return r===2?he(t)&&!Y(t)?dn(t)?me(e,null,[t]):me(e,t):me(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&dn(n)&&(n=[n]),me(e,t,n))}const Xc="3.2.41",Zc="http://www.w3.org/2000/svg",qt=typeof document<"u"?document:null,Fs=qt&&qt.createElement("template"),Gc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t?qt.createElementNS(Zc,e):qt.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>qt.createTextNode(e),createComment:e=>qt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>qt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const l=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{Fs.innerHTML=r?`${e}`:e;const i=Fs.content;if(r){const a=i.firstChild;for(;a.firstChild;)i.appendChild(a.firstChild);i.removeChild(a)}t.insertBefore(i,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function ef(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function tf(e,t,n){const r=e.style,o=we(n);if(n&&!o){for(const s in n)Eo(r,s,n[s]);if(t&&!we(t))for(const s in t)n[s]==null&&Eo(r,s,"")}else{const s=r.display;o?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=s)}}const Us=/\s*!important$/;function Eo(e,t,n){if(Y(n))n.forEach(r=>Eo(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=nf(e,t);Us.test(n)?e.setProperty(yn(r),n.replace(Us,""),"important"):e[r]=n}}const qs=["Webkit","Moz","ms"],Wr={};function nf(e,t){const n=Wr[t];if(n)return n;let r=it(t);if(r!=="filter"&&r in e)return Wr[t]=r;r=Rr(r);for(let o=0;oYr||(cf.then(()=>Yr=0),Yr=Date.now());function df(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Ve(pf(r,n.value),t,5,[r])};return n.value=e,n.attached=ff(),n}function pf(e,t){if(Y(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const Vs=/^on[a-z]/,hf=(e,t,n,r,o=!1,s,l,i,a)=>{t==="class"?ef(e,r,o):t==="style"?tf(e,n,r):Vn(t)?No(t)||af(e,t,n,r,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):mf(e,t,r,o))?of(e,t,r,s,l,i,a):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),rf(e,t,r,o))};function mf(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&Vs.test(t)&&X(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Vs.test(t)&&we(n)?!1:t in e}const bt="transition",kn="animation",Ir=(e,{slots:t})=>ye(_i,gf(e),t);Ir.displayName="Transition";const Ui={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Ir.props=Se({},_i.props,Ui);const It=(e,t=[])=>{Y(e)?e.forEach(n=>n(...t)):e&&e(...t)},Ws=e=>e?Y(e)?e.some(t=>t.length>1):e.length>1:!1;function gf(e){const t={};for(const H in e)H in Ui||(t[H]=e[H]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:u=l,appearToClass:c=i,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,_=yf(o),C=_&&_[0],R=_&&_[1],{onBeforeEnter:y,onEnter:h,onEnterCancelled:v,onLeave:w,onLeaveCancelled:T,onBeforeAppear:O=y,onAppear:I=h,onAppearCancelled:k=v}=t,U=(H,Z,j)=>{$t(H,Z?c:i),$t(H,Z?u:l),j&&j()},F=(H,Z)=>{H._isLeaving=!1,$t(H,f),$t(H,m),$t(H,p),Z&&Z()},W=H=>(Z,j)=>{const Ae=H?I:h,oe=()=>U(Z,H,j);It(Ae,[Z,oe]),Ys(()=>{$t(Z,H?a:s),wt(Z,H?c:i),Ws(Ae)||Qs(Z,r,C,oe)})};return Se(t,{onBeforeEnter(H){It(y,[H]),wt(H,s),wt(H,l)},onBeforeAppear(H){It(O,[H]),wt(H,a),wt(H,u)},onEnter:W(!1),onAppear:W(!0),onLeave(H,Z){H._isLeaving=!0;const j=()=>F(H,Z);wt(H,f),bf(),wt(H,p),Ys(()=>{!H._isLeaving||($t(H,f),wt(H,m),Ws(w)||Qs(H,r,R,j))}),It(w,[H,j])},onEnterCancelled(H){U(H,!1),It(v,[H])},onAppearCancelled(H){U(H,!0),It(k,[H])},onLeaveCancelled(H){F(H),It(T,[H])}})}function yf(e){if(e==null)return null;if(he(e))return[Qr(e.enter),Qr(e.leave)];{const t=Qr(e);return[t,t]}}function Qr(e){return Ko(e)}function wt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function $t(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Ys(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let _f=0;function Qs(e,t,n,r){const o=e._endId=++_f,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:l,timeout:i,propCount:a}=vf(e,t);if(!l)return r();const u=l+"end";let c=0;const f=()=>{e.removeEventListener(u,p),s()},p=m=>{m.target===e&&++c>=a&&f()};setTimeout(()=>{c(n[_]||"").split(", "),o=r(bt+"Delay"),s=r(bt+"Duration"),l=Js(o,s),i=r(kn+"Delay"),a=r(kn+"Duration"),u=Js(i,a);let c=null,f=0,p=0;t===bt?l>0&&(c=bt,f=l,p=s.length):t===kn?u>0&&(c=kn,f=u,p=a.length):(f=Math.max(l,u),c=f>0?l>u?bt:kn:null,p=c?c===bt?s.length:a.length:0);const m=c===bt&&/\b(transform|all)(,|$)/.test(n[bt+"Property"]);return{type:c,timeout:f,propCount:p,hasTransform:m}}function Js(e,t){for(;e.lengthXs(n)+Xs(e[r])))}function Xs(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function bf(){return document.body.offsetHeight}const qi=Se({patchProp:hf},Gc);let $n,Zs=!1;function wf(){return $n||($n=$c(qi))}function Ef(){return $n=Zs?$n:Bc(qi),Zs=!0,$n}const Cf=(...e)=>{const t=wf().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=Ki(r);if(!o)return;const s=t._component;!X(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.innerHTML="";const l=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t},xf=(...e)=>{const t=Ef().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=Ki(r);if(o)return n(o,!0,o instanceof SVGElement)},t};function Ki(e){return we(e)?document.querySelector(e):e}const Rf=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Pf=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,kf=/^["{[]|^-?[0-9][0-9.]{0,14}$/;function Sf(e,t){if(!(e==="__proto__"||e==="constructor"))return t}function as(e,t={}){if(typeof e!="string")return e;const n=e.toLowerCase();if(n==="true")return!0;if(n==="false")return!1;if(n==="null")return null;if(n==="nan")return NaN;if(n==="infinity")return 1/0;if(n!=="undefined"){if(!kf.test(e)){if(t.strict)throw new SyntaxError("Invalid JSON");return e}try{return Rf.test(e)||Pf.test(e)?JSON.parse(e,Sf):JSON.parse(e)}catch(r){if(t.strict)throw r;return e}}}const Af=/#/g,Tf=/&/g,Of=/=/g,zi=/\+/g,Lf=/%5B/gi,Mf=/%5D/gi,Df=/%5E/gi,If=/%60/gi,$f=/%7B/gi,Bf=/%7C/gi,Hf=/%7D/gi,Nf=/%20/gi;function jf(e){return encodeURI(""+e).replace(Bf,"|").replace(Lf,"[").replace(Mf,"]")}function Co(e){return jf(e).replace(zi,"%2B").replace(Nf,"+").replace(Af,"%23").replace(Tf,"%26").replace(If,"`").replace($f,"{").replace(Hf,"}").replace(Df,"^")}function Jr(e){return Co(e).replace(Of,"%3D")}function Vi(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function Ff(e){return Vi(e.replace(zi," "))}function Uf(e=""){const t={};e[0]==="?"&&(e=e.substr(1));for(const n of e.split("&")){const r=n.match(/([^=]+)=?(.*)/)||[];if(r.length<2)continue;const o=Vi(r[1]);if(o==="__proto__"||o==="constructor")continue;const s=Ff(r[2]||"");t[o]?Array.isArray(t[o])?t[o].push(s):t[o]=[t[o],s]:t[o]=s}return t}function qf(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(n=>`${Jr(e)}=${Co(n)}`).join("&"):`${Jr(e)}=${Co(t)}`:Jr(e)}function Kf(e){return Object.keys(e).map(t=>qf(t,e[t])).join("&")}const zf=/^\w+:(\/\/)?/,Vf=/^\/\/[^/]+/;function $r(e,t=!1){return zf.test(e)||t&&Vf.test(e)}const Wf=/\/$|\/\?/;function xo(e="",t=!1){return t?Wf.test(e):e.endsWith("/")}function us(e="",t=!1){if(!t)return(xo(e)?e.slice(0,-1):e)||"/";if(!xo(e,!0))return e||"/";const[n,...r]=e.split("?");return(n.slice(0,-1)||"/")+(r.length?`?${r.join("?")}`:"")}function Wi(e="",t=!1){if(!t)return e.endsWith("/")?e:e+"/";if(xo(e,!0))return e||"/";const[n,...r]=e.split("?");return n+"/"+(r.length?`?${r.join("?")}`:"")}function Yi(e=""){return e.startsWith("/")}function Yf(e=""){return(Yi(e)?e.substr(1):e)||"/"}function Qf(e=""){return Yi(e)?e:"/"+e}function Qi(e,t){if(Ji(t)||$r(e))return e;const n=us(t);return e.startsWith(n)?e:Qn(n,e)}function Gs(e,t){if(Ji(t))return e;const n=us(t);if(!e.startsWith(n))return e;const r=e.substring(n.length);return r[0]==="/"?r:"/"+r}function Jf(e,t){const n=Br(e),r={...Uf(n.search),...t};return n.search=Kf(r),Zf(n)}function Ji(e){return!e||e==="/"}function Xf(e){return e&&e!=="/"}function Qn(e,...t){let n=e||"";for(const r of t.filter(Xf))n=n?Wi(n)+Yf(r):r;return n}function Br(e="",t){if(!$r(e,!0))return t?Br(t+e):el(e);const[n="",r,o=""]=(e.replace(/\\/g,"/").match(/([^:/]+:)?\/\/([^/@]+@)?(.*)/)||[]).splice(1),[s="",l=""]=(o.match(/([^/?#]*)(.*)?/)||[]).splice(1),{pathname:i,search:a,hash:u}=el(l);return{protocol:n,auth:r?r.substr(0,r.length-1):"",host:s,pathname:i,search:a,hash:u}}function el(e=""){const[t="",n="",r=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function Zf(e){const t=e.pathname+(e.search?(e.search.startsWith("?")?"":"?")+e.search:"")+e.hash;return e.protocol?e.protocol+"//"+(e.auth?e.auth+"@":"")+e.host+t:t}class Gf extends Error{constructor(){super(...arguments),this.name="FetchError"}}function ed(e,t,n){let r="";e&&n&&(r=`${n.status} ${n.statusText} (${e.toString()})`),t&&(r=`${t.message} (${r})`);const o=new Gf(r);return Object.defineProperty(o,"request",{get(){return e}}),Object.defineProperty(o,"response",{get(){return n}}),Object.defineProperty(o,"data",{get(){return n&&n._data}}),o}const td=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function tl(e="GET"){return td.has(e.toUpperCase())}function nd(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const rd=new Set(["image/svg","application/xml","application/xhtml","application/html"]),od=/^application\/(?:[\w!#$%&*`\-.^~]*\+)?json(;.+)?$/i;function sd(e=""){if(!e)return"json";const t=e.split(";").shift();return od.test(t)?"json":rd.has(t)||t.startsWith("text/")?"text":"blob"}const ld=new Set([408,409,425,429,500,502,503,504]);function Xi(e){const{fetch:t,Headers:n}=e;function r(l){const i=l.error&&l.error.name==="AbortError"||!1;if(l.options.retry!==!1&&!i){const u=typeof l.options.retry=="number"?l.options.retry:tl(l.options.method)?0:1,c=l.response&&l.response.status||500;if(u>0&&ld.has(c))return o(l.request,{...l.options,retry:u-1})}const a=ed(l.request,l.error,l.response);throw Error.captureStackTrace&&Error.captureStackTrace(a,o),a}const o=async function(i,a={}){const u={request:i,options:{...e.defaults,...a},response:void 0,error:void 0};u.options.onRequest&&await u.options.onRequest(u),typeof u.request=="string"&&(u.options.baseURL&&(u.request=Qi(u.request,u.options.baseURL)),(u.options.query||u.options.params)&&(u.request=Jf(u.request,{...u.options.params,...u.options.query})),u.options.body&&tl(u.options.method)&&nd(u.options.body)&&(u.options.body=typeof u.options.body=="string"?u.options.body:JSON.stringify(u.options.body),u.options.headers=new n(u.options.headers),u.options.headers.has("content-type")||u.options.headers.set("content-type","application/json"),u.options.headers.has("accept")||u.options.headers.set("accept","application/json"))),u.response=await t(u.request,u.options).catch(async f=>(u.error=f,u.options.onRequestError&&await u.options.onRequestError(u),r(u)));const c=(u.options.parseResponse?"json":u.options.responseType)||sd(u.response.headers.get("content-type")||"");if(c==="json"){const f=await u.response.text(),p=u.options.parseResponse||as;u.response._data=p(f)}else c==="stream"?u.response._data=u.response.body:u.response._data=await u.response[c]();return u.options.onResponse&&await u.options.onResponse(u),u.response.ok||u.options.onResponseError&&await u.options.onResponseError(u),u.response.ok?u.response:r(u)},s=function(i,a){return o(i,a).then(u=>u._data)};return s.raw=o,s.create=(l={})=>Xi({...e,defaults:{...e.defaults,...l}}),s}const Zi=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),id=Zi.fetch||(()=>Promise.reject(new Error("[ohmyfetch] global.fetch is not supported!"))),ad=Zi.Headers,ud=Xi({fetch:id,Headers:ad}),cd=()=>{var e;return((e=window==null?void 0:window.__NUXT__)==null?void 0:e.config)||{}},vr=cd().app,fd=()=>vr.baseURL,dd=()=>vr.buildAssetsDir,pd=(...e)=>Qn(Gi(),dd(),...e),Gi=(...e)=>{const t=vr.cdnURL||vr.baseURL;return e.length?Qn(t,...e):t};globalThis.__buildAssetsURL=pd,globalThis.__publicAssetsURL=Gi;function Ro(e,t={},n){for(const r in e){const o=e[r],s=n?`${n}:${r}`:r;typeof o=="object"&&o!==null?Ro(o,t,s):typeof o=="function"&&(t[s]=o)}return t}function hd(e,t){return e.reduce((n,r)=>n.then(()=>r.apply(void 0,t)),Promise.resolve(null))}function md(e,t){return Promise.all(e.map(n=>n.apply(void 0,t)))}function Xr(e,t){for(const n of e)n(t)}class gd{constructor(){this._hooks={},this._before=null,this._after=null,this._deprecatedMessages=null,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,r={}){if(!t||typeof n!="function")return()=>{};const o=t;let s;for(;this._deprecatedHooks[t];)s=this._deprecatedHooks[t],t=s.to;if(s&&!r.allowDeprecated){let l=s.message;l||(l=`${o} hook has been deprecated`+(s.to?`, please use ${s.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(l)||(console.warn(l),this._deprecatedMessages.add(l))}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=null)}}hookOnce(t,n){let r,o=(...s)=>(r(),r=null,o=null,n(...s));return r=this.hook(t,o),r}removeHook(t,n){if(this._hooks[t]){const r=this._hooks[t].indexOf(n);r!==-1&&this._hooks[t].splice(r,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const r=this._hooks[t]||[];this._hooks[t]=void 0;for(const o of r)this.hook(t,o)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=Ro(t),r=Object.keys(n).map(o=>this.hook(o,n[o]));return()=>{r.splice(0,r.length).forEach(o=>o())}}removeHooks(t){const n=Ro(t);for(const r in n)this.removeHook(r,n[r])}callHook(t,...n){return this.callHookWith(hd,t,...n)}callHookParallel(t,...n){return this.callHookWith(md,t,...n)}callHookWith(t,n,...r){const o=this._before||this._after?{name:n,args:r,context:{}}:void 0;this._before&&Xr(this._before,o);const s=t(this._hooks[n]||[],r);return s instanceof Promise?s.finally(()=>{this._after&&o&&Xr(this._after,o)}):(this._after&&o&&Xr(this._after,o),s)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}function yd(){return new gd}function _d(){let e=null,t=!1;const n=r=>{if(e&&e!==r)throw new Error("Context conflict")};return{use:()=>{if(e==null)throw new Error("Context is not available");return e},tryUse:()=>e,set:(r,o)=>{o||n(r),e=r,t=!0},unset:()=>{e=null,t=!1},call:(r,o)=>{n(r),e=r;try{return o()}finally{t||(e=null)}},async callAsync(r,o){e=r;const s=()=>{e=r},l=()=>e===r?s:void 0;Po.add(l);try{const i=o();return t||(e=null),await i}finally{Po.delete(l)}}}}function vd(){const e={};return{get(t){return e[t]||(e[t]=_d()),e[t],e[t]}}}const br=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},nl="__unctx__",bd=br[nl]||(br[nl]=vd()),wd=e=>bd.get(e),rl="__unctx_async_handlers__",Po=br[rl]||(br[rl]=new Set);function ea(e){const t=[];for(const o of Po){const s=o();s&&t.push(s)}const n=()=>{for(const o of t)o()};let r=e();return"catch"in r&&(r=r.catch(o=>{throw n(),o})),[r,n]}const ta=wd("nuxt-app"),Ed="__nuxt_plugin";function Cd(e){let t=0;const n={provide:void 0,globalName:"nuxt",payload:et({data:{},state:{},_errors:{},...window.__NUXT__}),isHydrating:!0,deferHydration(){if(!n.isHydrating)return()=>{};t++;let s=!1;return()=>{if(!s&&(s=!0,t--,t===0))return n.isHydrating=!1,n.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:{},...e};n.hooks=yd(),n.hook=n.hooks.hook,n.callHook=n.hooks.callHook,n.provide=(s,l)=>{const i="$"+s;sr(n,i,l),sr(n.vueApp.config.globalProperties,i,l)},sr(n.vueApp,"$nuxt",n),sr(n.vueApp.config.globalProperties,"$nuxt",n);const r=et(n.payload.config),o=new Proxy(r,{get(s,l){var i;return l==="public"?s.public:(i=s[l])!=null?i:s.public[l]},set(s,l,i){return l==="public"||l==="app"?!1:(s[l]=i,s.public[l]=i,!0)}});return n.provide("config",o),n}async function xd(e,t){if(typeof t!="function")return;const{provide:n}=await xt(e,t,[e])||{};if(n&&typeof n=="object")for(const r in n)e.provide(r,n[r])}async function Rd(e,t){for(const n of t)await xd(e,n)}function Pd(e){return e.map(n=>typeof n!="function"?null:n.length>1?r=>n(r,r.provide):n).filter(Boolean)}function Lt(e){return e[Ed]=!0,e}function xt(e,t,n){const r=()=>n?t(...n):t();return ta.set(e),r()}function Ce(){const e=ta.tryUse();if(!e){const t=yt();if(!t)throw new Error("nuxt instance unavailable");return t.appContext.app.$nuxt}return e}function Cn(){return Ce().$config}function sr(e,t,n){Object.defineProperty(e,t,{get:()=>n})}const kd=()=>null;function Sd(...e){var f,p,m,_,C,R,y,h,v;const t=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(t);let[n,r,o={}]=e;if(typeof n!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof r!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");o.server=(f=o.server)!=null?f:!0,o.default=(p=o.default)!=null?p:kd,o.defer&&console.warn("[useAsyncData] `defer` has been renamed to `lazy`. Support for `defer` will be removed in RC."),o.lazy=(_=(m=o.lazy)!=null?m:o.defer)!=null?_:!1,o.initialCache=(C=o.initialCache)!=null?C:!0,o.immediate=(R=o.immediate)!=null?R:!0;const s=Ce(),l=()=>(s.isHydrating||o.initialCache)&&s.payload.data[n]!==void 0;s._asyncData[n]||(s._asyncData[n]={data:ze(l()?s.payload.data[n]:(h=(y=o.default)==null?void 0:y.call(o))!=null?h:null),pending:ze(!l()),error:ze((v=s.payload._errors[n])!=null?v:null)});const i={...s._asyncData[n]};i.refresh=i.execute=(w={})=>{if(s._asyncDataPromises[n]){if(w.dedupe===!1)return s._asyncDataPromises[n];s._asyncDataPromises[n].cancelled=!0}if(w._initial&&l())return s.payload.data[n];i.pending.value=!0;const T=new Promise((O,I)=>{try{O(r(s))}catch(k){I(k)}}).then(O=>{if(T.cancelled)return s._asyncDataPromises[n];o.transform&&(O=o.transform(O)),o.pick&&(O=Ad(O,o.pick)),i.data.value=O,i.error.value=null}).catch(O=>{var I,k;if(T.cancelled)return s._asyncDataPromises[n];i.error.value=O,i.data.value=be((k=(I=o.default)==null?void 0:I.call(o))!=null?k:null)}).finally(()=>{T.cancelled||(i.pending.value=!1,s.payload.data[n]=i.data.value,i.error.value&&(s.payload._errors[n]=!0),delete s._asyncDataPromises[n])});return s._asyncDataPromises[n]=T,s._asyncDataPromises[n]};const a=()=>i.refresh({_initial:!0}),u=o.server!==!1&&s.payload.serverRendered;{const w=yt();if(w&&!w._nuxtOnBeforeMountCbs){w._nuxtOnBeforeMountCbs=[];const O=w._nuxtOnBeforeMountCbs;w&&(Ei(()=>{O.forEach(I=>{I()}),O.splice(0,O.length)}),hr(()=>O.splice(0,O.length)))}u&&s.isHydrating&&n in s.payload.data?i.pending.value=!1:w&&(s.payload.serverRendered&&s.isHydrating||o.lazy)&&o.immediate?w._nuxtOnBeforeMountCbs.push(a):o.immediate&&a(),o.watch&&je(o.watch,()=>i.refresh());const T=s.hook("app:data:refresh",O=>{if(!O||O.includes(n))return i.refresh()});w&&hr(T)}const c=Promise.resolve(s._asyncDataPromises[n]).then(()=>i);return Object.assign(c,i),c}function Kg(e){const t=e?Array.isArray(e)?e:[e]:void 0;return Ce().callHook("app:data:refresh",t)}function Ad(e,t){const n={};for(const r of t)n[r]=e[r];return n}const Td=decodeURIComponent,Od=encodeURIComponent,Ld=/; */,lr=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function Md(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");let n={},r=t||{},o=e.split(Ld),s=r.decode||Td;for(let l=0;lZo(Ce().payload,"error"),On=e=>{const t=na(e);try{Ce().callHook("app:error",t);const r=Hr();r.value=r.value||t}catch{throw t}return t},$d=async(e={})=>{const t=Ce(),n=Hr();t.callHook("app:error:cleared",e),e.redirect&&await t.$router.replace(e.redirect),n.value=null},Bd=e=>!!(e&&typeof e=="object"&&"__nuxt_error"in e),na=e=>{const t=So(e);return t.__nuxt_error=!0,t};function ra(...e){const t=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(t);const[n,r]=e;if(!n||typeof n!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+n);if(r!==void 0&&typeof r!="function")throw new Error("[nuxt] [useState] init must be a function: "+r);const o="$s"+n,s=Ce(),l=Zo(s.payload.state,o);if(l.value===void 0&&r){const i=r();if(Re(i))return s.payload.state[o]=i,i;l.value=i}return l}const Wt=()=>{var e;return(e=Ce())==null?void 0:e.$router},xn=()=>yt()?Ge("_route",Ce()._route):Ce()._route,Hd=e=>e,Nd=()=>{try{if(Ce()._processingMiddleware)return!0}catch{return!0}return!1},jd=(e,t)=>{e||(e="/");const n=typeof e=="string"?e:e.path||"/",r=$r(n,!0);if(r&&!(t!=null&&t.external))throw new Error("Navigating to external URL is not allowed by default. Use `nagivateTo (url, { external: true })`.");if(r&&Br(n).protocol==="script:")throw new Error("Cannot navigate to an URL with script protocol.");if(!r&&Nd())return e;const o=Wt();return r?(t!=null&&t.replace?location.replace(n):location.href=n,Promise.resolve()):t!=null&&t.replace?o.replace(e):o.push(e)},Fd={ignoreUnknown:!1,respectType:!1,respectFunctionNames:!1,respectFunctionProperties:!1,unorderedObjects:!0,unorderedArrays:!1,unorderedSets:!1};function Ud(e,t={}){t={...Fd,...t};const n=oa(t);return n.dispatch(e),n.toString()}function oa(e){const t=[];let n=[];const r=o=>{t.push(o)};return{toString(){return t.join("")},getContext(){return n},dispatch(o){return e.replacer&&(o=e.replacer(o)),this["_"+(o===null?"null":typeof o)](o)},_object(o){const s=/\[object (.*)\]/i,l=Object.prototype.toString.call(o),i=s.exec(l),a=i?i[1].toLowerCase():"unknown:["+l.toLowerCase()+"]";let u=null;if((u=n.indexOf(o))>=0)return this.dispatch("[CIRCULAR:"+u+"]");if(n.push(o),typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(o))return r("buffer:"),r(o.toString("utf8"));if(a!=="object"&&a!=="function"&&a!=="asyncfunction")if(this["_"+a])this["_"+a](o);else{if(e.ignoreUnknown)return r("["+a+"]");throw new Error('Unknown object type "'+a+'"')}else{let c=Object.keys(o);return e.unorderedObjects&&(c=c.sort()),e.respectType!==!1&&!sl(o)&&c.splice(0,0,"prototype","__proto__","letructor"),e.excludeKeys&&(c=c.filter(function(f){return!e.excludeKeys(f)})),r("object:"+c.length+":"),c.forEach(f=>{this.dispatch(f),r(":"),e.excludeValues||this.dispatch(o[f]),r(",")})}},_array(o,s){if(s=typeof s<"u"?s:e.unorderedArrays!==!1,r("array:"+o.length+":"),!s||o.length<=1)return o.forEach(a=>this.dispatch(a));const l=[],i=o.map(a=>{const u=oa(e);return u.dispatch(a),l.push(u.getContext()),u.toString()});return n=n.concat(l),i.sort(),this._array(i,!1)},_date(o){return r("date:"+o.toJSON())},_symbol(o){return r("symbol:"+o.toString())},_error(o){return r("error:"+o.toString())},_boolean(o){return r("bool:"+o.toString())},_string(o){r("string:"+o.length+":"),r(o.toString())},_function(o){r("fn:"),sl(o)?this.dispatch("[native]"):this.dispatch(o.toString()),e.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(o.name)),e.respectFunctionProperties&&this._object(o)},_number(o){return r("number:"+o.toString())},_xml(o){return r("xml:"+o.toString())},_null(){return r("Null")},_undefined(){return r("Undefined")},_regexp(o){return r("regex:"+o.toString())},_uint8array(o){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(o))},_uint8clampedarray(o){return r("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(o))},_int8array(o){return r("int8array:"),this.dispatch(Array.prototype.slice.call(o))},_uint16array(o){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(o))},_int16array(o){return r("int16array:"),this.dispatch(Array.prototype.slice.call(o))},_uint32array(o){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(o))},_int32array(o){return r("int32array:"),this.dispatch(Array.prototype.slice.call(o))},_float32array(o){return r("float32array:"),this.dispatch(Array.prototype.slice.call(o))},_float64array(o){return r("float64array:"),this.dispatch(Array.prototype.slice.call(o))},_arraybuffer(o){return r("arraybuffer:"),this.dispatch(new Uint8Array(o))},_url(o){return r("url:"+o.toString())},_map(o){r("map:");const s=Array.from(o);return this._array(s,e.unorderedSets!==!1)},_set(o){r("set:");const s=Array.from(o);return this._array(s,e.unorderedSets!==!1)},_file(o){return r("file:"),this.dispatch([o.name,o.size,o.type,o.lastModfied])},_blob(){if(e.ignoreUnknown)return r("[blob]");throw new Error(`Hashing Blob objects is currently not supported +Use "options.replacer" or "options.ignoreUnknown" +`)},_domwindow(){return r("domwindow")},_bigint(o){return r("bigint:"+o.toString())},_process(){return r("process")},_timer(){return r("timer")},_pipe(){return r("pipe")},_tcp(){return r("tcp")},_udp(){return r("udp")},_tty(){return r("tty")},_statwatcher(){return r("statwatcher")},_securecontext(){return r("securecontext")},_connection(){return r("connection")},_zlib(){return r("zlib")},_context(){return r("context")},_nodescript(){return r("nodescript")},_httpparser(){return r("httpparser")},_dataview(){return r("dataview")},_signal(){return r("signal")},_fsevent(){return r("fsevent")},_tlswrap(){return r("tlswrap")}}}function sl(e){return typeof e!="function"?!1:/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(e))!=null}class hn{constructor(t,n){t=this.words=t||[],n!==void 0?this.sigBytes=n:this.sigBytes=t.length*4}toString(t){return(t||qd).stringify(this)}concat(t){if(this.clamp(),this.sigBytes%4)for(let n=0;n>>2]>>>24-n%4*8&255;this.words[this.sigBytes+n>>>2]|=r<<24-(this.sigBytes+n)%4*8}else for(let n=0;n>>2]=t.words[n>>>2];return this.sigBytes+=t.sigBytes,this}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new hn(this.words.slice(0))}}const qd={stringify(e){const t=[];for(let n=0;n>>2]>>>24-n%4*8&255;t.push((r>>>4).toString(16)),t.push((r&15).toString(16))}return t.join("")}},Kd={stringify(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[];for(let r=0;r>>2]>>>24-r%4*8&255,s=e.words[r+1>>>2]>>>24-(r+1)%4*8&255,l=e.words[r+2>>>2]>>>24-(r+2)%4*8&255,i=o<<16|s<<8|l;for(let a=0;a<4&&r*8+a*6>>6*(3-a)&63))}return n.join("")}},zd={parse(e){const t=e.length,n=[];for(let r=0;r>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new hn(n,t)}},Vd={parse(e){return zd.parse(unescape(encodeURIComponent(e)))}};class Wd{constructor(){this._minBufferSize=0,this.blockSize=512/32,this.reset()}reset(){this._data=new hn,this._nDataBytes=0}_append(t){typeof t=="string"&&(t=Vd.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_doProcessBlock(t,n){}_process(t){let n,r=this._data.sigBytes/(this.blockSize*4);t?r=Math.ceil(r):r=Math.max((r|0)-this._minBufferSize,0);const o=r*this.blockSize,s=Math.min(o*4,this._data.sigBytes);if(o){for(let l=0;l>>7)^(v<<14|v>>>18)^v>>>3,T=Bt[p-2],O=(T<<15|T>>>17)^(T<<13|T>>>19)^T>>>10;Bt[p]=w+Bt[p-7]+O+Bt[p-16]}const m=a&u^~a&c,_=o&s^o&l^s&l,C=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),R=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25),y=f+R+m+Jd[p]+Bt[p],h=C+_;f=c,c=u,u=a,a=i+y|0,i=l,l=s,s=o,o=y+h|0}r[0]=r[0]+o|0,r[1]=r[1]+s|0,r[2]=r[2]+l|0,r[3]=r[3]+i|0,r[4]=r[4]+a|0,r[5]=r[5]+u|0,r[6]=r[6]+c|0,r[7]=r[7]+f|0}finalize(t){super.finalize(t);const n=this._nDataBytes*8,r=this._data.sigBytes*8;return this._data.words[r>>>5]|=128<<24-r%32,this._data.words[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),this._data.words[(r+64>>>9<<4)+15]=n,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}}function Zd(e){return new Xd().finalize(e).toString(Kd)}function sa(e,t={}){const n=typeof e=="string"?e:Ud(e,t);return Zd(n).substr(0,10)}const Gd={path:"/",decode:e=>as(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))};function la(e,t){var s,l;const n={...Gd,...t},r=ep(n)||{},o=ze((l=r[e])!=null?l:(s=n.default)==null?void 0:s.call(n));return je(o,()=>{np(e,o.value,n)}),o}function ep(e={}){return Md(document.cookie,e)}function tp(e,t,n={}){return t==null?ol(e,t,{...n,maxAge:-1}):ol(e,t,n)}function np(e,t,n={}){document.cookie=tp(e,t,n)}async function ia(e,t=Wt()){if(t._routePreloaded||(t._routePreloaded=new Set),t._routePreloaded.has(e))return;t._routePreloaded.add(e);const n=t._preloadPromises||(t._preloadPromises=[]);if(n.length>4)return Promise.all(n).then(()=>ia(e,t));const r=t.resolve(e).matched.map(o=>{var s;return(s=o.components)==null?void 0:s.default}).filter(o=>typeof o=="function");for(const o of r){const s=Promise.resolve(o()).catch(()=>{}).finally(()=>n.splice(n.indexOf(s)));n.push(s)}await Promise.all(n)}const rp="modulepreload",op=function(e,t){return new URL(e,t).href},ll={},J=function(t,n,r){return!n||n.length===0?t():Promise.all(n.map(o=>{if(o=op(o,r),o in ll)return;ll[o]=!0;const s=o.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${l}`))return;const i=document.createElement("link");if(i.rel=s?"stylesheet":rp,s||(i.as="script",i.crossOrigin=""),i.href=o,document.head.appendChild(i),s)return new Promise((a,u)=>{i.addEventListener("load",a),i.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t())};function il(e,t={}){const n=sp(e,t),r=Ce(),o=r._payloadCache=r._payloadCache||{};return o[e]||(o[e]=lp(n).then(s=>s||(delete o[e],null))),o[e]}function sp(e,t={}){const n=Br(e);if(n.search)throw new Error("Payload URL cannot contain search params: "+e);const r=t.hash||(t.fresh?Date.now():"");return Qn(Cn().app.baseURL,n.pathname,r?`_payload.${r}.js`:"_payload.js")}async function lp(e){const t=await J(()=>import(e),[],import.meta.url).catch(n=>{console.warn("[nuxt] Cannot load payload ",e,n)});return(t==null?void 0:t.default)||null}function ip(){return!!Ce().payload.prerenderedAt}const ap=(...e)=>e.find(t=>t!==void 0),up="noopener noreferrer",cp=globalThis.requestIdleCallback||(e=>{const t=Date.now(),n={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))};return setTimeout(()=>{e(n)},1)}),fp=globalThis.cancelIdleCallback||(e=>{clearTimeout(e)});function aa(e){const t=e.componentName||"NuxtLink";return Le({name:t,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},setup(n,{slots:r}){const o=Wt(),s=xe(()=>n.to||n.href||""),l=xe(()=>n.external||n.target&&n.target!=="_self"?!0:typeof s.value=="object"?!1:s.value===""||$r(s.value,!0)),i=ze(!1),a=ze(null);if(n.prefetch!==!1&&n.noPrefetch!==!0&&typeof s.value=="string"&&n.target!=="_blank"&&!pp()){const c=Ce(),f=dp();let p,m=null;Yn(()=>{p=cp(()=>{var _;(_=a==null?void 0:a.value)!=null&&_.tagName&&(m=f.observe(a.value,async()=>{m==null||m(),m=null,await Promise.all([c.hooks.callHook("link:prefetch",s.value).catch(()=>{}),!l.value&&ia(s.value,o).catch(()=>{})]),i.value=!0}))})}),En(()=>{p&&fp(p),m==null||m(),m=null})}return()=>{var m,_,C;if(!l.value)return ye(Lr("RouterLink"),{ref:R=>{a.value=R==null?void 0:R.$el},to:s.value,...i.value&&!n.custom?{class:n.prefetchedClass||e.prefetchedClass}:{},activeClass:n.activeClass||e.activeClass,exactActiveClass:n.exactActiveClass||e.exactActiveClass,replace:n.replace,ariaCurrentValue:n.ariaCurrentValue,custom:n.custom},r.default);const u=typeof s.value=="object"?(_=(m=o.resolve(s.value))==null?void 0:m.href)!=null?_:null:s.value||null,c=n.target||null,f=n.noRel?null:ap(n.rel,e.externalRelAttribute,u?up:"")||null,p=()=>jd(u,{replace:n.replace});return n.custom?r.default?r.default({href:u,navigate:p,route:o.resolve(u),rel:f,target:c,isActive:!1,isExactActive:!1}):null:ye("a",{ref:a,href:u,rel:f,target:c},(C=r.default)==null?void 0:C.call(r))}}})}const ua=aa({componentName:"NuxtLink"});function dp(){const e=Ce();if(e._observer)return e._observer;let t=null;const n=new Map,r=(s,l)=>(t||(t=new IntersectionObserver(i=>{for(const a of i){const u=n.get(a.target);(a.isIntersecting||a.intersectionRatio>0)&&u&&u()}})),n.set(s,l),t.observe(s),()=>{n.delete(s),t.unobserve(s),n.size===0&&(t.disconnect(),t=null)});return e._observer={observe:r}}function pp(){const e=navigator.connection;return!!(e&&(e.saveData||/2g/.test(e.effectiveType)))}const zg=Object.freeze(Object.defineProperty({__proto__:null,defineNuxtLink:aa,default:ua},Symbol.toStringTag,{value:"Module"}));function Zr(e){return e!==null&&typeof e=="object"}function Ao(e,t,n=".",r){if(!Zr(t))return Ao(e,{},n,r);const o=Object.assign({},t);for(const s in e){if(s==="__proto__"||s==="constructor")continue;const l=e[s];l!=null&&(r&&r(o,s,l,n)||(Array.isArray(l)&&Array.isArray(o[s])?o[s]=l.concat(o[s]):Zr(l)&&Zr(o[s])?o[s]=Ao(l,o[s],(n?`${n}.`:"")+s.toString(),r):o[s]=l))}return o}function hp(e){return(...t)=>t.reduce((n,r)=>Ao(n,r,"",e),{})}const mp=hp((e,t,n,r)=>{if(typeof e[t]<"u"&&typeof n=="function")return e[t]=n(e[t]),!0}),gp={};mp(gp);function ca(e){Ce()._useHead(e)}const Gr={ProseA:ne(()=>J(()=>import("./ProseA.7eadd880.js"),[],import.meta.url).then(e=>e.default||e)),ProseCode:ne(()=>J(()=>import("./ProseCode.217ed266.js"),["ProseCode.217ed266.js","UiIconCopy.eae3960f.js","ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js","ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css"],import.meta.url).then(e=>e.default||e)),ContentDoc:ne(()=>J(()=>Promise.resolve().then(()=>Pm),void 0,import.meta.url).then(e=>e.default||e)),ContentList:ne(()=>J(()=>import("./ContentList.ac186f34.js"),[],import.meta.url).then(e=>e.default||e)),ContentNavigation:ne(()=>J(()=>import("./ContentNavigation.3feae645.js").then(e=>e.C),["ContentNavigation.3feae645.js","ContentNavigation.82aba83b.css","navigation.d66e160d.js","ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js","ProseCode.vue_used_vue_type_style_index_1_lang.24930a5d.css","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css","ContentList.ac186f34.js","ContentSlot.2a654c2d.js","DocumentDrivenEmpty.d3ab28ab.js","DocumentDrivenNotFound.47713d66.js","Markdown.273e7520.js"],import.meta.url).then(e=>e.default||e)),ContentQuery:ne(()=>J(()=>Promise.resolve().then(()=>xm),void 0,import.meta.url).then(e=>e.default||e)),ContentRenderer:ne(()=>J(()=>Promise.resolve().then(()=>gm),void 0,import.meta.url).then(e=>e.default||e)),ContentRendererMarkdown:ne(()=>J(()=>Promise.resolve().then(()=>mm),void 0,import.meta.url).then(e=>e.default||e)),ContentSlot:ne(()=>J(()=>import("./ContentSlot.2a654c2d.js"),[],import.meta.url).then(e=>e.default||e)),DocumentDrivenEmpty:ne(()=>J(()=>import("./DocumentDrivenEmpty.d3ab28ab.js"),[],import.meta.url).then(e=>e.default||e)),DocumentDrivenNotFound:ne(()=>J(()=>import("./DocumentDrivenNotFound.47713d66.js"),[],import.meta.url).then(e=>e.default||e)),Markdown:ne(()=>J(()=>import("./Markdown.273e7520.js"),["Markdown.273e7520.js","ContentSlot.2a654c2d.js"],import.meta.url).then(e=>e.default||e)),ProseBlockquote:ne(()=>J(()=>import("./ProseBlockquote.4eddfa24.js"),[],import.meta.url).then(e=>e.default||e)),ProseCodeInline:ne(()=>J(()=>import("./ProseCodeInline.653dfd51.js"),[],import.meta.url).then(e=>e.default||e)),ProseEm:ne(()=>J(()=>import("./ProseEm.fcc3e08f.js"),[],import.meta.url).then(e=>e.default||e)),ProseH1:ne(()=>J(()=>import("./ProseH1.4206edd4.js"),[],import.meta.url).then(e=>e.default||e)),ProseH2:ne(()=>J(()=>import("./ProseH2.6e168f26.js"),[],import.meta.url).then(e=>e.default||e)),ProseH3:ne(()=>J(()=>import("./ProseH3.e750c3fc.js"),[],import.meta.url).then(e=>e.default||e)),ProseH4:ne(()=>J(()=>import("./ProseH4.9ba7c7c7.js"),[],import.meta.url).then(e=>e.default||e)),ProseH5:ne(()=>J(()=>import("./ProseH5.38d08c0e.js"),[],import.meta.url).then(e=>e.default||e)),ProseH6:ne(()=>J(()=>import("./ProseH6.9eecf9ec.js"),[],import.meta.url).then(e=>e.default||e)),ProseHr:ne(()=>J(()=>import("./ProseHr.084d3715.js"),[],import.meta.url).then(e=>e.default||e)),ProseImg:ne(()=>J(()=>import("./ProseImg.100f8c70.js"),[],import.meta.url).then(e=>e.default||e)),ProseLi:ne(()=>J(()=>import("./ProseLi.7b97d062.js"),[],import.meta.url).then(e=>e.default||e)),ProseOl:ne(()=>J(()=>import("./ProseOl.6038eab9.js"),[],import.meta.url).then(e=>e.default||e)),ProseP:ne(()=>J(()=>import("./ProseP.4bffa454.js"),[],import.meta.url).then(e=>e.default||e)),ProseStrong:ne(()=>J(()=>import("./ProseStrong.0550a54f.js"),[],import.meta.url).then(e=>e.default||e)),ProseTable:ne(()=>J(()=>import("./ProseTable.2942e3d1.js"),[],import.meta.url).then(e=>e.default||e)),ProseTbody:ne(()=>J(()=>import("./ProseTbody.dcbbf441.js"),[],import.meta.url).then(e=>e.default||e)),ProseTd:ne(()=>J(()=>import("./ProseTd.c34b65be.js"),[],import.meta.url).then(e=>e.default||e)),ProseTh:ne(()=>J(()=>import("./ProseTh.e56b19e7.js"),[],import.meta.url).then(e=>e.default||e)),ProseThead:ne(()=>J(()=>import("./ProseThead.24261552.js"),[],import.meta.url).then(e=>e.default||e)),ProseTr:ne(()=>J(()=>import("./ProseTr.e844d968.js"),[],import.meta.url).then(e=>e.default||e)),ProseUl:ne(()=>J(()=>import("./ProseUl.536bb57e.js"),[],import.meta.url).then(e=>e.default||e))},yp=Lt(e=>{for(const t in Gr)e.vueApp.component(t,Gr[t]),e.vueApp.component("Lazy"+t,Gr[t])});var al;const _p=typeof window<"u";_p&&((al=window==null?void 0:window.navigator)==null?void 0:al.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function vp(e){return typeof e=="function"?e():be(e)}var bp="usehead",ul="head:count",eo="data-head-attrs",fa="data-meta-body",cs=(e,t)=>e.map(n=>(n.input&&(t||!n.resolved)&&(n.input=wr(n.input)),n)),wp=(e,t)=>{const n=r=>{var o;if((o=r.options)!=null&&o.renderPriority)return r.options.renderPriority;switch(r.tag){case"base":return-1;case"meta":return r.props.charset?-2:r.props["http-equiv"]==="content-security-policy"?0:10;default:return 10}};return n(e)-n(t)},Ep=e=>{const{props:t,tag:n,options:r}=e;if(n==="base"||n==="title"||n==="titleTemplate")return n;if(n==="link"&&t.rel==="canonical")return"canonical";if(t.charset)return"charset";if(r!=null&&r.key)return`${n}:${r.key}`;const o=["id"];n==="meta"&&o.push("name","property","http-equiv");for(const s of o)if(typeof t[s]<"u")return`${n}:${s}:${t[s]}`;return e.runtime.position};function wr(e){const t=vp(e);return!e||!t?t:Array.isArray(t)?t.map(wr):typeof t=="object"?Object.fromEntries(Object.entries(t).map(([n,r])=>n==="titleTemplate"?[n,be(r)]:[n,wr(r)])):t}var Cp=(e,t,n)=>{var r;t={...t};const o={tag:e,props:{},runtime:{entryId:n.id},options:{...n.options}};return["hid","vmid","key"].forEach(s=>{t[s]&&(o.options.key=t[s],delete t[s])}),["children","innerHTML","textContent"].forEach(s=>{typeof t[s]<"u"&&(o.children=t[s],delete t[s])}),["body","renderPriority"].forEach(s=>{typeof t[s]<"u"&&(o.options[s]=t[s],delete t[s])}),(r=o.options)!=null&&r.body&&(t[fa]=!0),o.props=t,o},xp=e=>Object.entries(e.input).filter(([,t])=>typeof t<"u").map(([t,n])=>(Array.isArray(n)?n:[n]).map(r=>{switch(t){case"title":case"titleTemplate":return{tag:t,children:r,props:{},runtime:{entryId:e.id},options:e.options};case"base":case"meta":case"link":case"style":case"script":case"noscript":case"htmlAttrs":case"bodyAttrs":return Cp(t,r,e);default:return!1}})).flat().filter(t=>!!t),cl=(e,t)=>e==null?t||null:typeof e=="function"?e(t):e.replace("%s",t!=null?t:""),da=e=>{const t={};cs(e).forEach((l,i)=>{xp(l).forEach((u,c)=>{u.runtime=u.runtime||{},u.runtime.position=i*1e4+c,t[Ep(u)]=u})});let r=Object.values(t).sort((l,i)=>l.runtime.position-i.runtime.position).sort(wp);const o=r.findIndex(l=>l.tag==="titleTemplate"),s=r.findIndex(l=>l.tag==="title");if(s!==-1&&o!==-1){const l=cl(r[o].children,r[s].children);l!==null?r[s].children=l||r[s].children:r=r.filter((i,a)=>a!==s),r=r.filter((i,a)=>a!==o)}else if(o!==-1){const l=cl(r[o].children);l!==null?(r[o].children=l,r[o].tag="title"):r=r.filter((i,a)=>a!==o)}return r};function fl(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){const n=t.getAttribute("nonce");if(n&&!e.getAttribute("nonce")){const r=t.cloneNode(!0);return r.setAttribute("nonce",""),r.nonce=n,n===e.nonce&&e.isEqualNode(r)}}return e.isEqualNode(t)}var dl=(e,t)=>{const n=e.getAttribute(eo);if(n)for(const o of n.split(","))o in t||e.removeAttribute(o);const r=[];for(const o in t){const s=t[o];s!=null&&(s===!1?e.removeAttribute(o):e.setAttribute(o,s),r.push(o))}r.length?e.setAttribute(eo,r.join(",")):e.removeAttribute(eo)},Rp=(e,t)=>{var n;const r=t.createElement(e.tag);return Object.entries(e.props).forEach(([o,s])=>{s!==!1&&r.setAttribute(o,s===!0?"":String(s))}),e.children&&((n=e.options)!=null&&n.safe?e.tag!=="script"&&(r.textContent=e.children):r.innerHTML=e.children),r},Pp=(e=window.document,t,n)=>{var r,o;const s=e.head,l=e.body;let i=s.querySelector(`meta[name="${ul}"]`);const a=l.querySelectorAll(`[${fa}]`),u=i?Number(i.getAttribute("content")):0,c=[],f=[];if(a)for(let m=0;m{var C;var _;return{element:Rp(m,e),body:(C=(_=m.options)==null?void 0:_.body)!=null?C:!1}});p=p.filter(m=>{for(let _=0;_{var _;return(_=m.parentNode)==null?void 0:_.removeChild(m)}),c.forEach(m=>{var _;return(_=m.parentNode)==null?void 0:_.removeChild(m)}),p.forEach(m=>{m.body?l.insertAdjacentElement("beforeend",m.element):s.insertBefore(m.element,i)}),i.setAttribute("content",`${u-c.length+p.filter(m=>!m.body).length}`)},kp=async(e,t,n)=>{var r,o;const s={};n||(n=window.document);for(const u in e.hooks["before:dom"])if(await e.hooks["before:dom"][u]()===!1)return;const l=cs(e.headEntries);for(const u in e.hooks["resolved:entries"])await e.hooks["resolved:entries"][u](l);const i=da(l);for(const u in e.hooks["resolved:tags"])await e.hooks["resolved:tags"][u](i);for(const u of i)switch(u.tag){case"title":typeof u.children<"u"&&(n.title=u.children);break;case"base":case"meta":case"link":case"style":case"script":case"noscript":s[u.tag]=s[u.tag]||[],s[u.tag].push(u);break}dl(n.documentElement,((r=i.find(u=>u.tag==="htmlAttrs"))==null?void 0:r.props)||{}),dl(n.body,((o=i.find(u=>u.tag==="bodyAttrs"))==null?void 0:o.props)||{});const a=new Set([...Object.keys(s),...t]);for(const u of a)Pp(n,u,s[u]||[]);t.clear(),Object.keys(s).forEach(u=>t.add(u))},Sp=typeof window<"u",Ap=e=>{let t=[],n=0;const r=new Set;let o=null;const s={install(l){l.config.globalProperties&&(l.config.globalProperties.$head=s),l.provide(bp,s)},hooks:{"before:dom":[],"resolved:tags":[],"resolved:entries":[]},get headEntries(){return t},get headTags(){const l=cs(s.headEntries);return da(l)},addHeadObjs(l,i){return s.addEntry(l,i)},addEntry(l,i={}){let a=!1;i!=null&&i.resolved&&(a=!0,delete i.resolved);const u={id:n++,options:i,resolved:a,input:l};return t.push(u),{remove(){t=t.filter(c=>c.id!==u.id)},update(c){t=t.map(f=>(f.id===u.id&&(f.input=c),f))}}},async updateDOM(l,i){const a=()=>(o=null,kp(s,r,l));return i?a():o=o||new Promise(u=>wn(()=>u(a())))},addReactiveEntry(l,i={}){let a=null;const u=lc(()=>{const c=wr(l);a===null?a=s.addEntry(c,{...i,resolved:!0}):a.update(c),Sp&&s.updateDOM()});return()=>{u(),a&&a.remove()}}};return e&&s.addEntry(e),s};const Tp={meta:[{name:"viewport",content:"width=device-width, initial-scale=1"},{charset:"utf-8"}],link:[],style:[],script:[],noscript:[]},Op={name:"layout",mode:"out-in"},Lp={name:"page",mode:"out-in"},Mp=!1,Dp=Lt(e=>{const t=Ap();t.addEntry(Tp,{resolved:!0}),e.vueApp.use(t);{let n=!0;t.hooks["before:dom"].push(()=>!n),e.hooks.hookOnce("app:mounted",()=>{n=!1,t.updateDOM(),Wt().beforeEach(()=>{n=!0}),Wt().afterEach(()=>{n&&(n=!1,t.updateDOM())})})}e._useHead=(n,r)=>{const o=t.addReactiveEntry(n,r);!yt()||En(()=>{o(),t.updateDOM()})}}),Ip={created(){const e=yt();if(!e)return;const t=e.type;if(!t||!("head"in t))return;const n=Ce(),r=typeof t.head=="function"?()=>t.head(n):t.head;ca(r)}},$p=Lt(e=>{e.vueApp.mixin(Ip)});/*! + * vue-router v4.1.5 + * (c) 2022 Eduardo San Martin Morote + * @license MIT + */const Gt=typeof window<"u";function Bp(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ie=Object.assign;function to(e,t){const n={};for(const r in t){const o=t[r];n[r]=tt(o)?o.map(e):e(o)}return n}const Bn=()=>{},tt=Array.isArray,Hp=/\/$/,Np=e=>e.replace(Hp,"");function no(e,t,n="/"){let r,o={},s="",l="";const i=t.indexOf("#");let a=t.indexOf("?");return i=0&&(a=-1),a>-1&&(r=t.slice(0,a),s=t.slice(a+1,i>-1?i:t.length),o=e(s)),i>-1&&(r=r||t.slice(0,i),l=t.slice(i,t.length)),r=qp(r!=null?r:t,n),{fullPath:r+(s&&"?")+s+l,path:r,query:o,hash:l}}function jp(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function pl(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Fp(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&mn(t.matched[r],n.matched[o])&&pa(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function mn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function pa(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Up(e[n],t[n]))return!1;return!0}function Up(e,t){return tt(e)?hl(e,t):tt(t)?hl(t,e):e===t}function hl(e,t){return tt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function qp(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/");let o=n.length-1,s,l;for(s=0;s1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(s-(s===r.length?1:0)).join("/")}var zn;(function(e){e.pop="pop",e.push="push"})(zn||(zn={}));var Hn;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Hn||(Hn={}));function Kp(e){if(!e)if(Gt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Np(e)}const zp=/^[^#]+#/;function Vp(e,t){return e.replace(zp,"#")+t}function Wp(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Nr=()=>({left:window.pageXOffset,top:window.pageYOffset});function Yp(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=Wp(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function ml(e,t){return(history.state?history.state.position-t:-1)+e}const To=new Map;function Qp(e,t){To.set(e,t)}function Jp(e){const t=To.get(e);return To.delete(e),t}let Xp=()=>location.protocol+"//"+location.host;function ha(e,t){const{pathname:n,search:r,hash:o}=t,s=e.indexOf("#");if(s>-1){let i=o.includes(e.slice(s))?e.slice(s).length:1,a=o.slice(i);return a[0]!=="/"&&(a="/"+a),pl(a,"")}return pl(n,e)+r+o}function Zp(e,t,n,r){let o=[],s=[],l=null;const i=({state:p})=>{const m=ha(e,location),_=n.value,C=t.value;let R=0;if(p){if(n.value=m,t.value=p,l&&l===_){l=null;return}R=C?p.position-C.position:0}else r(m);o.forEach(y=>{y(n.value,_,{delta:R,type:zn.pop,direction:R?R>0?Hn.forward:Hn.back:Hn.unknown})})};function a(){l=n.value}function u(p){o.push(p);const m=()=>{const _=o.indexOf(p);_>-1&&o.splice(_,1)};return s.push(m),m}function c(){const{history:p}=window;!p.state||p.replaceState(ie({},p.state,{scroll:Nr()}),"")}function f(){for(const p of s)p();s=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",c),{pauseListeners:a,listen:u,destroy:f}}function gl(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?Nr():null}}function Gp(e){const{history:t,location:n}=window,r={value:ha(e,n)},o={value:t.state};o.value||s(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(a,u,c){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+a:Xp()+e+a;try{t[c?"replaceState":"pushState"](u,"",p),o.value=u}catch(m){console.error(m),n[c?"replace":"assign"](p)}}function l(a,u){const c=ie({},t.state,gl(o.value.back,a,o.value.forward,!0),u,{position:o.value.position});s(a,c,!0),r.value=a}function i(a,u){const c=ie({},o.value,t.state,{forward:a,scroll:Nr()});s(c.current,c,!0);const f=ie({},gl(r.value,a,null),{position:c.position+1},u);s(a,f,!1),r.value=a}return{location:r,state:o,push:i,replace:l}}function ma(e){e=Kp(e);const t=Gp(e),n=Zp(e,t.state,t.location,t.replace);function r(s,l=!0){l||n.pauseListeners(),history.go(s)}const o=ie({location:"",base:e,go:r,createHref:Vp.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function eh(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),ma(e)}function th(e){return typeof e=="string"||e&&typeof e=="object"}function ga(e){return typeof e=="string"||typeof e=="symbol"}const Et={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},ya=Symbol("");var yl;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(yl||(yl={}));function gn(e,t){return ie(new Error,{type:e,[ya]:!0},t)}function at(e,t){return e instanceof Error&&ya in e&&(t==null||!!(e.type&t))}const _l="[^/]+?",nh={sensitive:!1,strict:!1,start:!0,end:!0},rh=/[.+*?^${}()[\]/\\]/g;function oh(e,t){const n=ie({},nh,t),r=[];let o=n.start?"^":"";const s=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(o+="/");for(let f=0;ft.length?t.length===1&&t[0]===40+40?1:-1:0}function lh(e,t){let n=0;const r=e.score,o=t.score;for(;n0&&t[t.length-1]<0}const ih={type:0,value:""},ah=/[a-zA-Z0-9_]/;function uh(e){if(!e)return[[]];if(e==="/")return[[ih]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${u}": ${m}`)}let n=0,r=n;const o=[];let s;function l(){s&&o.push(s),s=[]}let i=0,a,u="",c="";function f(){!u||(n===0?s.push({type:0,value:u}):n===1||n===2||n===3?(s.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:c,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=a}for(;i{l(h)}:Bn}function l(c){if(ga(c)){const f=r.get(c);f&&(r.delete(c),n.splice(n.indexOf(f),1),f.children.forEach(l),f.alias.forEach(l))}else{const f=n.indexOf(c);f>-1&&(n.splice(f,1),c.record.name&&r.delete(c.record.name),c.children.forEach(l),c.alias.forEach(l))}}function i(){return n}function a(c){let f=0;for(;f=0&&(c.record.path!==n[f].record.path||!_a(c,n[f]));)f++;n.splice(f,0,c),c.record.name&&!wl(c)&&r.set(c.record.name,c)}function u(c,f){let p,m={},_,C;if("name"in c&&c.name){if(p=r.get(c.name),!p)throw gn(1,{location:c});C=p.record.name,m=ie(bl(f.params,p.keys.filter(h=>!h.optional).map(h=>h.name)),c.params&&bl(c.params,p.keys.map(h=>h.name))),_=p.stringify(m)}else if("path"in c)_=c.path,p=n.find(h=>h.re.test(_)),p&&(m=p.parse(_),C=p.record.name);else{if(p=f.name?r.get(f.name):n.find(h=>h.re.test(f.path)),!p)throw gn(1,{location:c,currentLocation:f});C=p.record.name,m=ie({},f.params,c.params),_=p.stringify(m)}const R=[];let y=p;for(;y;)R.unshift(y.record),y=y.parent;return{name:C,path:_,params:m,matched:R,meta:hh(R)}}return e.forEach(c=>s(c)),{addRoute:s,resolve:u,removeRoute:l,getRoutes:i,getRecordMatcher:o}}function bl(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function dh(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:ph(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function ph(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="boolean"?n:n[r];return t}function wl(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function hh(e){return e.reduce((t,n)=>ie(t,n.meta),{})}function El(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function _a(e,t){return t.children.some(n=>n===e||_a(e,n))}const va=/#/g,mh=/&/g,gh=/\//g,yh=/=/g,_h=/\?/g,ba=/\+/g,vh=/%5B/g,bh=/%5D/g,wa=/%5E/g,wh=/%60/g,Ea=/%7B/g,Eh=/%7C/g,Ca=/%7D/g,Ch=/%20/g;function fs(e){return encodeURI(""+e).replace(Eh,"|").replace(vh,"[").replace(bh,"]")}function xh(e){return fs(e).replace(Ea,"{").replace(Ca,"}").replace(wa,"^")}function Oo(e){return fs(e).replace(ba,"%2B").replace(Ch,"+").replace(va,"%23").replace(mh,"%26").replace(wh,"`").replace(Ea,"{").replace(Ca,"}").replace(wa,"^")}function Rh(e){return Oo(e).replace(yh,"%3D")}function Ph(e){return fs(e).replace(va,"%23").replace(_h,"%3F")}function kh(e){return e==null?"":Ph(e).replace(gh,"%2F")}function Er(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Sh(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;os&&Oo(s)):[r&&Oo(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function Ah(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=tt(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const Th=Symbol(""),xl=Symbol(""),ds=Symbol(""),ps=Symbol(""),Lo=Symbol("");function Sn(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function Rt(e,t,n,r,o){const s=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((l,i)=>{const a=f=>{f===!1?i(gn(4,{from:n,to:t})):f instanceof Error?i(f):th(f)?i(gn(2,{from:t,to:f})):(s&&r.enterCallbacks[o]===s&&typeof f=="function"&&s.push(f),l())},u=e.call(r&&r.instances[o],t,n,a);let c=Promise.resolve(u);e.length<3&&(c=c.then(a)),c.catch(f=>i(f))})}function ro(e,t,n,r){const o=[];for(const s of e)for(const l in s.components){let i=s.components[l];if(!(t!=="beforeRouteEnter"&&!s.instances[l]))if(Oh(i)){const u=(i.__vccOpts||i)[t];u&&o.push(Rt(u,n,r,s,l))}else{let a=i();o.push(()=>a.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${l}" at "${s.path}"`));const c=Bp(u)?u.default:u;s.components[l]=c;const p=(c.__vccOpts||c)[t];return p&&Rt(p,n,r,s,l)()}))}}return o}function Oh(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Rl(e){const t=Ge(ds),n=Ge(ps),r=xe(()=>t.resolve(be(e.to))),o=xe(()=>{const{matched:a}=r.value,{length:u}=a,c=a[u-1],f=n.matched;if(!c||!f.length)return-1;const p=f.findIndex(mn.bind(null,c));if(p>-1)return p;const m=Pl(a[u-2]);return u>1&&Pl(c)===m&&f[f.length-1].path!==m?f.findIndex(mn.bind(null,a[u-2])):p}),s=xe(()=>o.value>-1&&Ih(n.params,r.value.params)),l=xe(()=>o.value>-1&&o.value===n.matched.length-1&&pa(n.params,r.value.params));function i(a={}){return Dh(a)?t[be(e.replace)?"replace":"push"](be(e.to)).catch(Bn):Promise.resolve()}return{route:r,href:xe(()=>r.value.href),isActive:s,isExactActive:l,navigate:i}}const Lh=Le({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Rl,setup(e,{slots:t}){const n=et(Rl(e)),{options:r}=Ge(ds),o=xe(()=>({[kl(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[kl(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&t.default(n);return e.custom?s:ye("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},s)}}}),Mh=Lh;function Dh(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Ih(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!tt(o)||o.length!==r.length||r.some((s,l)=>s!==o[l]))return!1}return!0}function Pl(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const kl=(e,t,n)=>e!=null?e:t!=null?t:n,$h=Le({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Ge(Lo),o=xe(()=>e.route||r.value),s=Ge(xl,0),l=xe(()=>{let u=be(s);const{matched:c}=o.value;let f;for(;(f=c[u])&&!f.components;)u++;return u}),i=xe(()=>o.value.matched[l.value]);ln(xl,xe(()=>l.value+1)),ln(Th,i),ln(Lo,o);const a=ze();return je(()=>[a.value,i.value,e.name],([u,c,f],[p,m,_])=>{c&&(c.instances[f]=u,m&&m!==c&&u&&u===p&&(c.leaveGuards.size||(c.leaveGuards=m.leaveGuards),c.updateGuards.size||(c.updateGuards=m.updateGuards))),u&&c&&(!m||!mn(c,m)||!p)&&(c.enterCallbacks[f]||[]).forEach(C=>C(u))},{flush:"post"}),()=>{const u=o.value,c=e.name,f=i.value,p=f&&f.components[c];if(!p)return Sl(n.default,{Component:p,route:u});const m=f.props[c],_=m?m===!0?u.params:typeof m=="function"?m(u):m:null,R=ye(p,ie({},_,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(f.instances[c]=null)},ref:a}));return Sl(n.default,{Component:R,route:u})||R}}});function Sl(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const xa=$h;function Bh(e){const t=fh(e.routes,e),n=e.parseQuery||Sh,r=e.stringifyQuery||Cl,o=e.history,s=Sn(),l=Sn(),i=Sn(),a=fo(Et);let u=Et;Gt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=to.bind(null,x=>""+x),f=to.bind(null,kh),p=to.bind(null,Er);function m(x,N){let $,K;return ga(x)?($=t.getRecordMatcher(x),K=N):K=x,t.addRoute(K,$)}function _(x){const N=t.getRecordMatcher(x);N&&t.removeRoute(N)}function C(){return t.getRoutes().map(x=>x.record)}function R(x){return!!t.getRecordMatcher(x)}function y(x,N){if(N=ie({},N||a.value),typeof x=="string"){const d=no(n,x,N.path),g=t.resolve({path:d.path},N),b=o.createHref(d.fullPath);return ie(d,g,{params:p(g.params),hash:Er(d.hash),redirectedFrom:void 0,href:b})}let $;if("path"in x)$=ie({},x,{path:no(n,x.path,N.path).path});else{const d=ie({},x.params);for(const g in d)d[g]==null&&delete d[g];$=ie({},x,{params:f(x.params)}),N.params=f(N.params)}const K=t.resolve($,N),se=x.hash||"";K.params=c(p(K.params));const ge=jp(r,ie({},x,{hash:xh(se),path:K.path})),ee=o.createHref(ge);return ie({fullPath:ge,hash:se,query:r===Cl?Ah(x.query):x.query||{}},K,{redirectedFrom:void 0,href:ee})}function h(x){return typeof x=="string"?no(n,x,a.value.path):ie({},x)}function v(x,N){if(u!==x)return gn(8,{from:N,to:x})}function w(x){return I(x)}function T(x){return w(ie(h(x),{replace:!0}))}function O(x){const N=x.matched[x.matched.length-1];if(N&&N.redirect){const{redirect:$}=N;let K=typeof $=="function"?$(x):$;return typeof K=="string"&&(K=K.includes("?")||K.includes("#")?K=h(K):{path:K},K.params={}),ie({query:x.query,hash:x.hash,params:"path"in K?{}:x.params},K)}}function I(x,N){const $=u=y(x),K=a.value,se=x.state,ge=x.force,ee=x.replace===!0,d=O($);if(d)return I(ie(h(d),{state:typeof d=="object"?ie({},se,d.state):se,force:ge,replace:ee}),N||$);const g=$;g.redirectedFrom=N;let b;return!ge&&Fp(r,K,$)&&(b=gn(16,{to:g,from:K}),Mt(K,K,!0,!1)),(b?Promise.resolve(b):U(g,K)).catch(E=>at(E)?at(E,2)?E:Ye(E):ce(E,g,K)).then(E=>{if(E){if(at(E,2))return I(ie({replace:ee},h(E.to),{state:typeof E.to=="object"?ie({},se,E.to.state):se,force:ge}),N||g)}else E=W(g,K,!0,ee,se);return F(g,K,E),E})}function k(x,N){const $=v(x,N);return $?Promise.reject($):Promise.resolve()}function U(x,N){let $;const[K,se,ge]=Hh(x,N);$=ro(K.reverse(),"beforeRouteLeave",x,N);for(const d of K)d.leaveGuards.forEach(g=>{$.push(Rt(g,x,N))});const ee=k.bind(null,x,N);return $.push(ee),Xt($).then(()=>{$=[];for(const d of s.list())$.push(Rt(d,x,N));return $.push(ee),Xt($)}).then(()=>{$=ro(se,"beforeRouteUpdate",x,N);for(const d of se)d.updateGuards.forEach(g=>{$.push(Rt(g,x,N))});return $.push(ee),Xt($)}).then(()=>{$=[];for(const d of x.matched)if(d.beforeEnter&&!N.matched.includes(d))if(tt(d.beforeEnter))for(const g of d.beforeEnter)$.push(Rt(g,x,N));else $.push(Rt(d.beforeEnter,x,N));return $.push(ee),Xt($)}).then(()=>(x.matched.forEach(d=>d.enterCallbacks={}),$=ro(ge,"beforeRouteEnter",x,N),$.push(ee),Xt($))).then(()=>{$=[];for(const d of l.list())$.push(Rt(d,x,N));return $.push(ee),Xt($)}).catch(d=>at(d,8)?d:Promise.reject(d))}function F(x,N,$){for(const K of i.list())K(x,N,$)}function W(x,N,$,K,se){const ge=v(x,N);if(ge)return ge;const ee=N===Et,d=Gt?history.state:{};$&&(K||ee?o.replace(x.fullPath,ie({scroll:ee&&d&&d.scroll},se)):o.push(x.fullPath,se)),a.value=x,Mt(x,N,$,ee),Ye()}let H;function Z(){H||(H=o.listen((x,N,$)=>{if(!Xn.listening)return;const K=y(x),se=O(K);if(se){I(ie(se,{replace:!0}),K).catch(Bn);return}u=K;const ge=a.value;Gt&&Qp(ml(ge.fullPath,$.delta),Nr()),U(K,ge).catch(ee=>at(ee,12)?ee:at(ee,2)?(I(ee.to,K).then(d=>{at(d,20)&&!$.delta&&$.type===zn.pop&&o.go(-1,!1)}).catch(Bn),Promise.reject()):($.delta&&o.go(-$.delta,!1),ce(ee,K,ge))).then(ee=>{ee=ee||W(K,ge,!1),ee&&($.delta&&!at(ee,8)?o.go(-$.delta,!1):$.type===zn.pop&&at(ee,20)&&o.go(-1,!1)),F(K,ge,ee)}).catch(Bn)}))}let j=Sn(),Ae=Sn(),oe;function ce(x,N,$){Ye(x);const K=Ae.list();return K.length?K.forEach(se=>se(x,N,$)):console.error(x),Promise.reject(x)}function ae(){return oe&&a.value!==Et?Promise.resolve():new Promise((x,N)=>{j.add([x,N])})}function Ye(x){return oe||(oe=!x,Z(),j.list().forEach(([N,$])=>x?$(x):N()),j.reset()),x}function Mt(x,N,$,K){const{scrollBehavior:se}=e;if(!Gt||!se)return Promise.resolve();const ge=!$&&Jp(ml(x.fullPath,0))||(K||!$)&&history.state&&history.state.scroll||null;return wn().then(()=>se(x,N,ge)).then(ee=>ee&&Yp(ee)).catch(ee=>ce(ee,x,N))}const Qe=x=>o.go(x);let $e;const Qt=new Set,Xn={currentRoute:a,listening:!0,addRoute:m,removeRoute:_,hasRoute:R,getRoutes:C,resolve:y,options:e,push:w,replace:T,go:Qe,back:()=>Qe(-1),forward:()=>Qe(1),beforeEach:s.add,beforeResolve:l.add,afterEach:i.add,onError:Ae.add,isReady:ae,install(x){const N=this;x.component("RouterLink",Mh),x.component("RouterView",xa),x.config.globalProperties.$router=N,Object.defineProperty(x.config.globalProperties,"$route",{enumerable:!0,get:()=>be(a)}),Gt&&!$e&&a.value===Et&&($e=!0,w(o.location).catch(se=>{}));const $={};for(const se in Et)$[se]=xe(()=>a.value[se]);x.provide(ds,N),x.provide(ps,et($)),x.provide(Lo,a);const K=x.unmount;Qt.add(x),x.unmount=function(){Qt.delete(x),Qt.size<1&&(u=Et,H&&H(),H=null,a.value=Et,$e=!1,oe=!1),K()}}};return Xn}function Xt(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function Hh(e,t){const n=[],r=[],o=[],s=Math.max(t.matched.length,e.matched.length);for(let l=0;lmn(u,i))?r.push(i):n.push(i));const a=e.matched[l];a&&(t.matched.find(u=>mn(u,a))||o.push(a))}return[n,r,o]}function Nh(){return Ge(ps)}const jh=/[0-9]/;function Fh(e=""){return jh.test(e)?null:e.toUpperCase()===e}const Uh=["-","_","/","."];function qh(e,t=Uh){const n=[];if(!e||typeof e!="string")return n;let r="",o=null,s=null;for(const l of e.split("")){const i=t.includes(l);if(i===!0){n.push(r),r="",o=null;continue}const a=Fh(l);if(s===!1){if(o===!1&&a===!0){n.push(r),r=l,o=a;continue}if(o===!0&&a===!1&&r.length>1){const u=r[r.length-1];n.push(r.substr(0,r.length-1)),r=u+l,o=a;continue}}r+=l,o=a,s=i}return n.push(r),n}function Kh(e){return e?e[0].toUpperCase()+e.substring(1):""}function zh(e=""){return(Array.isArray(e)?e:qh(e)).map(t=>Kh(t)).join("")}class Jn{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Jn.prototype.property={};Jn.prototype.normal={};Jn.prototype.space=null;function Ra(e,t){const n={},r={};let o=-1;for(;++o4&&n.slice(0,4)==="data"&&Jh.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Tl,em);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Tl.test(s)){let l=s.replace(Xh,Gh);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=hs}return new o(r,t)}function Gh(e){return"-"+e.toLowerCase()}function em(e){return e.charAt(1).toUpperCase()}const tm=Ra([Sa,ka,Oa,La,Yh],"html");Ra([Sa,ka,Oa,La,Qh],"svg");var Vg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ma={exports:{}};const rm=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];(function(e){e.exports=rm})(Ma);const Da=nm(Ma.exports),Nn="default",Ia=/^@|^v-on:/,$a=/^:|^v-bind:/,Ba=/^v-model/,om=["select","textarea","input"],Ha=Le({name:"ContentRendererMarkdown",props:{value:{type:Object,required:!0},excerpt:{type:Boolean,default:!1},tag:{type:String,default:"div"},components:{type:Object,default:()=>({})}},async setup(e){var n;const{content:{tags:t={}}}=Cn().public;return await hm(e.value.body,{tags:{...t,...((n=e.value)==null?void 0:n._components)||{},...e.components}}),{tags:t}},render(e){var u;const{tags:t,tag:n,value:r,components:o}=e;if(!r)return null;let s=r.body||r;e.excerpt&&r.excerpt&&(s=r.excerpt);const l={...r,tags:{...t,...(r==null?void 0:r._components)||{},...o}};let i=l.component||n;typeof l.component=="object"&&(i=l.component.name),i=Na(i);const a=(s.children||[]).map(c=>ar(c,ye,l));return ye(i,{...(u=l.component)==null?void 0:u.props,...this.$attrs},{default:Fa(a)})}});function ar(e,t,n,r={}){var a;if(e.type==="text")return t(ht,e.value);const o=e.tag,s=typeof((a=e.props)==null?void 0:a.__ignoreMap)>"u"&&n.tags[o]||o;if(e.tag==="binding")return sm(e,t,n,r);const l=Na(s);typeof l=="object"&&(l.tag=o);const i=im(e,n);return t(l,i,lm(e,t,n,{...r,...i}))}function sm(e,t,n,r={}){var a;const o={...r,$route:()=>xn(),$document:n,$doc:n},s=/\.|\[(\d+)\]/,i=((a=e.props)==null?void 0:a.value.trim().split(s).filter(Boolean)).reduce((u,c)=>c in u?typeof u[c]=="function"?u[c]():u[c]:{},o);return t(ht,i)}function lm(e,t,n,r){const s=(e.children||[]).reduce((i,a)=>{if(!Ua(a))return i[Nn].push(ar(a,t,n,r)),i;if(dm(a))return i[Nn].push(...(a.children||[]).map(c=>ar(c,t,n,r))),i;const u=ja(a);return i[u]=(a.children||[]).map(c=>ar(c,t,n,r)),i},{[Nn]:[]}),l=Object.entries(s).map(([i,a])=>[i,Fa(a)]);return Object.fromEntries(l)}function im(e,t){const{tag:n="",props:r={}}=e;return Object.keys(r).reduce(function(o,s){if(s==="__ignoreMap")return o;const l=r[s];if(Ba.test(s)&&!om.includes(n))return am(s,l,o,t);if(s==="v-bind")return um(s,l,o,t);if(Ia.test(s))return cm(s,l,o,t);if($a.test(s))return fm(s,l,o,t);const{attribute:i}=Zh(tm,s);return Array.isArray(l)&&l.every(a=>typeof a=="string")?(o[i]=l.join(" "),o):(o[i]=l,o)},{})}function am(e,t,n,r){const o=f=>+f,s=f=>f.trim(),l=f=>f,i=e.replace(Ba,"").split(".").filter(f=>f).reduce((f,p)=>(f[p]=!0,f),{}),a="value",u=i.lazy?"change":"input",c=i.number?o:i.trim?s:l;return n[a]=jr(t,r),n.on=n.on||{},n.on[u]=f=>r[t]=c(f),n}function um(e,t,n,r){const o=jr(t,r);return n=Object.assign(n,o),n}function cm(e,t,n,r){return e=e.replace(Ia,""),n.on=n.on||{},n.on[e]=()=>jr(t,r),n}function fm(e,t,n,r){return e=e.replace($a,""),n[e]=jr(t,r),n}const Na=e=>{if(!Da.includes(e)){const t=Lr(zh(e),!1);if(typeof t=="object")return t}return e};function jr(e,t){const n=e.split(".").reduce((r,o)=>typeof r=="object"?r[o]:void 0,t);return typeof n>"u"?as(e):n}function ja(e){let t="";for(const n of Object.keys(e.props||{}))if(!(!n.startsWith("#")&&!n.startsWith("v-slot:"))){t=n.split(/[:#]/,2)[1];break}return t||Nn}function Fa(e){return e.length?()=>pm(e):void 0}function dm(e){return Ua(e)&&ja(e)===Nn}function Ua(e){return e.tag==="template"}function pm(e){const t=[];for(const n of e){const r=t[t.length-1];n.type===ht&&(r==null?void 0:r.type)===ht?r.children=r.children+n.children:t.push(n)}return t}async function hm(e,t){const n=Array.from(new Set(r(e,t)));await Promise.all(n.map(async o=>{const s=Lr(o);(s==null?void 0:s.__asyncLoader)&&!s.__asyncResolved&&await s.__asyncLoader()}));function r(o,s){var a;if(o.type==="text"||o.tag==="binding")return[];const l=typeof((a=o.props)==null?void 0:a.__ignoreMap)>"u"&&s.tags[o.tag]||o.tag,i=[];o.type!=="root"&&!Da.includes(l)&&i.push(l);for(const u of o.children||[])i.push(...r(u,s));return i}}const mm=Object.freeze(Object.defineProperty({__proto__:null,default:Ha},Symbol.toStringTag,{value:"Module"})),qa=Le({name:"ContentRenderer",props:{value:{type:Object,required:!1,default:()=>({})},excerpt:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(e){je(()=>e.excerpt,t=>{var n,r,o;t&&!((n=e.value)!=null&&n.excerpt)&&(console.warn(`No excerpt found for document content/${(r=e==null?void 0:e.value)==null?void 0:r._path}.${(o=e==null?void 0:e.value)==null?void 0:o._extension}!`),console.warn("Make sure to use in your content if you want to use excerpt feature."))},{immediate:!0})},render(e){var s,l;const t=is(),{value:n,excerpt:r,tag:o}=e;return!n&&(t==null?void 0:t.empty)?t.empty({value:n,excerpt:r,tag:o,...this.$attrs}):t!=null&&t.default?t.default({value:n,excerpt:r,tag:o,...this.$attrs}):n&&(n==null?void 0:n._type)==="markdown"&&((l=(s=n==null?void 0:n.body)==null?void 0:s.children)==null?void 0:l.length)?ye(Ha,{value:n,excerpt:r,tag:o,...this.$attrs}):ye("pre",null,JSON.stringify({message:"You should use slots with ",value:n,excerpt:r,tag:o},null,2))}}),gm=Object.freeze(Object.defineProperty({__proto__:null,default:qa},Symbol.toStringTag,{value:"Module"}));function ym(e){return JSON.stringify(e,_m)}function _m(e,t){return t instanceof RegExp?`--REGEX ${t.toString()}`:t}const vm=["p","h1","h2","h3","h4","h5","h6","li"];function Io(e,t){return e.type===t||typeof e.type=="object"&&e.type.tag===t||e.tag===t}function Ka(e){return Io(e,"text")||typeof e.children=="string"}function za(e){return Array.isArray(e.children)||typeof e.children=="string"?e.children:typeof e.children.default=="function"?e.children.default():[]}function $o(e){if(!e)return"";if(Array.isArray(e))return e.map($o).join("");if(Ka(e))return e.children||e.value;const t=za(e);return Array.isArray(t)?t.map($o).join(""):""}function ms(e,t=["p"]){if(Array.isArray(e))return e.flatMap(r=>ms(r,t));let n=e;return t.some(r=>r==="*"||Io(e,r))&&(n=za(e)||e,!Array.isArray(n)&&vm.some(r=>Io(e,r))&&(n=[n])),n}function Va(e,t=["p"]){return e=Array.isArray(e)?e:[e],t.length?e.flatMap(n=>Va(ms(n,[t[0]]),t.slice(1))).filter(n=>!(Ka(n)&&$o(n).trim()==="")):e}const bm=e=>Qi(e,"/api/"+Cn().public.content.base),Wg=()=>({unwrap:ms,flatUnwrap:Va}),Yg=()=>{throw console.warn("useContent is only accessible when you are using `documentDriven` mode."),console.warn("Learn more by visiting: https://content.nuxtjs.org/guide/writing/document-driven"),new Error("useContent is only accessible when you are using `documentDriven` mode.")},wm=()=>{var t;const{clientDB:e}=Cn().content;return!!(e!=null&&e.isSPA||((t=xn().query)==null?void 0:t.preview)||la("previewToken").value)},Em="_list_1w161_1",Qg={list:Em},Wa=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Ol=(e,t=xn())=>{const n=be(e);je(()=>be(e),(o=n)=>{if(!t.path||!o)return;const s=Object.assign({},(o==null?void 0:o.head)||{}),l=s.title||(o==null?void 0:o.title);l&&(s.title=l),s.meta=[...s.meta||[]];const i=(s==null?void 0:s.description)||(o==null?void 0:o.description);i&&s.meta.filter(u=>u.name==="description").length===0&&s.meta.push({name:"description",content:i});const a=(s==null?void 0:s.image)||(o==null?void 0:o.image);if(a&&s.meta.filter(u=>u.property==="og:image").length===0&&(typeof a=="string"&&s.meta.push({property:"og:image",content:a}),typeof a=="object")){const u=["src","secure_url","type","width","height","alt"];for(const c of u)c==="src"&&a.src?s.meta.push({property:"og:image",content:a[c]}):a[c]&&s.meta.push({property:`og:image:${c}`,content:a[c]})}wn(()=>ca(s))},{immediate:!0})},Ll=(e,t)=>t.split(".").reduce((n,r)=>n&&n[r],e),Ya=(e,t)=>Object.keys(e).filter(t).reduce((n,r)=>Object.assign(n,{[r]:e[r]}),{}),Jg=e=>t=>Array.isArray(t)?t.map(n=>e(n)):e(t),Qa=e=>{const t=[],n=[];for(const r of e)["$","_"].includes(r)?t.push(r):n.push(r);return{prefixes:t,properties:n}},Xg=(e=[])=>t=>{if(e.length===0||!t)return t;const{prefixes:n,properties:r}=Qa(e);return Ya(t,o=>!r.includes(o)&&!n.includes(o[0]))},Zg=(e=[])=>t=>{if(e.length===0||!t)return t;const{prefixes:n,properties:r}=Qa(e);return Ya(t,o=>r.includes(o)||n.includes(o[0]))},Gg=(e,t)=>{const n=new Intl.Collator(t.$locale,{numeric:t.$numeric,caseFirst:t.$caseFirst,sensitivity:t.$sensitivity}),r=Object.keys(t).filter(o=>!o.startsWith("$"));for(const o of r)e=e.sort((s,l)=>{const i=[Ll(s,o),Ll(l,o)].map(a=>{if(a!==null)return a instanceof Date?a.toISOString():a});return t[o]===-1&&i.reverse(),n.compare(i[0],i[1])});return e},ey=(e,t="Expected an array")=>{if(!Array.isArray(e))throw new TypeError(t)},Zt=e=>Array.isArray(e)?e:e?[e]:[],Cm=["sort","where","only","without"],Ml=(e,t)=>{const n={...t};for(const s of Cm)n[s]&&(n[s]=Zt(n[s]));const r=(s,l=i=>i)=>(...i)=>(n[s]=l(...i),o),o={params:()=>n,only:r("only",Zt),without:r("without",Zt),where:r("where",s=>[...Zt(n.where),s]),sort:r("sort",s=>[...Zt(n.sort),...Zt(s)]),limit:r("limit",s=>parseInt(String(s),10)),skip:r("skip",s=>parseInt(String(s),10)),find:()=>e(o),findOne:()=>(n.first=!0,e(o)),findSurround:(s,l)=>(n.surround={query:s,...l},e(o)),locale:s=>o.where({_locale:s})};return o},Dl=e=>async t=>{var s;e&&(t.params().first&&(t.params().where||[]).length===0?t.where({_path:us(e)}):t.where({_path:new RegExp(`^${e.replace(/[-[\]{}()*+.,^$\s/]/g,"\\$&")}`)})),(s=t.params().sort)!=null&&s.length||t.sort({_file:1,$numeric:!0});const n=t.params(),r=bm(`/query/${sa(n)}.json`);if(wm())return(await J(()=>import("./client-db.2d7ab389.js"),[],import.meta.url).then(i=>i.useContentDatabase())).fetch(t);const o=await $fetch(r,{method:"GET",responseType:"json",params:{_params:ym(n),previewToken:la("previewToken").value}});if(typeof o=="string"&&o.startsWith(""))throw new Error("Not found");return o};function Il(e,...t){return typeof e=="string"?Ml(Dl(Qf(Qn(e,...t)))):Ml(Dl(),e)}const Ja=Le({name:"ContentQuery",props:{path:{type:String,required:!1,default:void 0},only:{type:Array,required:!1,default:void 0},without:{type:Array,required:!1,default:void 0},where:{type:Object,required:!1,default:void 0},sort:{type:Object,required:!1,default:void 0},limit:{type:Number,required:!1,default:void 0},skip:{type:Number,required:!1,default:void 0},locale:{type:String,required:!1,default:void 0},find:{type:String,required:!1,default:void 0}},async setup(e){const{path:t,only:n,without:r,where:o,sort:s,limit:l,skip:i,locale:a,find:u}=ii(e),c=xe(()=>{var m;return(m=t.value)==null?void 0:m.includes("/_")}),{data:f,refresh:p}=await Sd(`content-query-${sa(e)}`,()=>{let m;return t.value?m=Il(t.value):m=Il(),n.value&&(m=m.only(n.value)),r.value&&(m=m.without(r.value)),o.value&&(m=m.where(o.value)),s.value&&(m=m.sort(s.value)),l.value&&(m=m.limit(l.value)),i.value&&(m=m.skip(i.value)),a.value&&(m=m.where({_locale:a.value})),u.value==="one"?m.findOne():u.value==="surround"?t.value?m.findSurround(t):(console.warn("[Content] Surround queries requires `path` prop to be set."),console.warn("[Content] Query without `path` will return regular `find()` results."),m.find()):m.find()});return{isPartial:c,data:f,refresh:p}},render(e){var R;const t=is(),{data:n,refresh:r,isPartial:o,path:s,only:l,without:i,where:a,sort:u,limit:c,skip:f,locale:p,find:m}=e,_={path:s,only:l,without:i,where:a,sort:u,limit:c,skip:f,locale:p,find:m};if(_.find==="one"){if(!n&&(t==null?void 0:t["not-found"]))return t["not-found"]({props:_,...this.$attrs});if((n==null?void 0:n._type)==="markdown"&&!((R=n==null?void 0:n.body)!=null&&R.children.length))return t.empty({props:_,...this.$attrs})}else if((!n||!n.length)&&t!=null&&t["not-found"])return t["not-found"]({props:_,...this.$attrs});return t!=null&&t.default?t.default({data:n,refresh:r,isPartial:o,props:_,...this.$attrs}):((y,h)=>ye("pre",null,JSON.stringify({message:"You should use slots with !",slot:y,data:h},null,2)))("default",{data:n,props:_,isPartial:o})}}),xm=Object.freeze(Object.defineProperty({__proto__:null,default:Ja},Symbol.toStringTag,{value:"Module"})),Rm=Le({name:"ContentDoc",props:{tag:{type:String,required:!1,default:"div"},excerpt:{type:Boolean,default:!1},path:{type:String,required:!1,default:void 0},query:{type:Object,required:!1,default:void 0},head:{type:Boolean,required:!1,default:!0}},render(e){const t=is(),{tag:n,excerpt:r,path:o,query:s,head:l}=e,i={...s||{},path:o||(s==null?void 0:s.path)||Wi(xn().path),find:"one"},a=(u,c)=>ye("pre",null,JSON.stringify({message:"You should use slots with ",slot:u,data:c},null,2));return ye(Ja,i,{default:t!=null&&t.default?({data:u,refresh:c,isPartial:f})=>{var p;return l&&Ol(u),(p=t.default)==null?void 0:p.call(t,{doc:u,refresh:c,isPartial:f,excerpt:r,...this.$attrs})}:({data:u})=>(l&&Ol(u),ye(qa,{value:u,excerpt:r,tag:n,...this.$attrs},{empty:c=>t!=null&&t.empty?t.empty(c):a("default",u)})),empty:u=>{var c;return((c=t==null?void 0:t.empty)==null?void 0:c.call(t,u))||ye("p",null,"Document is empty, overwrite this content with #empty slot in .")},"not-found":u=>{var c;return((c=t==null?void 0:t["not-found"])==null?void 0:c.call(t,u))||ye("p",null,"Document not found, overwrite this content with #not-found slot in .")}})}}),Pm=Object.freeze(Object.defineProperty({__proto__:null,default:Rm},Symbol.toStringTag,{value:"Module"})),Ht=void 0,km="_grid_15n56_1",Sm="_text_15n56_7",ty={grid:km,text:Sm},Am="_rating_11ify_1",Tm="_star_11ify_10",Om="_filled_11ify_29",ny={rating:Am,star:Tm,filled:Om},Lm="_card_1i1za_1",Mm="_grid_1i1za_9",Dm="_title_1i1za_23",Im="_icon_1i1za_27",$m="_text_1i1za_32",Bm="_description_1i1za_38",ry={card:Lm,grid:Mm,title:Dm,icon:Im,text:$m,description:Bm},Hm="_list_89lzg_1",oy={list:Hm},Nt={layout:"content"},Nm="_button_e4315_1",jm="_prefixed_e4315_39",Fm="_suffixed_e4315_39",Um="_title_e4315_46",qm="_prefix_e4315_39",Km="_suffix_e4315_39",sy={button:Nm,"variant-outline":"_variant-outline_e4315_6","size-md":"_size-md_e4315_35",prefixed:jm,suffixed:Fm,title:Um,prefix:qm,suffix:Km},zm="_grid_1om67_1",Vm="_image_1om67_16",Wm="_desk_1om67_25",Ym="_title_1om67_30",Qm="_subtitle_1om67_42",Jm="_text_1om67_52",Xm="_buttons_1om67_70",ly={grid:zm,image:Vm,desk:Wm,title:Ym,subtitle:Qm,text:Jm,buttons:Xm},Zm=Le({mounted(){const e=document.querySelector(`.${this.$style.link}.${this.$style.active}`);!e||e==null||e.scrollIntoView({block:"center"})}}),Gm=Le({...Zm,__name:"LayoutMainMenuRow",props:{title:null,url:null,children:null,secondary:{type:Boolean}},setup(e){return(t,n)=>{var s;const r=Xa,o=ua;return((s=e.children)==null?void 0:s.length)||!e.url?(Oe(),Pt("div",{key:0,class:dt([t.$style.container,{[t.$style.secondary]:e.secondary}])},[_r("div",{class:dt(t.$style.heading)},lo(e.title),3),_r("div",{class:dt(t.$style.children)},[(Oe(!0),Pt(ke,null,mo(e.children,l=>(Oe(),Vt(r,{key:"item._path",title:l.title,url:l._path,children:l.children,secondary:""},null,8,["title","url","children"]))),128))],2)],2)):(Oe(),Pt("div",{key:1,class:dt(t.$style.row)},[me(o,{to:e.url,class:dt(t.$style.link),exactActiveClass:t.$style.active},{default:Tr(()=>[Dr(lo(e.title),1)]),_:1},8,["to","class","exactActiveClass"])],2))}}}),eg="_container_192pu_1",tg="_secondary_192pu_4",ng="_row_192pu_24",rg="_heading_192pu_48",og="_link_192pu_66",sg="_active_192pu_81",lg="_children_192pu_86",ig={container:eg,secondary:tg,row:ng,heading:rg,link:og,active:sg,children:lg},ag={$style:ig},Xa=Wa(Gm,[["__cssModules",ag]]),iy=Object.freeze(Object.defineProperty({__proto__:null,default:Xa},Symbol.toStringTag,{value:"Module"})),ug="_row_1ufrv_1",ay={row:ug},cg=Le({setup(e,{slots:t}){return()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),Bo=(e,t,n)=>({default:()=>t?ye(e,t===!0?{}:t,n):ye(cg,{},n)}),Za={content:()=>J(()=>import("./content.c14c0a2c.js"),["content.c14c0a2c.js","content.2c0ca7e0.css","LayoutThemeToggle.9b30b6e6.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js","LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.cfa40af4.css","LayoutFooter.163a17fa.js"],import.meta.url).then(e=>e.default||e),default:()=>J(()=>import("./default.be8f54bd.js"),["default.be8f54bd.js","default.98ce27f1.css","LayoutMainMenuToggle.7c76ad2a.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js","LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.5944fda9.css","LayoutMainMenu.06c3729f.js","navigation.d66e160d.js"],import.meta.url).then(e=>e.default||e)},fg=Le({props:{name:String},async setup(e,t){const n=await Za[e.name]().then(r=>r.default||r);return()=>ye(n,{},t.slots)}}),Ga=Le({props:{name:{type:[String,Boolean,Object],default:null}},setup(e,t){const n=Ge("_route"),r=n===xn()?Nh():n,o=xe(()=>{var s,l;return(l=(s=be(e.name))!=null?s:r.meta.layout)!=null?l:"default"});return()=>{var i;const s=o.value&&o.value in Za,l=(i=r.meta.layoutTransition)!=null?i:Op;return Bo(Ir,s&&l,{default:()=>Bo(fg,s&&{key:o.value,name:o.value,hasTransition:!!l},t.slots).default()}).default()}}}),uy=Object.freeze(Object.defineProperty({__proto__:null,default:Ga},Symbol.toStringTag,{value:"Module"})),dg="_main_32es8_1",pg="_reference_32es8_10",hg="_grid_32es8_14",cy={main:dg,reference:pg,grid:hg},jt={layout:!1},$l=[{name:"slug",path:"/:slug(.*)*",file:"/drone/src/pages/[...slug].vue",children:[],meta:Ht,alias:(Ht==null?void 0:Ht.alias)||[],redirect:(Ht==null?void 0:Ht.redirect)||void 0,component:()=>J(()=>import("./_...slug_.b28b1004.js"),["_...slug_.b28b1004.js","HomeReference.7471fc48.js","navigation.d66e160d.js"],import.meta.url).then(e=>e.default||e)},{name:"bio",path:"/bio",file:"/drone/src/pages/bio.vue",children:[],meta:Nt,alias:(Nt==null?void 0:Nt.alias)||[],redirect:(Nt==null?void 0:Nt.redirect)||void 0,component:()=>J(()=>import("./bio.2dd61c27.js"),["bio.2dd61c27.js","bio.1700b615.css","BioHeading.968f8c96.js","BioSkills.59f5dd5b.js","SkillsCard.a4048079.js","UiStars.f9df0828.js","IconStar.3b3b3476.js"],import.meta.url).then(e=>e.default||e)},{name:"index",path:"/",file:"/drone/src/pages/index.vue",children:[],meta:jt,alias:(jt==null?void 0:jt.alias)||[],redirect:(jt==null?void 0:jt.redirect)||void 0,component:()=>J(()=>import("./index.204267ae.js"),["index.204267ae.js","HomeHeader.fc13ef44.js","ArrowRight.b397e6a8.js","UiActionButton.bb3c8fbb.js","HomeContentList.228cf2a1.js","navigation.d66e160d.js"],import.meta.url).then(e=>e.default||e)}],mg={},ut={...mg},gg=Hd(async e=>{var o;let t,n;if(!((o=e.meta)!=null&&o.validate))return;const r=([t,n]=ea(()=>Promise.resolve(e.meta.validate(e))),t=await t,n(),t);return typeof r=="boolean"?r:na(r)}),yg=[gg],so={};function _g(e,t){const{pathname:n,search:r,hash:o}=t,s=e.indexOf("#");if(s>-1){const i=o.includes(e.slice(s))?e.slice(s).length:1;let a=o.slice(i);return a[0]!=="/"&&(a="/"+a),Gs(a,"")}return Gs(n,e)+r+o}const vg=Lt(async e=>{var _,C,R,y;let t,n,r=Cn().app.baseURL;ut.hashMode&&!r.includes("#")&&(r+="#");const o=(C=(_=ut.history)==null?void 0:_.call(ut,r))!=null?C:ut.hashMode?eh(r):ma(r),s=(y=(R=ut.routes)==null?void 0:R.call(ut,$l))!=null?y:$l,l=_g(r,window.location),i=Bh({...ut,history:o,routes:s});e.vueApp.use(i);const a=fo(i.currentRoute.value);i.afterEach((h,v)=>{a.value=v}),Object.defineProperty(e.vueApp.config.globalProperties,"previousRoute",{get:()=>a.value});const u=fo(i.resolve(l)),c=()=>{u.value=i.currentRoute.value};e.hook("page:finish",c),i.afterEach((h,v)=>{var w,T,O,I;((T=(w=h.matched[0])==null?void 0:w.components)==null?void 0:T.default)===((I=(O=v.matched[0])==null?void 0:O.components)==null?void 0:I.default)&&c()});const f={};for(const h in u.value)f[h]=xe(()=>u.value[h]);e._route=et(f),e._middleware=e._middleware||{global:[],named:{}};const p=Hr();try{[t,n]=ea(()=>i.isReady()),await t,n()}catch(h){xt(e,On,[h])}const m=ra("_layout");return i.beforeEach(async(h,v)=>{var T,O;h.meta=et(h.meta),e.isHydrating&&(h.meta.layout=(T=m.value)!=null?T:h.meta.layout),e._processingMiddleware=!0;const w=new Set([...yg,...e._middleware.global]);for(const I of h.matched){const k=I.meta.middleware;if(!!k)if(Array.isArray(k))for(const U of k)w.add(U);else w.add(k)}for(const I of w){const k=typeof I=="string"?e._middleware.named[I]||await((O=so[I])==null?void 0:O.call(so).then(F=>F.default||F)):I;if(!k)throw new Error(`Unknown route middleware: '${I}'.`);const U=await xt(e,k,[h,v]);if(!e.payload.serverRendered&&e.isHydrating&&(U===!1||U instanceof Error)){const F=U||So({statusCode:404,statusMessage:`Page Not Found: ${l}`});return xt(e,On,[F])}if(U||U===!1)return U}}),i.afterEach(async h=>{delete e._processingMiddleware,!e.isHydrating&&p.value&&await xt(e,$d),h.matched.length===0&&xt(e,On,[So({statusCode:404,fatal:!1,statusMessage:`Page not found: ${h.fullPath}`})])}),e.hooks.hookOnce("app:created",async()=>{try{await i.replace({...i.resolve(l),name:void 0,force:!0})}catch(h){xt(e,On,[h])}}),{provide:{router:i}}}),bg="__NUXT_COLOR_MODE__",fy="ColorScheme",wg="nuxt-color-mode",ct=window[bg],Eg=Lt(e=>{const t=ra("color-mode",()=>et({preference:ct.preference,value:ct.value,unknown:!1,forced:!1})).value;Wt().afterEach(o=>{const s=o.meta.colorMode;s&&s!=="system"?(t.value=s,t.forced=!0):(s==="system"&&console.warn("You cannot force the colorMode to system at the page level."),t.forced=!1,t.value=t.preference==="system"?ct.getColorScheme():t.preference)});let n;function r(){n||!window.matchMedia||(n=window.matchMedia("(prefers-color-scheme: dark)"),n.addEventListener("change",()=>{!t.forced&&t.preference==="system"&&(t.value=ct.getColorScheme())}))}je(()=>t.preference,o=>{var s;t.forced||(o==="system"?(t.value=ct.getColorScheme(),r()):t.value=o,(s=window.localStorage)==null||s.setItem(wg,o))},{immediate:!0}),je(()=>t.value,(o,s)=>{ct.removeColorScheme(s),ct.addColorScheme(o)}),t.preference==="system"&&r(),e.hook("app:mounted",()=>{t.unknown&&(t.preference=ct.preference,t.value=ct.value,t.unknown=!1)}),e.provide("colorMode",t)}),Cg=Lt(()=>{Cn().public.content.wsUrl&&J(()=>import("./web-socket.d671e65f.js"),[],import.meta.url).then(({useContentWebSocket:t})=>t())}),xg=Lt(e=>{!ip()||(e.hooks.hook("link:prefetch",t=>il(t)),Wt().beforeResolve(async(t,n)=>{if(t.path===n.path)return;const r=await il(t.path);!r||Object.assign(e.payload.data,r.data)}))}),Rg=["data-index"],Pg=Le({__name:"masonry-wall",props:{columnWidth:{default:400},items:null,gap:{default:0},rtl:{type:Boolean,default:!1},ssrColumns:{default:0},scrollContainer:{default:null}},emits:["redraw","redrawSkip"],setup(e,{emit:t}){const n=e,{columnWidth:r,items:o,gap:s,rtl:l,ssrColumns:i,scrollContainer:a}=ii(n),u=ze([]),c=ze();function f(){const R=Math.floor((c.value.getBoundingClientRect().width+s.value)/(r.value+s.value));return R>0?R:1}function p(R){return[...new Array(R)].map(()=>[])}if(i.value>0){const R=p(i.value);o.value.forEach((y,h)=>R[h%i.value].push(h)),u.value=R}async function m(R){if(R>=o.value.length)return;await wn();const y=[...c.value.children];l.value&&y.reverse();const h=y.reduce((v,w)=>w.getBoundingClientRect().height"u"?void 0:new ResizeObserver(()=>_());return Yn(()=>{_(),C==null||C.observe(c.value)}),En(()=>C==null?void 0:C.unobserve(c.value)),je([o,l],()=>_(!0)),je([r,s],()=>_()),(R,y)=>(Oe(),Pt("div",{ref_key:"wall",ref:c,class:"masonry-wall",style:un({display:"flex",gap:`${be(s)}px`})},[(Oe(!0),Pt(ke,null,mo(u.value,(h,v)=>(Oe(),Pt("div",{key:v,class:"masonry-column","data-index":v,style:un({display:"flex","flex-basis":"0px","flex-direction":"column","flex-grow":1,height:["-webkit-max-content","-moz-max-content","max-content"],gap:`${be(s)}px`})},[(Oe(!0),Pt(ke,null,mo(h,w=>(Oe(),Pt("div",{key:w,class:"masonry-item"},[wc(R.$slots,"default",{item:be(o)[w],index:w},()=>[Dr(lo(be(o)[w]),1)])]))),128))],12,Rg))),128))],4))}}),kg=(()=>{const e=Pg;return e.install=t=>{t.component("MasonryWall",e)},e})(),Sg=Lt(e=>{e.vueApp.use(kg)}),Ag=[yp,Dp,$p,vg,Eg,Cg,xg,Sg],Bl={__name:"nuxt-root",setup(e){const t=ne(()=>J(()=>import("./error-component.ed309281.js"),[],import.meta.url).then(s=>s.default||s)),n=Ce(),r=n.deferHydration();ln("_route",xn()),n.hooks.callHookWith(s=>s.map(l=>l()),"vue:setup");const o=Hr();return xi((s,l,i)=>{n.hooks.callHook("vue:error",s,l,i).catch(a=>console.error("[nuxt] Error in `vue:error` hook",a)),Bd(s)&&(s.fatal||s.unhandled)&&xt(n,On,[s])}),(s,l)=>{const i=Lr("App");return Oe(),Vt(mi,{onResolve:be(r)},{default:Tr(()=>[be(o)?(Oe(),Vt(be(t),{key:0,error:be(o)},null,8,["error"])):(Oe(),Vt(i,{key:1}))]),_:1},8,["onResolve"])}}},Tg=(e,t)=>t.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,n=>{var r;return((r=e.params[n.slice(1)])==null?void 0:r.toString())||""}),Og=(e,t)=>{var o;const n=t.route.matched.find(s=>{var l;return((l=s.components)==null?void 0:l.default)===t.Component.type}),r=(o=e!=null?e:n==null?void 0:n.meta.key)!=null?o:n&&Tg(t.route,n);return typeof r=="function"?r(t.route):r},Lg=(e,t)=>({default:()=>e?ye(fc,e===!0?{}:e,t):t}),eu=Le({name:"NuxtPage",inheritAttrs:!1,props:{name:{type:String},transition:{type:[Boolean,Object],default:void 0},keepalive:{type:[Boolean,Object],default:void 0},route:{type:Object},pageKey:{type:[Function,String],default:null}},setup(e,{attrs:t}){const n=Ce();return()=>ye(xa,{name:e.name,route:e.route,...t},{default:r=>{var i,a,u,c;if(!r.Component)return;const o=Og(e.pageKey,r),s=(a=(i=e.transition)!=null?i:r.route.meta.pageTransition)!=null?a:Lp,l=n.deferHydration();return Bo(Ir,s,Lg((c=(u=e.keepalive)!=null?u:r.route.meta.keepalive)!=null?c:Mp,ye(mi,{onPending:()=>n.callHook("page:start",r.Component),onResolve:()=>n.callHook("page:finish",r.Component).finally(l)},{default:()=>ye(Mg,{key:o,routeProps:r,pageKey:o,hasTransition:!!s})}))).default()}})}}),Mg=Le({props:["routeProps","pageKey","hasTransition"],setup(e){const t=e.pageKey,n=e.routeProps.route,r={};for(const o in e.routeProps.route)r[o]=xe(()=>t===e.pageKey?e.routeProps.route[o]:n[o]);return ln("_route",et(r)),()=>ye(e.routeProps.Component)}}),dy=Object.freeze(Object.defineProperty({__proto__:null,default:eu},Symbol.toStringTag,{value:"Module"})),Dg={};function Ig(e,t){const n=eu,r=Ga;return Oe(),Vt(r,null,{default:Tr(()=>[me(n)]),_:1})}const $g=Wa(Dg,[["render",Ig]]);globalThis.$fetch||(globalThis.$fetch=ud.create({baseURL:fd()}));let Hl;const Bg=Pd(Ag);Hl=async function(){var o;const n=Boolean((o=window.__NUXT__)==null?void 0:o.serverRendered)?xf(Bl):Cf(Bl);n.component("App",$g);const r=Cd({vueApp:n});try{await Rd(r,Bg)}catch(s){await r.callHook("app:error",s),r.payload.error=r.payload.error||s}try{await r.hooks.callHook("app:created",n),await r.hooks.callHook("app:beforeMount",n),n.mount("#__nuxt"),await r.hooks.callHook("app:mounted",n),await wn()}catch(s){await r.callHook("app:error",s),r.payload.error=r.payload.error||s}},Hl().catch(e=>{console.error("Error while mounting app:",e)});export{cy as $,ii as A,ra as B,Yg as C,Sd as D,sa as E,bm as F,wm as G,ym as H,la as I,Yn as J,Wg as K,yt as L,Cn as M,Kg as N,Rm as O,qa as P,qg as Q,ke as R,mo as S,Dr as T,Qg as U,ty as V,Fg as W,oy as X,ry as Y,ny as Z,J as _,Le as a,Ga as a0,ly as a1,Lr as a2,ay as a3,Xa as a4,sy as a5,hr as a6,wn as a7,as as a8,Ll as a9,ey as aa,Zt as ab,Gg as ac,Jg as ad,Xg as ae,Zg as af,Vg as ag,zh as ah,Ml as ai,Qi as aj,Ng as ak,jg as al,fy as am,zg as an,mm as ao,gm as ap,xm as aq,Pm as ar,iy as as,uy as at,dy as au,ua as b,Vt as c,ne as d,Pt as e,_r as f,Fc as g,dt as h,me as i,Ug as j,Wa as k,is as l,ye as m,Hg as n,Oe as o,Ja as p,ze as q,wc as r,Ce as s,lo as t,be as u,xi as v,Tr as w,En as x,xe as y,ca as z}; diff --git a/nuxt/entry.9c0c7058.css b/nuxt/entry.9c0c7058.css new file mode 100644 index 0000000..5befc56 --- /dev/null +++ b/nuxt/entry.9c0c7058.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@600&family=Roboto:wght@400;700&display=swap";.page-enter-active,.page-leave-active{transition:all .4s}.page-enter-from,.page-leave-to{opacity:0;transform:translateY(50px)}body,html{background:var(--color-background);color:var(--color-text);font-family:var(--family-roboto);margin:0;padding:0}*{box-sizing:border-box;transition:color .25s}a{color:var(--color-link)}h1>a,h2>a,h3>a,h4>a,h5>a{color:var(--color-header);text-decoration:none}pre{border-radius:10px;line-height:1.5em;overflow:scroll;padding:10px;width:100%}:not(pre)>code,pre{background-color:var(--color-code-background)}:not(pre)>code{border-radius:4px;color:var(--color-code-inline);padding:0 5px}h1,h2,h3,h4,h5{color:var(--color-header);font-family:var(--family-roboto-slab);font-weight:700}h1{color:var(--color-heading-primary);font-size:2.6rem;margin-bottom:1.5rem}h1:not(:first-child){margin-top:3rem}h2{color:var(--color-heading-secondary)}h2:not(:first-child){margin-top:2rem}h3,h4,h5{color:var(--color-heading-tertiary)}li,p{line-height:1.45em}li:not(:last-child){margin-bottom:.25em}button{background:none;padding:0}button,button:focus{border:none}table{border:2px solid var(--color-line);border-collapse:collapse}table td,table th{border:1px solid var(--color-line);padding:5px 10px;text-align:left}table thead{background:var(--color-table-head);border-bottom:2px solid var(--color-line)}blockquote{border-left:3px solid var(--color-primary);color:var(--color-text);padding:0 20px}blockquote ol,blockquote ul{padding-left:15px}.highlight{background-color:var(--color-highlight-background);border-radius:3px;color:var(--color-highlight-color);padding:0 1px}:root{--family-roboto-slab:"Roboto Slab","Segoe UI",Tahoma,Geneva,Verdana,sans-serif;--family-roboto:"Roboto","Segoe UI",Tahoma,Geneva,Verdana,sans-serif;--size-phone:$phone;--size-tablet:$size-tablet;--size-desktop:$size-desktop}:root.dark{--color-primary:#e84a72;--color-background:#16161c;--color-menu-background:#1a1c23;--color-line:#2d2f36;--color-menu-overlay-background:rgba(22,22,28,.9);--color-code-background:#1a1c23;--color-code-language-background:#23252f;--color-code-language-name:#1eaeae;--color-text:#fdf0ed;--color-text-secondary:#a3a4a7;--color-link:#e84a72;--color-code-inline:#1eb980;--color-heading-primary:#fff;--color-heading-secondary:#f9cbbe;--color-heading-tertiary:#f9cec3;--color-menu-title:#fadad1;--color-menu-link:#fab28e;--color-menu-link-active:#e84a72;--color-menu-line:#2e303e;--color-table-head:#2f212b;--color-rating-1:#ded187;--color-rating-2:#dbde87;--color-rating-3:#bade87;--color-rating-4:#9cde87;--color-rating-5:#87deaa;--color-highlight-color:var(--color-text);--color-highlight-background:#254e50}:root.light{--color-primary:#e84a72;--color-background:#fce9e4;--color-menu-background:#fbe2db;--color-line:#fbe2db;--color-menu-overlay-background:rgba(22,22,28,.9);--color-code-background:#fbe2db;--color-code-language-background:#23252f;--color-code-language-name:#1eaeae;--color-text:#5a5d68;--color-text-secondary:#7b7d86;--color-link:#e84a72;--color-code-inline:#8931b9;--color-heading-primary:#4c5161;--color-heading-secondary:#6bb8b4;--color-heading-tertiary:#6bb8b4;--color-menu-title:#6bb8b4;--color-menu-link:#eb6481;--color-menu-link-active:#e84a72;--color-menu-line:#f9cbbe;--color-table-head:#f8ccc8;--color-highlight-color:var(--color-text);--color-highlight-background:#fab795}._list_1w161_1{margin:0;padding:0 20px}._list_1w161_1 li a{text-decoration:none}._grid_15n56_1{grid-column-gap:40px;display:grid;grid-template-columns:1fr 2fr}._text_15n56_7{color:var(--color-text-secondary)}._text_15n56_7 b{color:var(--color-text)}._rating_11ify_1{display:flex;flex-direction:row;margin-left:-3px}._rating_11ify_1>img{margin-right:2px}._star_11ify_10{stroke:none;fill:currentColor}._star_11ify_10:first-child{color:var(--color-rating-1)}._star_11ify_10:nth-child(2){color:var(--color-rating-2)}._star_11ify_10:nth-child(3){color:var(--color-rating-3)}._star_11ify_10:nth-child(4){color:var(--color-rating-4)}._star_11ify_10:nth-child(5){color:var(--color-rating-5)}._star_11ify_10._filled_11ify_29{fill:var(--color-line)}._card_1i1za_1{border:1px solid var(--color-line);border-radius:8px;transition:all .25s}._card_1i1za_1:hover{background-color:var(--color-line)}._card_1i1za_1:hover,._card_1i1za_1:hover>._grid_1i1za_9{border-color:var(--color-text-secondary)}._grid_1i1za_9{grid-column-gap:16px;align-items:center;border-bottom:1px solid var(--color-line);display:grid;grid-template-columns:48px 1fr;padding:10px;transition:all .25s}._title_1i1za_23{margin:0 0 4px}._icon_1i1za_27{align-items:center;display:flex}._text_1i1za_32{display:flex;flex-direction:column;padding-bottom:4px}._description_1i1za_38{color:var(--color-text-secondary);font-size:.9rem;line-height:1.4rem;padding:10px}._list_89lzg_1{-moz-column-gap:20px;column-gap:20px;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));row-gap:20px}._button_e4315_1{border-radius:8px;color:#fff;text-decoration:none}._button_e4315_1._variant-outline_e4315_6{align-items:center;box-shadow:var(--color-text) 0 0 0 1px;color:var(--color-text);display:inline-flex;justify-content:center;overflow:hidden;position:relative;transition:all .25s}._button_e4315_1._variant-outline_e4315_6:after{background:var(--color-primary);border-radius:8px;content:" ";inset:0;opacity:0;position:absolute;transform:scale(0);transition:all .25s;z-index:0}._button_e4315_1._variant-outline_e4315_6:hover{box-shadow:var(--color-background) 0 0 0 1px;color:var(--color-background)}._button_e4315_1._variant-outline_e4315_6:hover:after{opacity:1;transform:scale(1)}._button_e4315_1._size-md_e4315_35{height:40px;padding:0 30px}._button_e4315_1._size-md_e4315_35._prefixed_e4315_39,._button_e4315_1._size-md_e4315_35._suffixed_e4315_39{padding:0 10px 0 20px}._button_e4315_1._size-md_e4315_35._suffixed_e4315_39{padding-right:0 20px 0 10px}._title_e4315_46{position:relative;z-index:1}._size-md_e4315_35._prefixed_e4315_39 ._title_e4315_46{padding-left:10px}._size-md_e4315_35._suffixed_e4315_39 ._title_e4315_46{padding-right:10px}._prefix_e4315_39,._suffix_e4315_39{display:inline-flex;position:relative;z-index:2}._grid_1om67_1{border-bottom:2px solid var(--color-line);-moz-column-gap:50px;column-gap:50px;display:grid;grid-template-columns:14fr 10fr}@media (max-width:1024px){._grid_1om67_1{border-bottom:none;-moz-column-gap:20px;column-gap:20px;grid-template-columns:1fr;grid-template-rows:auto auto}}._image_1om67_16{align-items:flex-end;display:flex}@media (max-width:1024px){._image_1om67_16{border-bottom:2px solid var(--color-line);justify-content:center}._image_1om67_16 ._desk_1om67_25{max-width:400px}}._title_1om67_30{font-size:3rem;line-height:3.4rem;margin:.8rem 0}@media (max-width:560px){._title_1om67_30{font-size:2.5rem;line-height:3rem}}._subtitle_1om67_42{color:var(--color-text-secondary);max-width:360px}@media (max-width:1024px){._subtitle_1om67_42{max-width:100%}}._text_1om67_52{display:flex;flex-direction:column;justify-content:center;padding-bottom:60px}@media (max-width:768px){._text_1om67_52{padding-bottom:40px;padding-top:0;text-align:center}}._desk_1om67_25{width:100%}._buttons_1om67_70{margin-top:50px}._container_192pu_1{position:relative}._container_192pu_1._secondary_192pu_4{padding:7px 2px 0}._container_192pu_1._secondary_192pu_4:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-22px;width:1px}._container_192pu_1._secondary_192pu_4:first-child:before{top:-4px}._container_192pu_1._secondary_192pu_4:last-child:before{bottom:auto;height:40px}._row_192pu_24{padding:3px 2px;position:relative}._row_192pu_24:before{background-color:var(--color-menu-line);bottom:13px;content:" ";left:-16px;position:absolute;top:-14px;width:1px}._row_192pu_24:first-child:before{top:-4px}._row_192pu_24:last-child:before{bottom:auto;height:30px}._row_192pu_24:only-child:before{height:19px}._heading_192pu_48{align-items:center;color:var(--color-menu-title);display:flex;font-weight:600;position:relative;text-transform:uppercase}._secondary_192pu_4 ._heading_192pu_48:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66{color:var(--color-menu-link);line-height:1.4em;position:relative;text-decoration:none}._link_192pu_66:before{background-color:var(--color-menu-line);content:" ";height:1px;left:-17px;position:absolute;top:.6em;width:10px}._link_192pu_66._active_192pu_81{color:var(--color-menu-link-active);font-weight:700}._children_192pu_86{margin:10px 3px;padding:0 0 0 16px;position:relative}._row_1ufrv_1{margin-bottom:10px}._main_32es8_1{padding-top:40px}@media (max-width:768px){._main_32es8_1{padding-top:0}}._reference_32es8_10{padding-top:20px}._grid_32es8_14{margin:40px 5px 0} diff --git a/nuxt/error-404.18ced855.css b/nuxt/error-404.18ced855.css new file mode 100644 index 0000000..521d49c --- /dev/null +++ b/nuxt/error-404.18ced855.css @@ -0,0 +1 @@ +.spotlight[data-v-07b7f6e4]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-30vh;filter:blur(20vh);height:40vh}.gradient-border[data-v-07b7f6e4]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:.5rem;position:relative}@media (prefers-color-scheme:light){.gradient-border[data-v-07b7f6e4]{background-color:#ffffff4d}.gradient-border[data-v-07b7f6e4]:before{background:linear-gradient(90deg,#e2e2e2,#e2e2e2 25%,#00dc82 50%,#36e4da 75%,#0047e1)}}@media (prefers-color-scheme:dark){.gradient-border[data-v-07b7f6e4]{background-color:#1414144d}.gradient-border[data-v-07b7f6e4]:before{background:linear-gradient(90deg,#303030,#303030 25%,#00dc82 50%,#36e4da 75%,#0047e1)}}.gradient-border[data-v-07b7f6e4]:before{background-size:400% auto;border-radius:.5rem;bottom:0;content:"";left:0;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.5;padding:2px;position:absolute;right:0;top:0;transition:background-position .3s ease-in-out,opacity .2s ease-in-out;width:100%}.gradient-border[data-v-07b7f6e4]:hover:before{background-position:-50% 0;opacity:1}.bg-white[data-v-07b7f6e4]{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.cursor-pointer[data-v-07b7f6e4]{cursor:pointer}.flex[data-v-07b7f6e4]{display:flex}.grid[data-v-07b7f6e4]{display:grid}.place-content-center[data-v-07b7f6e4]{place-content:center}.items-center[data-v-07b7f6e4]{align-items:center}.justify-center[data-v-07b7f6e4]{justify-content:center}.font-sans[data-v-07b7f6e4]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-medium[data-v-07b7f6e4]{font-weight:500}.font-light[data-v-07b7f6e4]{font-weight:300}.text-8xl[data-v-07b7f6e4]{font-size:6rem;line-height:1}.text-xl[data-v-07b7f6e4]{font-size:1.25rem;line-height:1.75rem}.leading-tight[data-v-07b7f6e4]{line-height:1.25}.mb-8[data-v-07b7f6e4]{margin-bottom:2rem}.mb-16[data-v-07b7f6e4]{margin-bottom:4rem}.max-w-520px[data-v-07b7f6e4]{max-width:520px}.min-h-screen[data-v-07b7f6e4]{min-height:100vh}.overflow-hidden[data-v-07b7f6e4]{overflow:hidden}.px-8[data-v-07b7f6e4]{padding-left:2rem;padding-right:2rem}.py-2[data-v-07b7f6e4]{padding-bottom:.5rem;padding-top:.5rem}.px-4[data-v-07b7f6e4]{padding-left:1rem;padding-right:1rem}.fixed[data-v-07b7f6e4]{position:fixed}.left-0[data-v-07b7f6e4]{left:0}.right-0[data-v-07b7f6e4]{right:0}.text-center[data-v-07b7f6e4]{text-align:center}.text-black[data-v-07b7f6e4]{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.antialiased[data-v-07b7f6e4]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.w-full[data-v-07b7f6e4]{width:100%}.z-10[data-v-07b7f6e4]{z-index:10}.z-20[data-v-07b7f6e4]{z-index:20}@media (min-width:640px){.sm\:text-4xl[data-v-07b7f6e4]{font-size:2.25rem;line-height:2.5rem}.sm\:text-xl[data-v-07b7f6e4]{font-size:1.25rem;line-height:1.75rem}.sm\:text-10xl[data-v-07b7f6e4]{font-size:10rem;line-height:1}.sm\:px-0[data-v-07b7f6e4]{padding-left:0;padding-right:0}.sm\:py-3[data-v-07b7f6e4]{padding-bottom:.75rem;padding-top:.75rem}.sm\:px-6[data-v-07b7f6e4]{padding-left:1.5rem;padding-right:1.5rem}}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-07b7f6e4]{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.dark\:text-white[data-v-07b7f6e4]{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}} diff --git a/nuxt/error-404.c5f8018c.js b/nuxt/error-404.c5f8018c.js new file mode 100644 index 0000000..973a704 --- /dev/null +++ b/nuxt/error-404.c5f8018c.js @@ -0,0 +1 @@ +import{k as a,z as n,o as r,e as l,f as e,t as s,i as d,w as c,T as p,b as f,ak as x,al as h}from"./entry.9584492c.js";const m=t=>(x("data-v-07b7f6e4"),t=t(),h(),t),u={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},g=m(()=>e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),b={class:"max-w-520px text-center z-20"},_=["textContent"],w=["textContent"],y={class:"w-full flex items-center justify-center"},k={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const o=t;return n({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}a{color:inherit;text-decoration:inherit}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(S,v)=>{const i=f;return r(),l("div",u,[g,e("div",b,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,_),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,w),e("div",y,[d(i,{to:"/",class:"gradient-border text-md sm:text-xl py-2 px-4 sm:py-3 sm:px-6 cursor-pointer"},{default:c(()=>[p(s(t.backHome),1)]),_:1})])])])}}},z=a(k,[["__scopeId","data-v-07b7f6e4"]]);export{z as default}; diff --git a/nuxt/error-500.430cc391.js b/nuxt/error-500.430cc391.js new file mode 100644 index 0000000..691d400 --- /dev/null +++ b/nuxt/error-500.430cc391.js @@ -0,0 +1 @@ +import{k as i,z as a,o as r,e as n,f as e,t as s,ak as l,al as d}from"./entry.9584492c.js";const c=t=>(l("data-v-73785db7"),t=t(),d(),t),p={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},h=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),f={class:"max-w-520px text-center"},g=["textContent"],m=["textContent"],b={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const o=t;return a({title:`${o.statusCode} - ${o.statusMessage} | ${o.appName}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p{margin:0}h1{font-size:inherit;font-weight:inherit}'}]}),(x,u)=>(r(),n("div",p,[h,e("div",f,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:s(t.statusCode)},null,8,g),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:s(t.description)},null,8,m)])]))}},w=i(b,[["__scopeId","data-v-73785db7"]]);export{w as default}; diff --git a/nuxt/error-500.e60962de.css b/nuxt/error-500.e60962de.css new file mode 100644 index 0000000..943ec58 --- /dev/null +++ b/nuxt/error-500.e60962de.css @@ -0,0 +1 @@ +.spotlight[data-v-73785db7]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);filter:blur(20vh)}.bg-white[data-v-73785db7]{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.grid[data-v-73785db7]{display:grid}.place-content-center[data-v-73785db7]{place-content:center}.font-sans[data-v-73785db7]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-medium[data-v-73785db7]{font-weight:500}.font-light[data-v-73785db7]{font-weight:300}.h-1\/2[data-v-73785db7]{height:50%}.text-8xl[data-v-73785db7]{font-size:6rem;line-height:1}.text-xl[data-v-73785db7]{font-size:1.25rem;line-height:1.75rem}.leading-tight[data-v-73785db7]{line-height:1.25}.mb-8[data-v-73785db7]{margin-bottom:2rem}.mb-16[data-v-73785db7]{margin-bottom:4rem}.max-w-520px[data-v-73785db7]{max-width:520px}.min-h-screen[data-v-73785db7]{min-height:100vh}.overflow-hidden[data-v-73785db7]{overflow:hidden}.px-8[data-v-73785db7]{padding-left:2rem;padding-right:2rem}.fixed[data-v-73785db7]{position:fixed}.left-0[data-v-73785db7]{left:0}.right-0[data-v-73785db7]{right:0}.-bottom-1\/2[data-v-73785db7]{bottom:-50%}.text-center[data-v-73785db7]{text-align:center}.text-black[data-v-73785db7]{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.antialiased[data-v-73785db7]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (min-width:640px){.sm\:text-4xl[data-v-73785db7]{font-size:2.25rem;line-height:2.5rem}.sm\:text-10xl[data-v-73785db7]{font-size:10rem;line-height:1}.sm\:px-0[data-v-73785db7]{padding-left:0;padding-right:0}}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-73785db7]{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.dark\:text-white[data-v-73785db7]{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}} diff --git a/nuxt/error-component.ed309281.js b/nuxt/error-component.ed309281.js new file mode 100644 index 0000000..2e16cf4 --- /dev/null +++ b/nuxt/error-component.ed309281.js @@ -0,0 +1,3 @@ +import{d as o,_ as c,o as g,c as E,n as k,g as P,u as s}from"./entry.9584492c.js";const v={__name:"nuxt-error-page",props:{error:Object},setup(u){var n;const{error:t}=u;(t.stack||"").split(` +`).splice(1).map(e=>({text:e.replace("webpack:/","").replace(".vue",".js").trim(),internal:e.includes("node_modules")&&!e.includes(".cache")||e.includes("internal")||e.includes("new Promise")})).map(e=>`${e.text}`).join(` +`);const r=Number(t.statusCode||500),a=r===404,i=(n=t.statusMessage)!=null?n:a?"Page Not Found":"Internal Server Error",p=t.message||t.toString(),_=void 0,d=o(()=>c(()=>import("./error-404.c5f8018c.js"),["error-404.c5f8018c.js","error-404.18ced855.css","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(e=>e.default||e)),l=o(()=>c(()=>import("./error-500.430cc391.js"),["error-500.430cc391.js","error-500.e60962de.css","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(e=>e.default||e)),m=a?d:l;return(e,f)=>(g(),E(s(m),k(P({statusCode:s(r),statusMessage:s(i),description:s(p),stack:s(_)})),null,16))}},h=v;export{h as default}; diff --git a/assets/svg/golang-logo.svg b/nuxt/golang-logo.f772e478.svg similarity index 100% rename from assets/svg/golang-logo.svg rename to nuxt/golang-logo.f772e478.svg diff --git a/assets/svg/gql-logo.svg b/nuxt/gql-logo.1e66e5b3.svg similarity index 100% rename from assets/svg/gql-logo.svg rename to nuxt/gql-logo.1e66e5b3.svg diff --git a/assets/svg/howdy.svg b/nuxt/howdy.824e8e62.svg similarity index 100% rename from assets/svg/howdy.svg rename to nuxt/howdy.824e8e62.svg diff --git a/assets/svg/html-logo.svg b/nuxt/html-logo.1f694231.svg similarity index 100% rename from assets/svg/html-logo.svg rename to nuxt/html-logo.1f694231.svg diff --git a/nuxt/index.204267ae.js b/nuxt/index.204267ae.js new file mode 100644 index 0000000..5bd66e8 --- /dev/null +++ b/nuxt/index.204267ae.js @@ -0,0 +1 @@ +import r from"./HomeHeader.fc13ef44.js";import _ from"./HomeContentList.228cf2a1.js";import{k as i,o as m,c as l,w as p,$ as d,a0 as u,f as e,i as s,h as o}from"./entry.9584492c.js";import"./ArrowRight.b397e6a8.js";import"./UiActionButton.bb3c8fbb.js";import"./navigation.d66e160d.js";const f={scrollToTop:!0,head(){return{title:"Obsidian Garden"}}},$=e("h1",null,"Cheatsheet",-1);function h(t,y,C,k,B,H){const n=r,a=_,c=u;return m(),l(c,{name:"content"},{default:p(()=>[e("main",{class:o(t.$style.main)},[s(n),e("div",{class:o(t.$style.reference)},[$,e("div",{class:o(t.$style.grid)},[s(a)],2)],2)],2)]),_:1})}const x={$style:d},V=i(f,[["render",h],["__cssModules",x]]);export{V as default}; diff --git a/assets/svg/logo.svg b/nuxt/logo.d91c5032.svg similarity index 100% rename from assets/svg/logo.svg rename to nuxt/logo.d91c5032.svg diff --git a/nuxt/navigation.d66e160d.js b/nuxt/navigation.d66e160d.js new file mode 100644 index 0000000..14003e0 --- /dev/null +++ b/nuxt/navigation.d66e160d.js @@ -0,0 +1 @@ +import{F as i,E as r,G as s,_ as p,H as f,I as h}from"./entry.9584492c.js";const m=async e=>{let t=e;typeof(t==null?void 0:t.params)=="function"&&(t=t.params());const n=i(t?`/navigation/${r(t)}.json`:"/navigation");if(s())return(await p(()=>import("./client-db.2d7ab389.js"),["client-db.2d7ab389.js","entry.9584492c.js","entry.9c0c7058.css"],import.meta.url).then(o=>o.generateNavigation))(t||{});const a=await $fetch(n,{method:"GET",responseType:"json",params:{_params:f(t||{}),previewToken:h("previewToken").value}});if(typeof a=="string"&&a.startsWith(""))throw new Error("Not found");return a};export{m as f}; diff --git a/assets/svg/obsidian.svg b/nuxt/obsidian.8dc2a844.svg similarity index 100% rename from assets/svg/obsidian.svg rename to nuxt/obsidian.8dc2a844.svg diff --git a/assets/svg/postgres-logo.svg b/nuxt/postgres-logo.d981f813.svg similarity index 100% rename from assets/svg/postgres-logo.svg rename to nuxt/postgres-logo.d981f813.svg diff --git a/assets/svg/react-logo.svg b/nuxt/react-logo.8351f38f.svg similarity index 100% rename from assets/svg/react-logo.svg rename to nuxt/react-logo.8351f38f.svg diff --git a/assets/svg/react-native-logo.svg b/nuxt/react-native-logo.bdbaa7c9.svg similarity index 100% rename from assets/svg/react-native-logo.svg rename to nuxt/react-native-logo.bdbaa7c9.svg diff --git a/assets/svg/react-ssr-logo.svg b/nuxt/react-ssr-logo.3593105e.svg similarity index 100% rename from assets/svg/react-ssr-logo.svg rename to nuxt/react-ssr-logo.3593105e.svg diff --git a/assets/svg/swagger-logo.svg b/nuxt/swagger-logo.b314537c.svg similarity index 100% rename from assets/svg/swagger-logo.svg rename to nuxt/swagger-logo.b314537c.svg diff --git a/assets/svg/ts-logo.svg b/nuxt/ts-logo.5847c362.svg similarity index 100% rename from assets/svg/ts-logo.svg rename to nuxt/ts-logo.5847c362.svg diff --git a/assets/svg/vue-logo.svg b/nuxt/vue-logo.17ff892a.svg similarity index 100% rename from assets/svg/vue-logo.svg rename to nuxt/vue-logo.17ff892a.svg diff --git a/nuxt/web-socket.d671e65f.js b/nuxt/web-socket.d671e65f.js new file mode 100644 index 0000000..e7a8ea3 --- /dev/null +++ b/nuxt/web-socket.d671e65f.js @@ -0,0 +1 @@ +import{M as u,N as i}from"./entry.9584492c.js";const n={log:(...t)=>console.log("[Content]",...t),warn:(...t)=>console.warn("[Content]",...t)};let e;function g(){if(!window.WebSocket){n.warn("Could not enable hot reload, your browser does not support WebSocket.");return}const t=o=>{try{if(!JSON.parse(o.data))return;i()}catch{}},s=()=>n.log("WS connected!"),a=o=>{switch(o.code){case"ECONNREFUSED":r(!0);break;default:n.warn("WS Error:",o);break}},l=o=>{o.code===1e3||o.code===1005?n.log("WS closed!"):r(!0)},r=(o=!1)=>{if(o){n.log("WS reconnecting.."),setTimeout(r,1e3);return}if(e){try{e.close()}catch{}e=void 0}const c=`${u().public.content.wsUrl}ws`;n.log(`WS connect to ${c}`),e=new WebSocket(c),e.onopen=s,e.onmessage=t,e.onerror=a,e.onclose=l};return r(),{connect:r}}export{g as useContentWebSocket}; diff --git a/nuxt/welcome.14964f1a.js b/nuxt/welcome.14964f1a.js new file mode 100644 index 0000000..3a3ec5e --- /dev/null +++ b/nuxt/welcome.14964f1a.js @@ -0,0 +1 @@ +import{k as i,z as s,o as l,e as n,f as t,t as a,W as r,ak as d,al as c}from"./entry.9584492c.js";import"./ContentNavigation.3feae645.js";import"./navigation.d66e160d.js";import"./ProseCode.vue_used_vue_type_style_index_1_lang.module.230a312a.js";import"./LayoutThemeToggle.vue_used_vue_type_style_index_0_lang.module.548e5575.js";import"./LayoutMainMenuToggle.vue_used_vue_type_style_index_0_lang.module.ab60ac3f.js";import"./ContentList.ac186f34.js";import"./ContentSlot.2a654c2d.js";import"./DocumentDrivenEmpty.d3ab28ab.js";import"./DocumentDrivenNotFound.47713d66.js";import"./Markdown.273e7520.js";const o=e=>(d("data-v-25102a06"),e=e(),c(),e),h={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white min-h-screen place-content-center flex flex-col items-center justify-center p-8 text-sm sm:text-base"},p={class:"grid grid-cols-3 gap-4 md:gap-8 max-w-5xl w-full z-20"},C={class:"flex justify-between items-end col-span-3"},f=r('',1),g=["href","textContent"],u=o(()=>t("div",{class:"spotlight-wrapper"},[t("div",{class:"fixed z-10 left-0 right-0 spotlight"})],-1)),v=r('

Get Started

Remove this welcome page by replacing <NuxtWelcome /> in app.vue with your own code.

',1),w={href:"https://v3.nuxtjs.org",target:"_blank",rel:"noopener",class:"gradient-border cursor-pointer col-span-3 sm:col-span-1 p-4 flex flex-col"},x=r('

Documentation

',2),m=["textContent"],b={href:"https://github.com/nuxt/framework",target:"_blank",rel:"noopener",class:"cursor-pointer gradient-border col-span-3 sm:col-span-1 p-4 flex flex-col"},_=o(()=>t("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 3.33333C10.795 3.33333 3.33337 10.8067 3.33337 20.0283C3.33337 27.4033 8.10837 33.6617 14.7317 35.8683C15.565 36.0217 15.8684 35.5067 15.8684 35.0633C15.8684 34.6683 15.855 33.6167 15.8467 32.225C11.21 33.2333 10.2317 29.9867 10.2317 29.9867C9.47504 28.0567 8.38171 27.5433 8.38171 27.5433C6.86837 26.51 8.49671 26.53 8.49671 26.53C10.1684 26.6467 11.0484 28.25 11.0484 28.25C12.535 30.8 14.95 30.0633 15.8984 29.6367C16.0517 28.5583 16.4817 27.8233 16.9584 27.4067C13.2584 26.985 9.36671 25.5517 9.36671 19.155C9.36671 17.3333 10.0167 15.8417 11.0817 14.675C10.91 14.2533 10.3384 12.555 11.245 10.2583C11.245 10.2583 12.645 9.80833 15.8284 11.9683C17.188 11.5975 18.5908 11.4087 20 11.4067C21.4167 11.4133 22.8417 11.5983 24.1734 11.9683C27.355 9.80833 28.7517 10.2567 28.7517 10.2567C29.6617 12.555 29.0884 14.2533 28.9184 14.675C29.985 15.8417 30.6317 17.3333 30.6317 19.155C30.6317 25.5683 26.7334 26.98 23.0217 27.3933C23.62 27.9083 24.1517 28.9267 24.1517 30.485C24.1517 32.715 24.1317 34.5167 24.1317 35.0633C24.1317 35.51 24.4317 36.03 25.2784 35.8667C28.5972 34.7535 31.4823 32.6255 33.5258 29.7834C35.5694 26.9413 36.6681 23.5289 36.6667 20.0283C36.6667 10.8067 29.2034 3.33333 20 3.33333Z",fill:"currentColor"})],-1)),k=o(()=>t("h2",{class:"font-semibold text-xl mt-4"},"GitHub",-1)),y=["textContent"],S={href:"https://twitter.com/nuxt_js",target:"_blank",rel:"noopener",class:"cursor-pointer gradient-border col-span-3 sm:col-span-1 p-4 flex flex-col"},M=o(()=>t("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M13.8167 33.7557C26.395 33.7557 33.275 23.334 33.275 14.2973C33.275 14.0007 33.275 13.7057 33.255 13.414C34.5937 12.4449 35.7489 11.245 36.6667 9.87066C35.4185 10.424 34.0943 10.7869 32.7384 10.9473C34.1661 10.0924 35.2346 8.74791 35.745 7.164C34.4029 7.96048 32.9345 8.52188 31.4034 8.824C30.3724 7.72694 29.0084 7.00039 27.5228 6.75684C26.0371 6.51329 24.5126 6.76633 23.1852 7.47678C21.8579 8.18723 20.8018 9.31545 20.1805 10.6868C19.5592 12.0581 19.4073 13.596 19.7484 15.0623C17.0294 14.9261 14.3694 14.2195 11.9411 12.9886C9.51285 11.7577 7.37059 10.0299 5.65337 7.91733C4.7789 9.42267 4.51102 11.2047 4.90427 12.9006C5.29751 14.5965 6.32232 16.0788 7.77004 17.0457C6.68214 17.0142 5.61776 16.7215 4.66671 16.1923V16.279C4.66736 17.8578 5.21403 19.3878 6.21404 20.6096C7.21404 21.8313 8.60582 22.6696 10.1534 22.9823C9.14639 23.2569 8.08986 23.2968 7.06504 23.099C7.50198 24.4581 8.35284 25.6467 9.49859 26.4984C10.6443 27.35 12.0277 27.8223 13.455 27.849C12.0369 28.9633 10.413 29.7871 8.67625 30.2732C6.93948 30.7594 5.12391 30.8984 3.33337 30.6823C6.46105 32.6896 10.1004 33.7542 13.8167 33.749",fill:"currentColor"})],-1)),j=o(()=>t("h2",{class:"font-semibold text-xl mt-4"},"Twitter",-1)),V=["textContent"],z={__name:"welcome",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},title:{type:String,default:"Welcome to Nuxt 3!"},readDocs:{type:String,default:"We highly recommend you take a look at the Nuxt documentation, whether you are new or have previous experience with the framework."},followTwitter:{type:String,default:"Follow the Nuxt Twitter account to get latest news about releases, new modules, tutorials and tips."},starGitHub:{type:String,default:"Nuxt is open source and the code is available on GitHub, feel free to star it, participate in discussions or dive into the source."}},setup(e){return s({title:`${e.title}`,script:[],style:[{children:'*,:before,:after{-webkit-box-sizing:border-box;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}*{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(14, 165, 233, .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}a{color:inherit;text-decoration:inherit}body{margin:0;font-family:inherit;line-height:inherit}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}h1,p,h2{margin:0}h1,h2{font-size:inherit;font-weight:inherit}svg{display:block;vertical-align:middle}'}]}),(Z,H)=>(l(),n("div",h,[t("div",p,[t("div",C,[f,t("a",{href:`https://github.com/nuxt/framework/releases/tag/${e.version}`,target:"_blank",rel:"noopener",class:"flex justify-end pb-1 sm:pb-2",textContent:a(e.version)},null,8,g),u]),v,t("a",w,[x,t("p",{class:"mt-2",textContent:a(e.readDocs)},null,8,m)]),t("a",b,[_,k,t("p",{class:"mt-2",textContent:a(e.starGitHub)},null,8,y)]),t("a",S,[M,j,t("p",{class:"mt-2",textContent:a(e.followTwitter)},null,8,V)])])]))}},P=i(z,[["__scopeId","data-v-25102a06"]]);export{P as default}; diff --git a/package.json b/package.json deleted file mode 100644 index 75ace8a..0000000 --- a/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "private": true, - "typings": "*.d.ts", - "scripts": { - "build": "nuxt build", - "dev": "nuxt dev", - "generate": "nuxt generate", - "preview": "nuxt preview", - "postinstall": "nuxt prepare", - "tsc": "nuxi typecheck" - }, - "devDependencies": { - "@lewebsimple/nuxt3-svg": "^0.1.1", - "@nuxt/content": "^2.2.0", - "@nuxtjs/color-mode": "^3.1.8", - "add": "^2.0.6", - "nuxt": "3.0.0-rc.12", - "typescript": "^4.8.4", - "vue-tsc": "^1.0.9", - "yarn": "^1.22.19" - }, - "dependencies": { - "@yeger/vue-masonry-wall": "^3.2.14", - "body-scroll-lock": "^4.0.0-beta.0", - "sass": "^1.55.0", - "vue-masonry-css": "^1.0.3" - } -} diff --git a/pages/[...slug].vue b/pages/[...slug].vue deleted file mode 100644 index 648e427..0000000 --- a/pages/[...slug].vue +++ /dev/null @@ -1,30 +0,0 @@ - - - - - diff --git a/pages/bio.vue b/pages/bio.vue deleted file mode 100644 index 9894a1b..0000000 --- a/pages/bio.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - - - diff --git a/pages/index.vue b/pages/index.vue deleted file mode 100644 index 95d76d3..0000000 --- a/pages/index.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - - - diff --git a/plugins/vue-mansonry-wall.ts b/plugins/vue-mansonry-wall.ts deleted file mode 100644 index d76be0f..0000000 --- a/plugins/vue-mansonry-wall.ts +++ /dev/null @@ -1,5 +0,0 @@ -import MasonryWall from "@yeger/vue-masonry-wall"; - -export default defineNuxtPlugin((nuxtApp) => { - nuxtApp.vueApp.use(MasonryWall); -}); diff --git a/server/plugins/highlight.ts b/server/plugins/highlight.ts deleted file mode 100644 index 46b2b06..0000000 --- a/server/plugins/highlight.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default defineNitroPlugin((nitroApp) => { - nitroApp.hooks.hook("content:file:beforeParse", (file) => { - if (file._id.endsWith(".md")) { - file.body = file.body.replace( - /==([^=]+)==/gs, - `$1` - ); - } - }); -}); diff --git a/sql/mysql-and-mariadb-setup/_payload.js b/sql/mysql-and-mariadb-setup/_payload.js new file mode 100644 index 0000000..66aed84 --- /dev/null +++ b/sql/mysql-and-mariadb-setup/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:A,_path:B},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-H09FJYhNy5":{_path:B,_dir:"sql",_draft:o,_partial:o,_locale:"en",_empty:o,title:A,description:e,excerpt:{type:C,children:[{type:a,tag:k,props:{id:p},children:[{type:b,value:q}]},{type:a,tag:c,props:{code:r,language:D},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:b,value:r}]}]}]},{type:a,tag:k,props:{id:s},children:[{type:b,value:t}]},{type:a,tag:E,props:{},children:[{type:b,value:F},{type:a,tag:g,props:{},children:[{type:b,value:G}]},{type:b,value:H},{type:a,tag:g,props:{},children:[{type:b,value:I}]},{type:b,value:J}]},{type:a,tag:c,props:{code:u,language:K},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:b,value:u}]}]}]},{type:a,tag:k,props:{id:v},children:[{type:b,value:w}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{},children:[{type:b,value:L},{type:a,tag:g,props:{},children:[{type:b,value:M}]},{type:b,value:N},{type:a,tag:g,props:{},children:[{type:b,value:O}]},{type:b,value:P},{type:a,tag:g,props:{},children:[{type:b,value:Q}]},{type:b,value:R}]}]},{type:a,tag:c,props:{code:x,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:b,value:x}]}]}]},{type:a,tag:l,props:{start:i},children:[{type:a,tag:m,props:{},children:[{type:b,value:S}]}]},{type:a,tag:c,props:{code:y,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:b,value:y}]}]}]},{type:a,tag:l,props:{start:T},children:[{type:a,tag:m,props:{},children:[{type:b,value:U}]}]},{type:a,tag:c,props:{code:z,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:b,value:z}]}]}]}]},body:{type:C,children:[{type:a,tag:k,props:{id:p},children:[{type:b,value:q}]},{type:a,tag:c,props:{code:r,language:D},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:"sudo apt update"}]}]},{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:"sudo apt install mariadb-server"}]}]},{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:"sudo mysql_secure_installation"}]}]}]}]}]},{type:a,tag:k,props:{id:s},children:[{type:b,value:t}]},{type:a,tag:E,props:{},children:[{type:b,value:F},{type:a,tag:g,props:{},children:[{type:b,value:G}]},{type:b,value:H},{type:a,tag:g,props:{},children:[{type:b,value:I}]},{type:b,value:J}]},{type:a,tag:c,props:{code:u,language:K},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:V}]}]},{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:"bind-"}]},{type:a,tag:d,props:{class:"ct-18d6eb"},children:[{type:b,value:"address"}]},{type:a,tag:d,props:{class:j},children:[{type:b,value:" = 0.0.0.0"}]}]},{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{class:j},children:[{type:b,value:V}]}]}]}]}]},{type:a,tag:k,props:{id:v},children:[{type:b,value:w}]},{type:a,tag:l,props:{},children:[{type:a,tag:m,props:{},children:[{type:b,value:L},{type:a,tag:g,props:{},children:[{type:b,value:M}]},{type:b,value:N},{type:a,tag:g,props:{},children:[{type:b,value:O}]},{type:b,value:P},{type:a,tag:g,props:{},children:[{type:b,value:Q}]},{type:b,value:R}]}]},{type:a,tag:c,props:{code:x,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{},children:[{type:b,value:"CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';"}]}]}]}]}]},{type:a,tag:l,props:{start:i},children:[{type:a,tag:m,props:{},children:[{type:b,value:S}]}]},{type:a,tag:c,props:{code:y,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{},children:[{type:b,value:"GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';"}]}]}]}]}]},{type:a,tag:l,props:{start:T},children:[{type:a,tag:m,props:{},children:[{type:b,value:U}]}]},{type:a,tag:c,props:{code:z,language:n},children:[{type:a,tag:f,props:{},children:[{type:a,tag:c,props:{__ignoreMap:e},children:[{type:a,tag:d,props:{class:h},children:[{type:a,tag:d,props:{},children:[{type:b,value:"FLUSH PRIVILEGES;"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-18d6eb{color:#FF7B72}.ct-39acdd{color:#C9D1D9}.light .ct-39acdd{color:#657B83}.light .ct-18d6eb{color:#859900}"}]}],toc:{title:e,searchDepth:i,depth:i,links:[{id:p,depth:i,text:q},{id:s,depth:i,text:t},{id:v,depth:i,text:w}]}},_type:"markdown",_id:"content:SQL:MySQL and MariaDB setup.md",_source:"content",_file:"SQL\u002FMySQL and MariaDB setup.md",_extension:"md"}},prerenderedAt:1667450792357}}("element","text","code","span","","pre","code-inline","line",2,"ct-39acdd","h2","ol","li","mysql",false,"install-mariadb-on-ubuntu-2004-lts","Install MariaDB on Ubuntu 20.04 LTS","sudo apt update\nsudo apt install mariadb-server\nsudo mysql_secure_installation\n","access-database-from-outside","Access Database from outside","...\nbind-address = 0.0.0.0\n...\n","create-administrative-user","Create Administrative User","CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';\n","GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';\n","FLUSH PRIVILEGES;\n","MySQL And MariaDB Setup","\u002Fsql\u002Fmysql-and-mariadb-setup","root","bash","p","Open ","\u002Fetc\u002Fmysql\u002Fmariadb.conf.d\u002F50-server.cnf"," and change the ","bind-address"," to:","nginx","Create a new user ","newuser"," for the host ","localhost"," with a new ","password",":","Grant all permissions to the new user",3,"Update permissions","...")) \ No newline at end of file diff --git a/sql/mysql-and-mariadb-setup/index.html b/sql/mysql-and-mariadb-setup/index.html new file mode 100644 index 0000000..97f09b1 --- /dev/null +++ b/sql/mysql-and-mariadb-setup/index.html @@ -0,0 +1,6 @@ + + +MySQL And MariaDB Setup • Obsidian Garden +

MySQL And MariaDB Setup

Install MariaDB on Ubuntu 20.04 LTS

sudo apt updatesudo apt install mariadb-serversudo mysql_secure_installation

Access Database from outside

Open /etc/mysql/mariadb.conf.d/50-server.cnf and change the bind-address to:

...bind-address = 0.0.0.0...

Create Administrative User

  1. Create a new user newuser for the host localhost with a new password:
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
  1. Grant all permissions to the new user
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
  1. Update permissions
FLUSH PRIVILEGES;
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/sql/postgress-setup/_payload.js b/sql/postgress-setup/_payload.js new file mode 100644 index 0000000..699a883 --- /dev/null +++ b/sql/postgress-setup/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:N,_path:O}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-OeCNLqMRmJ":{_path:O,_dir:m,_draft:r,_partial:r,_locale:"en",_empty:r,title:N,description:f,excerpt:{type:P,children:[{type:a,tag:k,props:{id:s},children:[{type:b,value:t}]},{type:a,tag:d,props:{code:u,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:u}]}]}]},{type:a,tag:k,props:{id:v},children:[{type:b,value:w}]},{type:a,tag:g,props:{},children:[{type:b,value:Q}]},{type:a,tag:d,props:{code:x,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:x}]}]}]},{type:a,tag:k,props:{id:y},children:[{type:b,value:z}]},{type:a,tag:g,props:{},children:[{type:b,value:R},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:S},{type:a,tag:e,props:{},children:[{type:b,value:T}]},{type:b,value:U},{type:a,tag:e,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:X},{type:a,tag:e,props:{},children:[{type:b,value:q}]},{type:b,value:p}]},{type:a,tag:Y,props:{id:A},children:[{type:b,value:B}]},{type:a,tag:g,props:{},children:[{type:b,value:Z},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:_},{type:a,tag:e,props:{},children:[{type:b,value:q}]},{type:b,value:$},{type:a,tag:e,props:{},children:[{type:b,value:aa}]},{type:b,value:p}]},{type:a,tag:d,props:{code:C,language:ab},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:C}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ac},{type:a,tag:e,props:{},children:[{type:b,value:ad}]},{type:b,value:p}]},{type:a,tag:d,props:{code:D},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:D}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ae}]},{type:a,tag:d,props:{code:E,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:E}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:af}]},{type:a,tag:d,props:{code:F,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:F}]}]}]},{type:a,tag:k,props:{id:G},children:[{type:b,value:H}]},{type:a,tag:g,props:{},children:[{type:b,value:ag}]},{type:a,tag:d,props:{code:I,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:I}]}]}]},{type:a,tag:k,props:{id:J},children:[{type:b,value:K}]},{type:a,tag:g,props:{},children:[{type:b,value:ah},{type:a,tag:e,props:{},children:[{type:b,value:ai}]},{type:b,value:aj}]},{type:a,tag:d,props:{code:L,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:L}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ak},{type:a,tag:e,props:{},children:[{type:b,value:al}]},{type:b,value:am}]},{type:a,tag:g,props:{},children:[{type:b,value:an}]},{type:a,tag:d,props:{code:M,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:b,value:M}]}]}]}]},body:{type:P,children:[{type:a,tag:k,props:{id:s},children:[{type:b,value:t}]},{type:a,tag:d,props:{code:u,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo apt update"}]}]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo apt install -y postgresql postgresql-contrib postgresql-client"}]}]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo systemctl status postgresql.service"}]}]}]}]}]},{type:a,tag:k,props:{id:v},children:[{type:b,value:w}]},{type:a,tag:g,props:{},children:[{type:b,value:Q}]},{type:a,tag:d,props:{code:x,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo -u postgres psql"}]}]},{type:a,tag:c,props:{class:h},children:[]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"psql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))"}]}]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"Type "}]},{type:a,tag:c,props:{class:"ct-c12bff"},children:[{type:b,value:"\"help\""}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:" "}]},{type:a,tag:c,props:{class:"ct-5ec62d"},children:[{type:b,value:"for"}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:" help."}]}]},{type:a,tag:c,props:{class:h},children:[]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"postgres="}]},{type:a,tag:c,props:{class:"ct-0949e9"},children:[{type:b,value:"#"}]}]}]}]}]},{type:a,tag:k,props:{id:y},children:[{type:b,value:z}]},{type:a,tag:g,props:{},children:[{type:b,value:R},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:S},{type:a,tag:e,props:{},children:[{type:b,value:T}]},{type:b,value:U},{type:a,tag:e,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:X},{type:a,tag:e,props:{},children:[{type:b,value:q}]},{type:b,value:p}]},{type:a,tag:Y,props:{id:A},children:[{type:b,value:B}]},{type:a,tag:g,props:{},children:[{type:b,value:Z},{type:a,tag:e,props:{},children:[{type:b,value:o}]},{type:b,value:_},{type:a,tag:e,props:{},children:[{type:b,value:q}]},{type:b,value:$},{type:a,tag:e,props:{},children:[{type:b,value:aa}]},{type:b,value:p}]},{type:a,tag:d,props:{code:C,language:ab},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo vi \u002Fetc\u002Fpostgresql\u002F12\u002Fmain\u002Fpg_hba.conf"}]}]},{type:a,tag:c,props:{class:h},children:[]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:ao}]}]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:"ct-ddaa35"},children:[{type:b,value:"local"}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:" all postgres peer"}]}]},{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:ao}]}]}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ac},{type:a,tag:e,props:{},children:[{type:b,value:ad}]},{type:b,value:p}]},{type:a,tag:d,props:{code:D},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{},children:[{type:b,value:"local all postgres md5"}]}]}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ae}]},{type:a,tag:d,props:{code:E,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"sudo systemctl restart postgresql"}]}]}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:af}]},{type:a,tag:d,props:{code:F,language:l},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"psql -U postgres -d postgres -h databasehostname"}]}]}]}]}]},{type:a,tag:k,props:{id:G},children:[{type:b,value:H}]},{type:a,tag:g,props:{},children:[{type:b,value:ag}]},{type:a,tag:d,props:{code:I,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{},children:[{type:b,value:"create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n List of roles\n Role name | Attributes | Member of\n-----------+------------------------------------------------------------+-----------\n myuser | | {}\n postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}"}]}]}]}]}]},{type:a,tag:k,props:{id:J},children:[{type:b,value:K}]},{type:a,tag:g,props:{},children:[{type:b,value:ah},{type:a,tag:e,props:{},children:[{type:b,value:ai}]},{type:b,value:aj}]},{type:a,tag:d,props:{code:L,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{},children:[{type:b,value:"CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n List of databases\n Name | Owner | Encoding | Collate | Ctype | Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname | myuser | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c\u002Fpostgres +\n | | | | | postgres=CTc\u002Fpostgres\n template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c\u002Fpostgres +\n | | | | | postgres=CTc\u002Fpostgres"}]}]}]}]}]},{type:a,tag:g,props:{},children:[{type:b,value:ak},{type:a,tag:e,props:{},children:[{type:b,value:al}]},{type:b,value:am}]},{type:a,tag:g,props:{},children:[{type:b,value:an}]},{type:a,tag:d,props:{code:M,language:m},children:[{type:a,tag:i,props:{},children:[{type:a,tag:d,props:{__ignoreMap:f},children:[{type:a,tag:c,props:{class:h},children:[{type:a,tag:c,props:{},children:[{type:b,value:"postgres=# alter database dbname owner to myuser;\nALTER DATABASE"}]}]}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-ddaa35{color:#FF7B72}.ct-0949e9{color:#8B949E}.ct-5ec62d{color:#FF7B72}.ct-c12bff{color:#A5D6FF}.ct-559254{color:#C9D1D9}.light .ct-559254{color:#657B83}.light .ct-c12bff{color:#2AA198}.light .ct-5ec62d{color:#859900}.light .ct-0949e9{color:#93A1A1}.light .ct-ddaa35{color:#073642}"}]}],toc:{title:f,searchDepth:n,depth:n,links:[{id:s,depth:n,text:t},{id:v,depth:n,text:w},{id:y,depth:n,text:z,children:[{id:A,depth:3,text:B}]},{id:G,depth:n,text:H},{id:J,depth:n,text:K}]}},_type:"markdown",_id:"content:SQL:Postgress setup.md",_source:"content",_file:"SQL\u002FPostgress setup.md",_extension:"md"}},prerenderedAt:1667450792404}}("element","text","span","code","code-inline","","p","line","pre","ct-559254","h2","bash","sql",2,"postgres",".","pg_hba.conf",false,"install-postgresql-12-on-ubuntu-2004-lts","Install PostgreSQL 12 on Ubuntu 20.04 LTS","sudo apt update\nsudo apt install -y postgresql postgresql-contrib postgresql-client\nsudo systemctl status postgresql.service\n","initial-database-connection","Initial database connection","sudo -u postgres psql\n\npsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))\nType \"help\" for help.\n\npostgres=#\n","set-password-for-postgres-database-user","Set password for postgres database user","update-pg_hbaconf-to-allow-postgres-user-connections-with-password","Update pg_hba.conf to allow postgres user connections with password","sudo vi \u002Fetc\u002Fpostgresql\u002F12\u002Fmain\u002Fpg_hba.conf\n\n...\nlocal all postgres peer\n...\n","local all postgres md5\n","sudo systemctl restart postgresql\n","psql -U postgres -d postgres -h databasehostname\n","creation-of-additional-database-users","Creation of additional database users","create user myuser with encrypted password 'Supersecret';\nCREATE ROLE\n\npostgres=# \\du\n List of roles\n Role name | Attributes | Member of\n-----------+------------------------------------------------------------+-----------\n myuser | | {}\n postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}\n","creation-of-additional-databases","Creation of additional databases","CREATE DATABASE dbname OWNER myuser;\nCREATE DATABASE\n\npostgres=# \\l\n List of databases\n Name | Owner | Encoding | Collate | Ctype | Access privileges\n-----------+----------+----------+-------------+-------------+-----------------------\n dbname | myuser | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |\n template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c\u002Fpostgres +\n | | | | | postgres=CTc\u002Fpostgres\n template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c\u002Fpostgres +\n | | | | | postgres=CTc\u002Fpostgres\n","postgres=# alter database dbname owner to myuser;\nALTER DATABASE\n","Postgress Setup","\u002Fsql\u002Fpostgress-setup","root","A local connection (from the database server) can be done by the following command:","The password for the "," database user can be set the the quick command ","\\password","\nor by ","alter user postgres password 'Supersecret'",". A connection using the "," user\nis still not possible from the \"outside\" hence to the default settings in the ","h3","In order to allow connections of the "," database user not using OS user\nauthentication, you have to update the "," which can be found under\n","\u002Fetc\u002Fpostgresql\u002F12\u002Fmain\u002Fpg_hba.conf","shell","Change the last section of the above line to ","md5","A restart is required in order to apply the new configuration:","Now a connection from outside the database host is possible e.g.","A database user can be created by the following command:","One can create new Postgres databases within an instance. Therefore you can use the ","psql","\ncommand to login (see above).","You can leave the ","OWNER"," section of the command, when doing so, the current user will become\nowner of the newly created database.","To change the owner of an existing database later, you can use the following command:","...")) \ No newline at end of file diff --git a/sql/postgress-setup/index.html b/sql/postgress-setup/index.html new file mode 100644 index 0000000..816feba --- /dev/null +++ b/sql/postgress-setup/index.html @@ -0,0 +1,33 @@ + + +Postgress Setup • Obsidian Garden +

Postgress Setup

Install PostgreSQL 12 on Ubuntu 20.04 LTS

sudo apt updatesudo apt install -y postgresql postgresql-contrib postgresql-clientsudo systemctl status postgresql.service

Initial database connection

A local connection (from the database server) can be done by the following command:

sudo -u postgres psqlpsql (12.12 (Ubuntu 12.12-0ubuntu0.20.04.1))Type "help" for help.postgres=#

Set password for postgres database user

The password for the postgres database user can be set the the quick command \password +or by alter user postgres password 'Supersecret'. A connection using the postgres user +is still not possible from the "outside" hence to the default settings in the pg_hba.conf.

Update pg_hba.conf to allow postgres user connections with password

In order to allow connections of the postgres database user not using OS user +authentication, you have to update the pg_hba.conf which can be found under +/etc/postgresql/12/main/pg_hba.conf.

sudo vi /etc/postgresql/12/main/pg_hba.conf...local   all             postgres                                peer...

Change the last section of the above line to md5.

local   all             postgres                                md5

A restart is required in order to apply the new configuration:

sudo systemctl restart postgresql

Now a connection from outside the database host is possible e.g.

psql -U postgres -d postgres -h databasehostname

Creation of additional database users

A database user can be created by the following command:

create user myuser with encrypted password 'Supersecret';
+CREATE ROLE
+
+postgres=# \du
+                                   List of roles
+ Role name |                         Attributes                         | Member of
+-----------+------------------------------------------------------------+-----------
+ myuser    |                                                            | {}
+ postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}

Creation of additional databases

One can create new Postgres databases within an instance. Therefore you can use the psql +command to login (see above).

CREATE DATABASE dbname OWNER myuser;
+CREATE DATABASE
+
+postgres=# \l
+                                  List of databases
+   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges
+-----------+----------+----------+-------------+-------------+-----------------------
+ dbname    | myuser   | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
+ postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
+ template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
+           |          |          |             |             | postgres=CTc/postgres
+ template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
+           |          |          |             |             | postgres=CTc/postgres

You can leave the OWNER section of the command, when doing so, the current user will become +owner of the newly created database.

To change the owner of an existing database later, you can use the following command:

postgres=# alter database dbname owner to myuser;
+ALTER DATABASE
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index a7bfa18..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - // https://v3.nuxtjs.org/concepts/typescript - "extends": "./.nuxt/tsconfig.json" -} diff --git a/typescript/add-global-variable-to-window/_payload.js b/typescript/add-global-variable-to-window/_payload.js new file mode 100644 index 0000000..443af2b --- /dev/null +++ b/typescript/add-global-variable-to-window/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:N,_path:O},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-Of3zHqmk1n":{_path:O,_dir:k,_draft:z,_partial:z,_locale:"en",_empty:z,title:N,description:"Sometimes you want to add global variable to your window. That thing's called global module augmentation.",excerpt:{type:P,children:[{type:a,tag:i,props:{},children:[{type:b,value:Q},{type:a,tag:f,props:{},children:[{type:b,value:s}]},{type:b,value:R},{type:a,tag:n,props:{href:S,rel:[t]},children:[{type:b,value:T}]},{type:b,value:A}]},{type:a,tag:i,props:{},children:[{type:b,value:U},{type:a,tag:f,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:f,props:{},children:[{type:b,value:s}]},{type:b,value:X},{type:a,tag:f,props:{},children:[{type:b,value:Y}]},{type:b,value:Z}]},{type:a,tag:g,props:{code:B,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:b,value:B}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:_},{type:a,tag:f,props:{},children:[{type:b,value:$}]},{type:b,value:aa},{type:a,tag:f,props:{},children:[{type:b,value:ab}]},{type:b,value:ac},{type:a,tag:n,props:{href:ad},children:[{type:b,value:ae}]},{type:b,value:af}]},{type:a,tag:ag,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:i,props:{},children:[{type:b,value:ah},{type:a,tag:f,props:{},children:[{type:b,value:p}]},{type:b,value:ai}]},{type:a,tag:g,props:{code:E,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:b,value:E}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:aj},{type:a,tag:f,props:{},children:[{type:b,value:ak}]},{type:b,value:al},{type:a,tag:n,props:{href:am,rel:[t]},children:[{type:b,value:an}]},{type:b,value:u}]},{type:a,tag:g,props:{code:F,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:b,value:F}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:ao},{type:a,tag:f,props:{},children:[{type:b,value:ap}]},{type:b,value:aq},{type:a,tag:f,props:{},children:[{type:b,value:ar}]},{type:b,value:as}]},{type:a,tag:g,props:{code:G,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:b,value:G}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:at},{type:a,tag:n,props:{href:au},children:[{type:b,value:av}]},{type:b,value:aw}]}]},body:{type:P,children:[{type:a,tag:i,props:{},children:[{type:b,value:Q},{type:a,tag:f,props:{},children:[{type:b,value:s}]},{type:b,value:R},{type:a,tag:n,props:{href:S,rel:[t]},children:[{type:b,value:T}]},{type:b,value:A}]},{type:a,tag:i,props:{},children:[{type:b,value:U},{type:a,tag:f,props:{},children:[{type:b,value:V}]},{type:b,value:W},{type:a,tag:f,props:{},children:[{type:b,value:s}]},{type:b,value:X},{type:a,tag:f,props:{},children:[{type:b,value:Y}]},{type:b,value:Z}]},{type:a,tag:g,props:{code:B,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:ax}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:"global"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:ay}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:"Window"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:az}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:u}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aA}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:aB}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:aC},children:[{type:b,value:aD}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aE}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:K}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:_},{type:a,tag:f,props:{},children:[{type:b,value:$}]},{type:b,value:aa},{type:a,tag:f,props:{},children:[{type:b,value:ab}]},{type:b,value:ac},{type:a,tag:n,props:{href:ad},children:[{type:b,value:ae}]},{type:b,value:af}]},{type:a,tag:ag,props:{id:C},children:[{type:b,value:D}]},{type:a,tag:i,props:{},children:[{type:b,value:ah},{type:a,tag:f,props:{},children:[{type:b,value:p}]},{type:b,value:ai}]},{type:a,tag:g,props:{code:E,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:x},children:[{type:b,value:"\u002F\u002F Sample.ts"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:"export"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:"class"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:x},children:[{type:b,value:"\u002F\u002F nothing :-)"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:K}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:aj},{type:a,tag:f,props:{},children:[{type:b,value:ak}]},{type:b,value:al},{type:a,tag:n,props:{href:am,rel:[t]},children:[{type:b,value:an}]},{type:b,value:u}]},{type:a,tag:g,props:{code:F,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:x},children:[{type:b,value:"\u002F\u002F fancyThings.ts"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aF}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aG}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:aH}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:y},children:[{type:b,value:aI}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:ax}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:"module"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:y},children:[{type:b,value:aI}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:ay}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:I},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:az}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:u}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aA}]},{type:a,tag:c,props:{class:m},children:[{type:b,value:aB}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:aC},children:[{type:b,value:aD}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:aE}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:K}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:ao},{type:a,tag:f,props:{},children:[{type:b,value:ap}]},{type:b,value:aq},{type:a,tag:f,props:{},children:[{type:b,value:ar}]},{type:b,value:as}]},{type:a,tag:g,props:{code:G,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:g,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aF}]},{type:a,tag:c,props:{class:v},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:aG}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:aH}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:y},children:[{type:b,value:"\".\u002Fsample\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:j},children:[{type:b,value:L}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:y},children:[{type:b,value:"\".\u002FfancyThings\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:m},children:[{type:b,value:"const"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:"ct-697848"},children:[{type:b,value:aJ}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"="}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"new"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:h}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:p}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"();"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:v},children:[{type:b,value:aJ}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:A}]},{type:a,tag:c,props:{class:w},children:[{type:b,value:J}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"(); "}]},{type:a,tag:c,props:{class:x},children:[{type:b,value:"\u002F\u002F ok"}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:at},{type:a,tag:n,props:{href:au},children:[{type:b,value:av}]},{type:b,value:aw}]},{type:a,tag:"style",children:[{type:b,value:".ct-697848{color:#79C0FF}.ct-309c27{color:#A5D6FF}.ct-46d873{color:#8B949E}.ct-a1f492{color:#79C0FF}.ct-754e74{color:#FF7B72}.ct-f0bc9a{color:#D2A8FF}.ct-aab988{color:#FFA657}.ct-76423f{color:#C9D1D9}.ct-e6aa60{color:#C9D1D9}.ct-580441{color:#FF7B72}.light .ct-580441{color:#073642}.light .ct-e6aa60{color:#657B83}.light .ct-76423f{color:#268BD2}.light .ct-aab988{color:#268BD2}.light .ct-f0bc9a{color:#268BD2}.light .ct-754e74{color:#859900}.light .ct-a1f492{color:#859900}.light .ct-46d873{color:#93A1A1}.light .ct-309c27{color:#2AA198}.light .ct-697848{color:#268BD2}"}]}],toc:{title:l,searchDepth:M,depth:M,links:[{id:C,depth:M,text:D}]}},_type:"markdown",_id:"content:Typescript:Add global variable to window.md",_source:"content",_file:"Typescript\u002FAdd global variable to window.md",_extension:"md"}},prerenderedAt:1667450792447}}("element","text","span","ct-e6aa60","line","code-inline","code"," ","p","ct-754e74","typescript","","ct-580441","a","pre","Sample"," {",";","window","nofollow",":","ct-76423f","ct-f0bc9a","ct-46d873","ct-309c27",false,".","declare global {\n interface Window {\n doFancyThings: () =\u003E void;\n }\n}\n","augmenting-existing-interface","Augmenting existing interface","\u002F\u002F Sample.ts\n\nexport class Sample {\n \u002F\u002F nothing :-)\n}\n","\u002F\u002F fancyThings.ts\nimport { Sample } from \".\u002FSample\";\n\ndeclare module \".\u002FSample\" {\n interface Sample {\n doFancyThings: () =\u003E void;\n }\n}\n","import { Sample } from \".\u002Fsample\";\nimport \".\u002FfancyThings\";\n\nconst sample = new Sample();\nsample.doFancyThings(); \u002F\u002F ok\n"," ","ct-aab988","doFancyThings","}","import",2,"Add Global Variable To Window","\u002Ftypescript\u002Fadd-global-variable-to-window","root","Sometimes you want to add global variable to your ",". That thing's called ","https:\u002F\u002Fwww.typescriptlang.org\u002Fdocs\u002Fhandbook\u002Fdeclaration-merging.html#global-augmentation","global module augmentation","Say you need to call ","window.doFancyThings()",". For that you should augment global "," interface in ","*.d.ts"," file:","This is useful for declaring global ","window.ethereum"," (or ","window.web3",") in ","\u002Fblockchain\u002FCommon%20typescript%20examples","blockchain"," projects with typescript, which use wallet browser extensions.","h2","For example, you have class "," without any functionality:","Then you want extend it with ","doFancyThings()"," method. That can be achieved with said ","https:\u002F\u002Fwww.typescriptlang.org\u002Fdocs\u002Fhandbook\u002Fdeclaration-merging.html#module-augmentation","module augmentation","Now you can call ","sample.doFancyThings()"," by importing both ",".ts"," files:","This example is useful for ",".\u002FFrontend\u002FVue\u002FAdding%20global%20properties%20to%20component","adding global properties to component"," in vue.js.","declare","interface"," "," () ","=\u003E","ct-a1f492","void"," }"," { "," } ","from","\".\u002FSample\"","sample")) \ No newline at end of file diff --git a/typescript/add-global-variable-to-window/index.html b/typescript/add-global-variable-to-window/index.html new file mode 100644 index 0000000..19bcf6e --- /dev/null +++ b/typescript/add-global-variable-to-window/index.html @@ -0,0 +1,6 @@ + + +Add Global Variable To Window • Obsidian Garden +

Add Global Variable To Window

Sometimes you want to add global variable to your window. That thing's called global module augmentation.

Say you need to call window.doFancyThings(). For that you should augment global window interface in *.d.ts file:

declare global {  interface Window {    doFancyThings: () => void;  }}

This is useful for declaring global window.ethereum (or window.web3) in blockchain projects with typescript, which use wallet browser extensions.

Augmenting existing interface

For example, you have class Sample without any functionality:

// Sample.tsexport class Sample {  // nothing :-)}

Then you want extend it with doFancyThings() method. That can be achieved with said module augmentation:

// fancyThings.tsimport { Sample } from "./Sample";declare module "./Sample" {  interface Sample {    doFancyThings: () => void;  }}

Now you can call sample.doFancyThings() by importing both .ts files:

import { Sample } from "./sample";import "./fancyThings";const sample = new Sample();sample.doFancyThings(); // ok

This example is useful for adding global properties to component in vue.js.

btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/typescript/flatten-object-with-periods/_payload.js b/typescript/flatten-object-with-periods/_payload.js new file mode 100644 index 0000000..b0193c3 --- /dev/null +++ b/typescript/flatten-object-with-periods/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:X,_path:Y},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-3yyO3sZiNO":{_path:Y,_dir:z,_draft:I,_partial:I,_locale:J,_empty:I,title:X,description:K,excerpt:{type:Z,children:[{type:a,tag:u,props:{},children:[{type:c,value:K}]},{type:a,tag:u,props:{},children:[{type:c,value:_},{type:a,tag:$,props:{href:aa,rel:[ab]},children:[{type:c,value:ac}]},{type:c,value:ad}]},{type:a,tag:m,props:{code:L,language:z},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:A},children:[{type:c,value:L}]}]}]},{type:a,tag:u,props:{},children:[{type:c,value:ae}]},{type:a,tag:m,props:{code:M,language:z},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:A},children:[{type:c,value:M}]}]}]}]},body:{type:Z,children:[{type:a,tag:u,props:{},children:[{type:c,value:K}]},{type:a,tag:u,props:{},children:[{type:c,value:_},{type:a,tag:$,props:{href:aa,rel:[ab]},children:[{type:c,value:ac}]},{type:c,value:ad}]},{type:a,tag:m,props:{code:L,language:z},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:A},children:[{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"import"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"from"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'.\u002Fen.json'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"typeof"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ag}]}]},{type:a,tag:b,props:{class:h},children:[]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:ah},children:[{type:c,value:"const"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:"ct-242dc6"},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:P},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:" ("}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:P},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:al},children:[{type:c,value:af}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:aj},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:P},children:[{type:c,value:"?:"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:al},children:[{type:c,value:"TranslateOptions"}]},{type:a,tag:b,props:{class:r},children:[{type:c,value:") "}]},{type:a,tag:b,props:{class:ah},children:[{type:c,value:"=\u003E"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:"I18nLib"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"."}]},{type:a,tag:b,props:{class:"ct-b8298a"},children:[{type:c,value:ai}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"("}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:ak}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:B},children:[{type:c,value:am}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:");"}]}]}]}]}]},{type:a,tag:u,props:{},children:[{type:c,value:ae}]},{type:a,tag:m,props:{code:M,language:z},children:[{type:a,tag:E,props:{},children:[{type:a,tag:m,props:{__ignoreMap:A},children:[{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:F},children:[{type:c,value:"\u002F\u002F This one based on answer from StackOverflow:"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:F},children:[{type:c,value:"\u002F\u002F https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F58434389\u002Ftypescript-deep-keyof-of-a-nested-object"}]}]},{type:a,tag:b,props:{class:h},children:[]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:f},children:[{type:c,value:"export"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:S}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"] "}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:U}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:D}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:"\u002F\u002F plural object"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:V}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:"object"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:" { ["}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"in"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:U}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"-?:"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:O}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"], "}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:as}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:R}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"]\u003E\u003E }["}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:aq}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:v}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:U}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:h},children:[]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:F},children:[{type:c,value:"\u002F\u002F Fix it for you plural form"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ap}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"Record"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'one'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'few'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'many'"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ag}]}]},{type:a,tag:b,props:{class:h},children:[]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:ar}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:ao}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:S}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:W}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:S}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"`${"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"}${''"}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:t}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:V}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:y},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"'.'}${"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]},{type:a,tag:b,props:{class:l},children:[{type:c,value:"}`"}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:Q}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:D}]}]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:o}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:s}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:N}]}]},{type:a,tag:b,props:{class:h},children:[]},{type:a,tag:b,props:{class:h},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:C}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:at}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:p}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:T}]},{type:a,tag:b,props:{class:k},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:"1"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:"2"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:"3"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:"4"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:an}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:f},children:[{type:c,value:"..."}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:"Array"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:q}]},{type:a,tag:b,props:{class:n},children:[{type:c,value:au}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:"\u003E];"}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-ffb8cb{color:#A5D6FF}.ct-becebd{color:#79C0FF}.ct-e52d61{color:#79C0FF}.ct-f1fc48{color:#8B949E}.ct-b8298a{color:#D2A8FF}.ct-7c830d{color:#FFA657}.ct-c56ad7{color:#FFA657}.ct-1dff2a{color:#FF7B72}.ct-242dc6{color:#D2A8FF}.ct-679523{color:#C9D1D9}.ct-02aa0f{color:#FF7B72}.ct-8d3044{color:#FFA657}.ct-52c38c{color:#FF7B72}.ct-a49555{color:#A5D6FF}.ct-8756fd{color:#C9D1D9}.ct-e523ef{color:#C9D1D9}.ct-ddc9a9{color:#FF7B72}.light .ct-ddc9a9{color:#859900}.light .ct-e523ef{color:#657B83}.light .ct-8756fd{color:#268BD2}.light .ct-a49555{color:#2AA198}.light .ct-52c38c{color:#073642}.light .ct-8d3044{color:#268BD2}.light .ct-02aa0f{color:#073642}.light .ct-679523{color:#657B83}.light .ct-242dc6{color:#268BD2}.light .ct-1dff2a{color:#859900}.light .ct-c56ad7{color:#657B83}.light .ct-7c830d{color:#268BD2}.light .ct-b8298a{color:#268BD2}.light .ct-f1fc48{color:#93A1A1}.light .ct-e52d61{color:#859900}.light .ct-becebd{color:#D33682}.light .ct-ffb8cb{color:#657B83}"}]}],toc:{title:A,searchDepth:av,depth:av,links:[]}},_type:"markdown",_id:"content:Typescript:Flatten object with periods.md",_source:"content",_file:"Typescript\u002FFlatten object with periods.md",_extension:"md"}},prerenderedAt:1667450792497}}("element","span","text","ct-e523ef"," ","ct-ddc9a9","ct-8d3044","line",", ","ct-52c38c","ct-e52d61","ct-a49555","code","ct-becebd"," ","=","\u003C","ct-679523",":","extends","p","T","?","K","ct-ffb8cb","typescript","","ct-8756fd","type","never","pre","ct-f1fc48","|","P",false,"en","This helper generates Typescript types for i18n dictionary json\nfiles by flattening it with period delimiter. Supports plural forms.","import en from '.\u002Fen.json';\ntype TranslationPath = Flatten\u003Ctypeof en\u003E;\n\nconst t = (key: TranslationPath, options?: TranslateOptions) =\u003E\n I18nLib.t(key, options);\n","\u002F\u002F This one based on answer from StackOverflow:\n\u002F\u002F https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F58434389\u002Ftypescript-deep-keyof-of-a-nested-object\n\nexport type Flatten\u003CT, D extends number = 5\u003E = [D] extends [never]\n ? never\n : T extends PluralForm \u002F\u002F plural object\n ? ''\n : T extends object\n ? { [K in keyof T]-?: Join\u003CK, Flatten\u003CT[K], Prev[D]\u003E\u003E }[keyof T]\n : '';\n\n\u002F\u002F Fix it for you plural form\ntype PluralForm = Record\u003C'one' | 'few' | 'many', string\u003E;\n\ntype Join\u003CK, P\u003E = K extends string | number\n ? P extends string | number\n ? `${K}${'' extends P ? '' : '.'}${P}`\n : never\n : never;\n\ntype Prev = [never, 0, 1, 2, 3, 4, 5, ...Array\u003C0\u003E];\n",";","Flatten","ct-1dff2a"," ","D","number"," [","]","''","string","Flatten Object With Periods","\u002Ftypescript\u002Fflatten-object-with-periods","root","Used for typing ","a","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fi18n-js","nofollow","i18n.js"," dictionaries;","Flatten type defined here:","TranslationPath","\u003E;","ct-02aa0f","t","ct-c56ad7","key","ct-7c830d","options","5","\u003E ","PluralForm","keyof","Join","[","Prev","0",2)) \ No newline at end of file diff --git a/typescript/flatten-object-with-periods/index.html b/typescript/flatten-object-with-periods/index.html new file mode 100644 index 0000000..506209e --- /dev/null +++ b/typescript/flatten-object-with-periods/index.html @@ -0,0 +1,8 @@ + + +Flatten Object With Periods • Obsidian Garden +

Flatten Object With Periods

This helper generates Typescript types for i18n dictionary json +files by flattening it with period delimiter. Supports plural forms.

Used for typing i18n.js dictionaries;

import en from './en.json';type TranslationPath = Flatten<typeof en>;const t = (key: TranslationPath, options?: TranslateOptions) =>    I18nLib.t(key, options);

Flatten type defined here:

// This one based on answer from StackOverflow:// https://stackoverflow.com/questions/58434389/typescript-deep-keyof-of-a-nested-objectexport type Flatten<T, D extends number = 5> = [D] extends [never]  ? never  : T extends PluralForm // plural object  ? ''  : T extends object  ? { [K in keyof T]-?: Join<K, Flatten<T[K], Prev[D]>> }[keyof T]  : '';// Fix it for you plural formtype PluralForm = Record<'one' | 'few' | 'many', string>;type Join<K, P> = K extends string | number  ? P extends string | number    ? `${K}${'' extends P ? '' : '.'}${P}`    : never  : never;type Prev = [never, 0, 1, 2, 3, 4, 5, ...Array<0>];
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/typescript/frontend/vue/adding-global-properties-to-component/_payload.js b/typescript/frontend/vue/adding-global-properties-to-component/_payload.js new file mode 100644 index 0000000..7208a5a --- /dev/null +++ b/typescript/frontend/vue/adding-global-properties-to-component/_payload.js @@ -0,0 +1 @@ +export default {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-6fvmNhB5QD":null},prerenderedAt:1667450792826} \ No newline at end of file diff --git a/typescript/frontend/vue/adding-global-properties-to-component/index.html b/typescript/frontend/vue/adding-global-properties-to-component/index.html new file mode 100644 index 0000000..6e1dcc9 --- /dev/null +++ b/typescript/frontend/vue/adding-global-properties-to-component/index.html @@ -0,0 +1,6 @@ + + +Obsidian Garden + + \ No newline at end of file diff --git a/typescript/type-guards/_payload.js b/typescript/type-guards/_payload.js new file mode 100644 index 0000000..f685fb3 --- /dev/null +++ b/typescript/type-guards/_payload.js @@ -0,0 +1 @@ +export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:z,_path:A}]}],"content-query-BxgTjDzHE9":{_path:A,_dir:k,_draft:r,_partial:r,_locale:"en",_empty:r,title:z,description:s,excerpt:{type:B,children:[{type:a,tag:n,props:{},children:[{type:c,value:s}]},{type:a,tag:h,props:{code:t,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:c,value:t}]}]}]},{type:a,tag:n,props:{},children:[{type:c,value:C}]},{type:a,tag:h,props:{code:u,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:c,value:u}]}]}]}]},body:{type:B,children:[{type:a,tag:n,props:{},children:[{type:c,value:s}]},{type:a,tag:h,props:{code:t,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:"ct-e6988d"},children:[{type:c,value:"function"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:"ct-68061a"},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"|"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:"Bird"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:")"}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:G}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:F},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:p},children:[{type:c,value:"is"}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:v},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:g},children:[{type:c,value:H}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"return"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"as"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:"ct-cc88bc"},children:[{type:c,value:w}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:")."}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"!=="}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:"ct-dbf28d"},children:[{type:c,value:"undefined"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:";"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]}]}]}]}]},{type:a,tag:n,props:{},children:[{type:c,value:C}]},{type:a,tag:h,props:{code:u,language:k},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:"ct-bd6ed9"},children:[{type:c,value:"const"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:"ct-d4f6a5"},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"="}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:"getSmallPet"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:e}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:j},children:[{type:c,value:"if"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:I}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:D}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:E}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:")) {"}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:J}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:"} "}]},{type:a,tag:b,props:{class:j},children:[{type:c,value:"else"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:H}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:x}]},{type:a,tag:b,props:{class:m},children:[{type:c,value:i}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:L}]},{type:a,tag:b,props:{class:q},children:[{type:c,value:"fly"}]},{type:a,tag:b,props:{class:d},children:[{type:c,value:y}]}]},{type:a,tag:b,props:{class:f},children:[{type:a,tag:b,props:{class:d},children:[{type:c,value:K}]}]}]}]}]},{type:a,tag:"style",children:[{type:c,value:".ct-e3a74f{color:#D2A8FF}.ct-d4f6a5{color:#79C0FF}.ct-bd6ed9{color:#FF7B72}.ct-dbf28d{color:#79C0FF}.ct-cc88bc{color:#FFA657}.ct-ba0a2b{color:#C9D1D9}.ct-359d96{color:#FF7B72}.ct-3d81ad{color:#C9D1D9}.ct-5d2456{color:#FFA657}.ct-f141b4{color:#FF7B72}.ct-b5a0e2{color:#FFA657}.ct-68061a{color:#D2A8FF}.ct-e1ee51{color:#C9D1D9}.ct-e6988d{color:#FF7B72}.light .ct-e6988d{color:#073642}.light .ct-e1ee51{color:#657B83}.light .ct-68061a{color:#268BD2}.light .ct-b5a0e2{color:#657B83}.light .ct-f141b4{color:#859900}.light .ct-5d2456{color:#268BD2}.light .ct-3d81ad{color:#657B83}.light .ct-359d96{color:#859900}.light .ct-ba0a2b{color:#268BD2}.light .ct-cc88bc{color:#268BD2}.light .ct-dbf28d{color:#B58900}.light .ct-bd6ed9{color:#073642}.light .ct-d4f6a5{color:#268BD2}.light .ct-e3a74f{color:#268BD2}"}]}],toc:{title:l,searchDepth:M,depth:M,links:[]}},_type:"markdown",_id:"content:Typescript:Type guards.md",_source:"content",_file:"Typescript\u002FType guards.md",_extension:"md"}},prerenderedAt:1667450792554}}("element","span","text","ct-3d81ad"," ","line","ct-e1ee51","code","pet","ct-359d96","typescript","","ct-ba0a2b","p","pre","ct-f141b4","ct-e3a74f",false,"Useful for type checking at compile and run time:","function isFish(pet: Fish | Bird): pet is Fish {\n return (pet as Fish).swim !== undefined;\n}\n","const pet = getSmallPet();\n \nif (isFish(pet)) {\n pet.swim();\n} else {\n pet.fly();\n}\n","ct-5d2456","Fish"," ","();","Type Guards","\u002Ftypescript\u002Ftype-guards","root","Usage:","isFish","(","ct-b5a0e2",":"," {"," (","swim","}",".",2)) \ No newline at end of file diff --git a/typescript/type-guards/index.html b/typescript/type-guards/index.html new file mode 100644 index 0000000..e490b2e --- /dev/null +++ b/typescript/type-guards/index.html @@ -0,0 +1,6 @@ + + +Type Guards • Obsidian Garden +

Type Guards

Useful for type checking at compile and run time:

function isFish(pet: Fish | Bird): pet is Fish {  return (pet as Fish).swim !== undefined;}

Usage:

const pet = getSmallPet(); if (isFish(pet)) {  pet.swim();} else {  pet.fly();}
btw, have a nice day
(2018 - 2022) muerwre
+ \ No newline at end of file diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 7a15079..0000000 --- a/yarn.lock +++ /dev/null @@ -1,6953 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@ampproject/remapping@^2.1.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" - integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== - dependencies: - "@jridgewell/gen-mapping" "^0.1.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/compat-data@^7.19.3": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.4.tgz#95c86de137bf0317f3a570e1b6e996b427299747" - integrity sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw== - -"@babel/core@^7.18.13", "@babel/core@^7.19.0": - version "7.19.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.6.tgz#7122ae4f5c5a37c0946c066149abd8e75f81540f" - integrity sha512-D2Ue4KHpc6Ys2+AxpIx1BZ8+UegLLLE2p3KJEuJRKmokHOtl49jQ5ny1773KsGLZs8MQvBidAF6yWUJxRqtKtg== - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.19.6" - "@babel/helper-compilation-targets" "^7.19.3" - "@babel/helper-module-transforms" "^7.19.6" - "@babel/helpers" "^7.19.4" - "@babel/parser" "^7.19.6" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.19.6" - "@babel/types" "^7.19.4" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.1" - semver "^6.3.0" - -"@babel/generator@^7.19.6": - version "7.19.6" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.19.6.tgz#9e481a3fe9ca6261c972645ae3904ec0f9b34a1d" - integrity sha512-oHGRUQeoX1QrKeJIKVe0hwjGqNnVYsM5Nep5zo0uE0m42sLH+Fsd2pStJ5sRM1bNyTUUoz0pe2lTeMJrb/taTA== - dependencies: - "@babel/types" "^7.19.4" - "@jridgewell/gen-mapping" "^0.3.2" - jsesc "^2.5.1" - -"@babel/helper-annotate-as-pure@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" - integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-compilation-targets@^7.19.3": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz#a10a04588125675d7c7ae299af86fa1b2ee038ca" - integrity sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg== - dependencies: - "@babel/compat-data" "^7.19.3" - "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.21.3" - semver "^6.3.0" - -"@babel/helper-create-class-features-plugin@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.19.0.tgz#bfd6904620df4e46470bae4850d66be1054c404b" - integrity sha512-NRz8DwF4jT3UfrmUoZjd0Uph9HQnP30t7Ash+weACcyNkiYTywpIjDBgReJMKgr+n86sn2nPVVmJ28Dm053Kqw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-member-expression-to-functions" "^7.18.9" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.9" - "@babel/helper-split-export-declaration" "^7.18.6" - -"@babel/helper-environment-visitor@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" - integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== - -"@babel/helper-function-name@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" - integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== - dependencies: - "@babel/template" "^7.18.10" - "@babel/types" "^7.19.0" - -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-member-expression-to-functions@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz#1531661e8375af843ad37ac692c132841e2fd815" - integrity sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg== - dependencies: - "@babel/types" "^7.18.9" - -"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" - integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-transforms@^7.19.6": - version "7.19.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.19.6.tgz#6c52cc3ac63b70952d33ee987cbee1c9368b533f" - integrity sha512-fCmcfQo/KYr/VXXDIyd3CBGZ6AFhPFy1TfSEJ+PilGVlQT6jcbqtHAM4C1EciRqMza7/TpOUZliuSH+U6HAhJw== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.19.4" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.19.1" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.19.6" - "@babel/types" "^7.19.4" - -"@babel/helper-optimise-call-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" - integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz#4796bb14961521f0f8715990bee2fb6e51ce21bf" - integrity sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw== - -"@babel/helper-replace-supers@^7.18.9": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz#e1592a9b4b368aa6bdb8784a711e0bcbf0612b78" - integrity sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-member-expression-to-functions" "^7.18.9" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/traverse" "^7.19.1" - "@babel/types" "^7.19.0" - -"@babel/helper-simple-access@^7.19.4": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.19.4.tgz#be553f4951ac6352df2567f7daa19a0ee15668e7" - integrity sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg== - dependencies: - "@babel/types" "^7.19.4" - -"@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-string-parser@^7.19.4": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" - integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== - -"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== - -"@babel/helper-validator-option@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" - integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== - -"@babel/helpers@^7.19.4": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.19.4.tgz#42154945f87b8148df7203a25c31ba9a73be46c5" - integrity sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw== - dependencies: - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.19.4" - "@babel/types" "^7.19.4" - -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@^7.16.4", "@babel/parser@^7.18.10", "@babel/parser@^7.19.6": - version "7.19.6" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.6.tgz#b923430cb94f58a7eae8facbffa9efd19130e7f8" - integrity sha512-h1IUp81s2JYJ3mRkdxJgs4UvmSsRvDrx5ICSJbPvtWYv5i1nTBGcBpnog+89rAFMwvvru6E5NUHdBe01UeSzYA== - -"@babel/plugin-syntax-import-meta@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" - integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-jsx@^7.0.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" - integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-syntax-typescript@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz#1c09cd25795c7c2b8a4ba9ae49394576d4133285" - integrity sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-typescript@^7.18.12": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.19.3.tgz#4f1db1e0fe278b42ddbc19ec2f6cd2f8262e35d6" - integrity sha512-z6fnuK9ve9u/0X0rRvI9MY0xg+DOUaABDYOe+/SQTxtlptaBB/V9JIUxJn6xp3lMBeb9qe8xSFmHU35oZDXD+w== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.19.0" - "@babel/helper-plugin-utils" "^7.19.0" - "@babel/plugin-syntax-typescript" "^7.18.6" - -"@babel/standalone@^7.19.0": - version "7.19.6" - resolved "https://registry.yarnpkg.com/@babel/standalone/-/standalone-7.19.6.tgz#88674a287d3875a635b62afb066ebf162cedf13c" - integrity sha512-SUOBMtHlxGpXf14X85c1vtHyxYgIODBUdclntETSEGkgI274MNPBUkOVWpvFmRhMuLokK3CL07qJoK2e5CIToA== - -"@babel/template@^7.0.0", "@babel/template@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" - integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.18.10" - "@babel/types" "^7.18.10" - -"@babel/traverse@^7.0.0", "@babel/traverse@^7.19.1", "@babel/traverse@^7.19.4", "@babel/traverse@^7.19.6": - version "7.19.6" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.19.6.tgz#7b4c865611df6d99cb131eec2e8ac71656a490dc" - integrity sha512-6l5HrUCzFM04mfbG09AagtYyR2P0B71B1wN7PfSPiksDPz2k5H9CBC1tcZpz2M8OxbKTPccByoOJ22rUKbpmQQ== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.19.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.19.6" - "@babel/types" "^7.19.4" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.19.4": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.4.tgz#0dd5c91c573a202d600490a35b33246fed8a41c7" - integrity sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw== - dependencies: - "@babel/helper-string-parser" "^7.19.4" - "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" - -"@cloudflare/kv-asset-handler@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.2.0.tgz#c9959bbd7a1c40bd7c674adae98aa8c8d0e5ca68" - integrity sha512-MVbXLbTcAotOPUj0pAMhVtJ+3/kFkwJqc5qNOleOZTv6QkZZABDMS21dSrSlVswEHwrpWC03e4fWytjqKvuE2A== - dependencies: - mime "^3.0.0" - -"@esbuild/android-arm@0.15.12": - version "0.15.12" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.12.tgz#e548b10a5e55b9e10537a049ebf0bc72c453b769" - integrity sha512-IC7TqIqiyE0MmvAhWkl/8AEzpOtbhRNDo7aph47We1NbE5w2bt/Q+giAhe0YYeVpYnIhGMcuZY92qDK6dQauvA== - -"@esbuild/linux-loong64@0.15.12": - version "0.15.12" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.12.tgz#475b33a2631a3d8ca8aa95ee127f9a61d95bf9c1" - integrity sha512-tZEowDjvU7O7I04GYvWQOS4yyP9E/7YlsB0jjw1Ycukgr2ycEzKyIk5tms5WnLBymaewc6VmRKnn5IJWgK4eFw== - -"@ioredis/commands@^1.1.1": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@ioredis/commands/-/commands-1.2.0.tgz#6d61b3097470af1fdbbe622795b8921d42018e11" - integrity sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg== - -"@jridgewell/gen-mapping@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" - integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== - dependencies: - "@jridgewell/set-array" "^1.0.0" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/source-map@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" - integrity sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/trace-mapping@^0.3.9": - version "0.3.17" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" - integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== - dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" - -"@lewebsimple/nuxt3-svg@^0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@lewebsimple/nuxt3-svg/-/nuxt3-svg-0.1.1.tgz#d5b60533f59a4c2adab1eb618fcdb172c1b0656b" - integrity sha512-Y6wr3X61Np5IlF8NpijrAvak5t1n/cWz5gqVbl+C2OXmLCeLV3zFK+FlUz2gwXiE0zGi/7piMa43lAHGVJOdQg== - dependencies: - "@nuxt/kit" "^3.0.0-rc.3" - vite-svg-loader "^3.3.0" - -"@mapbox/node-pre-gyp@^1.0.5": - version "1.0.10" - resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz#8e6735ccebbb1581e5a7e652244cadc8a844d03c" - integrity sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA== - dependencies: - detect-libc "^2.0.0" - https-proxy-agent "^5.0.0" - make-dir "^3.1.0" - node-fetch "^2.6.7" - nopt "^5.0.0" - npmlog "^5.0.1" - rimraf "^3.0.2" - semver "^7.3.5" - tar "^6.1.11" - -"@netlify/functions@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@netlify/functions/-/functions-1.3.0.tgz#4305a3fb6b49caf56cd2be88d4b8534b1d5aff4f" - integrity sha512-hN/Fgpz8XIOBfsBPLYUMxVKBlCopgeqGB0popayicnmkFLnvKByTTMYgF01wcF9DBtBQdV0H2h1kPFpMl34I8w== - dependencies: - is-promise "^4.0.0" - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@nuxt/content@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@nuxt/content/-/content-2.2.0.tgz#51bd254333f9a2e19f4b25be3b0cf97963840f66" - integrity sha512-+RNRw88XDP6Am4S5MiYaHZJyd7REgBfAvrVI3N+Cl/4F8semHJ/NEDVaK95bZzcgKJMEK7kKFsC9sKdIvw3wWg== - dependencies: - "@nuxt/kit" "^3.0.0-rc.12" - consola "^2.15.3" - defu "^6.1.0" - destr "^1.1.1" - detab "^3.0.1" - html-tags "^3.2.0" - json5 "^2.2.1" - knitwork "^0.1.2" - listhen "^0.3.4" - mdast-util-to-hast "^12.2.4" - mdurl "^1.0.1" - ohash "^0.1.5" - pathe "^0.3.9" - property-information "^6.1.1" - rehype-external-links "^2.0.1" - rehype-raw "^6.1.1" - rehype-slug "^5.0.1" - rehype-sort-attribute-values "^4.0.0" - rehype-sort-attributes "^4.0.0" - remark-emoji "^3.0.2" - remark-gfm "^3.0.1" - remark-mdc "^1.0.7" - remark-parse "^10.0.1" - remark-rehype "^10.1.0" - remark-squeeze-paragraphs "^5.0.1" - scule "^0.3.2" - shiki-es "^0.1.2" - slugify "^1.6.5" - socket.io-client "^4.5.3" - ufo "^0.8.6" - unified "^10.1.2" - unist-builder "^3.0.0" - unist-util-position "^4.0.3" - unist-util-visit "^4.1.1" - unstorage "^0.6.0" - ws "^8.9.0" - -"@nuxt/devalue@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@nuxt/devalue/-/devalue-2.0.0.tgz#c7bd7e9a516514e612d5d2e511ffc399e0eac322" - integrity sha512-YBI/6o2EBz02tdEJRBK8xkt3zvOFOWlLBf7WKYGBsSYSRtjjgrqPe2skp6VLLmKx5WbHHDNcW+6oACaurxGzeA== - -"@nuxt/kit@3.0.0-rc.12", "@nuxt/kit@^3.0.0-rc.11", "@nuxt/kit@^3.0.0-rc.12", "@nuxt/kit@^3.0.0-rc.3", "@nuxt/kit@^3.0.0-rc.9": - version "3.0.0-rc.12" - resolved "https://registry.yarnpkg.com/@nuxt/kit/-/kit-3.0.0-rc.12.tgz#637ab3e63d4213b886ab3cda19632bd08bc5ccb6" - integrity sha512-d/6SeNVL1OPdru5aKjjUIWIwqIjbYN/VYGCrZs5gddkzJ5202DsMxyn2rs/ZyT8+oBbbVTYcCK6M+G0945mQdA== - dependencies: - "@nuxt/schema" "3.0.0-rc.12" - c12 "^0.2.13" - consola "^2.15.3" - defu "^6.1.0" - globby "^13.1.2" - hash-sum "^2.0.0" - ignore "^5.2.0" - jiti "^1.16.0" - knitwork "^0.1.2" - lodash.template "^4.5.0" - mlly "^0.5.16" - pathe "^0.3.9" - pkg-types "^0.3.5" - scule "^0.3.2" - semver "^7.3.8" - unctx "^2.0.2" - unimport "^0.6.8" - untyped "^0.5.0" - -"@nuxt/schema@3.0.0-rc.12": - version "3.0.0-rc.12" - resolved "https://registry.yarnpkg.com/@nuxt/schema/-/schema-3.0.0-rc.12.tgz#2980cb83738093db88143d406608cf39f0bfa9ff" - integrity sha512-LZFy8a+5tZKtqTHvUJrlCjZXmKPSmar4S/p3SpjzgIbc4jDuWzA5r4voUODozd2/bCnYxfYyNtOgtbJSJtDUrw== - dependencies: - c12 "^0.2.13" - create-require "^1.1.1" - defu "^6.1.0" - jiti "^1.16.0" - pathe "^0.3.9" - pkg-types "^0.3.5" - postcss-import-resolver "^2.0.0" - scule "^0.3.2" - std-env "^3.3.0" - ufo "^0.8.6" - unimport "^0.6.8" - untyped "^0.5.0" - -"@nuxt/telemetry@^2.1.6": - version "2.1.6" - resolved "https://registry.yarnpkg.com/@nuxt/telemetry/-/telemetry-2.1.6.tgz#3fc1a60b9050353c470de198871d74be7758eab7" - integrity sha512-1+nhSxGTADRC4tMkKvt3gpgI659UHygNDx0eU9PJgNEtNoqeJ7gHAZ5cXyO4vw9g6ujgxbdEmoL8uHuyaANarA== - dependencies: - "@nuxt/kit" "^3.0.0-rc.11" - chalk "^5.1.0" - ci-info "^3.5.0" - consola "^2.15.3" - create-require "^1.1.1" - defu "^6.1.0" - destr "^1.1.1" - dotenv "^16.0.3" - fs-extra "^10.1.0" - git-url-parse "^13.1.0" - inquirer "^9.1.3" - is-docker "^3.0.0" - jiti "^1.16.0" - mri "^1.2.0" - nanoid "^4.0.0" - node-fetch "^3.2.10" - ohmyfetch "^0.4.19" - parse-git-config "^3.0.0" - rc9 "^1.2.2" - std-env "^3.2.1" - -"@nuxt/ui-templates@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@nuxt/ui-templates/-/ui-templates-0.4.0.tgz#b1ee0dc1f8213b64b550d256e979b3af350fd950" - integrity sha512-oFjUfn9r9U4vNljd5uU08+6M3mF6OSxZfCrfqJQaN5TtqVTcZmZFzOZ4H866Lq+Eaugv/Vte225kuaZCB3FR/g== - -"@nuxt/vite-builder@3.0.0-rc.12": - version "3.0.0-rc.12" - resolved "https://registry.yarnpkg.com/@nuxt/vite-builder/-/vite-builder-3.0.0-rc.12.tgz#8a2f156f8729263f5cf4f8b481b5faf078f62932" - integrity sha512-1jzEg2+Er9fzir8NvVnHAU8N4xda8IVzmqQQblKDWDE4v+zD5QLwk4Fp+l9Y74BZgH7pTogVSvEA01WdNQQUlw== - dependencies: - "@nuxt/kit" "3.0.0-rc.12" - "@rollup/plugin-replace" "^5.0.0" - "@vitejs/plugin-vue" "^3.1.2" - "@vitejs/plugin-vue-jsx" "^2.0.1" - autoprefixer "^10.4.12" - chokidar "^3.5.3" - cssnano "^5.1.13" - defu "^6.1.0" - esbuild "^0.15.11" - escape-string-regexp "^5.0.0" - estree-walker "^3.0.1" - externality "^0.2.2" - fs-extra "^10.1.0" - get-port-please "^2.6.1" - h3 "^0.8.4" - knitwork "^0.1.2" - magic-string "^0.26.7" - mlly "^0.5.16" - ohash "^0.1.5" - pathe "^0.3.9" - perfect-debounce "^0.1.3" - pkg-types "^0.3.5" - postcss "^8.4.18" - postcss-import "^15.0.0" - postcss-url "^10.1.3" - rollup "^2.79.1" - rollup-plugin-visualizer "^5.8.3" - ufo "^0.8.6" - unplugin "^0.10.0" - vite "~3.1.8" - vite-node "^0.24.3" - vite-plugin-checker "^0.5.1" - vue-bundle-renderer "^0.4.4" - -"@nuxtjs/color-mode@^3.1.8": - version "3.1.8" - resolved "https://registry.yarnpkg.com/@nuxtjs/color-mode/-/color-mode-3.1.8.tgz#58f3e5401028fe0c75088e9d2fdc5c7778d2b720" - integrity sha512-ahgjmSzpjTpaxvyyGA/1wD2rNcSFXiqs3/A/GEllB1s4BboJVnBIqkwIQpAguq7IDVZG2tMAvqmnZHSfwrI3IA== - dependencies: - "@nuxt/kit" "^3.0.0-rc.9" - lodash.template "^4.5.0" - pathe "^0.3.5" - -"@nuxtjs/svg@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@nuxtjs/svg/-/svg-0.4.0.tgz#db6b188bc74d71021d58ea8c45a03fe4c1f30011" - integrity sha512-XF8uvV5YKBPAJr52SFRVkhltAsjCBTwwTc4GTysSm8WPYB2utJLY48qXdVC/J9dNQiMd7NHo1xmEYEqQfzqpqg== - dependencies: - file-loader "^6.0.0" - raw-loader "^4.0.0" - svg-sprite-loader "^5.2.1" - url-loader "^4.1.0" - vue-svg-loader "^0.16.0" - -"@rollup/plugin-alias@^4.0.0": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-4.0.2.tgz#fec6c6aff8dd6fce580ae6bc5345084cd702bb62" - integrity sha512-1hv7dBOZZwo3SEupxn4UA2N0EDThqSSS+wI1St1TNTBtOZvUchyIClyHcnDcjjrReTPZ47Faedrhblv4n+T5UQ== - dependencies: - slash "^4.0.0" - -"@rollup/plugin-commonjs@^23.0.0": - version "23.0.2" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-23.0.2.tgz#3a3a5b7b1b1cb29037eb4992edcaae997d7ebd92" - integrity sha512-e9ThuiRf93YlVxc4qNIurvv+Hp9dnD+4PjOqQs5vAYfcZ3+AXSrcdzXnVjWxcGQOa6KGJFcRZyUI3ktWLavFjg== - dependencies: - "@rollup/pluginutils" "^5.0.1" - commondir "^1.0.1" - estree-walker "^2.0.2" - glob "^8.0.3" - is-reference "1.2.1" - magic-string "^0.26.4" - -"@rollup/plugin-inject@^5.0.1": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@rollup/plugin-inject/-/plugin-inject-5.0.2.tgz#b26c0e6e73f39c118ffc1cf07cfbfd93459b93a6" - integrity sha512-zRthPC/sZ2OaQwPh2LvFn0A+3SyMAZR1Vqsp89mWkIuGXKswT8ty1JWj1pf7xdZvft4gHZaCuhdopuiCwjclWg== - dependencies: - "@rollup/pluginutils" "^5.0.1" - estree-walker "^2.0.2" - magic-string "^0.26.4" - -"@rollup/plugin-json@^5.0.0": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-5.0.1.tgz#d5cd67cc83ede42967447dfabbe1be45a091f5b7" - integrity sha512-QCwhZZLvM8nRcTHyR1vOgyTMiAnjiNj1ebD/BMRvbO1oc/z14lZH6PfxXeegee2B6mky/u9fia4fxRM4TqrUaw== - dependencies: - "@rollup/pluginutils" "^5.0.1" - -"@rollup/plugin-node-resolve@^15.0.0": - version "15.0.1" - resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.0.1.tgz#72be449b8e06f6367168d5b3cd5e2802e0248971" - integrity sha512-ReY88T7JhJjeRVbfCyNj+NXAG3IIsVMsX9b5/9jC98dRP8/yxlZdz7mHZbHk5zHr24wZZICS5AcXsFZAXYUQEg== - dependencies: - "@rollup/pluginutils" "^5.0.1" - "@types/resolve" "1.20.2" - deepmerge "^4.2.2" - is-builtin-module "^3.2.0" - is-module "^1.0.0" - resolve "^1.22.1" - -"@rollup/plugin-replace@^5.0.0": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-5.0.1.tgz#49a57af3e6df111a9e75dea3f3572741f4c5c83e" - integrity sha512-Z3MfsJ4CK17BfGrZgvrcp/l6WXoKb0kokULO+zt/7bmcyayokDaQ2K3eDJcRLCTAlp5FPI4/gz9MHAsosz4Rag== - dependencies: - "@rollup/pluginutils" "^5.0.1" - magic-string "^0.26.4" - -"@rollup/plugin-wasm@^6.0.0": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@rollup/plugin-wasm/-/plugin-wasm-6.0.1.tgz#3dc69aac67b6e8e44c17d0a6d8d86d5699031c3a" - integrity sha512-a5yRknFQG/QGhb1xGkazWXgjpsv0hhWlx34irsf5adMEo55NdpzhZLg+jx49u+bzH6ekktuFg2WKA1RAF+WEDQ== - -"@rollup/pluginutils@^4.2.1": - version "4.2.1" - resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d" - integrity sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ== - dependencies: - estree-walker "^2.0.1" - picomatch "^2.2.2" - -"@rollup/pluginutils@^5.0.1": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz#012b8f53c71e4f6f9cb317e311df1404f56e7a33" - integrity sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA== - dependencies: - "@types/estree" "^1.0.0" - estree-walker "^2.0.2" - picomatch "^2.3.1" - -"@socket.io/component-emitter@~3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" - integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== - -"@trysound/sax@0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" - integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== - -"@types/debug@^4.0.0": - version "4.1.7" - resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.7.tgz#7cc0ea761509124709b8b2d1090d8f6c17aadb82" - integrity sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg== - dependencies: - "@types/ms" "*" - -"@types/estree@*", "@types/estree@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - -"@types/hast@^2.0.0": - version "2.3.4" - resolved "https://registry.yarnpkg.com/@types/hast/-/hast-2.3.4.tgz#8aa5ef92c117d20d974a82bdfb6a648b08c0bafc" - integrity sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g== - dependencies: - "@types/unist" "*" - -"@types/json-schema@^7.0.8": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== - -"@types/mdast@^3.0.0": - version "3.0.10" - resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.10.tgz#4724244a82a4598884cbbe9bcfd73dff927ee8af" - integrity sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA== - dependencies: - "@types/unist" "*" - -"@types/ms@*": - version "0.7.31" - resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" - integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== - -"@types/node@*": - version "18.11.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.3.tgz#78a6d7ec962b596fc2d2ec102c4dd3ef073fea6a" - integrity sha512-fNjDQzzOsZeKZu5NATgXUPsaFaTxeRgFXoosrHivTl8RGeV733OLawXsGfEk9a8/tySyZUyiZ6E8LcjPFZ2y1A== - -"@types/parse5@^6.0.0": - version "6.0.3" - resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-6.0.3.tgz#705bb349e789efa06f43f128cef51240753424cb" - integrity sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g== - -"@types/q@^1.5.1": - version "1.5.5" - resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.5.tgz#75a2a8e7d8ab4b230414505d92335d1dcb53a6df" - integrity sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ== - -"@types/resolve@1.20.2": - version "1.20.2" - resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" - integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q== - -"@types/unist@*", "@types/unist@^2.0.0": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" - integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== - -"@vercel/nft@^0.22.1": - version "0.22.1" - resolved "https://registry.yarnpkg.com/@vercel/nft/-/nft-0.22.1.tgz#0d91d2a21e3a7f0b23ce1550da9870eac4942828" - integrity sha512-lYYZIoxRurqDOSoVIdBicGnpUIpfyaS5qVjdPq+EfI285WqtZK3NK/dyCkiyBul+X2U2OEhRyeMdXPCHGJbohw== - dependencies: - "@mapbox/node-pre-gyp" "^1.0.5" - acorn "^8.6.0" - async-sema "^3.1.1" - bindings "^1.4.0" - estree-walker "2.0.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - micromatch "^4.0.2" - node-gyp-build "^4.2.2" - resolve-from "^5.0.0" - rollup-pluginutils "^2.8.2" - -"@vitejs/plugin-vue-jsx@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-2.0.1.tgz#563a844964f5b025c828b452d6a9882df7194f9a" - integrity sha512-lmiR1k9+lrF7LMczO0pxtQ8mOn6XeppJDHxnpxkJQpT5SiKz4SKhKdeNstXaTNuR8qZhUo5X0pJlcocn72Y4Jg== - dependencies: - "@babel/core" "^7.18.13" - "@babel/plugin-syntax-import-meta" "^7.10.4" - "@babel/plugin-transform-typescript" "^7.18.12" - "@vue/babel-plugin-jsx" "^1.1.1" - -"@vitejs/plugin-vue@^3.1.2": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-3.1.2.tgz#3cd52114e8871a0b5e7bd7d837469c032e503036" - integrity sha512-3zxKNlvA3oNaKDYX0NBclgxTQ1xaFdL7PzwF6zj9tGFziKwmBa3Q/6XcJQxudlT81WxDjEhHmevvIC4Orc1LhQ== - -"@volar/language-core@1.0.9": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@volar/language-core/-/language-core-1.0.9.tgz#d12456b294d1e5b3928b22e5214c8e7141ee2ce1" - integrity sha512-5Fty3slLet6svXiJw2YxhYeo6c7wFdtILrql5bZymYLM+HbiZtJbryW1YnUEKAP7MO9Mbeh+TNH4Z0HFxHgIqw== - dependencies: - "@volar/source-map" "1.0.9" - "@vue/reactivity" "^3.2.40" - muggle-string "^0.1.0" - -"@volar/source-map@1.0.9": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@volar/source-map/-/source-map-1.0.9.tgz#00aa951d3d7f9b842f84e28ab2a1831ab3b5b95a" - integrity sha512-fazB/vy5ZEJ3yKx4fabJyGNI3CBkdLkfEIRVu6+1P3VixK0Mn+eqyUIkLBrzGYaeFM3GybhCLCvsVdNz0Fu/CQ== - dependencies: - muggle-string "^0.1.0" - -"@volar/typescript@1.0.9": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@volar/typescript/-/typescript-1.0.9.tgz#9c0a8b5d79c0a03413755499d211c1c8001ac0cc" - integrity sha512-dVziu+ShQUWuMukM6bvK2v2O446/gG6l1XkTh2vfkccw1IzjfbiP1TWQoNo1ipTfZOtu5YJGYAx+o5HNrGXWfQ== - dependencies: - "@volar/language-core" "1.0.9" - -"@volar/vue-language-core@1.0.9": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@volar/vue-language-core/-/vue-language-core-1.0.9.tgz#9eb7c30652c80f210fca071aeeea794873835eda" - integrity sha512-tofNoR8ShPFenHT1YVMuvoXtXWwoQE+fiXVqSmW0dSKZqEDjWQ3YeXSd0a6aqyKaIbvR7kWWGp34WbpQlwf9Ww== - dependencies: - "@volar/language-core" "1.0.9" - "@volar/source-map" "1.0.9" - "@vue/compiler-dom" "^3.2.40" - "@vue/compiler-sfc" "^3.2.40" - "@vue/reactivity" "^3.2.40" - "@vue/shared" "^3.2.40" - minimatch "^5.1.0" - vue-template-compiler "^2.7.10" - -"@volar/vue-typescript@1.0.9": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@volar/vue-typescript/-/vue-typescript-1.0.9.tgz#47ae4424283ec42c0b3321a4efbd4c505de3fe16" - integrity sha512-ZLe4y9YNbviACa7uAMCilzxA76gbbSlKfjspXBzk6fCobd8QCIig+VyDYcjANIlm2HhgSCX8jYTzhCKlegh4mw== - dependencies: - "@volar/typescript" "1.0.9" - "@volar/vue-language-core" "1.0.9" - -"@vue/babel-helper-vue-transform-on@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@vue/babel-helper-vue-transform-on/-/babel-helper-vue-transform-on-1.0.2.tgz#9b9c691cd06fc855221a2475c3cc831d774bc7dc" - integrity sha512-hz4R8tS5jMn8lDq6iD+yWL6XNB699pGIVLk7WSJnn1dbpjaazsjZQkieJoRX6gW5zpYSCFqQ7jUquPNY65tQYA== - -"@vue/babel-plugin-jsx@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.1.1.tgz#0c5bac27880d23f89894cd036a37b55ef61ddfc1" - integrity sha512-j2uVfZjnB5+zkcbc/zsOc0fSNGCMMjaEXP52wdwdIfn0qjFfEYpYZBFKFg+HHnQeJCVrjOeO0YxgaL7DMrym9w== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.0.0" - "@babel/template" "^7.0.0" - "@babel/traverse" "^7.0.0" - "@babel/types" "^7.0.0" - "@vue/babel-helper-vue-transform-on" "^1.0.2" - camelcase "^6.0.0" - html-tags "^3.1.0" - svg-tags "^1.0.0" - -"@vue/compiler-core@3.2.41": - version "3.2.41" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.41.tgz#fb5b25f23817400f44377d878a0cdead808453ef" - integrity sha512-oA4mH6SA78DT+96/nsi4p9DX97PHcNROxs51lYk7gb9Z4BPKQ3Mh+BLn6CQZBw857Iuhu28BfMSRHAlPvD4vlw== - dependencies: - "@babel/parser" "^7.16.4" - "@vue/shared" "3.2.41" - estree-walker "^2.0.2" - source-map "^0.6.1" - -"@vue/compiler-dom@3.2.41", "@vue/compiler-dom@^3.2.40": - version "3.2.41" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.41.tgz#dc63dcd3ce8ca8a8721f14009d498a7a54380299" - integrity sha512-xe5TbbIsonjENxJsYRbDJvthzqxLNk+tb3d/c47zgREDa/PCp6/Y4gC/skM4H6PIuX5DAxm7fFJdbjjUH2QTMw== - dependencies: - "@vue/compiler-core" "3.2.41" - "@vue/shared" "3.2.41" - -"@vue/compiler-sfc@3.2.41", "@vue/compiler-sfc@^3.2.20", "@vue/compiler-sfc@^3.2.40": - version "3.2.41" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.41.tgz#238fb8c48318408c856748f4116aff8cc1dc2a73" - integrity sha512-+1P2m5kxOeaxVmJNXnBskAn3BenbTmbxBxWOtBq3mQTCokIreuMULFantBUclP0+KnzNCMOvcnKinqQZmiOF8w== - dependencies: - "@babel/parser" "^7.16.4" - "@vue/compiler-core" "3.2.41" - "@vue/compiler-dom" "3.2.41" - "@vue/compiler-ssr" "3.2.41" - "@vue/reactivity-transform" "3.2.41" - "@vue/shared" "3.2.41" - estree-walker "^2.0.2" - magic-string "^0.25.7" - postcss "^8.1.10" - source-map "^0.6.1" - -"@vue/compiler-ssr@3.2.41": - version "3.2.41" - resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.41.tgz#344f564d68584b33367731c04ffc949784611fcb" - integrity sha512-Y5wPiNIiaMz/sps8+DmhaKfDm1xgj6GrH99z4gq2LQenfVQcYXmHIOBcs5qPwl7jaW3SUQWjkAPKMfQemEQZwQ== - dependencies: - "@vue/compiler-dom" "3.2.41" - "@vue/shared" "3.2.41" - -"@vue/devtools-api@^6.1.4": - version "6.4.5" - resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.4.5.tgz#d54e844c1adbb1e677c81c665ecef1a2b4bb8380" - integrity sha512-JD5fcdIuFxU4fQyXUu3w2KpAJHzTVdN+p4iOX2lMWSHMOoQdMAcpFLZzm9Z/2nmsoZ1a96QEhZ26e50xLBsgOQ== - -"@vue/reactivity-transform@3.2.41": - version "3.2.41" - resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.2.41.tgz#9ff938877600c97f646e09ac1959b5150fb11a0c" - integrity sha512-mK5+BNMsL4hHi+IR3Ft/ho6Za+L3FA5j8WvreJ7XzHrqkPq8jtF/SMo7tuc9gHjLDwKZX1nP1JQOKo9IEAn54A== - dependencies: - "@babel/parser" "^7.16.4" - "@vue/compiler-core" "3.2.41" - "@vue/shared" "3.2.41" - estree-walker "^2.0.2" - magic-string "^0.25.7" - -"@vue/reactivity@3.2.41", "@vue/reactivity@^3.2.40", "@vue/reactivity@^3.2.41": - version "3.2.41" - resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.41.tgz#0ad3bdf76d76822da1502dc9f394dafd02642963" - integrity sha512-9JvCnlj8uc5xRiQGZ28MKGjuCoPhhTwcoAdv3o31+cfGgonwdPNuvqAXLhlzu4zwqavFEG5tvaoINQEfxz+l6g== - dependencies: - "@vue/shared" "3.2.41" - -"@vue/runtime-core@3.2.41": - version "3.2.41" - resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.41.tgz#775bfc00b3fadbaddab77138f23322aee3517a76" - integrity sha512-0LBBRwqnI0p4FgIkO9q2aJBBTKDSjzhnxrxHYengkAF6dMOjeAIZFDADAlcf2h3GDALWnblbeprYYpItiulSVQ== - dependencies: - "@vue/reactivity" "3.2.41" - "@vue/shared" "3.2.41" - -"@vue/runtime-dom@3.2.41": - version "3.2.41" - resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.41.tgz#cdf86be7410f7b15c29632a96ce879e5b4c9ab92" - integrity sha512-U7zYuR1NVIP8BL6jmOqmapRAHovEFp7CSw4pR2FacqewXNGqZaRfHoNLQsqQvVQ8yuZNZtxSZy0FFyC70YXPpA== - dependencies: - "@vue/runtime-core" "3.2.41" - "@vue/shared" "3.2.41" - csstype "^2.6.8" - -"@vue/server-renderer@3.2.41": - version "3.2.41" - resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.2.41.tgz#ca64552c05878f94e8d191ac439141c06c0fb2ad" - integrity sha512-7YHLkfJdTlsZTV0ae5sPwl9Gn/EGr2hrlbcS/8naXm2CDpnKUwC68i1wGlrYAfIgYWL7vUZwk2GkYLQH5CvFig== - dependencies: - "@vue/compiler-ssr" "3.2.41" - "@vue/shared" "3.2.41" - -"@vue/shared@3.2.41", "@vue/shared@^3.2.40", "@vue/shared@^3.2.41": - version "3.2.41" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.41.tgz#fbc95422df654ea64e8428eced96ba6ad555d2bb" - integrity sha512-W9mfWLHmJhkfAmV+7gDjcHeAWALQtgGT3JErxULl0oz6R6+3ug91I7IErs93eCFhPCZPHBs4QJS7YWEV7A3sxw== - -"@vueuse/head@~1.0.0-rc.9": - version "1.0.0-rc.12" - resolved "https://registry.yarnpkg.com/@vueuse/head/-/head-1.0.0-rc.12.tgz#9873b0ac3a5cc8c135b9070eeb29b1c8064b6a9e" - integrity sha512-J1U54lKeelgM123G7SojcOu002muUp58H2wMjI6WNgb5wag6Tt+CiSp7cFO+ZSG5bJFdsgoc1pwZPVazGbnimQ== - dependencies: - "@vueuse/shared" "^9.3.1" - "@zhead/schema" "^0.9.9" - "@zhead/schema-vue" "^0.9.9" - -"@vueuse/shared@^9.2.0", "@vueuse/shared@^9.3.1": - version "9.3.1" - resolved "https://registry.yarnpkg.com/@vueuse/shared/-/shared-9.3.1.tgz#78c6cf41d8b75f05460e18a80819bf8164b597a5" - integrity sha512-YFu3qcnVeu0S2L4XdQJtBpDcjz6xwqHZtTv/XRhu66/yge1XVhxskUcc7VZbX52xF9A34V6KCfwncP9YDqYFiw== - dependencies: - vue-demi "*" - -"@yeger/vue-masonry-wall@^3.2.14": - version "3.2.14" - resolved "https://registry.yarnpkg.com/@yeger/vue-masonry-wall/-/vue-masonry-wall-3.2.14.tgz#598528c391c8da86eaf2a44e682a344f3c2bb4b1" - integrity sha512-DLZhR8RpQw9oGLq0Il3vP7ALxORNHLI1cR+TC96ADP2hs334hCdjtFtZcIbz9rDEJZXDnio78h3BBUpFv1FoaQ== - -"@zhead/schema-vue@^0.9.9": - version "0.9.9" - resolved "https://registry.yarnpkg.com/@zhead/schema-vue/-/schema-vue-0.9.9.tgz#abc38295bdfa01145d0cc5b24de4c8ae775d8b6e" - integrity sha512-f7sOPMc1zQJ+tDDWWaksNsGoGGuRv5aHvOdZvsL3dIxbiHVlGVhDi/HZbUUupCtlYAPv2D8E/tUmwWKh/UrbXw== - dependencies: - "@vueuse/shared" "^9.2.0" - "@zhead/schema" "0.9.9" - -"@zhead/schema@0.9.9", "@zhead/schema@^0.9.9": - version "0.9.9" - resolved "https://registry.yarnpkg.com/@zhead/schema/-/schema-0.9.9.tgz#b12aa250625bac8831f58316c6aec575392a8d4b" - integrity sha512-B/No5zsZB1gz6BT7OKcD0rbyZCGoF6ImeQm2ffupQrgUpYAIv/LGtn3RVNSOcX2R2DB4g79UtuIwK0OxugFjJQ== - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -acorn@^8.5.0, acorn@^8.6.0, acorn@^8.8.0: - version "8.8.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" - integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== - -add@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/add/-/add-2.0.6.tgz#248f0a9f6e5a528ef2295dbeec30532130ae2235" - integrity sha512-j5QzrmsokwWWp6kUcJQySpbG+xfOBqqKnup3OIk1pz+kB/80SLorZ9V8zHFLO92Lcd+hbvq8bT+zOGoPkmBV0Q== - -agent-base@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -ajv-keywords@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" - integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - -ajv@^6.12.5: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-escapes@^4.3.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-escapes@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-6.0.0.tgz#68c580e87a489f6df3d761028bb93093fde6bd8a" - integrity sha512-IG23inYII3dWlU2EyiAiGj6Bwal5GzsgPMwjYGvc1HPE2dgbj4ZB5ToWBKSquKw74nB3TIuOwaI6/jSULzfgrw== - dependencies: - type-fest "^3.0.0" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-regex@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" - integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^6.1.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" - integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== - -anymatch@^3.1.2, anymatch@~3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -"aproba@^1.0.3 || ^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" - integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== - -arch@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" - integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ== - -archiver-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-2.1.0.tgz#e8a460e94b693c3e3da182a098ca6285ba9249e2" - integrity sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw== - dependencies: - glob "^7.1.4" - graceful-fs "^4.2.0" - lazystream "^1.0.0" - lodash.defaults "^4.2.0" - lodash.difference "^4.5.0" - lodash.flatten "^4.4.0" - lodash.isplainobject "^4.0.6" - lodash.union "^4.6.0" - normalize-path "^3.0.0" - readable-stream "^2.0.0" - -archiver@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/archiver/-/archiver-5.3.1.tgz#21e92811d6f09ecfce649fbefefe8c79e57cbbb6" - integrity sha512-8KyabkmbYrH+9ibcTScQ1xCJC/CGcugdVIwB+53f5sZziXgwUh3iXlAlANMxcZyDEfTHMe6+Z5FofV8nopXP7w== - dependencies: - archiver-utils "^2.1.0" - async "^3.2.3" - buffer-crc32 "^0.2.1" - readable-stream "^3.6.0" - readdir-glob "^1.0.0" - tar-stream "^2.2.0" - zip-stream "^4.1.0" - -are-we-there-yet@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" - integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw== - dependencies: - delegates "^1.0.0" - readable-stream "^3.6.0" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA== - -arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q== - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== - -array.prototype.reduce@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.4.tgz#8167e80089f78bff70a99e20bd4201d4663b0a6f" - integrity sha512-WnM+AjG/DvLRLo4DDl+r+SvCzYtD2Jd9oeBYMcEaI7t3fFrHY9M53/wdLcTvmZNQ70IU6Htj0emFkZ5TS+lrdw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.2" - es-array-method-boxes-properly "^1.0.0" - is-string "^1.0.7" - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw== - -async-sema@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/async-sema/-/async-sema-3.1.1.tgz#e527c08758a0f8f6f9f15f799a173ff3c40ea808" - integrity sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg== - -async@^3.2.3: - version "3.2.4" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" - integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== - -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -autoprefixer@^10.4.12: - version "10.4.12" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.12.tgz#183f30bf0b0722af54ee5ef257f7d4320bb33129" - integrity sha512-WrCGV9/b97Pa+jtwf5UGaRjgQIg7OK3D06GnoYoZNcG1Xb8Gt3EfuKjlhh9i/VtT16g6PYjZ69jdJ2g8FxSC4Q== - dependencies: - browserslist "^4.21.4" - caniuse-lite "^1.0.30001407" - fraction.js "^4.2.0" - normalize-range "^0.1.2" - picocolors "^1.0.0" - postcss-value-parser "^4.2.0" - -bail@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/bail/-/bail-2.0.2.tgz#d26f5cd8fe5d6f832a31517b9f7c356040ba6d5d" - integrity sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw== - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -bindings@^1.4.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - -bl@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - -bl@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-5.1.0.tgz#183715f678c7188ecef9fe475d90209400624273" - integrity sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ== - dependencies: - buffer "^6.0.3" - inherits "^2.0.4" - readable-stream "^3.4.0" - -bluebird@^3.5.0: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -body-scroll-lock@^4.0.0-beta.0: - version "4.0.0-beta.0" - resolved "https://registry.yarnpkg.com/body-scroll-lock/-/body-scroll-lock-4.0.0-beta.0.tgz#4f78789d10e6388115c0460cd6d7d4dd2bbc4f7e" - integrity sha512-a7tP5+0Mw3YlUJcGAKUqIBkYYGlYxk2fnCasq/FUph1hadxlTRjF+gAcZksxANnaMnALjxEddmSi/H3OR8ugcQ== - -boolbase@^1.0.0, boolbase@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@^2.2.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^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== - dependencies: - fill-range "^7.0.1" - -browserslist@^4.0.0, browserslist@^4.16.6, browserslist@^4.20.3, browserslist@^4.21.3, browserslist@^4.21.4: - version "4.21.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" - integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== - dependencies: - caniuse-lite "^1.0.30001400" - electron-to-chromium "^1.4.251" - node-releases "^2.0.6" - update-browserslist-db "^1.0.9" - -buffer-crc32@^0.2.1, buffer-crc32@^0.2.13: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -buffer@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - -builtin-modules@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" - integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== - -busboy@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" - integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== - dependencies: - streamsearch "^1.1.0" - -c12@^0.2.13: - version "0.2.13" - resolved "https://registry.yarnpkg.com/c12/-/c12-0.2.13.tgz#c5eb795684cfecdbc5f0d31bb13df6f2f0913420" - integrity sha512-wJL0/knDbqM/3moLb+8Xd+w3JdkggkIIhiNBkxZ1mWlskKC/vajb85wM3UPg/D9nK6RbI1NgaVTg6AeXBVbknA== - dependencies: - defu "^6.1.0" - dotenv "^16.0.2" - gittar "^0.1.1" - jiti "^1.15.0" - mlly "^0.5.14" - pathe "^0.3.8" - pkg-types "^0.3.5" - rc9 "^1.2.2" - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -camelcase@^6.0.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -caniuse-api@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" - integrity sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw== - dependencies: - browserslist "^4.0.0" - caniuse-lite "^1.0.0" - lodash.memoize "^4.1.2" - lodash.uniq "^4.5.0" - -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001407: - version "1.0.30001423" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001423.tgz#57176d460aa8cd85ee1a72016b961eb9aca55d91" - integrity sha512-09iwWGOlifvE1XuHokFMP7eR38a0JnajoyL3/i87c8ZjRWRrdKo1fqjNfugfBD0UDBIOz0U+jtNhJ0EPm1VleQ== - -ccount@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ccount/-/ccount-2.0.1.tgz#17a3bf82302e0870d6da43a01311a8bc02a3ecf5" - integrity sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg== - -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A== - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.0.0, chalk@^2.4.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^5.0.0, chalk@^5.1.0, chalk@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.1.2.tgz#d957f370038b75ac572471e83be4c5ca9f8e8c45" - integrity sha512-E5CkT4jWURs1Vy5qGJye+XwCkNj7Od3Af7CP6SujMetSMkLs8Do2RWJK5yx1wamHV/op8Rz+9rltjaTQWDnEFQ== - -character-entities-html4@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-2.1.0.tgz#1f1adb940c971a4b22ba39ddca6b618dc6e56b2b" - integrity sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA== - -character-entities-legacy@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz#76bc83a90738901d7bc223a9e93759fdd560125b" - integrity sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ== - -character-entities@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-2.0.2.tgz#2d09c2e72cd9523076ccb21157dff66ad43fcc22" - integrity sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ== - -character-reference-invalid@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz#85c66b041e43b47210faf401278abf808ac45cb9" - integrity sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw== - -chardet@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" - integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== - -"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.1, chokidar@^3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/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.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -chownr@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" - integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== - -ci-info@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.5.0.tgz#bfac2a29263de4c829d806b1ab478e35091e171f" - integrity sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw== - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -cli-cursor@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" - integrity sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== - dependencies: - restore-cursor "^4.0.0" - -cli-spinners@^2.6.1: - version "2.7.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.7.0.tgz#f815fd30b5f9eaac02db604c7a231ed7cb2f797a" - integrity sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw== - -cli-width@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.0.0.tgz#a5622f6a3b0a9e3e711a25f099bf2399f608caf6" - integrity sha512-ZksGS2xpa/bYkNzN3BAw1wEjsLV/ZKOf/CCrJ/QOBsxx6fOARIkwTutxp1XIOIohi6HKmOFjMoK/XaqDVUpEEw== - -clipboardy@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-3.0.0.tgz#f3876247404d334c9ed01b6f269c11d09a5e3092" - integrity sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg== - dependencies: - arch "^2.2.0" - execa "^5.1.1" - is-wsl "^2.2.0" - -cliui@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" - integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.1" - wrap-ansi "^7.0.0" - -clone@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== - -clone@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" - integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== - -cluster-key-slot@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/cluster-key-slot/-/cluster-key-slot-1.1.1.tgz#10ccb9ded0729464b6d2e7d714b100a2d1259d43" - integrity sha512-rwHwUfXL40Chm1r08yrhU3qpUvdVlgkKNeyeGPOxnW8/SyVDvgRaed/Uz54AqWNaTCAThlj6QAs3TZcKI0xDEw== - -coa@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" - integrity sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA== - dependencies: - "@types/q" "^1.5.1" - chalk "^2.4.1" - q "^1.1.2" - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw== - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -color-support@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" - integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== - -colord@^2.9.1: - version "2.9.3" - resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43" - integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw== - -colorette@^2.0.19: - version "2.0.19" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" - integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== - -comma-separated-tokens@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-2.0.2.tgz#d4c25abb679b7751c880be623c1179780fe1dd98" - integrity sha512-G5yTt3KQN4Yn7Yk4ed73hlZ1evrFKXeUW3086p3PRFNp7m2vIjI6Pg+Kgb+oyzhd9F2qdcoj67+y3SdxL5XWsg== - -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commander@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - -commander@^8.0.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" - integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== - -component-emitter@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - -compress-commons@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-4.1.1.tgz#df2a09a7ed17447642bad10a85cc9a19e5c42a7d" - integrity sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ== - dependencies: - buffer-crc32 "^0.2.13" - crc32-stream "^4.0.2" - normalize-path "^3.0.0" - readable-stream "^3.6.0" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -consola@^2.15.3: - version "2.15.3" - resolved "https://registry.yarnpkg.com/consola/-/consola-2.15.3.tgz#2e11f98d6a4be71ff72e0bdf07bd23e12cb61550" - integrity sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw== - -console-control-strings@^1.0.0, console-control-strings@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== - -convert-source-map@^1.7.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" - integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== - -cookie-es@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/cookie-es/-/cookie-es-0.5.0.tgz#a6ad89923e68c542fc9e760b07aefa5ab020d719" - integrity sha512-RyZrFi6PNpBFbIaQjXDlFIhFVqV42QeKSZX1yQIl6ihImq6vcHNGMtqQ/QzY3RMPuYSkvsRwtnt5M9NeYxKt0g== - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw== - -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - -crc-32@^1.2.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" - integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== - -crc32-stream@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-4.0.2.tgz#c922ad22b38395abe9d3870f02fa8134ed709007" - integrity sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w== - dependencies: - crc-32 "^1.2.0" - readable-stream "^3.4.0" - -create-require@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== - -cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -css-declaration-sorter@^6.3.0: - version "6.3.1" - resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.3.1.tgz#be5e1d71b7a992433fb1c542c7a1b835e45682ec" - integrity sha512-fBffmak0bPAnyqc/HO8C3n2sHrp9wcqQz6ES9koRF2/mLOVAx9zIQ3Y7R29sYCteTPqMCwns4WYQoCX91Xl3+w== - -css-select-base-adapter@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" - integrity sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w== - -css-select@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef" - integrity sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ== - dependencies: - boolbase "^1.0.0" - css-what "^3.2.1" - domutils "^1.7.0" - nth-check "^1.0.2" - -css-select@^4.1.3: - version "4.3.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" - integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ== - dependencies: - boolbase "^1.0.0" - css-what "^6.0.1" - domhandler "^4.3.1" - domutils "^2.8.0" - nth-check "^2.0.1" - -css-tree@1.0.0-alpha.37: - version "1.0.0-alpha.37" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" - integrity sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg== - dependencies: - mdn-data "2.0.4" - source-map "^0.6.1" - -css-tree@^1.1.2, css-tree@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d" - integrity sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q== - dependencies: - mdn-data "2.0.14" - source-map "^0.6.1" - -css-what@^3.2.1: - version "3.4.2" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4" - integrity sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ== - -css-what@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" - integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - -cssesc@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" - integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== - -cssnano-preset-default@^5.2.12: - version "5.2.12" - resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.2.12.tgz#ebe6596ec7030e62c3eb2b3c09f533c0644a9a97" - integrity sha512-OyCBTZi+PXgylz9HAA5kHyoYhfGcYdwFmyaJzWnzxuGRtnMw/kR6ilW9XzlzlRAtB6PLT/r+prYgkef7hngFew== - dependencies: - css-declaration-sorter "^6.3.0" - cssnano-utils "^3.1.0" - postcss-calc "^8.2.3" - postcss-colormin "^5.3.0" - postcss-convert-values "^5.1.2" - postcss-discard-comments "^5.1.2" - postcss-discard-duplicates "^5.1.0" - postcss-discard-empty "^5.1.1" - postcss-discard-overridden "^5.1.0" - postcss-merge-longhand "^5.1.6" - postcss-merge-rules "^5.1.2" - postcss-minify-font-values "^5.1.0" - postcss-minify-gradients "^5.1.1" - postcss-minify-params "^5.1.3" - postcss-minify-selectors "^5.2.1" - postcss-normalize-charset "^5.1.0" - postcss-normalize-display-values "^5.1.0" - postcss-normalize-positions "^5.1.1" - postcss-normalize-repeat-style "^5.1.1" - postcss-normalize-string "^5.1.0" - postcss-normalize-timing-functions "^5.1.0" - postcss-normalize-unicode "^5.1.0" - postcss-normalize-url "^5.1.0" - postcss-normalize-whitespace "^5.1.1" - postcss-ordered-values "^5.1.3" - postcss-reduce-initial "^5.1.0" - postcss-reduce-transforms "^5.1.0" - postcss-svgo "^5.1.0" - postcss-unique-selectors "^5.1.1" - -cssnano-utils@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-3.1.0.tgz#95684d08c91511edfc70d2636338ca37ef3a6861" - integrity sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA== - -cssnano@^5.1.13: - version "5.1.13" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.1.13.tgz#83d0926e72955332dc4802a7070296e6258efc0a" - integrity sha512-S2SL2ekdEz6w6a2epXn4CmMKU4K3KpcyXLKfAYc9UQQqJRkD/2eLUG0vJ3Db/9OvO5GuAdgXw3pFbR6abqghDQ== - dependencies: - cssnano-preset-default "^5.2.12" - lilconfig "^2.0.3" - yaml "^1.10.2" - -csso@^4.0.2, csso@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/csso/-/csso-4.2.0.tgz#ea3a561346e8dc9f546d6febedd50187cf389529" - integrity sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA== - dependencies: - css-tree "^1.1.2" - -csstype@^2.6.8: - version "2.6.21" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.21.tgz#2efb85b7cc55c80017c66a5ad7cbd931fda3a90e" - integrity sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w== - -cuint@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" - integrity sha512-d4ZVpCW31eWwCMe1YT3ur7mUDnTXbgwyzaL320DrcRT45rfjYxkt5QWLrmOJ+/UEAI2+fQgKe/fCjR8l4TpRgw== - -data-uri-to-buffer@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz#b5db46aea50f6176428ac05b73be39a57701a64b" - integrity sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA== - -de-indent@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d" - integrity sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg== - -debug@2.6.9, debug@^2.2.0, debug@^2.3.3: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -decode-named-character-reference@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz#daabac9690874c394c81e4162a0304b35d824f0e" - integrity sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg== - dependencies: - character-entities "^2.0.0" - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og== - -deepmerge@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.3.2.tgz#1663691629d4dbfe364fa12a2a4f0aa86aa3a050" - integrity sha512-qjMjTrk+RKv/sp4RPDpV5CnKhxjFI9p+GkLBOls5A8EEElldYWCWA9zceAkmfd0xIo2aU1nxiaLFoiya2sb6Cg== - -deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== - -defaults@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" - integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== - dependencies: - clone "^1.0.2" - -define-lazy-prop@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" - integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== - -define-properties@^1.1.3, define-properties@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" - integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== - dependencies: - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA== - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA== - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -defu@^6.0.0, defu@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.0.tgz#7a5411655da73335c7d933256911f17c74443e2d" - integrity sha512-pOFYRTIhoKujrmbTRhcW5lYQLBXw/dlTwfI8IguF1QCDJOcJzNH1w+YFjxqy6BAuJrClTy6MUE8q+oKJ2FLsIw== - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== - -denque@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1" - integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== - -depd@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -dequal@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" - integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== - -destr@^1.1.1, destr@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destr/-/destr-1.2.0.tgz#8adb17fa3861b8032ea1bba92f60ba989a9ff119" - integrity sha512-JG+cG4ZPB1L27sl2C2URg8MIOmIUtTbE5wEx02BpmrTCqg/hXxFKXsYsnODl5PdpqNRaS1KQGUQ56V8jk8XpYQ== - -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - -detab@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/detab/-/detab-3.0.1.tgz#2f1874ccee75b96858cb5efa30d41212a8657baf" - integrity sha512-T8gDOoz58xXMsXKLJkKxkyUTRkEpwOBL9w5nFFDJsD/XiFkajkBc2Yz99a/0kW7DGIYq/B1+oqqqru+fZetSvg== - -detect-libc@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.1.tgz#e1897aa88fa6ad197862937fbc0441ef352ee0cd" - integrity sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w== - -diff@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" - integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -dom-serializer@0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" - integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== - dependencies: - domelementtype "^2.0.1" - entities "^2.0.0" - -dom-serializer@^1.0.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" - integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.2.0" - entities "^2.0.0" - -domelementtype@1, domelementtype@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" - integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== - -domelementtype@^2.0.1, domelementtype@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - -domhandler@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" - integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== - dependencies: - domelementtype "1" - -domhandler@^4.2.0, domhandler@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" - integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== - dependencies: - domelementtype "^2.2.0" - -domready@1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/domready/-/domready-1.0.8.tgz#91f252e597b65af77e745ae24dd0185d5e26d58c" - integrity sha512-uIzsOJUNk+AdGE9a6VDeessoMCzF8RrZvJCX/W8QtyfgdR6Uofn/MvRonih3OtCO79b2VDzDOymuiABrQ4z3XA== - -domutils@^1.5.1, domutils@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" - integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== - dependencies: - dom-serializer "0" - domelementtype "1" - -domutils@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" - integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== - dependencies: - dom-serializer "^1.0.1" - domelementtype "^2.2.0" - domhandler "^4.2.0" - -dot-prop@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-7.2.0.tgz#468172a3529779814d21a779c1ba2f6d76609809" - integrity sha512-Ol/IPXUARn9CSbkrdV4VJo7uCy1I3VuSiWCaFSg+8BdUOzF9n3jefIpcgAydvUZbTdEBZs2vEiTiS9m61ssiDA== - dependencies: - type-fest "^2.11.2" - -dotenv@^16.0.2, dotenv@^16.0.3: - version "16.0.3" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07" - integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ== - -duplexer@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" - integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== - -eastasianwidth@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" - integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== - -electron-to-chromium@^1.4.251: - version "1.4.284" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592" - integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -emoji-regex@^9.2.2: - version "9.2.2" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" - integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== - -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - -emoticon@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/emoticon/-/emoticon-4.0.1.tgz#2d2bbbf231ce3a5909e185bbb64a9da703a1e749" - integrity sha512-dqx7eA9YaqyvYtUhJwT4rC1HIp82j5ybS1/vQ42ur+jBe17dJMwZE4+gvL1XadSFfxaPFFGt3Xsw+Y8akThDlw== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== - -end-of-stream@^1.4.1: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -engine.io-client@~6.2.3: - version "6.2.3" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-6.2.3.tgz#a8cbdab003162529db85e9de31575097f6d29458" - integrity sha512-aXPtgF1JS3RuuKcpSrBtimSjYvrbhKW9froICH4s0F3XQWLxsKNxqzG39nnvQZQnva4CMvUK63T7shevxRyYHw== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - engine.io-parser "~5.0.3" - ws "~8.2.3" - xmlhttprequest-ssl "~2.0.0" - -engine.io-parser@~5.0.3: - version "5.0.4" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.4.tgz#0b13f704fa9271b3ec4f33112410d8f3f41d0fc0" - integrity sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg== - -enhanced-resolve@^4.1.1: - version "4.5.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec" - integrity sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg== - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.5.0" - tapable "^1.0.0" - -enhanced-resolve@^5.9.3: - version "5.10.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz#0dc579c3bb2a1032e357ac45b8f3a6f3ad4fb1e6" - integrity sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -entities@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" - integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== - -entities@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" - integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== - -errno@^0.1.3: - version "0.1.8" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" - integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== - dependencies: - prr "~1.0.1" - -es-abstract@^1.17.2, es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5, es-abstract@^1.20.1: - version "1.20.4" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.4.tgz#1d103f9f8d78d4cf0713edcd6d0ed1a46eed5861" - integrity sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA== - dependencies: - call-bind "^1.0.2" - 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" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-symbols "^1.0.3" - internal-slot "^1.0.3" - is-callable "^1.2.7" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-weakref "^1.0.2" - object-inspect "^1.12.2" - 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.5" - string.prototype.trimstart "^1.0.5" - unbox-primitive "^1.0.2" - -es-array-method-boxes-properly@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" - integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -esbuild-android-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.12.tgz#5e8151d5f0a748c71a7fbea8cee844ccf008e6fc" - integrity sha512-MJKXwvPY9g0rGps0+U65HlTsM1wUs9lbjt5CU19RESqycGFDRijMDQsh68MtbzkqWSRdEtiKS1mtPzKneaAI0Q== - -esbuild-android-arm64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.12.tgz#5ee72a6baa444bc96ffcb472a3ba4aba2cc80666" - integrity sha512-Hc9SEcZbIMhhLcvhr1DH+lrrec9SFTiRzfJ7EGSBZiiw994gfkVV6vG0sLWqQQ6DD7V4+OggB+Hn0IRUdDUqvA== - -esbuild-darwin-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.12.tgz#70047007e093fa1b3ba7ef86f9b3fa63db51fe25" - integrity sha512-qkmqrTVYPFiePt5qFjP8w/S+GIUMbt6k8qmiPraECUWfPptaPJUGkCKrWEfYFRWB7bY23FV95rhvPyh/KARP8Q== - -esbuild-darwin-arm64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.12.tgz#41c951f23d9a70539bcca552bae6e5196696ae04" - integrity sha512-z4zPX02tQ41kcXMyN3c/GfZpIjKoI/BzHrdKUwhC/Ki5BAhWv59A9M8H+iqaRbwpzYrYidTybBwiZAIWCLJAkw== - -esbuild-freebsd-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.12.tgz#a761b5afd12bbedb7d56c612e9cfa4d2711f33f0" - integrity sha512-XFL7gKMCKXLDiAiBjhLG0XECliXaRLTZh6hsyzqUqPUf/PY4C6EJDTKIeqqPKXaVJ8+fzNek88285krSz1QECw== - -esbuild-freebsd-arm64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.12.tgz#6b0839d4d58deabc6cbd96276eb8cbf94f7f335e" - integrity sha512-jwEIu5UCUk6TjiG1X+KQnCGISI+ILnXzIzt9yDVrhjug2fkYzlLbl0K43q96Q3KB66v6N1UFF0r5Ks4Xo7i72g== - -esbuild-linux-32@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.12.tgz#bd50bfe22514d434d97d5150977496e2631345b4" - integrity sha512-uSQuSEyF1kVzGzuIr4XM+v7TPKxHjBnLcwv2yPyCz8riV8VUCnO/C4BF3w5dHiVpCd5Z1cebBtZJNlC4anWpwA== - -esbuild-linux-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.12.tgz#074bb2b194bf658245f8490f29c01ffcdfa8c931" - integrity sha512-QcgCKb7zfJxqT9o5z9ZUeGH1k8N6iX1Y7VNsEi5F9+HzN1OIx7ESxtQXDN9jbeUSPiRH1n9cw6gFT3H4qbdvcA== - -esbuild-linux-arm64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.12.tgz#3bf789c4396dc032875a122988efd6f3733f28f5" - integrity sha512-HtNq5xm8fUpZKwWKS2/YGwSfTF+339L4aIA8yphNKYJckd5hVdhfdl6GM2P3HwLSCORS++++7++//ApEwXEuAQ== - -esbuild-linux-arm@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.12.tgz#b91b5a8d470053f6c2c9c8a5e67ec10a71fe4a67" - integrity sha512-Wf7T0aNylGcLu7hBnzMvsTfEXdEdJY/hY3u36Vla21aY66xR0MS5I1Hw8nVquXjTN0A6fk/vnr32tkC/C2lb0A== - -esbuild-linux-mips64le@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.12.tgz#2fb54099ada3c950a7536dfcba46172c61e580e2" - integrity sha512-Qol3+AvivngUZkTVFgLpb0H6DT+N5/zM3V1YgTkryPYFeUvuT5JFNDR3ZiS6LxhyF8EE+fiNtzwlPqMDqVcc6A== - -esbuild-linux-ppc64le@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.12.tgz#9e3b8c09825fb27886249dfb3142a750df29a1b7" - integrity sha512-4D8qUCo+CFKaR0cGXtGyVsOI7w7k93Qxb3KFXWr75An0DHamYzq8lt7TNZKoOq/Gh8c40/aKaxvcZnTgQ0TJNg== - -esbuild-linux-riscv64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.12.tgz#923d0f5b6e12ee0d1fe116b08e4ae4478fe40693" - integrity sha512-G9w6NcuuCI6TUUxe6ka0enjZHDnSVK8bO+1qDhMOCtl7Tr78CcZilJj8SGLN00zO5iIlwNRZKHjdMpfFgNn1VA== - -esbuild-linux-s390x@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.12.tgz#3b1620220482b96266a0c6d9d471d451a1eab86f" - integrity sha512-Lt6BDnuXbXeqSlVuuUM5z18GkJAZf3ERskGZbAWjrQoi9xbEIsj/hEzVnSAFLtkfLuy2DE4RwTcX02tZFunXww== - -esbuild-netbsd-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.12.tgz#276730f80da646859b1af5a740e7802d8cd73e42" - integrity sha512-jlUxCiHO1dsqoURZDQts+HK100o0hXfi4t54MNRMCAqKGAV33JCVvMplLAa2FwviSojT/5ZG5HUfG3gstwAG8w== - -esbuild-openbsd-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.12.tgz#bd0eea1dd2ca0722ed489d88c26714034429f8ae" - integrity sha512-1o1uAfRTMIWNOmpf8v7iudND0L6zRBYSH45sofCZywrcf7NcZA+c7aFsS1YryU+yN7aRppTqdUK1PgbZVaB1Dw== - -esbuild-sunos-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.12.tgz#5e56bf9eef3b2d92360d6d29dcde7722acbecc9e" - integrity sha512-nkl251DpoWoBO9Eq9aFdoIt2yYmp4I3kvQjba3jFKlMXuqQ9A4q+JaqdkCouG3DHgAGnzshzaGu6xofGcXyPXg== - -esbuild-windows-32@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.12.tgz#a4f1a301c1a2fa7701fcd4b91ef9d2620cf293d0" - integrity sha512-WlGeBZHgPC00O08luIp5B2SP4cNCp/PcS+3Pcg31kdcJPopHxLkdCXtadLU9J82LCfw4TVls21A6lilQ9mzHrw== - -esbuild-windows-64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.12.tgz#bc2b467541744d653be4fe64eaa9b0dbbf8e07f6" - integrity sha512-VActO3WnWZSN//xjSfbiGOSyC+wkZtI8I4KlgrTo5oHJM6z3MZZBCuFaZHd8hzf/W9KPhF0lY8OqlmWC9HO5AA== - -esbuild-windows-arm64@0.15.12: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.12.tgz#9a7266404334a86be800957eaee9aef94c3df328" - integrity sha512-Of3MIacva1OK/m4zCNIvBfz8VVROBmQT+gRX6pFTLPngFYcj6TFH/12VveAqq1k9VB2l28EoVMNMUCcmsfwyuA== - -esbuild@^0.15.11, esbuild@^0.15.9: - version "0.15.12" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.12.tgz#6c8e22d6d3b7430d165c33848298d3fc9a1f251c" - integrity sha512-PcT+/wyDqJQsRVhaE9uX/Oq4XLrFh0ce/bs2TJh4CSaw9xuvI+xFrH2nAYOADbhQjUgAhNWC5LKoUsakm4dxng== - optionalDependencies: - "@esbuild/android-arm" "0.15.12" - "@esbuild/linux-loong64" "0.15.12" - esbuild-android-64 "0.15.12" - esbuild-android-arm64 "0.15.12" - esbuild-darwin-64 "0.15.12" - esbuild-darwin-arm64 "0.15.12" - esbuild-freebsd-64 "0.15.12" - esbuild-freebsd-arm64 "0.15.12" - esbuild-linux-32 "0.15.12" - esbuild-linux-64 "0.15.12" - esbuild-linux-arm "0.15.12" - esbuild-linux-arm64 "0.15.12" - esbuild-linux-mips64le "0.15.12" - esbuild-linux-ppc64le "0.15.12" - esbuild-linux-riscv64 "0.15.12" - esbuild-linux-s390x "0.15.12" - esbuild-netbsd-64 "0.15.12" - esbuild-openbsd-64 "0.15.12" - esbuild-sunos-64 "0.15.12" - esbuild-windows-32 "0.15.12" - esbuild-windows-64 "0.15.12" - esbuild-windows-arm64 "0.15.12" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== - -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" - integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -estree-walker@2.0.2, estree-walker@^2.0.1, estree-walker@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" - integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== - -estree-walker@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" - integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== - -estree-walker@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-3.0.1.tgz#c2a9fb4a30232f5039b7c030b37ead691932debd" - integrity sha512-woY0RUD87WzMBUiZLx8NsYr23N5BKsOMZHhu2hoNRVh6NXGfoiT1KOL8G3UHlJAnEDGmfa5ubNA/AacfG+Kb0g== - -etag@^1.8.1, etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== - -eventemitter3@^4.0.0: - version "4.0.7" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - -execa@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA== - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug== - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q== - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extend@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -external-editor@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" - integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== - dependencies: - chardet "^0.7.0" - iconv-lite "^0.4.24" - tmp "^0.0.33" - -externality@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/externality/-/externality-0.2.2.tgz#a0592150366ae714f212fe9da20fc9a22c882efa" - integrity sha512-seYffJRrRVI3qrCC0asf2mWAvQ/U0jZA+eECylqIxCDHzBs/W+ZeEv3D0bsjNeEewIYZKfELyY96mRactx8C4w== - dependencies: - enhanced-resolve "^5.9.3" - mlly "^0.5.2" - pathe "^0.3.0" - ufo "^0.8.3" - -extglob@^2.0.2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-glob@^3.2.11, fast-glob@^3.2.12, fast-glob@^3.2.7: - version "3.2.12" - resolved "https://registry.yarnpkg.com/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" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fastq@^1.6.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" - integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== - dependencies: - reusify "^1.0.4" - -fetch-blob@^3.1.2, fetch-blob@^3.1.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" - integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== - dependencies: - node-domexception "^1.0.0" - web-streams-polyfill "^3.0.3" - -figures@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-5.0.0.tgz#126cd055052dea699f8a54e8c9450e6ecfc44d5f" - integrity sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg== - dependencies: - escape-string-regexp "^5.0.0" - is-unicode-supported "^1.2.0" - -file-loader@^6.0.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.2.0.tgz#baef7cf8e1840df325e4390b4484879480eebe4d" - integrity sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw== - dependencies: - loader-utils "^2.0.0" - schema-utils "^3.0.0" - -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ== - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -flat@^5.0.0, flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - -follow-redirects@^1.0.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== - -for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ== - -formdata-polyfill@^4.0.10: - version "4.0.10" - resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" - integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== - dependencies: - fetch-blob "^3.1.2" - -fraction.js@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.2.0.tgz#448e5109a313a3527f5a3ab2119ec4cf0e0e2950" - integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA== - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA== - dependencies: - map-cache "^0.2.2" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-extra@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" - integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs-memo@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fs-memo/-/fs-memo-1.2.0.tgz#a2ec3be606b902077adbb37ec529c5ec5fb2e037" - integrity sha512-YEexkCpL4j03jn5SxaMHqcO6IuWuqm8JFUYhyCep7Ao89JIYmB8xoKhK7zXXJ9cCaNXpyNH5L3QtAmoxjoHW2w== - -fs-minipass@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - -fs-minipass@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" - integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== - dependencies: - minipass "^3.0.0" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/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" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" - -functions-have-names@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - -gauge@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" - integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q== - dependencies: - aproba "^1.0.3 || ^2.0.0" - color-support "^1.1.2" - console-control-strings "^1.0.0" - has-unicode "^2.0.1" - object-assign "^4.1.1" - signal-exit "^3.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - wide-align "^1.1.2" - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385" - integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - -get-port-please@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/get-port-please/-/get-port-please-2.6.1.tgz#80143de24fcaab39b01df977f66ad967e06b17d1" - integrity sha512-4PDSrL6+cuMM1xs6w36ZIkaKzzE0xzfVBCfebHIJ3FE8iB9oic/ECwPw3iNiD4h1AoJ5XLLBhEviFAVrZsDC5A== - dependencies: - fs-memo "^1.2.0" - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== - -git-config-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/git-config-path/-/git-config-path-2.0.0.tgz#62633d61af63af4405a5024efd325762f58a181b" - integrity sha512-qc8h1KIQbJpp+241id3GuAtkdyJ+IK+LIVtkiFTRKRrmddDzs3SI9CvP1QYmWBFvm1I/PWRwj//of8bgAc0ltA== - -git-up@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/git-up/-/git-up-7.0.0.tgz#bace30786e36f56ea341b6f69adfd83286337467" - integrity sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ== - dependencies: - is-ssh "^1.4.0" - parse-url "^8.1.0" - -git-url-parse@^13.1.0: - version "13.1.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-13.1.0.tgz#07e136b5baa08d59fabdf0e33170de425adf07b4" - integrity sha512-5FvPJP/70WkIprlUZ33bm4UAaFdjcLkJLpWft1BeZKqwR0uhhNGoKwlUaPtVb4LxCSQ++erHapRak9kWGj+FCA== - dependencies: - git-up "^7.0.0" - -github-slugger@^1.1.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.4.0.tgz#206eb96cdb22ee56fdc53a28d5a302338463444e" - integrity sha512-w0dzqw/nt51xMVmlaV1+JRzN+oCa1KfcgGEWhxUG16wbdA+Xnt/yoFO8Z8x/V82ZcZ0wy6ln9QDup5avbhiDhQ== - -gittar@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/gittar/-/gittar-0.1.1.tgz#d6993ea6160a86c8b7f3de722a61f73bc99e14b4" - integrity sha512-p+XuqWJpW9ahUuNTptqeFjudFq31o6Jd+maMBarkMAR5U3K9c7zJB4sQ4BV8mIqrTOV29TtqikDhnZfCD4XNfQ== - dependencies: - mkdirp "^0.5.1" - tar "^4.4.1" - -glob-parent@^5.1.2, glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@^7.1.3, glob@^7.1.4: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" - integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globby@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.2.tgz#29047105582427ab6eca4f905200667b056da515" - integrity sha512-LKSDZXToac40u8Q1PQtZihbNdTYSNMuWe+K5l+oa6KgDzSvVrHXlJy40hUP522RjAIoNLJYBJi7ow+rbFpIhHQ== - dependencies: - dir-glob "^3.0.1" - fast-glob "^3.2.11" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^4.0.0" - -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.9: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - -gzip-size@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-7.0.0.tgz#9f9644251f15bc78460fccef4055ae5a5562ac60" - integrity sha512-O1Ld7Dr+nqPnmGpdhzLmMTQ4vAsD+rHwMm1NLUmoUFFymBOMKxCCrtDxqdBRYXdeEPEi3SyoR4TizJLQrnKBNA== - dependencies: - duplexer "^0.1.2" - -h3@^0.8.1, h3@^0.8.4: - version "0.8.5" - resolved "https://registry.yarnpkg.com/h3/-/h3-0.8.5.tgz#59b84b55da407cd9f8d02ae838a3d5130816fa90" - integrity sha512-A+rVzJ+31e67JJzlRf2Ycphu/mvl2qknbpch38xRfrs9HuGSKTtOWuzPnpgaEGIfnzuD/BsDOfhQLJevXEm3ag== - dependencies: - cookie-es "^0.5.0" - destr "^1.2.0" - radix3 "^0.2.1" - ufo "^0.8.6" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg== - dependencies: - ansi-regex "^2.0.0" - -has-bigints@^1.0.1, has-bigints@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - integrity sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== - dependencies: - get-intrinsic "^1.1.1" - -has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has-unicode@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q== - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw== - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ== - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ== - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-sum@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/hash-sum/-/hash-sum-2.0.0.tgz#81d01bb5de8ea4a214ad5d6ead1b523460b0b45a" - integrity sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg== - -hast-to-hyperscript@^10.0.0: - version "10.0.1" - resolved "https://registry.yarnpkg.com/hast-to-hyperscript/-/hast-to-hyperscript-10.0.1.tgz#3decd7cb4654bca8883f6fcbd4fb3695628c4296" - integrity sha512-dhIVGoKCQVewFi+vz3Vt567E4ejMppS1haBRL6TEmeLeJVB1i/FJIIg/e6s1Bwn0g5qtYojHEKvyGA+OZuyifw== - dependencies: - "@types/unist" "^2.0.0" - comma-separated-tokens "^2.0.0" - property-information "^6.0.0" - space-separated-tokens "^2.0.0" - style-to-object "^0.3.0" - unist-util-is "^5.0.0" - web-namespaces "^2.0.0" - -hast-util-from-parse5@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/hast-util-from-parse5/-/hast-util-from-parse5-7.1.0.tgz#c129dd3a24dd8a867ab8a029ca47e27aa54864b7" - integrity sha512-m8yhANIAccpU4K6+121KpPP55sSl9/samzQSQGpb0mTExcNh2WlvjtMwSWFhg6uqD4Rr6Nfa8N6TMypQM51rzQ== - dependencies: - "@types/hast" "^2.0.0" - "@types/parse5" "^6.0.0" - "@types/unist" "^2.0.0" - hastscript "^7.0.0" - property-information "^6.0.0" - vfile "^5.0.0" - vfile-location "^4.0.0" - web-namespaces "^2.0.0" - -hast-util-has-property@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/hast-util-has-property/-/hast-util-has-property-2.0.0.tgz#c15cd6180f3e535540739fcc9787bcffb5708cae" - integrity sha512-4Qf++8o5v14us4Muv3HRj+Er6wTNGA/N9uCaZMty4JWvyFKLdhULrv4KE1b65AthsSO9TXSZnjuxS8ecIyhb0w== - -hast-util-heading-rank@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/hast-util-heading-rank/-/hast-util-heading-rank-2.1.0.tgz#c39f34fa8330ebfec03a08b5d5019ed56122029c" - integrity sha512-w+Rw20Q/iWp2Bcnr6uTrYU6/ftZLbHKhvc8nM26VIWpDqDMlku2iXUVTeOlsdoih/UKQhY7PHQ+vZ0Aqq8bxtQ== - dependencies: - "@types/hast" "^2.0.0" - -hast-util-is-element@^2.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/hast-util-is-element/-/hast-util-is-element-2.1.2.tgz#fc0b0dc7cef3895e839b8d66979d57b0338c68f3" - integrity sha512-thjnlGAnwP8ef/GSO1Q8BfVk2gundnc2peGQqEg2kUt/IqesiGg/5mSwN2fE7nLzy61pg88NG6xV+UrGOrx9EA== - dependencies: - "@types/hast" "^2.0.0" - "@types/unist" "^2.0.0" - -hast-util-parse-selector@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-3.1.0.tgz#a519e27e8b61bd5a98fad494ed06131ce68d9c3f" - integrity sha512-AyjlI2pTAZEOeu7GeBPZhROx0RHBnydkQIXlhnFzDi0qfXTmGUWoCYZtomHbrdrheV4VFUlPcfJ6LMF5T6sQzg== - dependencies: - "@types/hast" "^2.0.0" - -hast-util-raw@^7.2.0: - version "7.2.2" - resolved "https://registry.yarnpkg.com/hast-util-raw/-/hast-util-raw-7.2.2.tgz#1974360b2d7f15b5ce26c2a4bac892d5d8185a18" - integrity sha512-0x3BhhdlBcqRIKyc095lBSDvmQNMY3Eulj2PLsT5XCyKYrxssI5yr3P4Kv/PBo1s/DMkZy2voGkMXECnFCZRLQ== - dependencies: - "@types/hast" "^2.0.0" - "@types/parse5" "^6.0.0" - hast-util-from-parse5 "^7.0.0" - hast-util-to-parse5 "^7.0.0" - html-void-elements "^2.0.0" - parse5 "^6.0.0" - unist-util-position "^4.0.0" - unist-util-visit "^4.0.0" - vfile "^5.0.0" - web-namespaces "^2.0.0" - zwitch "^2.0.0" - -hast-util-to-parse5@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/hast-util-to-parse5/-/hast-util-to-parse5-7.0.0.tgz#a39808e69005d10afeed1866029a1fb137df3f7c" - integrity sha512-YHiS6aTaZ3N0Q3nxaY/Tj98D6kM8QX5Q8xqgg8G45zR7PvWnPGPP0vcKCgb/moIydEJ/QWczVrX0JODCVeoV7A== - dependencies: - "@types/hast" "^2.0.0" - "@types/parse5" "^6.0.0" - hast-to-hyperscript "^10.0.0" - property-information "^6.0.0" - web-namespaces "^2.0.0" - zwitch "^2.0.0" - -hast-util-to-string@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/hast-util-to-string/-/hast-util-to-string-2.0.0.tgz#b008b0a4ea472bf34dd390b7eea1018726ae152a" - integrity sha512-02AQ3vLhuH3FisaMM+i/9sm4OXGSq1UhOOCpTLLQtHdL3tZt7qil69r8M8iDkZYyC0HCFylcYoP+8IO7ddta1A== - dependencies: - "@types/hast" "^2.0.0" - -hastscript@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-7.1.0.tgz#e402ed48f46161cf2f093badbff30583a5c3c315" - integrity sha512-uBjaTTLN0MkCZxY/R2fWUOcu7FRtUVzKRO5P/RAfgsu3yFiMB1JWCO4AjeVkgHxAira1f2UecHK5WfS9QurlWA== - dependencies: - "@types/hast" "^2.0.0" - comma-separated-tokens "^2.0.0" - hast-util-parse-selector "^3.0.0" - property-information "^6.0.0" - space-separated-tokens "^2.0.0" - -he@^1.1.1, he@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -hookable@^5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/hookable/-/hookable-5.4.1.tgz#c0ce030a31a0243fdff2ac3518ea9a83b7e7f9d9" - integrity sha512-i808BglQ1OuSIcgPSZoWsDapCMLXKe5wLS6XZvIXpaBWdWLUZARM8vOLayu6cXewj5TSbaZaMzKnq+pRnfscEQ== - -html-tags@^3.1.0, html-tags@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.2.0.tgz#dbb3518d20b726524e4dd43de397eb0a95726961" - integrity sha512-vy7ClnArOZwCnqZgvv+ddgHgJiAFXe3Ge9ML5/mBctVJoUoYPCdxVucOywjDARn6CVoh3dRSFdPHy2sX80L0Wg== - -html-void-elements@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/html-void-elements/-/html-void-elements-2.0.1.tgz#29459b8b05c200b6c5ee98743c41b979d577549f" - integrity sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A== - -htmlparser2@^3.8.3: - version "3.10.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" - integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== - dependencies: - domelementtype "^1.3.1" - domhandler "^2.3.0" - domutils "^1.5.1" - entities "^1.1.1" - inherits "^2.0.1" - readable-stream "^3.1.1" - -http-errors@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" - integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== - dependencies: - depd "2.0.0" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses "2.0.1" - toidentifier "1.0.1" - -http-proxy@^1.18.1: - version "1.18.1" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" - integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== - dependencies: - eventemitter3 "^4.0.0" - follow-redirects "^1.0.0" - requires-port "^1.0.0" - -http-shutdown@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/http-shutdown/-/http-shutdown-1.2.2.tgz#41bc78fc767637c4c95179bc492f312c0ae64c5f" - integrity sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw== - -https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -iconv-lite@^0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ieee754@^1.1.13, ieee754@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -ignore@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" - integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== - -image-size@^0.5.1: - version "0.5.5" - resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" - integrity sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ== - -immutable@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.1.0.tgz#f795787f0db780183307b9eb2091fcac1f6fafef" - integrity sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -ini@^1.3.5: - version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - -inline-style-parser@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.1.1.tgz#ec8a3b429274e9c0a1f1c4ffa9453a7fef72cea1" - integrity sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q== - -inquirer@^9.1.3: - version "9.1.4" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-9.1.4.tgz#482da8803670a64bd942bc5166a9547a19d41474" - integrity sha512-9hiJxE5gkK/cM2d1mTEnuurGTAoHebbkX0BYl3h7iEg7FYfuNIom+nDfBCSWtvSnoSrWCeBxqqBZu26xdlJlXA== - dependencies: - ansi-escapes "^6.0.0" - chalk "^5.1.2" - cli-cursor "^4.0.0" - cli-width "^4.0.0" - external-editor "^3.0.3" - figures "^5.0.0" - lodash "^4.17.21" - mute-stream "0.0.8" - ora "^6.1.2" - run-async "^2.4.0" - rxjs "^7.5.7" - string-width "^5.1.2" - strip-ansi "^7.0.1" - through "^2.3.6" - wrap-ansi "^8.0.1" - -internal-slot@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" - integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== - dependencies: - get-intrinsic "^1.1.0" - has "^1.0.3" - side-channel "^1.0.4" - -ioredis@^5.2.3: - version "5.2.3" - resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-5.2.3.tgz#d5b37eb13e643241660d6cee4eeb41a026cda8c0" - integrity sha512-gQNcMF23/NpvjCaa1b5YycUyQJ9rBNH2xP94LWinNpodMWVUPP5Ai/xXANn/SM7gfIvI62B5CCvZxhg5pOgyMw== - dependencies: - "@ioredis/commands" "^1.1.1" - cluster-key-slot "^1.1.0" - debug "^4.3.4" - denque "^2.0.1" - lodash.defaults "^4.2.0" - lodash.isarguments "^3.1.0" - redis-errors "^1.2.0" - redis-parser "^3.0.0" - standard-as-callback "^2.1.0" - -ip-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-5.0.0.tgz#cd313b2ae9c80c07bd3851e12bf4fa4dc5480632" - integrity sha512-fOCG6lhoKKakwv+C6KdsOnGvgXnmgfmp0myi3bcNwj3qfwPAxRKWEuFhvEFF7ceYIz6+1jRZ+yguLFAmUNPEfw== - -is-absolute-url@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-4.0.1.tgz#16e4d487d4fded05cfe0685e53ec86804a5e94dc" - integrity sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A== - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A== - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-alphabetical@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-2.0.1.tgz#01072053ea7c1036df3c7d19a6daaec7f19e789b" - integrity sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ== - -is-alphanumerical@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz#7c03fbe96e3e931113e57f964b0a368cc2dfd875" - integrity sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw== - dependencies: - is-alphabetical "^2.0.0" - is-decimal "^2.0.0" - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.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" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-buffer@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" - integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== - -is-builtin-module@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.0.tgz#bb0310dfe881f144ca83f30100ceb10cf58835e0" - integrity sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw== - dependencies: - builtin-modules "^3.3.0" - -is-callable@^1.1.4, is-callable@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - -is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== - dependencies: - has "^1.0.3" - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg== - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-date-object@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" - integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== - dependencies: - has-tostringtag "^1.0.0" - -is-decimal@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-2.0.1.tgz#9469d2dc190d0214fd87d78b78caecc0cc14eef7" - integrity sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A== - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-docker@^2.0.0, is-docker@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - -is-docker@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" - integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-hexadecimal@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz#86b5bf668fca307498d319dfc03289d781a90027" - integrity sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg== - -is-interactive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-2.0.0.tgz#40c57614593826da1100ade6059778d597f16e90" - integrity sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ== - -is-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" - integrity sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g== - -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== - -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg== - dependencies: - kind-of "^3.0.2" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-plain-obj@^1.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg== - -is-plain-obj@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-4.1.0.tgz#d65025edec3657ce032fd7db63c97883eaed71f0" - integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg== - -is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-primitive@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-3.0.1.tgz#98c4db1abff185485a657fc2905052b940524d05" - integrity sha512-GljRxhWvlCNRfZyORiH77FwdFwGcMO620o37EOYC0ORWdq+WYNVqW0w2Juzew4M+L81l6/QS3t5gkkihyRqv9w== - -is-promise@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-4.0.0.tgz#42ff9f84206c1991d26debf520dd5c01042dd2f3" - integrity sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ== - -is-reference@1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" - integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== - dependencies: - "@types/estree" "*" - -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== - dependencies: - call-bind "^1.0.2" - -is-ssh@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.4.0.tgz#4f8220601d2839d8fa624b3106f8e8884f01b8b2" - integrity sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ== - dependencies: - protocols "^2.0.1" - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-unicode-supported@^1.1.0, is-unicode-supported@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" - integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ== - -is-weakref@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - dependencies: - call-bind "^1.0.2" - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -is-wsl@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - -isarray@1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -isobject@^2.0.0, isobject@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA== - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== - -jest-worker@^26.2.1: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" - integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^7.0.0" - -jiti@^1.15.0, jiti@^1.16.0: - version "1.16.0" - resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.16.0.tgz#f72065954446ad1866fa8d6bcc3bed3cc1cebdaa" - integrity sha512-L3BJStEf5NAqNuzrpfbN71dp43mYIcBUlCRea/vdyv5dW/AYa1d4bpelko4SHdY3I6eN9Wzyasxirj1/vv5kmg== - -js-base64@^2.1.9: - version "2.6.4" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.4.tgz#f4e686c5de1ea1f867dbcad3d46d969428df98c4" - integrity sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ== - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - -json5@^2.1.2, json5@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" - integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== - -jsonc-parser@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" - integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== - -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw== - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0, kind-of@^5.0.2: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -kleur@^4.0.3: - version "4.1.5" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" - integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== - -klona@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.5.tgz#d166574d90076395d9963aa7a928fabb8d76afbc" - integrity sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ== - -knitwork@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/knitwork/-/knitwork-0.1.2.tgz#5447a81d8eaede57d236f864ec29b8dc2bc192bf" - integrity sha512-2ekmY2S/VB3YGVhrIFadyJQpkjMFSf48tsXCnA+kjs4FEQIT+5FLyOF0No/X58z/2E/VaMyeJfukRoVT4gMsfQ== - -lazystream@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638" - integrity sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw== - dependencies: - readable-stream "^2.0.5" - -lilconfig@^2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4" - integrity sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg== - -listhen@^0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/listhen/-/listhen-0.3.4.tgz#5bb0db65dae5f2204ffa7ee46b40f2330854cf7f" - integrity sha512-cuzWWoIWF8JvsPLmIurTkUXi27owH4RRKnBsbPswRJvB82uTv15W01yOOLaPvjxY5mMlftmW2p1XnxB835AdRA== - dependencies: - clipboardy "^3.0.0" - colorette "^2.0.19" - defu "^6.1.0" - get-port-please "^2.6.1" - http-shutdown "^1.2.2" - ip-regex "^5.0.0" - node-forge "^1.3.1" - ufo "^0.8.5" - -loader-utils@^1.1.0, loader-utils@^1.2.3: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" - integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^1.0.1" - -loader-utils@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.3.tgz#d4b15b8504c63d1fc3f2ade52d41bc8459d6ede1" - integrity sha512-THWqIsn8QRnvLl0shHYVBN9syumU8pYWEHPTmkiVGd+7K5eFNVSY6AJhRvgGF70gg1Dz+l/k8WicvFCxdEs60A== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - -local-pkg@^0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.2.tgz#13107310b77e74a0e513147a131a2ba288176c2f" - integrity sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg== - -lodash._reinterpolate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" - integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== - -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" - integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== - -lodash.defaults@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" - integrity sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ== - -lodash.difference@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c" - integrity sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA== - -lodash.flatten@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" - integrity sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g== - -lodash.isarguments@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" - integrity sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg== - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== - -lodash.memoize@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== - -lodash.pick@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" - integrity sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q== - -lodash.template@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" - integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== - dependencies: - lodash._reinterpolate "^3.0.0" - lodash.templatesettings "^4.0.0" - -lodash.templatesettings@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" - integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== - dependencies: - lodash._reinterpolate "^3.0.0" - -lodash.union@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" - integrity sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw== - -lodash.uniq@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" - integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== - -lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -log-symbols@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-5.1.0.tgz#a20e3b9a5f53fac6aeb8e2bb22c07cf2c8f16d93" - integrity sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA== - dependencies: - chalk "^5.0.0" - is-unicode-supported "^1.1.0" - -longest-streak@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-3.0.1.tgz#c97315b7afa0e7d9525db9a5a2953651432bdc5d" - integrity sha512-cHlYSUpL2s7Fb3394mYxwTYj8niTaNHUCLr0qdiCXQfSjfuA7CKofpX2uSwEfFDQ0EB7JcnMnm+GjbqqoinYYg== - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -magic-string@^0.25.7: - version "0.25.9" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.9.tgz#de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c" - integrity sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ== - dependencies: - sourcemap-codec "^1.4.8" - -magic-string@^0.26.2, magic-string@^0.26.4, magic-string@^0.26.7: - version "0.26.7" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.26.7.tgz#caf7daf61b34e9982f8228c4527474dac8981d6f" - integrity sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow== - dependencies: - sourcemap-codec "^1.4.8" - -make-dir@^3.1.0, make-dir@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg== - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w== - dependencies: - object-visit "^1.0.0" - -markdown-table@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-3.0.2.tgz#9b59eb2c1b22fe71954a65ff512887065a7bb57c" - integrity sha512-y8j3a5/DkJCmS5x4dMCQL+OR0+2EAq3DOtio1COSHsmW2BGXnNCK3v12hJt1LrUz5iZH5g0LmuYOjDdI+czghA== - -mdast-squeeze-paragraphs@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/mdast-squeeze-paragraphs/-/mdast-squeeze-paragraphs-5.2.0.tgz#23440cea3586a1cb70771f98971d4f8bf1dbb36b" - integrity sha512-uqPZ2smyXe0gNjweQaDkm7eK/KgvcS0u9X9yu28Yj/UOmK6CN6JRs/puzAGQw72vZcxWxs05LxkUTwZIsQZvrw== - dependencies: - "@types/mdast" "^3.0.0" - unist-util-remove "^3.0.0" - -mdast-util-definitions@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/mdast-util-definitions/-/mdast-util-definitions-5.1.1.tgz#2c1d684b28e53f84938bb06317944bee8efa79db" - integrity sha512-rQ+Gv7mHttxHOBx2dkF4HWTg+EE+UR78ptQWDylzPKaQuVGdG4HIoY3SrS/pCp80nZ04greFvXbVFHT+uf0JVQ== - dependencies: - "@types/mdast" "^3.0.0" - "@types/unist" "^2.0.0" - unist-util-visit "^4.0.0" - -mdast-util-find-and-replace@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/mdast-util-find-and-replace/-/mdast-util-find-and-replace-2.2.1.tgz#249901ef43c5f41d6e8a8d446b3b63b17e592d7c" - integrity sha512-SobxkQXFAdd4b5WmEakmkVoh18icjQRxGy5OWTCzgsLRm1Fu/KCtwD1HIQSsmq5ZRjVH0Ehwg6/Fn3xIUk+nKw== - dependencies: - escape-string-regexp "^5.0.0" - unist-util-is "^5.0.0" - unist-util-visit-parents "^5.0.0" - -mdast-util-from-markdown@^1.0.0, mdast-util-from-markdown@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-1.2.0.tgz#84df2924ccc6c995dec1e2368b2b208ad0a76268" - integrity sha512-iZJyyvKD1+K7QX1b5jXdE7Sc5dtoTry1vzV28UZZe8Z1xVnB/czKntJ7ZAkG0tANqRnBF6p3p7GpU1y19DTf2Q== - dependencies: - "@types/mdast" "^3.0.0" - "@types/unist" "^2.0.0" - decode-named-character-reference "^1.0.0" - mdast-util-to-string "^3.1.0" - micromark "^3.0.0" - micromark-util-decode-numeric-character-reference "^1.0.0" - micromark-util-decode-string "^1.0.0" - micromark-util-normalize-identifier "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - unist-util-stringify-position "^3.0.0" - uvu "^0.5.0" - -mdast-util-gfm-autolink-literal@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-1.0.2.tgz#4032dcbaddaef7d4f2f3768ed830475bb22d3970" - integrity sha512-FzopkOd4xTTBeGXhXSBU0OCDDh5lUj2rd+HQqG92Ld+jL4lpUfgX2AT2OHAVP9aEeDKp7G92fuooSZcYJA3cRg== - dependencies: - "@types/mdast" "^3.0.0" - ccount "^2.0.0" - mdast-util-find-and-replace "^2.0.0" - micromark-util-character "^1.0.0" - -mdast-util-gfm-footnote@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-1.0.1.tgz#11d2d40a1a673a399c459e467fa85e00223191fe" - integrity sha512-p+PrYlkw9DeCRkTVw1duWqPRHX6Ywh2BNKJQcZbCwAuP/59B0Lk9kakuAd7KbQprVO4GzdW8eS5++A9PUSqIyw== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-to-markdown "^1.3.0" - micromark-util-normalize-identifier "^1.0.0" - -mdast-util-gfm-strikethrough@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-1.0.1.tgz#a4a74c36864ec6a6e3bbd31e1977f29beb475789" - integrity sha512-zKJbEPe+JP6EUv0mZ0tQUyLQOC+FADt0bARldONot/nefuISkaZFlmVK4tU6JgfyZGrky02m/I6PmehgAgZgqg== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-to-markdown "^1.3.0" - -mdast-util-gfm-table@^1.0.0: - version "1.0.6" - resolved "https://registry.yarnpkg.com/mdast-util-gfm-table/-/mdast-util-gfm-table-1.0.6.tgz#184e900979fe790745fc3dabf77a4114595fcd7f" - integrity sha512-uHR+fqFq3IvB3Rd4+kzXW8dmpxUhvgCQZep6KdjsLK4O6meK5dYZEayLtIxNus1XO3gfjfcIFe8a7L0HZRGgag== - dependencies: - "@types/mdast" "^3.0.0" - markdown-table "^3.0.0" - mdast-util-from-markdown "^1.0.0" - mdast-util-to-markdown "^1.3.0" - -mdast-util-gfm-task-list-item@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-1.0.1.tgz#6f35f09c6e2bcbe88af62fdea02ac199cc802c5c" - integrity sha512-KZ4KLmPdABXOsfnM6JHUIjxEvcx2ulk656Z/4Balw071/5qgnhz+H1uGtf2zIGnrnvDC8xR4Fj9uKbjAFGNIeA== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-to-markdown "^1.3.0" - -mdast-util-gfm@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/mdast-util-gfm/-/mdast-util-gfm-2.0.1.tgz#16fcf70110ae689a06d77e8f4e346223b64a0ea6" - integrity sha512-42yHBbfWIFisaAfV1eixlabbsa6q7vHeSPY+cg+BBjX51M8xhgMacqH9g6TftB/9+YkcI0ooV4ncfrJslzm/RQ== - dependencies: - mdast-util-from-markdown "^1.0.0" - mdast-util-gfm-autolink-literal "^1.0.0" - mdast-util-gfm-footnote "^1.0.0" - mdast-util-gfm-strikethrough "^1.0.0" - mdast-util-gfm-table "^1.0.0" - mdast-util-gfm-task-list-item "^1.0.0" - mdast-util-to-markdown "^1.0.0" - -mdast-util-to-hast@^12.1.0, mdast-util-to-hast@^12.2.4: - version "12.2.4" - resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-12.2.4.tgz#34c1ef2b6cf01c27b3e3504e2c977c76f722e7e1" - integrity sha512-a21xoxSef1l8VhHxS1Dnyioz6grrJkoaCUgGzMD/7dWHvboYX3VW53esRUfB5tgTyz4Yos1n25SPcj35dJqmAg== - dependencies: - "@types/hast" "^2.0.0" - "@types/mdast" "^3.0.0" - mdast-util-definitions "^5.0.0" - micromark-util-sanitize-uri "^1.1.0" - trim-lines "^3.0.0" - unist-builder "^3.0.0" - unist-util-generated "^2.0.0" - unist-util-position "^4.0.0" - unist-util-visit "^4.0.0" - -mdast-util-to-markdown@^1.0.0, mdast-util-to-markdown@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/mdast-util-to-markdown/-/mdast-util-to-markdown-1.3.0.tgz#38b6cdc8dc417de642a469c4fc2abdf8c931bd1e" - integrity sha512-6tUSs4r+KK4JGTTiQ7FfHmVOaDrLQJPmpjD6wPMlHGUVXoG9Vjc3jIeP+uyBWRf8clwB2blM+W7+KrlMYQnftA== - dependencies: - "@types/mdast" "^3.0.0" - "@types/unist" "^2.0.0" - longest-streak "^3.0.0" - mdast-util-to-string "^3.0.0" - micromark-util-decode-string "^1.0.0" - unist-util-visit "^4.0.0" - zwitch "^2.0.0" - -mdast-util-to-string@^3.0.0, mdast-util-to-string@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-3.1.0.tgz#56c506d065fbf769515235e577b5a261552d56e9" - integrity sha512-n4Vypz/DZgwo0iMHLQL49dJzlp7YtAJP+N07MZHpjPf/5XJuHUWstviF4Mn2jEiR/GNmtnRRqnwsXExk3igfFA== - -mdn-data@2.0.14: - version "2.0.14" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" - integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow== - -mdn-data@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" - integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA== - -mdurl@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" - integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== - -memory-fs@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" - integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -merge-options@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-options/-/merge-options-1.0.1.tgz#2a64b24457becd4e4dc608283247e94ce589aa32" - integrity sha512-iuPV41VWKWBIOpBsjoxjDZw8/GbSfZ2mk7N1453bwMrfzdrIk7EzBd+8UVR6rkw67th7xnk9Dytl3J+lHPdxvg== - dependencies: - is-plain-obj "^1.1" - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.3.0, merge2@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -micromark-core-commonmark@^1.0.0, micromark-core-commonmark@^1.0.1, micromark-core-commonmark@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/micromark-core-commonmark/-/micromark-core-commonmark-1.0.6.tgz#edff4c72e5993d93724a3c206970f5a15b0585ad" - integrity sha512-K+PkJTxqjFfSNkfAhp4GB+cZPfQd6dxtTXnf+RjZOV7T4EEXnvgzOcnp+eSTmpGk9d1S9sL6/lqrgSNn/s0HZA== - dependencies: - decode-named-character-reference "^1.0.0" - micromark-factory-destination "^1.0.0" - micromark-factory-label "^1.0.0" - micromark-factory-space "^1.0.0" - micromark-factory-title "^1.0.0" - micromark-factory-whitespace "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-chunked "^1.0.0" - micromark-util-classify-character "^1.0.0" - micromark-util-html-tag-name "^1.0.0" - micromark-util-normalize-identifier "^1.0.0" - micromark-util-resolve-all "^1.0.0" - micromark-util-subtokenize "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.1" - uvu "^0.5.0" - -micromark-extension-gfm-autolink-literal@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-1.0.3.tgz#dc589f9c37eaff31a175bab49f12290edcf96058" - integrity sha512-i3dmvU0htawfWED8aHMMAzAVp/F0Z+0bPh3YrbTPPL1v4YAlCZpy5rBO5p0LPYiZo0zFVkoYh7vDU7yQSiCMjg== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-sanitize-uri "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-gfm-footnote@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-1.0.4.tgz#cbfd8873b983e820c494498c6dac0105920818d5" - integrity sha512-E/fmPmDqLiMUP8mLJ8NbJWJ4bTw6tS+FEQS8CcuDtZpILuOb2kjLqPEeAePF1djXROHXChM/wPJw0iS4kHCcIg== - dependencies: - micromark-core-commonmark "^1.0.0" - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-normalize-identifier "^1.0.0" - micromark-util-sanitize-uri "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-gfm-strikethrough@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-1.0.4.tgz#162232c284ffbedd8c74e59c1525bda217295e18" - integrity sha512-/vjHU/lalmjZCT5xt7CcHVJGq8sYRm80z24qAKXzaHzem/xsDYb2yLL+NNVbYvmpLx3O7SYPuGL5pzusL9CLIQ== - dependencies: - micromark-util-chunked "^1.0.0" - micromark-util-classify-character "^1.0.0" - micromark-util-resolve-all "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-gfm-table@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/micromark-extension-gfm-table/-/micromark-extension-gfm-table-1.0.5.tgz#7b708b728f8dc4d95d486b9e7a2262f9cddbcbb4" - integrity sha512-xAZ8J1X9W9K3JTJTUL7G6wSKhp2ZYHrFk5qJgY/4B33scJzE2kpfRL6oiw/veJTbt7jiM/1rngLlOKPWr1G+vg== - dependencies: - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-gfm-tagfilter@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-1.0.1.tgz#fb2e303f7daf616db428bb6a26e18fda14a90a4d" - integrity sha512-Ty6psLAcAjboRa/UKUbbUcwjVAv5plxmpUTy2XC/3nJFL37eHej8jrHrRzkqcpipJliuBH30DTs7+3wqNcQUVA== - dependencies: - micromark-util-types "^1.0.0" - -micromark-extension-gfm-task-list-item@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-1.0.3.tgz#7683641df5d4a09795f353574d7f7f66e47b7fc4" - integrity sha512-PpysK2S1Q/5VXi72IIapbi/jliaiOFzv7THH4amwXeYXLq3l1uo8/2Be0Ac1rEwK20MQEsGH2ltAZLNY2KI/0Q== - dependencies: - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-gfm@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/micromark-extension-gfm/-/micromark-extension-gfm-2.0.1.tgz#40f3209216127a96297c54c67f5edc7ef2d1a2a2" - integrity sha512-p2sGjajLa0iYiGQdT0oelahRYtMWvLjy8J9LOCxzIQsllMCGLbsLW+Nc+N4vi02jcRJvedVJ68cjelKIO6bpDA== - dependencies: - micromark-extension-gfm-autolink-literal "^1.0.0" - micromark-extension-gfm-footnote "^1.0.0" - micromark-extension-gfm-strikethrough "^1.0.0" - micromark-extension-gfm-table "^1.0.0" - micromark-extension-gfm-tagfilter "^1.0.0" - micromark-extension-gfm-task-list-item "^1.0.0" - micromark-util-combine-extensions "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-factory-destination@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz#fef1cb59ad4997c496f887b6977aa3034a5a277e" - integrity sha512-eUBA7Rs1/xtTVun9TmV3gjfPz2wEwgK5R5xcbIM5ZYAtvGF6JkyaDsj0agx8urXnO31tEO6Ug83iVH3tdedLnw== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-factory-label@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/micromark-factory-label/-/micromark-factory-label-1.0.2.tgz#6be2551fa8d13542fcbbac478258fb7a20047137" - integrity sha512-CTIwxlOnU7dEshXDQ+dsr2n+yxpP0+fn271pu0bwDIS8uqfFcumXpj5mLn3hSC8iw2MUr6Gx8EcKng1dD7i6hg== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-factory-space@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/micromark-factory-space/-/micromark-factory-space-1.0.0.tgz#cebff49968f2b9616c0fcb239e96685cb9497633" - integrity sha512-qUmqs4kj9a5yBnk3JMLyjtWYN6Mzfcx8uJfi5XAveBniDevmZasdGBba5b4QsvRcAkmvGo5ACmSUmyGiKTLZew== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-factory-title@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/micromark-factory-title/-/micromark-factory-title-1.0.2.tgz#7e09287c3748ff1693930f176e1c4a328382494f" - integrity sha512-zily+Nr4yFqgMGRKLpTVsNl5L4PMu485fGFDOQJQBl2NFpjGte1e86zC0da93wf97jrc4+2G2GQudFMHn3IX+A== - dependencies: - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-factory-whitespace@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0.tgz#e991e043ad376c1ba52f4e49858ce0794678621c" - integrity sha512-Qx7uEyahU1lt1RnsECBiuEbfr9INjQTGa6Err+gF3g0Tx4YEviPbqqGKNv/NrBaE7dVHdn1bVZKM/n5I/Bak7A== - dependencies: - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-util-character@^1.0.0, micromark-util-character@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-util-character/-/micromark-util-character-1.1.0.tgz#d97c54d5742a0d9611a68ca0cd4124331f264d86" - integrity sha512-agJ5B3unGNJ9rJvADMJ5ZiYjBRyDpzKAOk01Kpi1TKhlT1APx3XZk6eN7RtSz1erbWHC2L8T3xLZ81wdtGRZzg== - dependencies: - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-util-chunked@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/micromark-util-chunked/-/micromark-util-chunked-1.0.0.tgz#5b40d83f3d53b84c4c6bce30ed4257e9a4c79d06" - integrity sha512-5e8xTis5tEZKgesfbQMKRCyzvffRRUX+lK/y+DvsMFdabAicPkkZV6gO+FEWi9RfuKKoxxPwNL+dFF0SMImc1g== - dependencies: - micromark-util-symbol "^1.0.0" - -micromark-util-classify-character@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/micromark-util-classify-character/-/micromark-util-classify-character-1.0.0.tgz#cbd7b447cb79ee6997dd274a46fc4eb806460a20" - integrity sha512-F8oW2KKrQRb3vS5ud5HIqBVkCqQi224Nm55o5wYLzY/9PwHGXC01tr3d7+TqHHz6zrKQ72Okwtvm/xQm6OVNZA== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-util-combine-extensions@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.0.0.tgz#91418e1e74fb893e3628b8d496085639124ff3d5" - integrity sha512-J8H058vFBdo/6+AsjHp2NF7AJ02SZtWaVUjsayNFeAiydTxUwViQPxN0Hf8dp4FmCQi0UUFovFsEyRSUmFH3MA== - dependencies: - micromark-util-chunked "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-util-decode-numeric-character-reference@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.0.0.tgz#dcc85f13b5bd93ff8d2868c3dba28039d490b946" - integrity sha512-OzO9AI5VUtrTD7KSdagf4MWgHMtET17Ua1fIpXTpuhclCqD8egFWo85GxSGvxgkGS74bEahvtM0WP0HjvV0e4w== - dependencies: - micromark-util-symbol "^1.0.0" - -micromark-util-decode-string@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/micromark-util-decode-string/-/micromark-util-decode-string-1.0.2.tgz#942252ab7a76dec2dbf089cc32505ee2bc3acf02" - integrity sha512-DLT5Ho02qr6QWVNYbRZ3RYOSSWWFuH3tJexd3dgN1odEuPNxCngTCXJum7+ViRAd9BbdxCvMToPOD/IvVhzG6Q== - dependencies: - decode-named-character-reference "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-decode-numeric-character-reference "^1.0.0" - micromark-util-symbol "^1.0.0" - -micromark-util-encode@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/micromark-util-encode/-/micromark-util-encode-1.0.1.tgz#2c1c22d3800870ad770ece5686ebca5920353383" - integrity sha512-U2s5YdnAYexjKDel31SVMPbfi+eF8y1U4pfiRW/Y8EFVCy/vgxk/2wWTxzcqE71LHtCuCzlBDRU2a5CQ5j+mQA== - -micromark-util-html-tag-name@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.1.0.tgz#eb227118befd51f48858e879b7a419fc0df20497" - integrity sha512-BKlClMmYROy9UiV03SwNmckkjn8QHVaWkqoAqzivabvdGcwNGMMMH/5szAnywmsTBUzDsU57/mFi0sp4BQO6dA== - -micromark-util-normalize-identifier@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.0.0.tgz#4a3539cb8db954bbec5203952bfe8cedadae7828" - integrity sha512-yg+zrL14bBTFrQ7n35CmByWUTFsgst5JhA4gJYoty4Dqzj4Z4Fr/DHekSS5aLfH9bdlfnSvKAWsAgJhIbogyBg== - dependencies: - micromark-util-symbol "^1.0.0" - -micromark-util-resolve-all@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/micromark-util-resolve-all/-/micromark-util-resolve-all-1.0.0.tgz#a7c363f49a0162e931960c44f3127ab58f031d88" - integrity sha512-CB/AGk98u50k42kvgaMM94wzBqozSzDDaonKU7P7jwQIuH2RU0TeBqGYJz2WY1UdihhjweivStrJ2JdkdEmcfw== - dependencies: - micromark-util-types "^1.0.0" - -micromark-util-sanitize-uri@^1.0.0, micromark-util-sanitize-uri@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.1.0.tgz#f12e07a85106b902645e0364feb07cf253a85aee" - integrity sha512-RoxtuSCX6sUNtxhbmsEFQfWzs8VN7cTctmBPvYivo98xb/kDEoTCtJQX5wyzIYEmk/lvNFTat4hL8oW0KndFpg== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-encode "^1.0.0" - micromark-util-symbol "^1.0.0" - -micromark-util-subtokenize@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/micromark-util-subtokenize/-/micromark-util-subtokenize-1.0.2.tgz#ff6f1af6ac836f8bfdbf9b02f40431760ad89105" - integrity sha512-d90uqCnXp/cy4G881Ub4psE57Sf8YD0pim9QdjCRNjfas2M1u6Lbt+XZK9gnHL2XFhnozZiEdCa9CNfXSfQ6xA== - dependencies: - micromark-util-chunked "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-util-symbol@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/micromark-util-symbol/-/micromark-util-symbol-1.0.1.tgz#b90344db62042ce454f351cf0bebcc0a6da4920e" - integrity sha512-oKDEMK2u5qqAptasDAwWDXq0tG9AssVwAx3E9bBF3t/shRIGsWIRG+cGafs2p/SnDSOecnt6hZPCE2o6lHfFmQ== - -micromark-util-types@^1.0.0, micromark-util-types@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/micromark-util-types/-/micromark-util-types-1.0.2.tgz#f4220fdb319205812f99c40f8c87a9be83eded20" - integrity sha512-DCfg/T8fcrhrRKTPjRrw/5LLvdGV7BHySf/1LOZx7TzWZdYRjogNtyNq885z3nNallwr3QUKARjqvHqX1/7t+w== - -micromark@^3.0.0, micromark@^3.0.10: - version "3.1.0" - resolved "https://registry.yarnpkg.com/micromark/-/micromark-3.1.0.tgz#eeba0fe0ac1c9aaef675157b52c166f125e89f62" - integrity sha512-6Mj0yHLdUZjHnOPgr5xfWIMqMWS12zDN6iws9SLuSz76W8jTtAv24MN4/CL7gJrl5vtxGInkkqDv/JIoRsQOvA== - dependencies: - "@types/debug" "^4.0.0" - debug "^4.0.0" - decode-named-character-reference "^1.0.0" - micromark-core-commonmark "^1.0.1" - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-chunked "^1.0.0" - micromark-util-combine-extensions "^1.0.0" - micromark-util-decode-numeric-character-reference "^1.0.0" - micromark-util-encode "^1.0.0" - micromark-util-normalize-identifier "^1.0.0" - micromark-util-resolve-all "^1.0.0" - micromark-util-sanitize-uri "^1.0.0" - micromark-util-subtokenize "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.1" - uvu "^0.5.0" - -micromatch@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.0.tgz#5102d4eaf20b6997d6008e3acfe1c44a3fa815e2" - integrity sha512-3StSelAE+hnRvMs8IdVW7Uhk8CVed5tp+kLLGlBP6WiRAXS21GPGu/Nat4WNPXj2Eoc24B02SaeoyozPMfj0/g== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.2.2" - define-property "^1.0.0" - extend-shallow "^2.0.1" - extglob "^2.0.2" - fragment-cache "^0.2.1" - kind-of "^5.0.2" - nanomatch "^1.2.1" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -micromatch@^4.0.2, micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.27: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mime@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" - integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== - -mime@~2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe" - integrity sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg== - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -minimatch@^3.0.4, minimatch@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^5.0.1, minimatch@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.0.tgz#1717b464f4971b144f6aabe8f2d0b8e4511e09c7" - integrity sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg== - dependencies: - brace-expansion "^2.0.1" - -minimatch@~3.0.4: - version "3.0.8" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.8.tgz#5e6a59bd11e2ab0de1cfb843eb2d82e546c321c1" - integrity sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q== - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.0, minimist@^1.2.6: - version "1.2.7" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" - integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== - -minipass@^2.6.0, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minipass@^3.0.0: - version "3.3.4" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.4.tgz#ca99f95dd77c43c7a76bf51e6d200025eee0ffae" - integrity sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw== - dependencies: - yallist "^4.0.0" - -minizlib@^1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - -minizlib@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" - integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== - dependencies: - minipass "^3.0.0" - yallist "^4.0.0" - -mitt@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/mitt/-/mitt-1.1.2.tgz#380e61480d6a615b660f07abb60d51e0a4e4bed6" - integrity sha512-3btxP0O9iGADGWAkteQ8mzDtEspZqu4I32y4GZYCV5BrwtzdcRpF4dQgNdJadCrbBx7Lu6Sq9AVrerMHR0Hkmw== - -mixin-deep@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" - integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdir@^0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/mkdir/-/mkdir-0.0.2.tgz#3b9da7a4e5b13004ebc636581b160e1e04776851" - integrity sha512-98OnjcWaNEIRUJJe9rFoWlbkQ5n9z8F86wIPCrI961YEViiVybTuJln919WuuSHSnlrqXy0ELKCntoPy8C7lqg== - -mkdirp@^0.5.1, mkdirp@^0.5.5, mkdirp@~0.5.1: - version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - -mkdirp@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -mlly@^0.5.14, mlly@^0.5.16, mlly@^0.5.2: - version "0.5.16" - resolved "https://registry.yarnpkg.com/mlly/-/mlly-0.5.16.tgz#adb7d39fed81396a50b43173c88589de314015c7" - integrity sha512-LaJ8yuh4v0zEmge/g3c7jjFlhoCPfQn6RCjXgm9A0Qiuochq4BcuOxVfWmdnCoLTlg2MV+hqhOek+W2OhG0Lwg== - dependencies: - acorn "^8.8.0" - pathe "^0.3.8" - pkg-types "^0.3.5" - ufo "^0.8.5" - -mri@^1.1.0, mri@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" - integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -muggle-string@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/muggle-string/-/muggle-string-0.1.0.tgz#1fda8a281c8b27bb8b70466dbc9f27586a8baa6c" - integrity sha512-Tr1knR3d2mKvvWthlk7202rywKbiOm4rVFLsfAaSIhJ6dt9o47W4S+JMtWhd/PW9Wrdew2/S2fSvhz3E2gkfEg== - -mute-stream@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" - integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== - -nanoid@^3.3.4: - version "3.3.4" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" - integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== - -nanoid@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-4.0.0.tgz#6e144dee117609232c3f415c34b0e550e64999a5" - integrity sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg== - -nanomatch@^1.2.1: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -nitropack@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/nitropack/-/nitropack-0.6.0.tgz#f55cfd795c0509c51061334e115c9991c02e6fe4" - integrity sha512-pmBOBAvrOxnTCKLOn0V6f2hRUt2g+Uthhi5JCx2/29vQKWi0ri0I6IZ+qnN8bVkkbBp4DLmmWG8vxo7ZH/irig== - dependencies: - "@cloudflare/kv-asset-handler" "^0.2.0" - "@netlify/functions" "^1.3.0" - "@rollup/plugin-alias" "^4.0.0" - "@rollup/plugin-commonjs" "^23.0.0" - "@rollup/plugin-inject" "^5.0.1" - "@rollup/plugin-json" "^5.0.0" - "@rollup/plugin-node-resolve" "^15.0.0" - "@rollup/plugin-replace" "^5.0.0" - "@rollup/plugin-wasm" "^6.0.0" - "@rollup/pluginutils" "^5.0.1" - "@vercel/nft" "^0.22.1" - archiver "^5.3.1" - c12 "^0.2.13" - chalk "^5.1.2" - chokidar "^3.5.3" - consola "^2.15.3" - cookie-es "^0.5.0" - defu "^6.1.0" - destr "^1.1.1" - dot-prop "^7.2.0" - esbuild "^0.15.11" - escape-string-regexp "^5.0.0" - etag "^1.8.1" - fs-extra "^10.1.0" - globby "^13.1.2" - gzip-size "^7.0.0" - h3 "^0.8.4" - hookable "^5.4.1" - http-proxy "^1.18.1" - is-primitive "^3.0.1" - jiti "^1.16.0" - klona "^2.0.5" - knitwork "^0.1.2" - listhen "^0.3.4" - mime "^3.0.0" - mlly "^0.5.16" - mri "^1.2.0" - node-fetch-native "^0.1.8" - ohash "^0.1.5" - ohmyfetch "^0.4.20" - pathe "^0.3.9" - perfect-debounce "^0.1.3" - pkg-types "^0.3.5" - pretty-bytes "^6.0.0" - radix3 "^0.2.1" - rollup "^2.79.1" - rollup-plugin-terser "^7.0.2" - rollup-plugin-visualizer "^5.8.3" - scule "^0.3.2" - semver "^7.3.8" - serve-placeholder "^2.0.1" - serve-static "^1.15.0" - source-map-support "^0.5.21" - std-env "^3.3.0" - ufo "^0.8.6" - unenv "^0.6.2" - unimport "^0.6.8" - unstorage "^0.6.0" - -node-domexception@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" - integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== - -node-emoji@^1.11.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" - integrity sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A== - dependencies: - lodash "^4.17.21" - -node-fetch-native@^0.1.4, node-fetch-native@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-0.1.8.tgz#19e2eaf6d86ac14e711ebd2612f40517c3468f2a" - integrity sha512-ZNaury9r0NxaT2oL65GvdGDy+5PlSaHTovT6JV5tOW07k1TQmgC0olZETa4C9KZg0+6zBr99ctTYa3Utqj9P/Q== - -node-fetch@^2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== - dependencies: - whatwg-url "^5.0.0" - -node-fetch@^3.2.10: - version "3.2.10" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.2.10.tgz#e8347f94b54ae18b57c9c049ef641cef398a85c8" - integrity sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA== - dependencies: - data-uri-to-buffer "^4.0.0" - fetch-blob "^3.1.4" - formdata-polyfill "^4.0.10" - -node-forge@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" - integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== - -node-gyp-build@^4.2.2: - version "4.5.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40" - integrity sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg== - -node-releases@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" - integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== - -nopt@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" - integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== - dependencies: - abbrev "1" - -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== - -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" - integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA== - -normalize-url@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" - integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -npmlog@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" - 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" - -nth-check@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" - integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== - dependencies: - boolbase "~1.0.0" - -nth-check@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" - integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== - dependencies: - boolbase "^1.0.0" - -nuxi@3.0.0-rc.12: - version "3.0.0-rc.12" - resolved "https://registry.yarnpkg.com/nuxi/-/nuxi-3.0.0-rc.12.tgz#4c0d11f2db31b698dbc7d7943fc22d4de258b0c3" - integrity sha512-jOnWe/Gf2/5Zj4wCFDHpmBPDDHZFMGrhqK5C+8jhG2RHNJy+YOlZETwAgoXPjmH0Hhb441UDQhZHKg5+yyKhbw== - optionalDependencies: - fsevents "~2.3.2" - -nuxt@3.0.0-rc.12: - version "3.0.0-rc.12" - resolved "https://registry.yarnpkg.com/nuxt/-/nuxt-3.0.0-rc.12.tgz#09e79dbc681930286e838281cd1017540a84a470" - integrity sha512-VhSod1u/w+C3VWsagTd5Prnsjk/VxPRt/bbADhUz3l0zxxajHRhHFX4xZSJWNgzsakducDqhn7N1pY6Ukko9kg== - dependencies: - "@nuxt/devalue" "^2.0.0" - "@nuxt/kit" "3.0.0-rc.12" - "@nuxt/schema" "3.0.0-rc.12" - "@nuxt/telemetry" "^2.1.6" - "@nuxt/ui-templates" "^0.4.0" - "@nuxt/vite-builder" "3.0.0-rc.12" - "@vue/reactivity" "^3.2.41" - "@vue/shared" "^3.2.41" - "@vueuse/head" "~1.0.0-rc.9" - chokidar "^3.5.3" - cookie-es "^0.5.0" - defu "^6.1.0" - destr "^1.1.1" - escape-string-regexp "^5.0.0" - fs-extra "^10.1.0" - globby "^13.1.2" - h3 "^0.8.4" - hash-sum "^2.0.0" - hookable "^5.4.1" - knitwork "^0.1.2" - magic-string "^0.26.7" - mlly "^0.5.16" - nitropack "^0.6.0" - nuxi "3.0.0-rc.12" - ohash "^0.1.5" - ohmyfetch "^0.4.20" - pathe "^0.3.9" - perfect-debounce "^0.1.3" - scule "^0.3.2" - strip-literal "^0.4.2" - ufo "^0.8.6" - ultrahtml "^0.4.0" - unctx "^2.0.2" - unenv "^0.6.2" - unimport "^0.6.8" - unplugin "^0.10.0" - untyped "^0.5.0" - vue "^3.2.41" - vue-bundle-renderer "^0.4.4" - vue-devtools-stub "^0.1.0" - vue-router "^4.1.5" - -object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ== - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-inspect@^1.12.2, object-inspect@^1.9.0: - version "1.12.2" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" - integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== - -object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA== - dependencies: - isobject "^3.0.0" - -object.assign@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" - integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - has-symbols "^1.0.3" - object-keys "^1.1.1" - -object.getownpropertydescriptors@^2.1.0: - version "2.1.4" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.4.tgz#7965e6437a57278b587383831a9b829455a4bc37" - integrity sha512-sccv3L/pMModT6dJAYF3fzGMVcb38ysQ0tEE6ixv2yXJDtEIPph268OlAdJj5/qZMZDq2g/jqvwppt36uS/uQQ== - dependencies: - array.prototype.reduce "^1.0.4" - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.1" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ== - dependencies: - isobject "^3.0.1" - -object.values@^1.1.0: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" - integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - -ohash@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/ohash/-/ohash-0.1.5.tgz#7ba53b68c41fc72612ed75942b8f6da3b5d5bbda" - integrity sha512-qynly1AFIpGWEAW88p6DhMNqok/Swb52/KsiU+Toi7er058Ptvno3tkfTML6wYcEgFgp2GsUziW4Nqn62ciuyw== - -ohmyfetch@^0.4.19, ohmyfetch@^0.4.20: - version "0.4.20" - resolved "https://registry.yarnpkg.com/ohmyfetch/-/ohmyfetch-0.4.20.tgz#735895d396c6d2fbf5705625db1196bd3f29be16" - integrity sha512-+c3/l+X91owrT1reTos1R13rb2j8NGZpKi0bRWwrnxIHlr1FZ8NzghIsNBKpUvk9nsnFoNK4phw+nTnXrcALzA== - dependencies: - destr "^1.1.1" - node-fetch-native "^0.1.8" - ufo "^0.8.6" - undici "^5.11.0" - -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - -once@^1.3.0, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -onetime@^5.1.0, onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -open@^8.4.0: - version "8.4.0" - resolved "https://registry.yarnpkg.com/open/-/open-8.4.0.tgz#345321ae18f8138f82565a910fdc6b39e8c244f8" - integrity sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q== - dependencies: - define-lazy-prop "^2.0.0" - is-docker "^2.1.1" - is-wsl "^2.2.0" - -ora@^6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/ora/-/ora-6.1.2.tgz#7b3c1356b42fd90fb1dad043d5dbe649388a0bf5" - integrity sha512-EJQ3NiP5Xo94wJXIzAyOtSb0QEIAUu7m8t6UZ9krbz0vAJqr92JpcK/lEXg91q6B9pEGqrykkd2EQplnifDSBw== - dependencies: - bl "^5.0.0" - chalk "^5.0.0" - cli-cursor "^4.0.0" - cli-spinners "^2.6.1" - is-interactive "^2.0.0" - is-unicode-supported "^1.1.0" - log-symbols "^5.1.0" - strip-ansi "^7.0.1" - wcwidth "^1.0.1" - -os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== - -parse-entities@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-4.0.0.tgz#f67c856d4e3fe19b1a445c3fabe78dcdc1053eeb" - integrity sha512-5nk9Fn03x3rEhGaX1FU6IDwG/k+GxLXlFAkgrbM1asuAFl3BhdQWvASaIsmwWypRNcZKHPYnIuOSfIWEyEQnPQ== - dependencies: - "@types/unist" "^2.0.0" - character-entities "^2.0.0" - character-entities-legacy "^3.0.0" - character-reference-invalid "^2.0.0" - decode-named-character-reference "^1.0.0" - is-alphanumerical "^2.0.0" - is-decimal "^2.0.0" - is-hexadecimal "^2.0.0" - -parse-git-config@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/parse-git-config/-/parse-git-config-3.0.0.tgz#4a2de08c7b74a2555efa5ae94d40cd44302a6132" - integrity sha512-wXoQGL1D+2COYWCD35/xbiKma1Z15xvZL8cI25wvxzled58V51SJM04Urt/uznS900iQor7QO04SgdfT/XlbuA== - dependencies: - git-config-path "^2.0.0" - ini "^1.3.5" - -parse-path@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-7.0.0.tgz#605a2d58d0a749c8594405d8cc3a2bf76d16099b" - integrity sha512-Euf9GG8WT9CdqwuWJGdf3RkUcTBArppHABkO7Lm8IzRQp0e2r/kkFnmhu4TSK30Wcu5rVAZLmfPKSBBi9tWFog== - dependencies: - protocols "^2.0.0" - -parse-url@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-8.1.0.tgz#972e0827ed4b57fc85f0ea6b0d839f0d8a57a57d" - integrity sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w== - dependencies: - parse-path "^7.0.0" - -parse5@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" - integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== - -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -pathe@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/pathe/-/pathe-0.2.0.tgz#30fd7bbe0a0d91f0e60bae621f5d19e9e225c339" - integrity sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw== - -pathe@^0.3.0, pathe@^0.3.5, pathe@^0.3.7, pathe@^0.3.8, pathe@^0.3.9: - version "0.3.9" - resolved "https://registry.yarnpkg.com/pathe/-/pathe-0.3.9.tgz#4baff768f37f03e3d9341502865fb93116f65191" - integrity sha512-6Y6s0vT112P3jD8dGfuS6r+lpa0qqNrLyHPOwvXMnyNTQaYiwgau2DP3aNDsR13xqtGj7rrPo+jFUATpU6/s+g== - -perfect-debounce@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/perfect-debounce/-/perfect-debounce-0.1.3.tgz#ff6798ea543a3ba1f0efeeaf97c0340f5c8871ce" - integrity sha512-NOT9AcKiDGpnV/HBhI22Str++XWcErO/bALvHCuhv33owZW/CjH8KAFLZDCmu3727sihe0wTxpDhyGc6M8qacQ== - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pify@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== - -pkg-types@^0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-0.3.5.tgz#ea01c7cf28da9e4c5b85de9b250de4b3dc2e9abc" - integrity sha512-VkxCBFVgQhNHYk9subx+HOhZ4jzynH11ah63LZsprTKwPCWG9pfWBlkElWFbvkP9BVR0dP1jS9xPdhaHQNK74Q== - dependencies: - jsonc-parser "^3.2.0" - mlly "^0.5.14" - pathe "^0.3.7" - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== - -postcss-calc@^8.2.3: - version "8.2.4" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-8.2.4.tgz#77b9c29bfcbe8a07ff6693dc87050828889739a5" - integrity sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q== - dependencies: - postcss-selector-parser "^6.0.9" - postcss-value-parser "^4.2.0" - -postcss-colormin@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-5.3.0.tgz#3cee9e5ca62b2c27e84fce63affc0cfb5901956a" - integrity sha512-WdDO4gOFG2Z8n4P8TWBpshnL3JpmNmJwdnfP2gbk2qBA8PWwOYcmjmI/t3CmMeL72a7Hkd+x/Mg9O2/0rD54Pg== - dependencies: - browserslist "^4.16.6" - caniuse-api "^3.0.0" - colord "^2.9.1" - postcss-value-parser "^4.2.0" - -postcss-convert-values@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-5.1.2.tgz#31586df4e184c2e8890e8b34a0b9355313f503ab" - integrity sha512-c6Hzc4GAv95B7suy4udszX9Zy4ETyMCgFPUDtWjdFTKH1SE9eFY/jEpHSwTH1QPuwxHpWslhckUQWbNRM4ho5g== - dependencies: - browserslist "^4.20.3" - postcss-value-parser "^4.2.0" - -postcss-discard-comments@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-5.1.2.tgz#8df5e81d2925af2780075840c1526f0660e53696" - integrity sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ== - -postcss-discard-duplicates@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz#9eb4fe8456706a4eebd6d3b7b777d07bad03e848" - integrity sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw== - -postcss-discard-empty@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-5.1.1.tgz#e57762343ff7f503fe53fca553d18d7f0c369c6c" - integrity sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A== - -postcss-discard-overridden@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz#7e8c5b53325747e9d90131bb88635282fb4a276e" - integrity sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw== - -postcss-import-resolver@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-import-resolver/-/postcss-import-resolver-2.0.0.tgz#95c61ac5489047bd93ff42a9cd405cfe9041e2c0" - integrity sha512-y001XYgGvVwgxyxw9J1a5kqM/vtmIQGzx34g0A0Oy44MFcy/ZboZw1hu/iN3VYFjSTRzbvd7zZJJz0Kh0AGkTw== - dependencies: - enhanced-resolve "^4.1.1" - -postcss-import@^15.0.0: - version "15.0.0" - resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-15.0.0.tgz#0b66c25fdd9c0d19576e63c803cf39e4bad08822" - integrity sha512-Y20shPQ07RitgBGv2zvkEAu9bqvrD77C9axhj/aA1BQj4czape2MdClCExvB27EwYEJdGgKZBpKanb0t1rK2Kg== - dependencies: - postcss-value-parser "^4.0.0" - read-cache "^1.0.0" - resolve "^1.1.7" - -postcss-merge-longhand@^5.1.6: - version "5.1.6" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-5.1.6.tgz#f378a8a7e55766b7b644f48e5d8c789ed7ed51ce" - integrity sha512-6C/UGF/3T5OE2CEbOuX7iNO63dnvqhGZeUnKkDeifebY0XqkkvrctYSZurpNE902LDf2yKwwPFgotnfSoPhQiw== - dependencies: - postcss-value-parser "^4.2.0" - stylehacks "^5.1.0" - -postcss-merge-rules@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-5.1.2.tgz#7049a14d4211045412116d79b751def4484473a5" - integrity sha512-zKMUlnw+zYCWoPN6yhPjtcEdlJaMUZ0WyVcxTAmw3lkkN/NDMRkOkiuctQEoWAOvH7twaxUUdvBWl0d4+hifRQ== - dependencies: - browserslist "^4.16.6" - caniuse-api "^3.0.0" - cssnano-utils "^3.1.0" - postcss-selector-parser "^6.0.5" - -postcss-minify-font-values@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-5.1.0.tgz#f1df0014a726083d260d3bd85d7385fb89d1f01b" - integrity sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA== - dependencies: - postcss-value-parser "^4.2.0" - -postcss-minify-gradients@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-5.1.1.tgz#f1fe1b4f498134a5068240c2f25d46fcd236ba2c" - integrity sha512-VGvXMTpCEo4qHTNSa9A0a3D+dxGFZCYwR6Jokk+/3oB6flu2/PnPXAh2x7x52EkY5xlIHLm+Le8tJxe/7TNhzw== - dependencies: - colord "^2.9.1" - cssnano-utils "^3.1.0" - postcss-value-parser "^4.2.0" - -postcss-minify-params@^5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-5.1.3.tgz#ac41a6465be2db735099bbd1798d85079a6dc1f9" - integrity sha512-bkzpWcjykkqIujNL+EVEPOlLYi/eZ050oImVtHU7b4lFS82jPnsCb44gvC6pxaNt38Els3jWYDHTjHKf0koTgg== - dependencies: - browserslist "^4.16.6" - cssnano-utils "^3.1.0" - postcss-value-parser "^4.2.0" - -postcss-minify-selectors@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-5.2.1.tgz#d4e7e6b46147b8117ea9325a915a801d5fe656c6" - integrity sha512-nPJu7OjZJTsVUmPdm2TcaiohIwxP+v8ha9NehQ2ye9szv4orirRU3SDdtUmKH+10nzn0bAyOXZ0UEr7OpvLehg== - dependencies: - postcss-selector-parser "^6.0.5" - -postcss-normalize-charset@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz#9302de0b29094b52c259e9b2cf8dc0879879f0ed" - integrity sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg== - -postcss-normalize-display-values@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-5.1.0.tgz#72abbae58081960e9edd7200fcf21ab8325c3da8" - integrity sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA== - dependencies: - postcss-value-parser "^4.2.0" - -postcss-normalize-positions@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-5.1.1.tgz#ef97279d894087b59325b45c47f1e863daefbb92" - integrity sha512-6UpCb0G4eofTCQLFVuI3EVNZzBNPiIKcA1AKVka+31fTVySphr3VUgAIULBhxZkKgwLImhzMR2Bw1ORK+37INg== - dependencies: - postcss-value-parser "^4.2.0" - -postcss-normalize-repeat-style@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.1.tgz#e9eb96805204f4766df66fd09ed2e13545420fb2" - integrity sha512-mFpLspGWkQtBcWIRFLmewo8aC3ImN2i/J3v8YCFUwDnPu3Xz4rLohDO26lGjwNsQxB3YF0KKRwspGzE2JEuS0g== - dependencies: - postcss-value-parser "^4.2.0" - -postcss-normalize-string@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-5.1.0.tgz#411961169e07308c82c1f8c55f3e8a337757e228" - integrity sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w== - dependencies: - postcss-value-parser "^4.2.0" - -postcss-normalize-timing-functions@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.1.0.tgz#d5614410f8f0b2388e9f240aa6011ba6f52dafbb" - integrity sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg== - dependencies: - postcss-value-parser "^4.2.0" - -postcss-normalize-unicode@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.0.tgz#3d23aede35e160089a285e27bf715de11dc9db75" - integrity sha512-J6M3MizAAZ2dOdSjy2caayJLQT8E8K9XjLce8AUQMwOrCvjCHv24aLC/Lps1R1ylOfol5VIDMaM/Lo9NGlk1SQ== - dependencies: - browserslist "^4.16.6" - postcss-value-parser "^4.2.0" - -postcss-normalize-url@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-5.1.0.tgz#ed9d88ca82e21abef99f743457d3729a042adcdc" - integrity sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew== - dependencies: - normalize-url "^6.0.1" - postcss-value-parser "^4.2.0" - -postcss-normalize-whitespace@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.1.1.tgz#08a1a0d1ffa17a7cc6efe1e6c9da969cc4493cfa" - integrity sha512-83ZJ4t3NUDETIHTa3uEg6asWjSBYL5EdkVB0sDncx9ERzOKBVJIUeDO9RyA9Zwtig8El1d79HBp0JEi8wvGQnA== - dependencies: - postcss-value-parser "^4.2.0" - -postcss-ordered-values@^5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-5.1.3.tgz#b6fd2bd10f937b23d86bc829c69e7732ce76ea38" - integrity sha512-9UO79VUhPwEkzbb3RNpqqghc6lcYej1aveQteWY+4POIwlqkYE21HKWaLDF6lWNuqCobEAyTovVhtI32Rbv2RQ== - dependencies: - cssnano-utils "^3.1.0" - postcss-value-parser "^4.2.0" - -postcss-prefix-selector@^1.6.0: - version "1.16.0" - resolved "https://registry.yarnpkg.com/postcss-prefix-selector/-/postcss-prefix-selector-1.16.0.tgz#ad5b56f9a73a2c090ca7161049632c9d89bcb404" - integrity sha512-rdVMIi7Q4B0XbXqNUEI+Z4E+pueiu/CS5E6vRCQommzdQ/sgsS4dK42U7GX8oJR+TJOtT+Qv3GkNo6iijUMp3Q== - -postcss-reduce-initial@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-5.1.0.tgz#fc31659ea6e85c492fb2a7b545370c215822c5d6" - integrity sha512-5OgTUviz0aeH6MtBjHfbr57tml13PuedK/Ecg8szzd4XRMbYxH4572JFG067z+FqBIf6Zp/d+0581glkvvWMFw== - dependencies: - browserslist "^4.16.6" - caniuse-api "^3.0.0" - -postcss-reduce-transforms@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-5.1.0.tgz#333b70e7758b802f3dd0ddfe98bb1ccfef96b6e9" - integrity sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ== - dependencies: - postcss-value-parser "^4.2.0" - -postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.9: - version "6.0.10" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d" - integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w== - dependencies: - cssesc "^3.0.0" - util-deprecate "^1.0.2" - -postcss-svgo@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-5.1.0.tgz#0a317400ced789f233a28826e77523f15857d80d" - integrity sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA== - dependencies: - postcss-value-parser "^4.2.0" - svgo "^2.7.0" - -postcss-unique-selectors@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-5.1.1.tgz#a9f273d1eacd09e9aa6088f4b0507b18b1b541b6" - integrity sha512-5JiODlELrz8L2HwxfPnhOWZYWDxVHWL83ufOv84NrcgipI7TaeRsatAhK4Tr2/ZiYldpK/wBvw5BD3qfaK96GA== - dependencies: - postcss-selector-parser "^6.0.5" - -postcss-url@^10.1.3: - version "10.1.3" - resolved "https://registry.yarnpkg.com/postcss-url/-/postcss-url-10.1.3.tgz#54120cc910309e2475ec05c2cfa8f8a2deafdf1e" - integrity sha512-FUzyxfI5l2tKmXdYc6VTu3TWZsInayEKPbiyW+P6vmmIrrb4I6CGX0BFoewgYHLK+oIL5FECEK02REYRpBvUCw== - dependencies: - make-dir "~3.1.0" - mime "~2.5.2" - minimatch "~3.0.4" - xxhashjs "~0.2.2" - -postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" - integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== - -postcss@^5.2.17: - version "5.2.18" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" - integrity sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg== - dependencies: - chalk "^1.1.3" - js-base64 "^2.1.9" - source-map "^0.5.6" - supports-color "^3.2.3" - -postcss@^8.1.10, postcss@^8.4.16, postcss@^8.4.18: - version "8.4.18" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.18.tgz#6d50046ea7d3d66a85e0e782074e7203bc7fbca2" - integrity sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA== - dependencies: - nanoid "^3.3.4" - picocolors "^1.0.0" - source-map-js "^1.0.2" - -posthtml-parser@^0.2.0, posthtml-parser@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/posthtml-parser/-/posthtml-parser-0.2.1.tgz#35d530de386740c2ba24ff2eb2faf39ccdf271dd" - integrity sha512-nPC53YMqJnc/+1x4fRYFfm81KV2V+G9NZY+hTohpYg64Ay7NemWWcV4UWuy/SgMupqQ3kJ88M/iRfZmSnxT+pw== - dependencies: - htmlparser2 "^3.8.3" - isobject "^2.1.0" - -posthtml-rename-id@^1.0: - version "1.0.12" - resolved "https://registry.yarnpkg.com/posthtml-rename-id/-/posthtml-rename-id-1.0.12.tgz#cf7f6eb37146bf1afac31e68f18c6cc19ae61433" - integrity sha512-UKXf9OF/no8WZo9edRzvuMenb6AD5hDLzIepJW+a4oJT+T/Lx7vfMYWT4aWlGNQh0WMhnUx1ipN9OkZ9q+ddEw== - dependencies: - escape-string-regexp "1.0.5" - -posthtml-render@^1.0.5, posthtml-render@^1.0.6: - version "1.4.0" - resolved "https://registry.yarnpkg.com/posthtml-render/-/posthtml-render-1.4.0.tgz#40114070c45881cacb93347dae3eff53afbcff13" - integrity sha512-W1779iVHGfq0Fvh2PROhCe2QhB8mEErgqzo1wpIt36tCgChafP+hbXIhLDOM8ePJrZcFs0vkNEtdibEWVqChqw== - -posthtml-svg-mode@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/posthtml-svg-mode/-/posthtml-svg-mode-1.0.3.tgz#abd554face81223cab0cb367e18e4efd2a4e74b0" - integrity sha512-hEqw9NHZ9YgJ2/0G7CECOeuLQKZi8HjWLkBaSVtOWjygQ9ZD8P7tqeowYs7WrFdKsWEKG7o+IlsPY8jrr0CJpQ== - dependencies: - merge-options "1.0.1" - posthtml "^0.9.2" - posthtml-parser "^0.2.1" - posthtml-render "^1.0.6" - -posthtml@^0.9.2: - version "0.9.2" - resolved "https://registry.yarnpkg.com/posthtml/-/posthtml-0.9.2.tgz#f4c06db9f67b61fd17c4e256e7e3d9515bf726fd" - integrity sha512-spBB5sgC4cv2YcW03f/IAUN1pgDJWNWD8FzkyY4mArLUMJW+KlQhlmUdKAHQuPfb00Jl5xIfImeOsf6YL8QK7Q== - dependencies: - posthtml-parser "^0.2.0" - posthtml-render "^1.0.5" - -pretty-bytes@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-6.0.0.tgz#928be2ad1f51a2e336add8ba764739f9776a8140" - integrity sha512-6UqkYefdogmzqAZWzJ7laYeJnaXDy2/J+ZqiiMtS7t7OfpXWTlaeGMwX8U6EFvPV/YWWEKRkS8hKS4k60WHTOg== - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -property-information@^6.0.0, property-information@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/property-information/-/property-information-6.1.1.tgz#5ca85510a3019726cb9afed4197b7b8ac5926a22" - integrity sha512-hrzC564QIl0r0vy4l6MvRLhafmUowhO/O3KgVSoXIbbA2Sz4j8HGpJc6T2cubRVwMwpdiG/vKGfhT4IixmKN9w== - -protocols@^2.0.0, protocols@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/protocols/-/protocols-2.0.1.tgz#8f155da3fc0f32644e83c5782c8e8212ccf70a86" - integrity sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q== - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -q@^1.1.2: - version "1.5.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== - -query-string@^4.3.2: - version "4.3.4" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" - integrity sha512-O2XLNDBIg1DnTOa+2XrIwSiXEV8h2KImXUnjhhn2+UsvZ+Es2uyd5CCRTNQlDGbzUQOW3aYCBx9rVA6dzsiY7Q== - dependencies: - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -radix3@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/radix3/-/radix3-0.2.1.tgz#77e66a41c7ba5600a8bc137fd259ef661d314418" - integrity sha512-FnhArTl5Tq7dodiLeSPKrDUyCQuJqEncP8cKdyy399g8F/cz7GH6FmzA3Rkosu2IZMkpswFFwXfb2ERSiL06pg== - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-loader@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-4.0.2.tgz#1aac6b7d1ad1501e66efdac1522c73e59a584eb6" - integrity sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA== - dependencies: - loader-utils "^2.0.0" - schema-utils "^3.0.0" - -rc9@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/rc9/-/rc9-1.2.2.tgz#0d79202e088dd80e2e0f77ac36f520247d2d3964" - integrity sha512-zbe8+HR2X28eZepAwohuKkebbEsA67h0DO9I7g12QrHa2CQopR9gztOLPIPXXGTvcxeUjAN4wZ+b29t3m/u05g== - dependencies: - defu "^6.0.0" - destr "^1.1.1" - flat "^5.0.0" - -read-cache@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" - integrity sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA== - dependencies: - pify "^2.3.0" - -readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.5: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readdir-glob@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/readdir-glob/-/readdir-glob-1.1.2.tgz#b185789b8e6a43491635b6953295c5c5e3fd224c" - integrity sha512-6RLVvwJtVwEDfPdn6X6Ille4/lxGl0ATOY4FN/B9nxQcgOazvvI0nodiD19ScKq0PvA/29VpaOQML36o5IzZWA== - dependencies: - minimatch "^5.1.0" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -redis-errors@^1.0.0, redis-errors@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/redis-errors/-/redis-errors-1.2.0.tgz#eb62d2adb15e4eaf4610c04afe1529384250abad" - integrity sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w== - -redis-parser@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-3.0.0.tgz#b66d828cdcafe6b4b8a428a7def4c6bcac31c8b4" - integrity sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A== - dependencies: - redis-errors "^1.0.0" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexp.prototype.flags@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" - integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - functions-have-names "^1.2.2" - -rehype-external-links@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/rehype-external-links/-/rehype-external-links-2.0.1.tgz#fe54f9f227a1a2f8f6afe442ac4c9ee748f08756" - integrity sha512-u2dNypma+ps12SJWlS23zvbqwNx0Hl24t0YHXSM/6FCZj/pqWETCO3WyyrvALv4JYvRtuPjhiv2Lpen15ESqbA== - dependencies: - "@types/hast" "^2.0.0" - extend "^3.0.0" - is-absolute-url "^4.0.0" - space-separated-tokens "^2.0.0" - unified "^10.0.0" - unist-util-visit "^4.0.0" - -rehype-raw@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/rehype-raw/-/rehype-raw-6.1.1.tgz#81bbef3793bd7abacc6bf8335879d1b6c868c9d4" - integrity sha512-d6AKtisSRtDRX4aSPsJGTfnzrX2ZkHQLE5kiUuGOeEoLpbEulFF4hj0mLPbsa+7vmguDKOVVEQdHKDSwoaIDsQ== - dependencies: - "@types/hast" "^2.0.0" - hast-util-raw "^7.2.0" - unified "^10.0.0" - -rehype-slug@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/rehype-slug/-/rehype-slug-5.0.1.tgz#6e732d0c55b3b1e34187e74b7363fb53229e5f52" - integrity sha512-X5v3wV/meuOX9NFcGhJvUpEjIvQl2gDvjg3z40RVprYFt7q3th4qMmYLULiu3gXvbNX1ppx+oaa6JyY1W67pTA== - dependencies: - "@types/hast" "^2.0.0" - github-slugger "^1.1.1" - hast-util-has-property "^2.0.0" - hast-util-heading-rank "^2.0.0" - hast-util-to-string "^2.0.0" - unified "^10.0.0" - unist-util-visit "^4.0.0" - -rehype-sort-attribute-values@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/rehype-sort-attribute-values/-/rehype-sort-attribute-values-4.0.0.tgz#6a1baaced2f984ebed9aa201145c85cbc1c76880" - integrity sha512-+Y3OWTbbxSIutbXMVY7+aWFmcRyEvdz6HkghXAyVPjee1Y8HUi+/vryBL1UdEI9VknVBiGvphXAf5n6MDNOXOA== - dependencies: - "@types/hast" "^2.0.0" - hast-util-is-element "^2.0.0" - unified "^10.0.0" - unist-util-visit "^4.0.0" - -rehype-sort-attributes@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/rehype-sort-attributes/-/rehype-sort-attributes-4.0.0.tgz#b7766c864a370a07dd8ffa93b02c98322c20fe67" - integrity sha512-sCT58e12F+fJL8ZmvpEP2vAK7cpYffUAf0cMQjNfLIewWjMHMGo0Io+H8eztJoI1S9dvEm2XZT5zzchqe8gYJw== - dependencies: - "@types/hast" "^2.0.0" - unified "^10.0.0" - unist-util-visit "^4.0.0" - -remark-emoji@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/remark-emoji/-/remark-emoji-3.0.2.tgz#786e88af1ecae682d74d7e1219989f34708205da" - integrity sha512-hEgxEv2sBtvhT3tNG/tQeeFY3EbslftaOoG14dDZndLo25fWJ6Fbg4ukFbIotOWWrfXyASjXjyHT+6n366k3mg== - dependencies: - emoticon "^4.0.0" - node-emoji "^1.11.0" - unist-util-visit "^4.1.0" - -remark-gfm@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/remark-gfm/-/remark-gfm-3.0.1.tgz#0b180f095e3036545e9dddac0e8df3fa5cfee54f" - integrity sha512-lEFDoi2PICJyNrACFOfDD3JlLkuSbOa5Wd8EPt06HUdptv8Gn0bxYTdbU/XXQ3swAPkEaGxxPN9cbnMHvVu1Ig== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-gfm "^2.0.0" - micromark-extension-gfm "^2.0.0" - unified "^10.0.0" - -remark-mdc@^1.0.7: - version "1.0.8" - resolved "https://registry.yarnpkg.com/remark-mdc/-/remark-mdc-1.0.8.tgz#88f79a1de7a1b5e0634e3be979d40dad29cddeb6" - integrity sha512-pg2KtOem9cZd0PHyPvlamDdk+eXeKAOGq5UzPIa0I7Mqi74lqqprAksjgtrKQpEaDULiLh6Yh48HPcAxdeL5Uw== - dependencies: - flat "^5.0.2" - js-yaml "^4.1.0" - mdast-util-from-markdown "^1.2.0" - mdast-util-to-markdown "^1.3.0" - micromark "^3.0.10" - micromark-core-commonmark "^1.0.6" - micromark-factory-space "^1.0.0" - micromark-factory-whitespace "^1.0.0" - micromark-util-character "^1.1.0" - parse-entities "^4.0.0" - scule "^0.2.1" - stringify-entities "^4.0.2" - unist-util-visit "^4.1.0" - unist-util-visit-parents "^5.1.0" - -remark-parse@^10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-10.0.1.tgz#6f60ae53edbf0cf38ea223fe643db64d112e0775" - integrity sha512-1fUyHr2jLsVOkhbvPRBJ5zTKZZyD6yZzYaWCS6BPBdQ8vEMBCH+9zNCDA6tET/zHCi/jLqjCWtlJZUPk+DbnFw== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-from-markdown "^1.0.0" - unified "^10.0.0" - -remark-rehype@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/remark-rehype/-/remark-rehype-10.1.0.tgz#32dc99d2034c27ecaf2e0150d22a6dcccd9a6279" - integrity sha512-EFmR5zppdBp0WQeDVZ/b66CWJipB2q2VLNFMabzDSGR66Z2fQii83G5gTBbgGEnEEA0QRussvrFHxk1HWGJskw== - dependencies: - "@types/hast" "^2.0.0" - "@types/mdast" "^3.0.0" - mdast-util-to-hast "^12.1.0" - unified "^10.0.0" - -remark-squeeze-paragraphs@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/remark-squeeze-paragraphs/-/remark-squeeze-paragraphs-5.0.1.tgz#c15aae559c43cc6e1fe85e24d6ec3cca7ecc4fa9" - integrity sha512-VWPAoa1bAAtU/aQfSLRZ7vOrwH9I02RhZTSo+e0LT3fVO9RKNCq/bwobIEBhxvNCt00JoQ7GwR3sYGhmD2/y6Q== - dependencies: - "@types/mdast" "^3.0.0" - mdast-squeeze-paragraphs "^5.0.0" - unified "^10.0.0" - -repeat-element@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" - integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== - -repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== - -resolve@^1.1.7, resolve@^1.22.1: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -restore-cursor@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" - integrity sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -rollup-plugin-terser@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d" - integrity sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ== - dependencies: - "@babel/code-frame" "^7.10.4" - jest-worker "^26.2.1" - serialize-javascript "^4.0.0" - terser "^5.0.0" - -rollup-plugin-visualizer@^5.8.3: - version "5.8.3" - resolved "https://registry.yarnpkg.com/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.8.3.tgz#2f002d6e1e38f4d4fb8638fd8d23ec799c3a2060" - integrity sha512-QGJk4Bqe4AOat5AjipOh8esZH1nck5X2KFpf4VytUdSUuuuSwvIQZjMGgjcxe/zXexltqaXp5Vx1V3LmnQH15Q== - dependencies: - open "^8.4.0" - source-map "^0.7.4" - yargs "^17.5.1" - -rollup-pluginutils@^2.8.2: - version "2.8.2" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" - integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== - dependencies: - estree-walker "^0.6.1" - -rollup@^2.79.1: - version "2.79.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7" - integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw== - optionalDependencies: - fsevents "~2.3.2" - -rollup@~2.78.0: - version "2.78.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.78.1.tgz#52fe3934d9c83cb4f7c4cb5fb75d88591be8648f" - integrity sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg== - optionalDependencies: - fsevents "~2.3.2" - -run-async@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" - integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -rxjs@^7.5.7: - version "7.5.7" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.7.tgz#2ec0d57fdc89ece220d2e702730ae8f1e49def39" - integrity sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA== - dependencies: - tslib "^2.1.0" - -sade@^1.7.3: - version "1.8.1" - resolved "https://registry.yarnpkg.com/sade/-/sade-1.8.1.tgz#0a78e81d658d394887be57d2a409bf703a3b2701" - integrity sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A== - dependencies: - mri "^1.1.0" - -safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@^5.2.1, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-regex "^1.1.4" - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg== - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sass@^1.55.0: - version "1.55.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.55.0.tgz#0c4d3c293cfe8f8a2e8d3b666e1cf1bff8065d1c" - integrity sha512-Pk+PMy7OGLs9WaxZGJMn7S96dvlyVBwwtToX895WmCpAOr5YiJYEUJfiJidMuKb613z2xNWcXCHEuOvjZbqC6A== - dependencies: - chokidar ">=3.0.0 <4.0.0" - immutable "^4.0.0" - source-map-js ">=0.6.2 <2.0.0" - -sax@~1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -schema-utils@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" - integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -scule@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/scule/-/scule-0.2.1.tgz#0c1dc847b18e07219ae9a3832f2f83224e2079dc" - integrity sha512-M9gnWtn3J0W+UhJOHmBxBTwv8mZCan5i1Himp60t6vvZcor0wr+IM0URKmIglsWJ7bRujNAVVN77fp+uZaWoKg== - -scule@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/scule/-/scule-0.3.2.tgz#472445cecd8357165a94a067f78cee40e700b596" - integrity sha512-zIvPdjOH8fv8CgrPT5eqtxHQXmPNnV/vHJYffZhE43KZkvULvpCTvOt1HPlFaCZx287INL9qaqrZg34e8NgI4g== - -semver@^6.0.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.3.4, semver@^7.3.5, semver@^7.3.8: - version "7.3.8" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== - dependencies: - lru-cache "^6.0.0" - -send@0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" - integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== - dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" - -serialize-javascript@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" - integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== - dependencies: - randombytes "^2.1.0" - -serve-placeholder@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/serve-placeholder/-/serve-placeholder-2.0.1.tgz#dfa741812f49dfea472a68c4f292dbc40d28389a" - integrity sha512-rUzLlXk4uPFnbEaIz3SW8VISTxMuONas88nYWjAWaM2W9VDbt9tyFOr3lq8RhVOFrT3XISoBw8vni5una8qMnQ== - dependencies: - defu "^6.0.0" - -serve-static@^1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.18.0" - -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== - -set-value@^2.0.0, set-value@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" - integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -shiki-es@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/shiki-es/-/shiki-es-0.1.2.tgz#37176c6ff8d734f95e27560b62e1230c9a90c0cb" - integrity sha512-eqtfk8idlYlSLAn0gp0Ly2+FbKc2d78IddigHSS4iHAnpXoY2kdRzyFGZOdi6TvemYMnRhZBi1HsSqZc5eNKqg== - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -slash@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" - integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== - -slugify@^1.6.5: - version "1.6.5" - resolved "https://registry.yarnpkg.com/slugify/-/slugify-1.6.5.tgz#c8f5c072bf2135b80703589b39a3d41451fbe8c8" - integrity sha512-8mo9bslnBO3tr5PEVFzMPIWwWnipGS0xVbYf65zxDqfNwmzYn1LpiKNrR6DlClusuvo+hDHd1zKpmfAe83NQSQ== - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -socket.io-client@^4.5.3: - version "4.5.3" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.5.3.tgz#bed69209d001465b2fea650d2e95c1e82768ab5e" - integrity sha512-I/hqDYpQ6JKwtJOf5ikM+Qz+YujZPMEl6qBLhxiP0nX+TfXKhW4KZZG8lamrD6Y5ngjmYHreESVasVCgi5Kl3A== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.2" - engine.io-client "~6.2.3" - socket.io-parser "~4.2.0" - -socket.io-parser@~4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.1.tgz#01c96efa11ded938dcb21cbe590c26af5eff65e5" - integrity sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - -"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== - -source-map-resolve@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@^0.5.21, source-map-support@~0.5.20: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-url@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" - integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== - -source-map@^0.5.6: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== - -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@^0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" - integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== - -sourcemap-codec@^1.4.8: - version "1.4.8" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" - integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== - -space-separated-tokens@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-2.0.1.tgz#43193cec4fb858a2ce934b7f98b7f2c18107098b" - integrity sha512-ekwEbFp5aqSPKaqeY1PGrlGQxPNaq+Cnx4+bE2D8sciBQrHpbwoBbawqTN2+6jPs9IdWxxiUcN0K2pkczD3zmw== - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -stable@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" - integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== - -standard-as-callback@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/standard-as-callback/-/standard-as-callback-2.1.0.tgz#8953fc05359868a77b5b9739a665c5977bb7df45" - integrity sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A== - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g== - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - -std-env@^3.2.1, std-env@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.3.0.tgz#86b5b5d416c5744b3fdeac6893c2b98196fc1a55" - integrity sha512-cNNS+VYsXIs5gI6gJipO4qZ8YYT274JHvNnQ1/R/x8Q8mdP0qj0zoMchRXmBNPqp/0eOEhX+3g7g6Fgb7meLIQ== - -streamsearch@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" - integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - integrity sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ== - -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^5.0.1, string-width@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" - integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== - dependencies: - eastasianwidth "^0.2.0" - emoji-regex "^9.2.2" - strip-ansi "^7.0.1" - -string.prototype.trimend@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" - integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" - -string.prototype.trimstart@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" - integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -stringify-entities@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-4.0.3.tgz#cfabd7039d22ad30f3cc435b0ca2c1574fc88ef8" - integrity sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g== - dependencies: - character-entities-html4 "^2.0.0" - character-entities-legacy "^3.0.0" - -strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" - integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw== - dependencies: - ansi-regex "^6.0.1" - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-literal@^0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-0.4.2.tgz#4f9fa6c38bb157b924e9ace7155ebf8a2342cbcf" - integrity sha512-pv48ybn4iE1O9RLgCAN0iU4Xv7RlBTiit6DKmMiErbs9x1wH6vXBs45tWc0H5wUIF6TLTrKweqkmYF/iraQKNw== - dependencies: - acorn "^8.8.0" - -style-to-object@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/style-to-object/-/style-to-object-0.3.0.tgz#b1b790d205991cc783801967214979ee19a76e46" - integrity sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA== - dependencies: - inline-style-parser "0.1.1" - -stylehacks@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-5.1.0.tgz#a40066490ca0caca04e96c6b02153ddc39913520" - integrity sha512-SzLmvHQTrIWfSgljkQCw2++C9+Ne91d/6Sp92I8c5uHTcy/PgeHamwITIbBW9wnFTY/3ZfSXR9HIL6Ikqmcu6Q== - dependencies: - browserslist "^4.16.6" - postcss-selector-parser "^6.0.4" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g== - -supports-color@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - integrity sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A== - dependencies: - has-flag "^1.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.0.0, supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -svg-baker-runtime@^1.4.7: - version "1.4.7" - resolved "https://registry.yarnpkg.com/svg-baker-runtime/-/svg-baker-runtime-1.4.7.tgz#f4720637f5b6202eef6378d81f1fead0815f8a4e" - integrity sha512-Zorfwwj5+lWjk/oxwSMsRdS2sPQQdTmmsvaSpzU+i9ZWi3zugHLt6VckWfnswphQP0LmOel3nggpF5nETbt6xw== - dependencies: - deepmerge "1.3.2" - mitt "1.1.2" - svg-baker "^1.7.0" - -svg-baker@^1.5.0, svg-baker@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/svg-baker/-/svg-baker-1.7.0.tgz#8367f78d875550c52fe4756f7303d5c5d7c2e9a7" - integrity sha512-nibslMbkXOIkqKVrfcncwha45f97fGuAOn1G99YwnwTj8kF9YiM6XexPcUso97NxOm6GsP0SIvYVIosBis1xLg== - dependencies: - bluebird "^3.5.0" - clone "^2.1.1" - he "^1.1.1" - image-size "^0.5.1" - loader-utils "^1.1.0" - merge-options "1.0.1" - micromatch "3.1.0" - postcss "^5.2.17" - postcss-prefix-selector "^1.6.0" - posthtml-rename-id "^1.0" - posthtml-svg-mode "^1.0.3" - query-string "^4.3.2" - traverse "^0.6.6" - -svg-sprite-loader@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/svg-sprite-loader/-/svg-sprite-loader-5.2.1.tgz#f0c37e76665ddfdf7abc8ff6ebd1da35cdd212d9" - integrity sha512-n2IZc87rpOeXh+PQFksFMGCfMV/BT01YG+Dlbyjoh2Cz8BSTL5Vi/7KDr86Pt/u1NRDCVb3vY74BF5rKCmqbNA== - dependencies: - bluebird "^3.5.0" - deepmerge "1.3.2" - domready "1.0.8" - escape-string-regexp "1.0.5" - loader-utils "^1.1.0" - svg-baker "^1.5.0" - svg-baker-runtime "^1.4.7" - url-slug "2.0.0" - -svg-tags@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" - integrity sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA== - -svg-to-vue@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/svg-to-vue/-/svg-to-vue-0.7.0.tgz#ec86deb1742be38319462e36703af1dfa2f9fad9" - integrity sha512-Tg2nMmf3BQorYCAjxbtTkYyWPVSeox5AZUFvfy4MoWK/5tuQlnA/h3LAlTjV3sEvOC5FtUNovRSj3p784l4KOA== - dependencies: - svgo "^1.3.2" - -svgo@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" - integrity sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw== - dependencies: - chalk "^2.4.1" - coa "^2.0.2" - css-select "^2.0.0" - css-select-base-adapter "^0.1.1" - css-tree "1.0.0-alpha.37" - csso "^4.0.2" - js-yaml "^3.13.1" - mkdirp "~0.5.1" - object.values "^1.1.0" - sax "~1.2.4" - stable "^0.1.8" - unquote "~1.1.1" - util.promisify "~1.0.0" - -svgo@^2.7.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.8.0.tgz#4ff80cce6710dc2795f0c7c74101e6764cfccd24" - integrity sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg== - dependencies: - "@trysound/sax" "0.2.0" - commander "^7.2.0" - css-select "^4.1.3" - css-tree "^1.1.3" - csso "^4.2.0" - picocolors "^1.0.0" - stable "^0.1.8" - -tapable@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" - integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - -tapable@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" - integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== - -tar-stream@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" - integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== - dependencies: - bl "^4.0.3" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - -tar@^4.4.1: - version "4.4.19" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" - integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== - dependencies: - chownr "^1.1.4" - fs-minipass "^1.2.7" - minipass "^2.9.0" - minizlib "^1.3.3" - mkdirp "^0.5.5" - safe-buffer "^5.2.1" - yallist "^3.1.1" - -tar@^6.1.11: - version "6.1.11" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" - integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== - dependencies: - chownr "^2.0.0" - fs-minipass "^2.0.0" - minipass "^3.0.0" - minizlib "^2.1.1" - mkdirp "^1.0.3" - yallist "^4.0.0" - -terser@^5.0.0: - version "5.15.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.15.1.tgz#8561af6e0fd6d839669c73b92bdd5777d870ed6c" - integrity sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw== - dependencies: - "@jridgewell/source-map" "^0.3.2" - acorn "^8.5.0" - commander "^2.20.0" - source-map-support "~0.5.20" - -through@^2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== - -tiny-invariant@^1.1.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.1.tgz#8560808c916ef02ecfd55e66090df23a4b7aa642" - integrity sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw== - -tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg== - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg== - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -to-regex@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - -traverse@^0.6.6: - version "0.6.7" - resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.7.tgz#46961cd2d57dd8706c36664acde06a248f1173fe" - integrity sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg== - -trim-lines@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/trim-lines/-/trim-lines-3.0.1.tgz#d802e332a07df861c48802c04321017b1bd87338" - integrity sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg== - -trough@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/trough/-/trough-2.1.0.tgz#0f7b511a4fde65a46f18477ab38849b22c554876" - integrity sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g== - -tslib@^2.1.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" - integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -type-fest@^2.11.2: - version "2.19.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" - integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== - -type-fest@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.1.0.tgz#157b74044d9c27fd796b9c6aa46eae6658b1e9b8" - integrity sha512-StmrZmK3eD9mDF9Vt7UhqthrDSk66O9iYl5t5a0TSoVkHjl0XZx/xuc/BRz4urAXXGHOY5OLsE0RdJFIApSFmw== - -typescript@^4.8.4: - version "4.8.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" - integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== - -ufo@^0.8.3, ufo@^0.8.5, ufo@^0.8.6: - version "0.8.6" - resolved "https://registry.yarnpkg.com/ufo/-/ufo-0.8.6.tgz#c0ec89bc0e0c9fa59a683680feb0f28b55ec323b" - integrity sha512-fk6CmUgwKCfX79EzcDQQpSCMxrHstvbLswFChHS0Vump+kFkw7nJBfTZoC1j0bOGoY9I7R3n2DGek5ajbcYnOw== - -ultrahtml@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/ultrahtml/-/ultrahtml-0.4.0.tgz#d421eefc3263460c68b5a5ec6a8105825925db38" - integrity sha512-pnJXeIWo9gu7ftQLsMii4Se9kWOzyuH63EDsOsFKwP9XTdLG+QI+JUUxXFSAlCJ/frcdmjfE6kSvvCKiGmiakg== - -unbox-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" - integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - dependencies: - call-bind "^1.0.2" - has-bigints "^1.0.2" - has-symbols "^1.0.3" - which-boxed-primitive "^1.0.2" - -unctx@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/unctx/-/unctx-2.0.2.tgz#7d14d9290e0879aa7be697b7f35066cffec4ffc4" - integrity sha512-3lcXTlDoOaguRVC1GqG3mrawy17yoycSAQDDnUayQYZ17v9to+Gn6Zyssroc/GD2ppJ0wF5V8adOcKkrNKVWow== - dependencies: - acorn "^8.8.0" - estree-walker "^3.0.1" - magic-string "^0.26.2" - unplugin "^0.9.5" - -undici@^5.11.0: - version "5.11.0" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.11.0.tgz#1db25f285821828fc09d3804b9e2e934ae86fc13" - integrity sha512-oWjWJHzFet0Ow4YZBkyiJwiK5vWqEYoH7BINzJAJOLedZ++JpAlCbUktW2GQ2DS2FpKmxD/JMtWUUWl1BtghGw== - dependencies: - busboy "^1.6.0" - -unenv@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/unenv/-/unenv-0.6.2.tgz#bae287932759a8d3956885c88fc76e4fe10cc18a" - integrity sha512-IdQfYsHsGKDkiBdeOmtU4MjWvPYfMDOC63cvFqZPodAc5aVezvfD9Bwr7FL/G78cAMMCaDm5Jux3vYo+Z8c/Dg== - dependencies: - defu "^6.1.0" - mime "^3.0.0" - node-fetch-native "^0.1.4" - pathe "^0.3.5" - -unidecode@0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/unidecode/-/unidecode-0.1.8.tgz#efbb301538bc45246a9ac8c559d72f015305053e" - integrity sha512-SdoZNxCWpN2tXTCrGkPF/0rL2HEq+i2gwRG1ReBvx8/0yTzC3enHfugOf8A9JBShVwwrRIkLX0YcDUGbzjbVCA== - -unified@^10.0.0, unified@^10.1.2: - version "10.1.2" - resolved "https://registry.yarnpkg.com/unified/-/unified-10.1.2.tgz#b1d64e55dafe1f0b98bb6c719881103ecf6c86df" - integrity sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q== - dependencies: - "@types/unist" "^2.0.0" - bail "^2.0.0" - extend "^3.0.0" - is-buffer "^2.0.0" - is-plain-obj "^4.0.0" - trough "^2.0.0" - vfile "^5.0.0" - -unimport@^0.6.8: - version "0.6.8" - resolved "https://registry.yarnpkg.com/unimport/-/unimport-0.6.8.tgz#5f1b770aa0cc0557c67c9b2187ad2d226fcc06c1" - integrity sha512-MWkaPYvN0j+6jfEuiVFhfmy+aOtgAP11CozSbu/I3Cx+8ybjXIueB7GVlKofHabtjzSlPeAvWKJSFjHWsG2JaA== - dependencies: - "@rollup/pluginutils" "^4.2.1" - escape-string-regexp "^5.0.0" - fast-glob "^3.2.12" - local-pkg "^0.4.2" - magic-string "^0.26.4" - mlly "^0.5.16" - pathe "^0.3.8" - scule "^0.3.2" - strip-literal "^0.4.2" - unplugin "^0.9.6" - -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" - -unist-builder@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/unist-builder/-/unist-builder-3.0.0.tgz#728baca4767c0e784e1e64bb44b5a5a753021a04" - integrity sha512-GFxmfEAa0vi9i5sd0R2kcrI9ks0r82NasRq5QHh2ysGngrc6GiqD5CDf1FjPenY4vApmFASBIIlk/jj5J5YbmQ== - dependencies: - "@types/unist" "^2.0.0" - -unist-util-generated@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-2.0.0.tgz#86fafb77eb6ce9bfa6b663c3f5ad4f8e56a60113" - integrity sha512-TiWE6DVtVe7Ye2QxOVW9kqybs6cZexNwTwSMVgkfjEReqy/xwGpAXb99OxktoWwmL+Z+Epb0Dn8/GNDYP1wnUw== - -unist-util-is@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-5.1.1.tgz#e8aece0b102fa9bc097b0fef8f870c496d4a6236" - integrity sha512-F5CZ68eYzuSvJjGhCLPL3cYx45IxkqXSetCcRgUXtbcm50X2L9oOWQlfUfDdAf+6Pd27YDblBfdtmsThXmwpbQ== - -unist-util-position@^4.0.0, unist-util-position@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/unist-util-position/-/unist-util-position-4.0.3.tgz#5290547b014f6222dff95c48d5c3c13a88fadd07" - integrity sha512-p/5EMGIa1qwbXjA+QgcBXaPWjSnZfQ2Sc3yBEEfgPwsEmJd8Qh+DSk3LGnmOM4S1bY2C0AjmMnB8RuEYxpPwXQ== - dependencies: - "@types/unist" "^2.0.0" - -unist-util-remove@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/unist-util-remove/-/unist-util-remove-3.1.0.tgz#8042577e151dac989b7517976bfe4bac58f76ccd" - integrity sha512-rO/sIghl13eN8irs5OBN2a4RC10MsJdiePCfwrvnzGtgIbHcDXr2REr0qi9F2r/CIb1r9FyyFmcMRIGs+EyUFw== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^5.0.0" - unist-util-visit-parents "^5.0.0" - -unist-util-stringify-position@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-3.0.2.tgz#5c6aa07c90b1deffd9153be170dce628a869a447" - integrity sha512-7A6eiDCs9UtjcwZOcCpM4aPII3bAAGv13E96IkawkOAW0OhH+yRxtY0lzo8KiHpzEMfH7Q+FizUmwp8Iqy5EWg== - dependencies: - "@types/unist" "^2.0.0" - -unist-util-visit-parents@^5.0.0, unist-util-visit-parents@^5.1.0, unist-util-visit-parents@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-5.1.1.tgz#868f353e6fce6bf8fa875b251b0f4fec3be709bb" - integrity sha512-gks4baapT/kNRaWxuGkl5BIhoanZo7sC/cUT/JToSRNL1dYoXRFl75d++NkjYk4TAu2uv2Px+l8guMajogeuiw== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^5.0.0" - -unist-util-visit@^4.0.0, unist-util-visit@^4.1.0, unist-util-visit@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-4.1.1.tgz#1c4842d70bd3df6cc545276f5164f933390a9aad" - integrity sha512-n9KN3WV9k4h1DxYR1LoajgN93wpEi/7ZplVe02IoB4gH5ctI1AaF2670BLHQYbwj+pY83gFtyeySFiyMHJklrg== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^5.0.0" - unist-util-visit-parents "^5.1.1" - -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - -unplugin@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/unplugin/-/unplugin-0.10.1.tgz#e00dc951c1901aef4124121057102a8c290e28b3" - integrity sha512-y1hdBitiLOJvCmer0/IGrMGmHplsm2oFRGWleoAJTRQ8aMHxHOe9gLntYlh1WNLKufBuQ2sOTrHF+KWH4xE8Ag== - dependencies: - acorn "^8.8.0" - chokidar "^3.5.3" - webpack-sources "^3.2.3" - webpack-virtual-modules "^0.4.5" - -unplugin@^0.9.5, unplugin@^0.9.6: - version "0.9.6" - resolved "https://registry.yarnpkg.com/unplugin/-/unplugin-0.9.6.tgz#f449173b619b9970bf3190d5419a66a727bb5d18" - integrity sha512-YYLtfoNiie/lxswy1GOsKXgnLJTE27la/PeCGznSItk+8METYZErO+zzV9KQ/hXhPwzIJsfJ4s0m1Rl7ZCWZ4Q== - dependencies: - acorn "^8.8.0" - chokidar "^3.5.3" - webpack-sources "^3.2.3" - webpack-virtual-modules "^0.4.5" - -unquote@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" - integrity sha512-vRCqFv6UhXpWxZPyGDh/F3ZpNv8/qo7w6iufLpQg9aKnQ71qM4B5KiI7Mia9COcjEhrO9LueHpMYjYzsWH3OIg== - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ== - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -unstorage@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-0.6.0.tgz#9a70d770d08ed8dbb87f4aa5fbf7700baf4a641d" - integrity sha512-X05PIq28pVNA1BypX6Y00YNqAsHM25MGemvpjHeYvwJ8/wg936GoO1YD+VdWlqm3LmVX4fNJ5tlC7uhXsMPgeg== - dependencies: - anymatch "^3.1.2" - chokidar "^3.5.3" - destr "^1.1.1" - h3 "^0.8.1" - ioredis "^5.2.3" - listhen "^0.3.4" - mkdir "^0.0.2" - mri "^1.2.0" - ohmyfetch "^0.4.19" - ufo "^0.8.6" - ws "^8.9.0" - -untyped@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/untyped/-/untyped-0.5.0.tgz#0c8be1296d128a3f35e0df229b542f288741a50f" - integrity sha512-2Sre5A1a7G61bjaAKZnSFaVgbJMwwbbYQpJFH69hAYcDfN7kIaktlSphS02XJilz4+/jR1tsJ5MHo1oMoCezxg== - dependencies: - "@babel/core" "^7.19.0" - "@babel/standalone" "^7.19.0" - "@babel/types" "^7.19.0" - scule "^0.3.2" - -update-browserslist-db@^1.0.9: - version "1.0.10" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" - integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== - -url-loader@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-4.1.1.tgz#28505e905cae158cf07c92ca622d7f237e70a4e2" - integrity sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA== - dependencies: - loader-utils "^2.0.0" - mime-types "^2.1.27" - schema-utils "^3.0.0" - -url-slug@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/url-slug/-/url-slug-2.0.0.tgz#a789d5aed4995c0d95af33377ad1d5c68d4d7027" - integrity sha512-aiNmSsVgrjCiJ2+KWPferjT46YFKoE8i0YX04BlMVDue022Xwhg/zYlnZ6V9/mP3p8Wj7LEp0myiTkC/p6sxew== - dependencies: - unidecode "0.1.8" - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - -util.promisify@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee" - integrity sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.2" - has-symbols "^1.0.1" - object.getownpropertydescriptors "^2.1.0" - -uvu@^0.5.0: - version "0.5.6" - resolved "https://registry.yarnpkg.com/uvu/-/uvu-0.5.6.tgz#2754ca20bcb0bb59b64e9985e84d2e81058502df" - integrity sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA== - dependencies: - dequal "^2.0.0" - diff "^5.0.0" - kleur "^4.0.3" - sade "^1.7.3" - -vfile-location@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-4.0.1.tgz#06f2b9244a3565bef91f099359486a08b10d3a95" - integrity sha512-JDxPlTbZrZCQXogGheBHjbRWjESSPEak770XwWPfw5mTc1v1nWGLB/apzZxsx8a0SJVfF8HK8ql8RD308vXRUw== - dependencies: - "@types/unist" "^2.0.0" - vfile "^5.0.0" - -vfile-message@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-3.1.2.tgz#a2908f64d9e557315ec9d7ea3a910f658ac05f7d" - integrity sha512-QjSNP6Yxzyycd4SVOtmKKyTsSvClqBPJcd00Z0zuPj3hOIjg0rUPG6DbFGPvUKRgYyaIWLPKpuEclcuvb3H8qA== - dependencies: - "@types/unist" "^2.0.0" - unist-util-stringify-position "^3.0.0" - -vfile@^5.0.0: - version "5.3.5" - resolved "https://registry.yarnpkg.com/vfile/-/vfile-5.3.5.tgz#ec2e206b1414f561c85b7972bb1eeda8ab47ee61" - integrity sha512-U1ho2ga33eZ8y8pkbQLH54uKqGhFJ6GYIHnnG5AhRpAh3OWjkrRHKa/KogbmQn8We+c0KVV3rTOgR9V/WowbXQ== - dependencies: - "@types/unist" "^2.0.0" - is-buffer "^2.0.0" - unist-util-stringify-position "^3.0.0" - vfile-message "^3.0.0" - -vite-node@^0.24.3: - version "0.24.3" - resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.24.3.tgz#a547ff40fff2121b321d2003f3c830a33089c479" - integrity sha512-OBdUO+xEySODBy8aT0mze537Gt3qushIqdt/DylbfnK5sfVtpRcredNACHCyhvzhVYqs3hKxavPhV8IN8zFg2A== - dependencies: - debug "^4.3.4" - mlly "^0.5.16" - pathe "^0.2.0" - vite "^3.1.7" - -vite-plugin-checker@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/vite-plugin-checker/-/vite-plugin-checker-0.5.1.tgz#b8e085f456d37be7f89020cf081102daff52812e" - integrity sha512-NFiO1PyK9yGuaeSnJ7Whw9fnxLc1AlELnZoyFURnauBYhbIkx9n+PmIXxSFUuC9iFyACtbJQUAEuQi6yHs2Adg== - dependencies: - "@babel/code-frame" "^7.12.13" - ansi-escapes "^4.3.0" - chalk "^4.1.1" - chokidar "^3.5.1" - commander "^8.0.0" - fast-glob "^3.2.7" - lodash.debounce "^4.0.8" - lodash.pick "^4.4.0" - npm-run-path "^4.0.1" - strip-ansi "^6.0.0" - tiny-invariant "^1.1.0" - vscode-languageclient "^7.0.0" - vscode-languageserver "^7.0.0" - vscode-languageserver-textdocument "^1.0.1" - vscode-uri "^3.0.2" - -vite-svg-loader@^3.3.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/vite-svg-loader/-/vite-svg-loader-3.6.0.tgz#71d246cba5e808c7f183a2a56a9dde6856bb0c92" - integrity sha512-bZJffcgCREW57kNkgMhuNqeDznWXyQwJ3wKrRhHLMMzwDnP5jr3vXW3cqsmquRR7VTP5mLdKj1/zzPPooGUuPw== - dependencies: - "@vue/compiler-sfc" "^3.2.20" - svgo "^2.7.0" - -vite@^3.1.7, vite@~3.1.8: - version "3.1.8" - resolved "https://registry.yarnpkg.com/vite/-/vite-3.1.8.tgz#fa29144167d19b773baffd65b3972ea4c12359c9" - integrity sha512-m7jJe3nufUbuOfotkntGFupinL/fmuTNuQmiVE7cH2IZMuf4UbfbGYMUT3jVWgGYuRVLY9j8NnrRqgw5rr5QTg== - dependencies: - esbuild "^0.15.9" - postcss "^8.4.16" - resolve "^1.22.1" - rollup "~2.78.0" - optionalDependencies: - fsevents "~2.3.2" - -vscode-jsonrpc@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz#108bdb09b4400705176b957ceca9e0880e9b6d4e" - integrity sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg== - -vscode-languageclient@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-7.0.0.tgz#b505c22c21ffcf96e167799757fca07a6bad0fb2" - integrity sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg== - dependencies: - minimatch "^3.0.4" - semver "^7.3.4" - vscode-languageserver-protocol "3.16.0" - -vscode-languageserver-protocol@3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz#34135b61a9091db972188a07d337406a3cdbe821" - integrity sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A== - dependencies: - vscode-jsonrpc "6.0.0" - vscode-languageserver-types "3.16.0" - -vscode-languageserver-textdocument@^1.0.1: - version "1.0.7" - resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.7.tgz#16df468d5c2606103c90554ae05f9f3d335b771b" - integrity sha512-bFJH7UQxlXT8kKeyiyu41r22jCZXG8kuuVVA33OEJn1diWOZK5n8zBSPZFHVBOu8kXZ6h0LIRhf5UnCo61J4Hg== - -vscode-languageserver-types@3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz#ecf393fc121ec6974b2da3efb3155644c514e247" - integrity sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA== - -vscode-languageserver@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz#49b068c87cfcca93a356969d20f5d9bdd501c6b0" - integrity sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw== - dependencies: - vscode-languageserver-protocol "3.16.0" - -vscode-uri@^3.0.2: - version "3.0.6" - resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.6.tgz#5e6e2e1a4170543af30151b561a41f71db1d6f91" - integrity sha512-fmL7V1eiDBFRRnu+gfRWTzyPpNIHJTc4mWnFkwBUmO9U3KPgJAmTx7oxi2bl/Rh6HLdU7+4C9wlj0k2E4AdKFQ== - -vue-bundle-renderer@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/vue-bundle-renderer/-/vue-bundle-renderer-0.4.4.tgz#97a1c9609ea99f0b6ae245fc1ce9bdfffbbac292" - integrity sha512-kjJWPayzup8QFynETVpoYD0gDM2nbwN//bpt86hAHpZ+FPdTJFDQqKpouSLQgb2XjkOYM1uB/yc6Zb3iCvS7Gw== - dependencies: - ufo "^0.8.6" - -vue-demi@*: - version "0.13.11" - resolved "https://registry.yarnpkg.com/vue-demi/-/vue-demi-0.13.11.tgz#7d90369bdae8974d87b1973564ad390182410d99" - integrity sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A== - -vue-devtools-stub@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/vue-devtools-stub/-/vue-devtools-stub-0.1.0.tgz#a65b9485edecd4273cedcb8102c739b83add2c81" - integrity sha512-RutnB7X8c5hjq39NceArgXg28WZtZpGc3+J16ljMiYnFhKvd8hITxSWQSQ5bvldxMDU6gG5mkxl1MTQLXckVSQ== - -vue-masonry-css@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/vue-masonry-css/-/vue-masonry-css-1.0.3.tgz#a5e7bb248570eeedcd358637d3f1f4fc7f0c5f86" - integrity sha512-viecHQiHVLez7HlYUQsv1wJb2MT/RDSzkDp6m3In41vPrk6OsBmT2qRE8LZqYIA4daIwrnx/Xm8h4fjOpuE3hw== - -vue-router@^4.1.5: - version "4.1.5" - resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.1.5.tgz#256f597e3f5a281a23352a6193aa6e342c8d9f9a" - integrity sha512-IsvoF5D2GQ/EGTs/Th4NQms9gd2NSqV+yylxIyp/OYp8xOwxmU8Kj/74E9DTSYAyH5LX7idVUngN3JSj1X4xcQ== - dependencies: - "@vue/devtools-api" "^6.1.4" - -vue-svg-loader@^0.16.0: - version "0.16.0" - resolved "https://registry.yarnpkg.com/vue-svg-loader/-/vue-svg-loader-0.16.0.tgz#adccbdc9aca90132bde9c9d96cd49f74efecd345" - integrity sha512-2RtFXlTCYWm8YAEO2qAOZ2SuIF2NvLutB5muc3KDYoZq5ZeCHf8ggzSan3ksbbca7CJ/Aw57ZnDF4B7W/AkGtw== - dependencies: - loader-utils "^1.2.3" - svg-to-vue "^0.7.0" - -vue-template-compiler@^2.7.10: - version "2.7.13" - resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.7.13.tgz#1520a5aa6d1af51dd0622824e79814f6e8cb7058" - integrity sha512-jYM6TClwDS9YqP48gYrtAtaOhRKkbYmbzE+Q51gX5YDr777n7tNI/IZk4QV4l/PjQPNh/FVa/E92sh/RqKMrog== - dependencies: - de-indent "^1.0.2" - he "^1.2.0" - -vue-tsc@^1.0.9: - version "1.0.9" - resolved "https://registry.yarnpkg.com/vue-tsc/-/vue-tsc-1.0.9.tgz#7d388ec3097bc9c1789d5745a97c608217af4873" - integrity sha512-vRmHD1K6DmBymNhoHjQy/aYKTRQNLGOu2/ESasChG9Vy113K6CdP0NlhR0bzgFJfv2eFB9Ez/9L5kIciUajBxQ== - dependencies: - "@volar/vue-language-core" "1.0.9" - "@volar/vue-typescript" "1.0.9" - -vue@^3.2.41: - version "3.2.41" - resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.41.tgz#ed452b8a0f7f2b962f055c8955139c28b1c06806" - integrity sha512-uuuvnrDXEeZ9VUPljgHkqB5IaVO8SxhPpqF2eWOukVrBnRBx2THPSGQBnVRt0GrIG1gvCmFXMGbd7FqcT1ixNQ== - dependencies: - "@vue/compiler-dom" "3.2.41" - "@vue/compiler-sfc" "3.2.41" - "@vue/runtime-dom" "3.2.41" - "@vue/server-renderer" "3.2.41" - "@vue/shared" "3.2.41" - -wcwidth@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" - integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== - dependencies: - defaults "^1.0.3" - -web-namespaces@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-2.0.1.tgz#1010ff7c650eccb2592cebeeaf9a1b253fd40692" - integrity sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ== - -web-streams-polyfill@^3.0.3: - version "3.2.1" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" - integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== - -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - -webpack-sources@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" - integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== - -webpack-virtual-modules@^0.4.5: - version "0.4.5" - resolved "https://registry.yarnpkg.com/webpack-virtual-modules/-/webpack-virtual-modules-0.4.5.tgz#e476842dab5eafb7beb844aa2f747fc12ebbf6ec" - integrity sha512-8bWq0Iluiv9lVf9YaqWQ9+liNgXSHICm+rg544yRgGYaR8yXZTVBaHZkINZSB2yZSWo4b0F6MIxqJezVfOEAlg== - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" - integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== - dependencies: - string-width "^1.0.2 || 2 || 3 || 4" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.0.1.tgz#2101e861777fec527d0ea90c57c6b03aac56a5b3" - integrity sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g== - dependencies: - ansi-styles "^6.1.0" - string-width "^5.0.1" - strip-ansi "^7.0.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -ws@^8.9.0: - version "8.9.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.9.0.tgz#2a994bb67144be1b53fe2d23c53c028adeb7f45e" - integrity sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg== - -ws@~8.2.3: - version "8.2.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba" - integrity sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA== - -xmlhttprequest-ssl@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" - integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== - -xxhashjs@~0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8" - integrity sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw== - dependencies: - cuint "^0.2.2" - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^3.0.0, yallist@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yaml@^1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" - integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== - -yargs-parser@^21.0.0: - version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs@^17.5.1: - version "17.6.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.6.0.tgz#e134900fc1f218bc230192bdec06a0a5f973e46c" - integrity sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.0.0" - -yarn@^1.22.19: - version "1.22.19" - resolved "https://registry.yarnpkg.com/yarn/-/yarn-1.22.19.tgz#4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447" - integrity sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ== - -zip-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-4.1.0.tgz#51dd326571544e36aa3f756430b313576dc8fc79" - integrity sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A== - dependencies: - archiver-utils "^2.1.0" - compress-commons "^4.1.0" - readable-stream "^3.6.0" - -zwitch@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-2.0.2.tgz#91f8d0e901ffa3d66599756dde7f57b17c95dce1" - integrity sha512-JZxotl7SxAJH0j7dN4pxsTV6ZLXoLdGME+PsjkL/DaBrVryK9kTGq06GfKrwcSOqypP+fdXGoCHE36b99fWVoA==