From 3317b21d5daab2cc3ef0d5e5ce09f1af15ca396a Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Sat, 21 Oct 2023 00:49:26 +0000 Subject: [PATCH 01/32] fix: upgrade eslint-config-next from 13.1.6 to 13.5.3 Snyk has created this PR to upgrade eslint-config-next from 13.1.6 to 13.5.3. See this package in npm: See this project in Snyk: https://app.snyk.io/org/gabehamilton/project/f1490843-1830-4eb0-a957-99816aa5edcc?utm_source=github&utm_medium=referral&page=upgrade-pr --- frontend/package.json | 2 +- frontend/yarn.lock | 1322 ++++++++++++++++++++++++++++++----------- 2 files changed, 983 insertions(+), 341 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 7ce4a1c14..0b3983939 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -23,7 +23,7 @@ "bootstrap": "^5.2.3", "buffer": "^6.0.3", "eslint": "8.34.0", - "eslint-config-next": "13.1.6", + "eslint-config-next": "13.5.3", "graphiql": "3.0.6", "graphql": "^16.6.0", "near-api-js": "1.1.0", diff --git a/frontend/yarn.lock b/frontend/yarn.lock index d10e66f86..a32fac16a 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -84,19 +84,12 @@ resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.21.2.tgz" integrity sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ== -"@babel/runtime@^7.0.0": - version "7.22.3" - resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.3.tgz" - integrity sha512-XsDuspWKLUsxwCp6r7EhsExHtYfbe5oAGQ19kqngTdCPUoPQzOPdUbD/pB9PJiwb2ptYKQDjSJT3R6dC+EPqfQ== +"@babel/runtime@^7.13.10": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.2.tgz#062b0ac103261d68a966c4c7baf2ae3e62ec3885" + integrity sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg== dependencies: - regenerator-runtime "^0.13.11" - -"@babel/runtime@^7.12.13": - version "7.21.0" - resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz" - integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw== - dependencies: - regenerator-runtime "^0.13.11" + regenerator-runtime "^0.14.0" "@babel/runtime@^7.17.2", "@babel/runtime@^7.20.7", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.7": version "7.20.13" @@ -139,6 +132,13 @@ "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" +"@emotion/is-prop-valid@^0.8.2": + version "0.8.8" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" + integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA== + dependencies: + "@emotion/memoize" "0.7.4" + "@emotion/is-prop-valid@^1.1.0": version "1.2.0" resolved "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.0.tgz" @@ -146,6 +146,11 @@ dependencies: "@emotion/memoize" "^0.8.0" +"@emotion/memoize@0.7.4": + version "0.7.4" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" + integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== + "@emotion/memoize@^0.8.0": version "0.8.0" resolved "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.0.tgz" @@ -176,48 +181,83 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@graphiql/plugin-code-exporter@0.3.0": - version "0.3.0" - resolved "https://registry.npmjs.org/@graphiql/plugin-code-exporter/-/plugin-code-exporter-0.3.0.tgz" - integrity sha512-IQvrNJEPRPdMIG9E3nVbznGgtYYsZv5kU8LRayBqHqXoIaOsL4CTXx2PjmjJptbFuDMQxzlkYCOyW+QUcLQ2XA== +"@floating-ui/core@^1.4.2": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.5.0.tgz#5c05c60d5ae2d05101c3021c1a2a350ddc027f8c" + integrity sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg== + dependencies: + "@floating-ui/utils" "^0.1.3" + +"@floating-ui/dom@^1.5.1": + version "1.5.3" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.5.3.tgz#54e50efcb432c06c23cd33de2b575102005436fa" + integrity sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA== + dependencies: + "@floating-ui/core" "^1.4.2" + "@floating-ui/utils" "^0.1.3" + +"@floating-ui/react-dom@^2.0.0": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.0.2.tgz#fab244d64db08e6bed7be4b5fcce65315ef44d20" + integrity sha512-5qhlDvjaLmAst/rKb3VdlCinwTF4EYMiVxuuc/HVUjs46W0zgtbMmAZ1UTsDrRTxRmUEzl92mOtWbeeXL26lSQ== + dependencies: + "@floating-ui/dom" "^1.5.1" + +"@floating-ui/utils@^0.1.3": + version "0.1.6" + resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.1.6.tgz#22958c042e10b67463997bd6ea7115fe28cbcaf9" + integrity sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A== + +"@graphiql/plugin-code-exporter@0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@graphiql/plugin-code-exporter/-/plugin-code-exporter-0.3.5.tgz#3d926bdcd0f32c6ac7860f6cd5a2f0ae2e835bd9" + integrity sha512-14CmC6IWcfJyhC27pfUoPz3dmLQyNuOQIeEmPFH2M9k0z/GzZr6bnxMK/ImVsAmzTP3M7Jm0bCTXUwU7AVO0tA== dependencies: graphiql-code-exporter "^3.0.3" -"@graphiql/plugin-explorer@0.3.0": - version "0.3.0" - resolved "https://registry.npmjs.org/@graphiql/plugin-explorer/-/plugin-explorer-0.3.0.tgz" - integrity sha512-ZXAfzFXuqBPzD3HNSelh23eCRE1Qdsi2ndZyOqAjcy6bxo3lSj8wrM8cN1+T1Wo+0U39SiTkdmlElZTaip7RXA== +"@graphiql/plugin-explorer@0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@graphiql/plugin-explorer/-/plugin-explorer-0.3.5.tgz#cb1eb364bc3f3f6487061d0a54ef12a0393d2a64" + integrity sha512-oHn4cuH1uPWv70zy64mpG/x99BeFOFzGJ/tZXdx8wvb6c4aBMMCo4ouVnvNReVxE9N0KAwJfPvC6laWSbQ6lkQ== dependencies: graphiql-explorer "^0.9.0" -"@graphiql/react@^0.17.6": - version "0.17.6" - resolved "https://registry.npmjs.org/@graphiql/react/-/react-0.17.6.tgz" - integrity sha512-3k1paSRbRwVNxr2U80xnRhkws8tSErWlETJvEQBmqRcWbt0+WmwFJorkLnG1n3Wj0Ho6k4a2BAiTfJ6F4SPrLg== - dependencies: - "@graphiql/toolkit" "^0.8.4" - "@reach/combobox" "^0.17.0" - "@reach/dialog" "^0.17.0" - "@reach/listbox" "^0.17.0" - "@reach/menu-button" "^0.17.0" - "@reach/tooltip" "^0.17.0" - "@reach/visually-hidden" "^0.17.0" +"@graphiql/react@^0.19.4": + version "0.19.4" + resolved "https://registry.yarnpkg.com/@graphiql/react/-/react-0.19.4.tgz#7ce928c944cbac6ae36258de7ce96758365dee3f" + integrity sha512-qg3N2Zeuq2+GDMZddz7K/ak1p5O56kKuLM/idOJZD+Lxbk2e8Eye3KWM24lJuuCi2gdvJuqPMfCdewLXrHhEkw== + dependencies: + "@graphiql/toolkit" "^0.9.1" + "@headlessui/react" "^1.7.15" + "@radix-ui/react-dialog" "^1.0.4" + "@radix-ui/react-dropdown-menu" "^2.0.5" + "@radix-ui/react-tooltip" "^1.0.6" + "@radix-ui/react-visually-hidden" "^1.0.3" + "@types/codemirror" "^5.60.8" clsx "^1.2.1" codemirror "^5.65.3" - codemirror-graphql "^2.0.8" + codemirror-graphql "^2.0.10" copy-to-clipboard "^3.2.0" - graphql-language-service "^5.1.6" + framer-motion "^6.5.1" + graphql-language-service "^5.2.0" markdown-it "^12.2.0" set-value "^4.1.0" -"@graphiql/toolkit@^0.8.4": - version "0.8.4" - resolved "https://registry.npmjs.org/@graphiql/toolkit/-/toolkit-0.8.4.tgz" - integrity sha512-cFUGqh3Dau+SD3Vq9EFlZrhzYfaHKyOJveFtaCR+U5Cn/S68p7oy+vQBIdwtO6J2J58FncnwBbVRfr+IvVfZqQ== +"@graphiql/toolkit@^0.9.1": + version "0.9.1" + resolved "https://registry.yarnpkg.com/@graphiql/toolkit/-/toolkit-0.9.1.tgz#44bfa83aed79c8c18affac49efbb81f8e87bade3" + integrity sha512-LVt9pdk0830so50ZnU2Znb2rclcoWznG8r8asqAENzV0U1FM1kuY0sdPpc/rBc9MmmNgnB6A+WZzDhq6dbhTHA== dependencies: "@n1ru4l/push-pull-async-iterable-iterator" "^3.1.0" meros "^1.1.4" +"@headlessui/react@^1.7.15": + version "1.7.17" + resolved "https://registry.yarnpkg.com/@headlessui/react/-/react-1.7.17.tgz#a0ec23af21b527c030967245fd99776aa7352bc6" + integrity sha512-4am+tzvkqDSSgiwrsEpGWqgGo9dz8qU5M3znCkC4PgkpY4HcCZzEDEvozltGGGHIKl9jbXbZPSH5TWn4sWJdow== + dependencies: + client-only "^0.0.1" + "@humanwhocodes/config-array@^0.11.8": version "0.11.8" resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz" @@ -284,6 +324,59 @@ "@monaco-editor/loader" "^1.3.2" prop-types "^15.7.2" +"@motionone/animation@^10.12.0": + version "10.16.3" + resolved "https://registry.yarnpkg.com/@motionone/animation/-/animation-10.16.3.tgz#f5b71e27fd8b88b61f983adb0ed6c8e3e89281f9" + integrity sha512-QUGWpLbMFLhyqKlngjZhjtxM8IqiJQjLK0DF+XOF6od9nhSvlaeEpOY/UMCRVcZn/9Tr2rZO22EkuCIjYdI74g== + dependencies: + "@motionone/easing" "^10.16.3" + "@motionone/types" "^10.16.3" + "@motionone/utils" "^10.16.3" + tslib "^2.3.1" + +"@motionone/dom@10.12.0": + version "10.12.0" + resolved "https://registry.yarnpkg.com/@motionone/dom/-/dom-10.12.0.tgz#ae30827fd53219efca4e1150a5ff2165c28351ed" + integrity sha512-UdPTtLMAktHiqV0atOczNYyDd/d8Cf5fFsd1tua03PqTwwCe/6lwhLSQ8a7TbnQ5SN0gm44N1slBfj+ORIhrqw== + dependencies: + "@motionone/animation" "^10.12.0" + "@motionone/generators" "^10.12.0" + "@motionone/types" "^10.12.0" + "@motionone/utils" "^10.12.0" + hey-listen "^1.0.8" + tslib "^2.3.1" + +"@motionone/easing@^10.16.3": + version "10.16.3" + resolved "https://registry.yarnpkg.com/@motionone/easing/-/easing-10.16.3.tgz#a62abe0ba2841861f167f286782e287eab8d7466" + integrity sha512-HWTMZbTmZojzwEuKT/xCdvoMPXjYSyQvuVM6jmM0yoGU6BWzsmYMeB4bn38UFf618fJCNtP9XeC/zxtKWfbr0w== + dependencies: + "@motionone/utils" "^10.16.3" + tslib "^2.3.1" + +"@motionone/generators@^10.12.0": + version "10.16.4" + resolved "https://registry.yarnpkg.com/@motionone/generators/-/generators-10.16.4.tgz#4a38708244bce733bfcebd4a26d19f4bbabd36af" + integrity sha512-geFZ3w0Rm0ZXXpctWsSf3REGywmLLujEjxPYpBR0j+ymYwof0xbV6S5kGqqsDKgyWKVWpUInqQYvQfL6fRbXeg== + dependencies: + "@motionone/types" "^10.16.3" + "@motionone/utils" "^10.16.3" + tslib "^2.3.1" + +"@motionone/types@^10.12.0", "@motionone/types@^10.16.3": + version "10.16.3" + resolved "https://registry.yarnpkg.com/@motionone/types/-/types-10.16.3.tgz#9284ea8a52f6b32c51c54b617214f20e43ac6c59" + integrity sha512-W4jkEGFifDq73DlaZs3HUfamV2t1wM35zN/zX7Q79LfZ2sc6C0R1baUHZmqc/K5F3vSw3PavgQ6HyHLd/MXcWg== + +"@motionone/utils@^10.12.0", "@motionone/utils@^10.16.3": + version "10.16.3" + resolved "https://registry.yarnpkg.com/@motionone/utils/-/utils-10.16.3.tgz#ddf07ab6cf3000d89e3bcbdc9a8c3e1fd64f8520" + integrity sha512-WNWDksJIxQkaI9p9Z9z0+K27xdqISGNFy1SsWVGaiedTHq0iaT6iZujby8fT/ZnZxj1EOaxJtSfUPCFNU5CRoA== + dependencies: + "@motionone/types" "^10.16.3" + hey-listen "^1.0.8" + tslib "^2.3.1" + "@n1ru4l/push-pull-async-iterable-iterator@^3.1.0": version "3.2.0" resolved "https://registry.npmjs.org/@n1ru4l/push-pull-async-iterable-iterator/-/push-pull-async-iterable-iterator-3.2.0.tgz" @@ -299,10 +392,10 @@ resolved "https://registry.npmjs.org/@next/env/-/env-13.1.6.tgz" integrity sha512-s+W9Fdqh5MFk6ECrbnVmmAOwxKQuhGMT7xXHrkYIBMBcTiOqNWhv5KbJIboKR5STXxNXl32hllnvKaffzFaWQg== -"@next/eslint-plugin-next@13.1.6": - version "13.1.6" - resolved "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.1.6.tgz" - integrity sha512-o7cauUYsXjzSJkay8wKjpKJf2uLzlggCsGUkPu3lP09Pv97jYlekTC20KJrjQKmSv5DXV0R/uks2ZXhqjNkqAw== +"@next/eslint-plugin-next@13.5.3": + version "13.5.3" + resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-13.5.3.tgz#585fca48fb5f969825ad57f05c0a627fd4662dda" + integrity sha512-lbZOoEjzSuTtpk9UgV9rOmxYw+PsSfNR+00mZcInqooiDMZ1u+RqT1YQYLsEZPW1kumZoQe5+exkCBtZ2xn0uw== dependencies: glob "7.1.7" @@ -414,157 +507,295 @@ resolved "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz" integrity sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw== -"@reach/auto-id@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/auto-id/-/auto-id-0.17.0.tgz" - integrity sha512-ud8iPwF52RVzEmkHq1twuqGuPA+moreumUHdtgvU3sr3/15BNhwp3KyDLrKKSz0LP1r3V4pSdyF9MbYM8BoSjA== +"@radix-ui/primitive@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/primitive/-/primitive-1.0.1.tgz#e46f9958b35d10e9f6dc71c497305c22e3e55dbd" + integrity sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw== dependencies: - "@reach/utils" "0.17.0" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" -"@reach/combobox@^0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/combobox/-/combobox-0.17.0.tgz" - integrity sha512-2mYvU5agOBCQBMdlM4cri+P1BbNwp05P1OuDyc33xJSNiBG7BMy4+ZSHJ0X4fyle6rHwSgCAOCLOeWV1XUYjoQ== +"@radix-ui/react-arrow@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@radix-ui/react-arrow/-/react-arrow-1.0.3.tgz#c24f7968996ed934d57fe6cde5d6ec7266e1d25d" + integrity sha512-wSP+pHsB/jQRaL6voubsQ/ZlrGBHHrOjmBnr19hxYgtS0WvAFwZhK2WP/YY5yF9uKECCEEDGxuLxq1NBK51wFA== dependencies: - "@reach/auto-id" "0.17.0" - "@reach/descendants" "0.17.0" - "@reach/popover" "0.17.0" - "@reach/portal" "0.17.0" - "@reach/utils" "0.17.0" - prop-types "^15.7.2" - tiny-warning "^1.0.3" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" + "@radix-ui/react-primitive" "1.0.3" -"@reach/descendants@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/descendants/-/descendants-0.17.0.tgz" - integrity sha512-c7lUaBfjgcmKFZiAWqhG+VnXDMEhPkI4kAav/82XKZD6NVvFjsQOTH+v3tUkskrAPV44Yuch0mFW/u5Ntifr7Q== +"@radix-ui/react-collection@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@radix-ui/react-collection/-/react-collection-1.0.3.tgz#9595a66e09026187524a36c6e7e9c7d286469159" + integrity sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA== dependencies: - "@reach/utils" "0.17.0" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-slot" "1.0.2" -"@reach/dialog@^0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/dialog/-/dialog-0.17.0.tgz" - integrity sha512-AnfKXugqDTGbeG3c8xDcrQDE4h9b/vnc27Sa118oQSquz52fneUeX9MeFb5ZEiBJK8T5NJpv7QUTBIKnFCAH5A== +"@radix-ui/react-compose-refs@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz#7ed868b66946aa6030e580b1ffca386dd4d21989" + integrity sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw== dependencies: - "@reach/portal" "0.17.0" - "@reach/utils" "0.17.0" - prop-types "^15.7.2" - react-focus-lock "^2.5.2" - react-remove-scroll "^2.4.3" - tslib "^2.3.0" - -"@reach/dropdown@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/dropdown/-/dropdown-0.17.0.tgz" - integrity sha512-qBTIGInhxtPHtdj4Pl2XZgZMz3e37liydh0xR3qc48syu7g71sL4nqyKjOzThykyfhA3Pb3/wFgsFJKGTSdaig== - dependencies: - "@reach/auto-id" "0.17.0" - "@reach/descendants" "0.17.0" - "@reach/popover" "0.17.0" - "@reach/utils" "0.17.0" - tslib "^2.3.0" - -"@reach/listbox@^0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/listbox/-/listbox-0.17.0.tgz" - integrity sha512-AMnH1P6/3VKy2V/nPb4Es441arYR+t4YRdh9jdcFVrCOD6y7CQrlmxsYjeg9Ocdz08XpdoEBHM3PKLJqNAUr7A== - dependencies: - "@reach/auto-id" "0.17.0" - "@reach/descendants" "0.17.0" - "@reach/machine" "0.17.0" - "@reach/popover" "0.17.0" - "@reach/utils" "0.17.0" - prop-types "^15.7.2" + "@babel/runtime" "^7.13.10" -"@reach/machine@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/machine/-/machine-0.17.0.tgz" - integrity sha512-9EHnuPgXzkbRENvRUzJvVvYt+C2jp7PGN0xon7ffmKoK8rTO6eA/bb7P0xgloyDDQtu88TBUXKzW0uASqhTXGA== +"@radix-ui/react-context@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-context/-/react-context-1.0.1.tgz#fe46e67c96b240de59187dcb7a1a50ce3e2ec00c" + integrity sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg== dependencies: - "@reach/utils" "0.17.0" - "@xstate/fsm" "1.4.0" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" -"@reach/menu-button@^0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/menu-button/-/menu-button-0.17.0.tgz" - integrity sha512-YyuYVyMZKamPtivoEI6D0UEILYH3qZtg4kJzEAuzPmoR/aHN66NZO75Fx0gtjG1S6fZfbiARaCOZJC0VEiDOtQ== +"@radix-ui/react-dialog@^1.0.4": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dialog/-/react-dialog-1.0.5.tgz#71657b1b116de6c7a0b03242d7d43e01062c7300" + integrity sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-dismissable-layer" "1.0.5" + "@radix-ui/react-focus-guards" "1.0.1" + "@radix-ui/react-focus-scope" "1.0.4" + "@radix-ui/react-id" "1.0.1" + "@radix-ui/react-portal" "1.0.4" + "@radix-ui/react-presence" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-slot" "1.0.2" + "@radix-ui/react-use-controllable-state" "1.0.1" + aria-hidden "^1.1.1" + react-remove-scroll "2.5.5" + +"@radix-ui/react-direction@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-direction/-/react-direction-1.0.1.tgz#9cb61bf2ccf568f3421422d182637b7f47596c9b" + integrity sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA== dependencies: - "@reach/dropdown" "0.17.0" - "@reach/popover" "0.17.0" - "@reach/utils" "0.17.0" - prop-types "^15.7.2" - tiny-warning "^1.0.3" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" -"@reach/observe-rect@1.2.0": - version "1.2.0" - resolved "https://registry.npmjs.org/@reach/observe-rect/-/observe-rect-1.2.0.tgz" - integrity sha512-Ba7HmkFgfQxZqqaeIWWkNK0rEhpxVQHIoVyW1YDSkGsGIXzcaW4deC8B0pZrNSSyLTdIk7y+5olKt5+g0GmFIQ== - -"@reach/popover@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/popover/-/popover-0.17.0.tgz" - integrity sha512-yYbBF4fMz4Ml4LB3agobZjcZ/oPtPsNv70ZAd7lEC2h7cvhF453pA+zOBGYTPGupKaeBvgAnrMjj7RnxDU5hoQ== - dependencies: - "@reach/portal" "0.17.0" - "@reach/rect" "0.17.0" - "@reach/utils" "0.17.0" - tabbable "^4.0.0" - tslib "^2.3.0" - -"@reach/portal@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/portal/-/portal-0.17.0.tgz" - integrity sha512-+IxsgVycOj+WOeNPL2NdgooUdHPSY285wCtj/iWID6akyr4FgGUK7sMhRM9aGFyrGpx2vzr+eggbUmAVZwOz+A== - dependencies: - "@reach/utils" "0.17.0" - tiny-warning "^1.0.3" - tslib "^2.3.0" - -"@reach/rect@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/rect/-/rect-0.17.0.tgz" - integrity sha512-3YB7KA5cLjbLc20bmPkJ06DIfXSK06Cb5BbD2dHgKXjUkT9WjZaLYIbYCO8dVjwcyO3GCNfOmPxy62VsPmZwYA== - dependencies: - "@reach/observe-rect" "1.2.0" - "@reach/utils" "0.17.0" - prop-types "^15.7.2" - tiny-warning "^1.0.3" - tslib "^2.3.0" - -"@reach/tooltip@^0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/tooltip/-/tooltip-0.17.0.tgz" - integrity sha512-HP8Blordzqb/Cxg+jnhGmWQfKgypamcYLBPlcx6jconyV5iLJ5m93qipr1giK7MqKT2wlsKWy44ZcOrJ+Wrf8w== - dependencies: - "@reach/auto-id" "0.17.0" - "@reach/portal" "0.17.0" - "@reach/rect" "0.17.0" - "@reach/utils" "0.17.0" - "@reach/visually-hidden" "0.17.0" - prop-types "^15.7.2" - tiny-warning "^1.0.3" - tslib "^2.3.0" +"@radix-ui/react-dismissable-layer@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.5.tgz#3f98425b82b9068dfbab5db5fff3df6ebf48b9d4" + integrity sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-use-callback-ref" "1.0.1" + "@radix-ui/react-use-escape-keydown" "1.0.3" -"@reach/utils@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/utils/-/utils-0.17.0.tgz" - integrity sha512-M5y8fCBbrWeIsxedgcSw6oDlAMQDkl5uv3VnMVJ7guwpf4E48Xlh1v66z/1BgN/WYe2y8mB/ilFD2nysEfdGeA== +"@radix-ui/react-dropdown-menu@^2.0.5": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.0.6.tgz#cdf13c956c5e263afe4e5f3587b3071a25755b63" + integrity sha512-i6TuFOoWmLWq+M/eCLGd/bQ2HfAX1RJgvrBQ6AQLmzfvsLdefxbWu8G9zczcPFfcSPehz9GcpF6K9QYreFV8hA== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-id" "1.0.1" + "@radix-ui/react-menu" "2.0.6" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-use-controllable-state" "1.0.1" + +"@radix-ui/react-focus-guards@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.1.tgz#1ea7e32092216b946397866199d892f71f7f98ad" + integrity sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA== dependencies: - tiny-warning "^1.0.3" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" -"@reach/visually-hidden@0.17.0", "@reach/visually-hidden@^0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/visually-hidden/-/visually-hidden-0.17.0.tgz" - integrity sha512-T6xF3Nv8vVnjVkGU6cm0+kWtvliLqPAo8PcZ+WxkKacZsaHTjaZb4v1PaCcyQHmuTNT/vtTVNOJLG0SjQOIb7g== +"@radix-ui/react-focus-scope@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.4.tgz#2ac45fce8c5bb33eb18419cdc1905ef4f1906525" + integrity sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA== dependencies: - prop-types "^15.7.2" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-use-callback-ref" "1.0.1" + +"@radix-ui/react-id@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-id/-/react-id-1.0.1.tgz#73cdc181f650e4df24f0b6a5b7aa426b912c88c0" + integrity sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-use-layout-effect" "1.0.1" + +"@radix-ui/react-menu@2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-menu/-/react-menu-2.0.6.tgz#2c9e093c1a5d5daa87304b2a2f884e32288ae79e" + integrity sha512-BVkFLS+bUC8HcImkRKPSiVumA1VPOOEC5WBMiT+QAVsPzW1FJzI9KnqgGxVDPBcql5xXrHkD3JOVoXWEXD8SYA== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-collection" "1.0.3" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-direction" "1.0.1" + "@radix-ui/react-dismissable-layer" "1.0.5" + "@radix-ui/react-focus-guards" "1.0.1" + "@radix-ui/react-focus-scope" "1.0.4" + "@radix-ui/react-id" "1.0.1" + "@radix-ui/react-popper" "1.1.3" + "@radix-ui/react-portal" "1.0.4" + "@radix-ui/react-presence" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-roving-focus" "1.0.4" + "@radix-ui/react-slot" "1.0.2" + "@radix-ui/react-use-callback-ref" "1.0.1" + aria-hidden "^1.1.1" + react-remove-scroll "2.5.5" + +"@radix-ui/react-popper@1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@radix-ui/react-popper/-/react-popper-1.1.3.tgz#24c03f527e7ac348fabf18c89795d85d21b00b42" + integrity sha512-cKpopj/5RHZWjrbF2846jBNacjQVwkP068DfmgrNJXpvVWrOvlAmE9xSiy5OqeE+Gi8D9fP+oDhUnPqNMY8/5w== + dependencies: + "@babel/runtime" "^7.13.10" + "@floating-ui/react-dom" "^2.0.0" + "@radix-ui/react-arrow" "1.0.3" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-use-callback-ref" "1.0.1" + "@radix-ui/react-use-layout-effect" "1.0.1" + "@radix-ui/react-use-rect" "1.0.1" + "@radix-ui/react-use-size" "1.0.1" + "@radix-ui/rect" "1.0.1" + +"@radix-ui/react-portal@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@radix-ui/react-portal/-/react-portal-1.0.4.tgz#df4bfd353db3b1e84e639e9c63a5f2565fb00e15" + integrity sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-primitive" "1.0.3" + +"@radix-ui/react-presence@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.0.1.tgz#491990ba913b8e2a5db1b06b203cb24b5cdef9ba" + integrity sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-use-layout-effect" "1.0.1" + +"@radix-ui/react-primitive@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz#d49ea0f3f0b2fe3ab1cb5667eb03e8b843b914d0" + integrity sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-slot" "1.0.2" + +"@radix-ui/react-roving-focus@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.4.tgz#e90c4a6a5f6ac09d3b8c1f5b5e81aab2f0db1974" + integrity sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-collection" "1.0.3" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-direction" "1.0.1" + "@radix-ui/react-id" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-use-callback-ref" "1.0.1" + "@radix-ui/react-use-controllable-state" "1.0.1" + +"@radix-ui/react-slot@1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-slot/-/react-slot-1.0.2.tgz#a9ff4423eade67f501ffb32ec22064bc9d3099ab" + integrity sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-compose-refs" "1.0.1" + +"@radix-ui/react-tooltip@^1.0.6": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@radix-ui/react-tooltip/-/react-tooltip-1.0.7.tgz#8f55070f852e7e7450cc1d9210b793d2e5a7686e" + integrity sha512-lPh5iKNFVQ/jav/j6ZrWq3blfDJ0OH9R6FlNUHPMqdLuQ9vwDgFsRxvl8b7Asuy5c8xmoojHUxKHQSOAvMHxyw== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-dismissable-layer" "1.0.5" + "@radix-ui/react-id" "1.0.1" + "@radix-ui/react-popper" "1.1.3" + "@radix-ui/react-portal" "1.0.4" + "@radix-ui/react-presence" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-slot" "1.0.2" + "@radix-ui/react-use-controllable-state" "1.0.1" + "@radix-ui/react-visually-hidden" "1.0.3" + +"@radix-ui/react-use-callback-ref@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz#f4bb1f27f2023c984e6534317ebc411fc181107a" + integrity sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ== + dependencies: + "@babel/runtime" "^7.13.10" + +"@radix-ui/react-use-controllable-state@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.1.tgz#ecd2ced34e6330caf89a82854aa2f77e07440286" + integrity sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-use-callback-ref" "1.0.1" + +"@radix-ui/react-use-escape-keydown@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.3.tgz#217b840c250541609c66f67ed7bab2b733620755" + integrity sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-use-callback-ref" "1.0.1" + +"@radix-ui/react-use-layout-effect@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz#be8c7bc809b0c8934acf6657b577daf948a75399" + integrity sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ== + dependencies: + "@babel/runtime" "^7.13.10" + +"@radix-ui/react-use-rect@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-rect/-/react-use-rect-1.0.1.tgz#fde50b3bb9fd08f4a1cd204572e5943c244fcec2" + integrity sha512-Cq5DLuSiuYVKNU8orzJMbl15TXilTnJKUCltMVQg53BQOF1/C5toAaGrowkgksdBQ9H+SRL23g0HDmg9tvmxXw== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/rect" "1.0.1" + +"@radix-ui/react-use-size@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-size/-/react-use-size-1.0.1.tgz#1c5f5fea940a7d7ade77694bb98116fb49f870b2" + integrity sha512-ibay+VqrgcaI6veAojjofPATwledXiSmX+C0KrBk/xgpX9rBzPV3OsfwlhQdUOFbh+LKQorLYT+xTXW9V8yd0g== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-use-layout-effect" "1.0.1" + +"@radix-ui/react-visually-hidden@1.0.3", "@radix-ui/react-visually-hidden@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.0.3.tgz#51aed9dd0fe5abcad7dee2a234ad36106a6984ac" + integrity sha512-D4w41yN5YRKtu464TLnByKzMDG/JlMPHtfZgQAu9v6mNakUqGUI9vUrfQKz8NK41VMm/xbZbh76NUTVtIYqOMA== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-primitive" "1.0.3" + +"@radix-ui/rect@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/rect/-/rect-1.0.1.tgz#bf8e7d947671996da2e30f4904ece343bc4a883f" + integrity sha512-fyrgCaedtvMg9NK3en0pnOYJdtfwxUcNolezkNPUsoX57X8oQk+NkqcvzHXD2uKNij6GXmWU9NDru2IWjrO4BQ== + dependencies: + "@babel/runtime" "^7.13.10" "@react-aria/ssr@^3.4.1": version "3.5.0" @@ -595,10 +826,10 @@ uncontrollable "^7.2.1" warning "^4.0.3" -"@rushstack/eslint-patch@^1.1.3": - version "1.2.0" - resolved "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz" - integrity sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg== +"@rushstack/eslint-patch@^1.3.3": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.5.1.tgz#5f1b518ec5fa54437c0b7c4a821546c64fed6922" + integrity sha512-6i/8UoL0P5y4leBIGzvkZdS85RDMG9y1ihZzmTZQ5LdHUYmZ7pKFoj8X0236s3lusPs1Fa5HTQUpwI+UfTcmeA== "@swc/helpers@0.4.14", "@swc/helpers@^0.4.14": version "0.4.14" @@ -607,6 +838,25 @@ dependencies: tslib "^2.4.0" +"@types/codemirror@^0.0.90": + version "0.0.90" + resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-0.0.90.tgz#9c5edafce2a780b4f8bc5e3b699fe1f4727c8f17" + integrity sha512-8Z9+tSg27NPRGubbUPUCrt5DDG/OWzLph5BvcDykwR5D7RyZh5mhHG0uS1ePKV1YFCA+/cwc4Ey2AJAEFfV3IA== + dependencies: + "@types/tern" "*" + +"@types/codemirror@^5.60.8": + version "5.60.12" + resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-5.60.12.tgz#09daf6f2af381d1613a50b2b53ff2abf0232045b" + integrity sha512-SFSj5Tb/mtQoVgaltsipdRGG1PkcFu/L0OXPNBGCXYUQtwsNoAGRNNHOTl1jYcQUcEI77EiUfk94bgETTbSo/A== + dependencies: + "@types/tern" "*" + +"@types/estree@*": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.3.tgz#2be19e759a3dd18c79f9f436bd7363556c1a73dd" + integrity sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ== + "@types/json-schema@^7.0.8": version "7.0.12" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz" @@ -655,59 +905,62 @@ resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz" integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== +"@types/tern@*": + version "0.23.6" + resolved "https://registry.yarnpkg.com/@types/tern/-/tern-0.23.6.tgz#8927626347db76a998d27889c5c2dbf18cb42115" + integrity sha512-ntalN+F2msUwz7/OCCADN4FwxtIGqF4Hqwxd15yAn0VOUozj1VaIrH4Prh95N8y69K3bQpHFVGwTJDZC4oRtvA== + dependencies: + "@types/estree" "*" + "@types/warning@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@types/warning/-/warning-3.0.0.tgz" integrity sha512-t/Tvs5qR47OLOr+4E9ckN8AmP2Tf16gWq+/qA4iUGS/OOyHVO8wv2vjJuX8SNOUTJyWb+2t7wJm6cXILFnOROA== -"@typescript-eslint/parser@^5.42.0": - version "5.52.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.52.0.tgz" - integrity sha512-e2KiLQOZRo4Y0D/b+3y08i3jsekoSkOYStROYmPUnGMEoA0h+k2qOH5H6tcjIc68WDvGwH+PaOrP1XRzLJ6QlA== +"@typescript-eslint/parser@^5.4.2 || ^6.0.0": + version "6.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.8.0.tgz#bb2a969d583db242f1ee64467542f8b05c2e28cb" + integrity sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg== dependencies: - "@typescript-eslint/scope-manager" "5.52.0" - "@typescript-eslint/types" "5.52.0" - "@typescript-eslint/typescript-estree" "5.52.0" + "@typescript-eslint/scope-manager" "6.8.0" + "@typescript-eslint/types" "6.8.0" + "@typescript-eslint/typescript-estree" "6.8.0" + "@typescript-eslint/visitor-keys" "6.8.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.52.0": - version "5.52.0" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.52.0.tgz" - integrity sha512-AR7sxxfBKiNV0FWBSARxM8DmNxrwgnYMPwmpkC1Pl1n+eT8/I2NAUPuwDy/FmDcC6F8pBfmOcaxcxRHspgOBMw== +"@typescript-eslint/scope-manager@6.8.0": + version "6.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.8.0.tgz#5cac7977385cde068ab30686889dd59879811efd" + integrity sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g== dependencies: - "@typescript-eslint/types" "5.52.0" - "@typescript-eslint/visitor-keys" "5.52.0" + "@typescript-eslint/types" "6.8.0" + "@typescript-eslint/visitor-keys" "6.8.0" -"@typescript-eslint/types@5.52.0": - version "5.52.0" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.52.0.tgz" - integrity sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ== +"@typescript-eslint/types@6.8.0": + version "6.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.8.0.tgz#1ab5d4fe1d613e3f65f6684026ade6b94f7e3ded" + integrity sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ== -"@typescript-eslint/typescript-estree@5.52.0": - version "5.52.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.52.0.tgz" - integrity sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ== +"@typescript-eslint/typescript-estree@6.8.0": + version "6.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.8.0.tgz#9565f15e0cd12f55cf5aa0dfb130a6cb0d436ba1" + integrity sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg== dependencies: - "@typescript-eslint/types" "5.52.0" - "@typescript-eslint/visitor-keys" "5.52.0" + "@typescript-eslint/types" "6.8.0" + "@typescript-eslint/visitor-keys" "6.8.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" -"@typescript-eslint/visitor-keys@5.52.0": - version "5.52.0" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.52.0.tgz" - integrity sha512-qMwpw6SU5VHCPr99y274xhbm+PRViK/NATY6qzt+Et7+mThGuFSl/ompj2/hrBlRP/kq+BFdgagnOSgw9TB0eA== +"@typescript-eslint/visitor-keys@6.8.0": + version "6.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.8.0.tgz#cffebed56ae99c45eba901c378a6447b06be58b8" + integrity sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg== dependencies: - "@typescript-eslint/types" "5.52.0" - eslint-visitor-keys "^3.3.0" - -"@xstate/fsm@1.4.0": - version "1.4.0" - resolved "https://registry.npmjs.org/@xstate/fsm/-/fsm-1.4.0.tgz" - integrity sha512-uTHDeu2xI5E1IFwf37JFQM31RrH7mY7877RqPBS4ZqSNUwoLDuct8AhBWaXGnVizBAYyimVwgCyGa9z/NiRhXA== + "@typescript-eslint/types" "6.8.0" + eslint-visitor-keys "^3.4.1" acorn-jsx@^5.3.2: version "5.3.2" @@ -758,6 +1011,13 @@ argparse@^2.0.1: resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +aria-hidden@^1.1.1: + version "1.2.3" + resolved "https://registry.yarnpkg.com/aria-hidden/-/aria-hidden-1.2.3.tgz#14aeb7fb692bbb72d69bebfa47279c1fd725e954" + integrity sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ== + dependencies: + tslib "^2.0.0" + aria-query@^5.1.3: version "5.1.3" resolved "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz" @@ -765,6 +1025,14 @@ aria-query@^5.1.3: dependencies: deep-equal "^2.0.5" +array-buffer-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" + integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== + dependencies: + call-bind "^1.0.2" + is-array-buffer "^3.0.1" + array-includes@^3.1.5, array-includes@^3.1.6: version "3.1.6" resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz" @@ -781,6 +1049,17 @@ array-union@^2.1.0: resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== +array.prototype.findlastindex@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz#b37598438f97b579166940814e2c0493a4f50207" + integrity sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + get-intrinsic "^1.2.1" + array.prototype.flat@^1.3.1: version "1.3.1" resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz" @@ -812,11 +1091,31 @@ array.prototype.tosorted@^1.1.1: es-shim-unscopables "^1.0.0" get-intrinsic "^1.1.3" +arraybuffer.prototype.slice@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz#98bd561953e3e74bb34938e77647179dfe6e9f12" + integrity sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw== + dependencies: + array-buffer-byte-length "^1.0.0" + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + is-array-buffer "^3.0.2" + is-shared-array-buffer "^1.0.2" + ast-types-flow@^0.0.7: version "0.0.7" resolved "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz" integrity sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag== +asynciterator.prototype@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz#8c5df0514936cdd133604dfcc9d3fb93f09b2b62" + integrity sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg== + dependencies: + has-symbols "^1.0.3" + available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz" @@ -934,6 +1233,15 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" +call-bind@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513" + integrity sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ== + dependencies: + function-bind "^1.1.2" + get-intrinsic "^1.2.1" + set-function-length "^1.1.1" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" @@ -976,9 +1284,9 @@ classnames@^2.3.1: resolved "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz" integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw== -client-only@0.0.1: +client-only@0.0.1, client-only@^0.0.1: version "0.0.1" - resolved "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz" + resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1" integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== clsx@^1.2.1: @@ -986,12 +1294,13 @@ clsx@^1.2.1: resolved "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz" integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== -codemirror-graphql@^2.0.8: - version "2.0.8" - resolved "https://registry.npmjs.org/codemirror-graphql/-/codemirror-graphql-2.0.8.tgz" - integrity sha512-EU+pXsSKZJAFVdF8j5hbB5gqXsDDjsBiJoohQq09yhsr69pzaI8ZrXjmpuR4CMyf9jgqcz5KK7rsTmxDHmeJPQ== +codemirror-graphql@^2.0.10: + version "2.0.10" + resolved "https://registry.yarnpkg.com/codemirror-graphql/-/codemirror-graphql-2.0.10.tgz#c2ea5943b7c9426293dc158db1659b121d2cd55f" + integrity sha512-rC9NxibCsSzWtCQjHLfwKCkyYdGv2BT/BCgyDoKPrc/e7aGiyLyeT0fB60d+0imwlvhX3lIHncl6JMz2YxQ/jg== dependencies: - graphql-language-service "5.1.6" + "@types/codemirror" "^0.0.90" + graphql-language-service "5.2.0" codemirror@^5.65.3: version "5.65.13" @@ -1114,6 +1423,15 @@ deep-is@^0.1.3: resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== +define-data-property@^1.0.1, define-data-property@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" + integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ== + dependencies: + get-intrinsic "^1.2.1" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" + define-lazy-prop@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz" @@ -1127,6 +1445,15 @@ define-properties@^1.1.3, define-properties@^1.1.4: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +define-properties@^1.2.0, define-properties@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + depd@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" @@ -1252,6 +1579,51 @@ es-abstract@^1.19.0, es-abstract@^1.20.4: unbox-primitive "^1.0.2" which-typed-array "^1.1.9" +es-abstract@^1.22.1: + version "1.22.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.2.tgz#90f7282d91d0ad577f505e423e52d4c1d93c1b8a" + integrity sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA== + dependencies: + array-buffer-byte-length "^1.0.0" + arraybuffer.prototype.slice "^1.0.2" + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + es-set-tostringtag "^2.0.1" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.1" + get-symbol-description "^1.0.0" + globalthis "^1.0.3" + gopd "^1.0.1" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-proto "^1.0.1" + has-symbols "^1.0.3" + internal-slot "^1.0.5" + is-array-buffer "^3.0.2" + 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-typed-array "^1.1.12" + is-weakref "^1.0.2" + object-inspect "^1.12.3" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.5.1" + safe-array-concat "^1.0.1" + safe-regex-test "^1.0.0" + string.prototype.trim "^1.2.8" + string.prototype.trimend "^1.0.7" + string.prototype.trimstart "^1.0.7" + typed-array-buffer "^1.0.0" + typed-array-byte-length "^1.0.0" + typed-array-byte-offset "^1.0.0" + typed-array-length "^1.0.4" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.11" + es-get-iterator@^1.1.2: version "1.1.3" resolved "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz" @@ -1267,6 +1639,26 @@ es-get-iterator@^1.1.2: isarray "^2.0.5" stop-iteration-iterator "^1.0.0" +es-iterator-helpers@^1.0.12: + version "1.0.15" + resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz#bd81d275ac766431d19305923707c3efd9f1ae40" + integrity sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g== + dependencies: + asynciterator.prototype "^1.0.0" + call-bind "^1.0.2" + define-properties "^1.2.1" + es-abstract "^1.22.1" + es-set-tostringtag "^2.0.1" + function-bind "^1.1.1" + get-intrinsic "^1.2.1" + globalthis "^1.0.3" + has-property-descriptors "^1.0.0" + has-proto "^1.0.1" + has-symbols "^1.0.3" + internal-slot "^1.0.5" + iterator.prototype "^1.1.2" + safe-array-concat "^1.0.1" + es-set-tostringtag@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz" @@ -1302,20 +1694,20 @@ escape-string-regexp@^4.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-next@13.1.6: - version "13.1.6" - resolved "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.1.6.tgz" - integrity sha512-0cg7h5wztg/SoLAlxljZ0ZPUQ7i6QKqRiP4M2+MgTZtxWwNKb2JSwNc18nJ6/kXBI6xYvPraTbQSIhAuVw6czw== +eslint-config-next@13.5.3: + version "13.5.3" + resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-13.5.3.tgz#f1ff64e4a5b55ce52ef0ab0ea85de04fd581b956" + integrity sha512-VN2qbCpq2DMWgs7SVF8KTmc8bVaWz3s4nmcFqRLs7PNBt5AXejOhJuZ4zg2sCEHOvz5RvqdwLeI++NSCV6qHVg== dependencies: - "@next/eslint-plugin-next" "13.1.6" - "@rushstack/eslint-patch" "^1.1.3" - "@typescript-eslint/parser" "^5.42.0" + "@next/eslint-plugin-next" "13.5.3" + "@rushstack/eslint-patch" "^1.3.3" + "@typescript-eslint/parser" "^5.4.2 || ^6.0.0" eslint-import-resolver-node "^0.3.6" eslint-import-resolver-typescript "^3.5.2" - eslint-plugin-import "^2.26.0" - eslint-plugin-jsx-a11y "^6.5.1" - eslint-plugin-react "^7.31.7" - eslint-plugin-react-hooks "^4.5.0" + eslint-plugin-import "^2.28.1" + eslint-plugin-jsx-a11y "^6.7.1" + eslint-plugin-react "^7.33.2" + eslint-plugin-react-hooks "^4.5.0 || 5.0.0-canary-7118f5dd7-20230705" eslint-import-resolver-node@^0.3.6, eslint-import-resolver-node@^0.3.7: version "0.3.7" @@ -1339,37 +1731,39 @@ eslint-import-resolver-typescript@^3.5.2: is-glob "^4.0.3" synckit "^0.8.4" -eslint-module-utils@^2.7.4: - version "2.7.4" - resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz" - integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== +eslint-module-utils@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" + integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== dependencies: debug "^3.2.7" -eslint-plugin-import@^2.26.0: - version "2.27.5" - resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz" - integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== +eslint-plugin-import@^2.28.1: + version "2.28.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz#63b8b5b3c409bfc75ebaf8fb206b07ab435482c4" + integrity sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A== dependencies: array-includes "^3.1.6" + array.prototype.findlastindex "^1.2.2" array.prototype.flat "^1.3.1" array.prototype.flatmap "^1.3.1" debug "^3.2.7" doctrine "^2.1.0" eslint-import-resolver-node "^0.3.7" - eslint-module-utils "^2.7.4" + eslint-module-utils "^2.8.0" has "^1.0.3" - is-core-module "^2.11.0" + is-core-module "^2.13.0" is-glob "^4.0.3" minimatch "^3.1.2" + object.fromentries "^2.0.6" + object.groupby "^1.0.0" object.values "^1.1.6" - resolve "^1.22.1" - semver "^6.3.0" - tsconfig-paths "^3.14.1" + semver "^6.3.1" + tsconfig-paths "^3.14.2" -eslint-plugin-jsx-a11y@^6.5.1: +eslint-plugin-jsx-a11y@^6.7.1: version "6.7.1" - resolved "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.7.1.tgz" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.7.1.tgz#fca5e02d115f48c9a597a6894d5bcec2f7a76976" integrity sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA== dependencies: "@babel/runtime" "^7.20.7" @@ -1389,20 +1783,21 @@ eslint-plugin-jsx-a11y@^6.5.1: object.fromentries "^2.0.6" semver "^6.3.0" -eslint-plugin-react-hooks@^4.5.0: +"eslint-plugin-react-hooks@^4.5.0 || 5.0.0-canary-7118f5dd7-20230705": version "4.6.0" - resolved "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== -eslint-plugin-react@^7.31.7: - version "7.32.2" - resolved "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz" - integrity sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg== +eslint-plugin-react@^7.33.2: + version "7.33.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz#69ee09443ffc583927eafe86ffebb470ee737608" + integrity sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw== dependencies: array-includes "^3.1.6" array.prototype.flatmap "^1.3.1" array.prototype.tosorted "^1.1.1" doctrine "^2.1.0" + es-iterator-helpers "^1.0.12" estraverse "^5.3.0" jsx-ast-utils "^2.4.1 || ^3.0.0" minimatch "^3.1.2" @@ -1412,7 +1807,7 @@ eslint-plugin-react@^7.31.7: object.values "^1.1.6" prop-types "^15.8.1" resolve "^2.0.0-next.4" - semver "^6.3.0" + semver "^6.3.1" string.prototype.matchall "^4.0.8" eslint-scope@^7.1.1: @@ -1440,6 +1835,11 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== +eslint-visitor-keys@^3.4.1: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + eslint@8.34.0: version "8.34.0" resolved "https://registry.npmjs.org/eslint/-/eslint-8.34.0.tgz" @@ -1586,13 +1986,6 @@ flatted@^3.1.0: resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== -focus-lock@^0.11.6: - version "0.11.6" - resolved "https://registry.npmjs.org/focus-lock/-/focus-lock-0.11.6.tgz" - integrity sha512-KSuV3ur4gf2KqMNoZx3nXNVhqCkn42GuTYCX4tXPEwf0MjpFQmNMiN6m7dXaUXgIoivL6/65agoUMg4RLS0Vbg== - dependencies: - tslib "^2.0.3" - for-each@^0.3.3: version "0.3.3" resolved "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz" @@ -1600,6 +1993,27 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" +framer-motion@^6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-6.5.1.tgz#802448a16a6eb764124bf36d8cbdfa6dd6b931a7" + integrity sha512-o1BGqqposwi7cgDrtg0dNONhkmPsUFDaLcKXigzuTFC5x58mE8iyTazxSudFzmT6MEyJKfjjU8ItoMe3W+3fiw== + dependencies: + "@motionone/dom" "10.12.0" + framesync "6.0.1" + hey-listen "^1.0.8" + popmotion "11.0.3" + style-value-types "5.0.0" + tslib "^2.1.0" + optionalDependencies: + "@emotion/is-prop-valid" "^0.8.2" + +framesync@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/framesync/-/framesync-6.0.1.tgz#5e32fc01f1c42b39c654c35b16440e07a25d6f20" + integrity sha512-fUY88kXvGiIItgNC7wcTOl0SNRCVXMKSWW2Yzfmn7EKNc+MpCzcz9DhdHcdjbrtN3c6R4H5dTY2jiCpPdysEjA== + dependencies: + tslib "^2.1.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" @@ -1610,6 +2024,11 @@ function-bind@^1.1.1: resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + function.prototype.name@^1.1.5: version "1.1.5" resolved "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz" @@ -1620,7 +2039,17 @@ function.prototype.name@^1.1.5: es-abstract "^1.19.0" functions-have-names "^1.2.2" -functions-have-names@^1.2.2: +function.prototype.name@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" + +functions-have-names@^1.2.2, functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== @@ -1634,6 +2063,16 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has "^1.0.3" has-symbols "^1.0.3" +get-intrinsic@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" + integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-proto "^1.0.1" + has-symbols "^1.0.3" + get-nonce@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz" @@ -1759,20 +2198,20 @@ graphiql-explorer@^0.9.0: resolved "https://registry.npmjs.org/graphiql-explorer/-/graphiql-explorer-0.9.0.tgz" integrity sha512-fZC/wsuatqiQDO2otchxriFO0LaWIo/ovF/CQJ1yOudmY0P7pzDiP+l9CEHUiWbizk3e99x6DQG4XG1VxA+d6A== -graphiql@^2.4.1: - version "2.4.7" - resolved "https://registry.npmjs.org/graphiql/-/graphiql-2.4.7.tgz" - integrity sha512-Fm3fVI65EPyXy+PdbeQUyODTwl2NhpZ47msGnGwpDvdEzYdgF7pPrxL96xCfF31KIauS4+ceEJ+ZwEe5iLWiQw== +graphiql@3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/graphiql/-/graphiql-3.0.6.tgz#c23b26874bab3f3a14ba74b91f8d4b870feb6548" + integrity sha512-PuyAhRQibTrwT3RUKmwIGrJAB+M1gg+TAftmChjBqQW0n5WMFFvP5Wcr2NEikomY0s06+oKeUGhBU2iPrq+cSQ== dependencies: - "@graphiql/react" "^0.17.6" - "@graphiql/toolkit" "^0.8.4" - graphql-language-service "^5.1.6" + "@graphiql/react" "^0.19.4" + "@graphiql/toolkit" "^0.9.1" + graphql-language-service "^5.2.0" markdown-it "^12.2.0" -graphql-language-service@5.1.6, graphql-language-service@^5.1.6: - version "5.1.6" - resolved "https://registry.npmjs.org/graphql-language-service/-/graphql-language-service-5.1.6.tgz" - integrity sha512-sl9HTlE/sBoFvZ2SPGnApwpp/a4ahl1d49SOxGm2OIYOslFv00MK7AYms9Yx91omOwAp74is10S7Cjamh5TRQw== +graphql-language-service@5.2.0, graphql-language-service@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/graphql-language-service/-/graphql-language-service-5.2.0.tgz#cfe22b2e911292d724451580632c67d908e5606a" + integrity sha512-o/ZgTS0pBxWm3hSF4+6GwiV1//DxzoLWEbS38+jqpzzy1d/QXBidwQuVYTOksclbtOJZ3KR/tZ8fi/tI6VpVMg== dependencies: nullthrows "^1.0.0" vscode-languageserver-types "^3.17.1" @@ -1828,6 +2267,11 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +hey-listen@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/hey-listen/-/hey-listen-1.0.8.tgz#8e59561ff724908de1aa924ed6ecc84a56a9aa68" + integrity sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q== + hoist-non-react-statics@^3.0.0: version "3.3.2" resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz" @@ -1882,7 +2326,7 @@ inherits@2, inherits@2.0.4: resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -internal-slot@^1.0.3, internal-slot@^1.0.4: +internal-slot@^1.0.3, internal-slot@^1.0.4, internal-slot@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz" integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== @@ -1915,6 +2359,22 @@ is-array-buffer@^3.0.1: get-intrinsic "^1.1.3" is-typed-array "^1.1.10" +is-array-buffer@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" + integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.0" + is-typed-array "^1.1.10" + +is-async-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-async-function/-/is-async-function-2.0.0.tgz#8e4418efd3e5d3a6ebb0164c05ef5afb69aa9646" + integrity sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA== + dependencies: + has-tostringtag "^1.0.0" + is-bigint@^1.0.1: version "1.0.4" resolved "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz" @@ -1942,6 +2402,13 @@ is-core-module@^2.10.0, is-core-module@^2.11.0, is-core-module@^2.9.0: dependencies: has "^1.0.3" +is-core-module@^2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== + dependencies: + has "^1.0.3" + is-date-object@^1.0.1, is-date-object@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz" @@ -1959,6 +2426,20 @@ is-extglob@^2.1.1: resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== +is-finalizationregistry@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz#c8749b65f17c133313e661b1289b95ad3dbd62e6" + integrity sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw== + dependencies: + call-bind "^1.0.2" + +is-generator-function@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" + is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" @@ -2050,6 +2531,13 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.9: gopd "^1.0.1" has-tostringtag "^1.0.0" +is-typed-array@^1.1.12: + version "1.1.12" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" + integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== + dependencies: + which-typed-array "^1.1.11" + is-weakmap@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz" @@ -2092,6 +2580,17 @@ isobject@^3.0.1: resolved "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== +iterator.prototype@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.2.tgz#5e29c8924f01916cb9335f1ff80619dcff22b0c0" + integrity sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w== + dependencies: + define-properties "^1.2.1" + get-intrinsic "^1.2.1" + has-symbols "^1.0.3" + reflect.getprototypeof "^1.0.4" + set-function-name "^2.0.1" + js-sdsl@^4.1.4: version "4.3.0" resolved "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz" @@ -2129,9 +2628,9 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== -json5@^1.0.1: +json5@^1.0.2: version "1.0.2" - resolved "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== dependencies: minimist "^1.2.0" @@ -2387,6 +2886,11 @@ object-inspect@^1.12.2, object-inspect@^1.9.0: resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== +object-inspect@^1.12.3: + version "1.13.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== + object-is@^1.1.5: version "1.1.5" resolved "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz" @@ -2428,6 +2932,16 @@ object.fromentries@^2.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" +object.groupby@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.1.tgz#d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee" + integrity sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + object.hasown@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.2.tgz" @@ -2529,6 +3043,16 @@ picomatch@^2.3.0, picomatch@^2.3.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +popmotion@11.0.3: + version "11.0.3" + resolved "https://registry.yarnpkg.com/popmotion/-/popmotion-11.0.3.tgz#565c5f6590bbcddab7a33a074bb2ba97e24b0cc9" + integrity sha512-Y55FLdj3UxkR7Vl3s7Qr4e9m0onSnP8W7d/xQLsoJM40vs6UKHFdygs6SWryasTZYqugMjm3BepCF4CWXDiHgA== + dependencies: + framesync "6.0.1" + hey-listen "^1.0.8" + style-value-types "5.0.0" + tslib "^2.1.0" + postcss-value-parser@^4.0.2: version "4.2.0" resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" @@ -2635,13 +3159,6 @@ react-bootstrap@^2.7.2: uncontrollable "^7.2.1" warning "^4.0.3" -react-clientside-effect@^1.2.6: - version "1.2.6" - resolved "https://registry.npmjs.org/react-clientside-effect/-/react-clientside-effect-1.2.6.tgz" - integrity sha512-XGGGRQAKY+q25Lz9a/4EPqom7WRjz3z9R2k4jhVKA/puQFH/5Nt27vFZYql4m4NVNdUvX8PS3O7r/Zzm7cjUlg== - dependencies: - "@babel/runtime" "^7.12.13" - react-dom@18.2.0: version "18.2.0" resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz" @@ -2650,18 +3167,6 @@ react-dom@18.2.0: loose-envify "^1.1.0" scheduler "^0.23.0" -react-focus-lock@^2.5.2: - version "2.9.4" - resolved "https://registry.npmjs.org/react-focus-lock/-/react-focus-lock-2.9.4.tgz" - integrity sha512-7pEdXyMseqm3kVjhdVH18sovparAzLg5h6WvIx7/Ck3ekjhrrDMEegHSa3swwC8wgfdd7DIdUVRGeiHT9/7Sgg== - dependencies: - "@babel/runtime" "^7.0.0" - focus-lock "^0.11.6" - prop-types "^15.6.2" - react-clientside-effect "^1.2.6" - use-callback-ref "^1.3.0" - use-sidecar "^1.1.2" - react-is@^16.13.1, react-is@^16.3.2, react-is@^16.7.0: version "16.13.1" resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" @@ -2672,20 +3177,20 @@ react-lifecycles-compat@^3.0.4: resolved "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== -react-remove-scroll-bar@^2.3.4: +react-remove-scroll-bar@^2.3.3: version "2.3.4" - resolved "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.4.tgz" + resolved "https://registry.yarnpkg.com/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.4.tgz#53e272d7a5cb8242990c7f144c44d8bd8ab5afd9" integrity sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A== dependencies: react-style-singleton "^2.2.1" tslib "^2.0.0" -react-remove-scroll@^2.4.3: - version "2.5.6" - resolved "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.6.tgz" - integrity sha512-bO856ad1uDYLefgArk559IzUNeQ6SWH4QnrevIUjH+GczV56giDfl3h0Idptf2oIKxQmd1p9BN25jleKodTALg== +react-remove-scroll@2.5.5: + version "2.5.5" + resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz#1e31a1260df08887a8a0e46d09271b52b3a37e77" + integrity sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw== dependencies: - react-remove-scroll-bar "^2.3.4" + react-remove-scroll-bar "^2.3.3" react-style-singleton "^2.2.1" tslib "^2.1.0" use-callback-ref "^1.3.0" @@ -2724,11 +3229,28 @@ react@18.2.0: dependencies: loose-envify "^1.1.0" +reflect.getprototypeof@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz#aaccbf41aca3821b87bb71d9dcbc7ad0ba50a3f3" + integrity sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + globalthis "^1.0.3" + which-builtin-type "^1.1.3" + regenerator-runtime@^0.13.11: version "0.13.11" resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz" integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== +regenerator-runtime@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" + integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== + regexp.prototype.flags@^1.4.3: version "1.4.3" resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz" @@ -2738,6 +3260,15 @@ regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" +regexp.prototype.flags@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" + integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + set-function-name "^2.0.0" + regexpp@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" @@ -2790,6 +3321,16 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +safe-array-concat@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.1.tgz#91686a63ce3adbea14d61b14c99572a8ff84754c" + integrity sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + has-symbols "^1.0.3" + isarray "^2.0.5" + safe-buffer@^5.0.1: version "5.2.1" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" @@ -2825,13 +3366,37 @@ semver@^6.3.0: resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.3.7: - version "7.3.8" - resolved "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== +semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.5.4: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" +set-function-length@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.1.1.tgz#4bc39fafb0307224a33e106a7d35ca1218d659ed" + integrity sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ== + dependencies: + define-data-property "^1.1.1" + get-intrinsic "^1.2.1" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" + +set-function-name@^2.0.0, set-function-name@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" + integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA== + dependencies: + define-data-property "^1.0.1" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.0" + set-value@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/set-value/-/set-value-4.1.0.tgz" @@ -2925,6 +3490,15 @@ string.prototype.matchall@^4.0.8: regexp.prototype.flags "^1.4.3" side-channel "^1.0.4" +string.prototype.trim@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" + integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + string.prototype.trimend@^1.0.6: version "1.0.6" resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz" @@ -2934,6 +3508,15 @@ string.prototype.trimend@^1.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" +string.prototype.trimend@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" + integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + string.prototype.trimstart@^1.0.6: version "1.0.6" resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz" @@ -2943,6 +3526,15 @@ string.prototype.trimstart@^1.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" +string.prototype.trimstart@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" + integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" @@ -2960,6 +3552,14 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +style-value-types@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/style-value-types/-/style-value-types-5.0.0.tgz#76c35f0e579843d523187989da866729411fc8ad" + integrity sha512-08yq36Ikn4kx4YU6RD7jWEv27v4V+PUsOGa4n/as8Et3CuODMJQ00ENeAVXAeydX4Z2j1XHZF1K2sX4mGl18fA== + dependencies: + hey-listen "^1.0.8" + tslib "^2.1.0" + styled-components@^5.3.6: version "5.3.6" resolved "https://registry.npmjs.org/styled-components/-/styled-components-5.3.6.tgz" @@ -3010,11 +3610,6 @@ synckit@^0.8.4: "@pkgr/utils" "^2.3.1" tslib "^2.5.0" -tabbable@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/tabbable/-/tabbable-4.0.0.tgz" - integrity sha512-H1XoH1URcBOa/rZZWxLxHCtOdVUEev+9vo5YdYhC9tCY4wnybX+VQrCYuy9ubkg69fCBxCONJOSLGfw0DWMffQ== - tapable@^2.2.0: version "2.2.1" resolved "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz" @@ -3038,11 +3633,6 @@ tiny-glob@^0.2.9: globalyzer "0.1.0" globrex "^0.1.2" -tiny-warning@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz" - integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== - to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" @@ -3070,37 +3660,30 @@ tr46@~0.0.3: resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -tsconfig-paths@^3.14.1: - version "3.14.1" - resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz" - integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== +ts-api-utils@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" + integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== + +tsconfig-paths@^3.14.2: + version "3.14.2" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" + integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== dependencies: "@types/json5" "^0.0.29" - json5 "^1.0.1" + json5 "^1.0.2" minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^1.8.1: - version "1.14.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - tslib@^2.0.0, tslib@^2.1.0, tslib@^2.4.0, tslib@^2.5.0: version "2.5.0" resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== -tslib@^2.0.3, tslib@^2.3.0: - version "2.5.2" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.2.tgz" - integrity sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA== - -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" +tslib@^2.3.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== tweetnacl@^1.0.1: version "1.0.3" @@ -3119,6 +3702,36 @@ type-fest@^0.20.2: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== +typed-array-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" + integrity sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + is-typed-array "^1.1.10" + +typed-array-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz#d787a24a995711611fb2b87a4052799517b230d0" + integrity sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + +typed-array-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz#cbbe89b51fdef9cd6aaf07ad4707340abbc4ea0b" + integrity sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + typed-array-length@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz" @@ -3221,6 +3834,24 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" +which-builtin-type@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.1.3.tgz#b1b8443707cc58b6e9bf98d32110ff0c2cbd029b" + integrity sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw== + dependencies: + function.prototype.name "^1.1.5" + has-tostringtag "^1.0.0" + is-async-function "^2.0.0" + is-date-object "^1.0.5" + is-finalizationregistry "^1.0.2" + is-generator-function "^1.0.10" + is-regex "^1.1.4" + is-weakref "^1.0.2" + isarray "^2.0.5" + which-boxed-primitive "^1.0.2" + which-collection "^1.0.1" + which-typed-array "^1.1.9" + which-collection@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz" @@ -3231,6 +3862,17 @@ which-collection@^1.0.1: is-weakmap "^2.0.1" is-weakset "^2.0.1" +which-typed-array@^1.1.11: + version "1.1.13" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.13.tgz#870cd5be06ddb616f504e7b039c4c24898184d36" + integrity sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.4" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + which-typed-array@^1.1.9: version "1.1.9" resolved "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz" From d83396c35c747fa2e95ccbf0f9f0bc15c5cf1985 Mon Sep 17 00:00:00 2001 From: Morgan McCauley Date: Wed, 20 Dec 2023 15:11:50 +1300 Subject: [PATCH 02/32] feat: Make log/state Hasura tables `backend_only` (#462) --- .../databases/default/tables/public_indexer_log_entries.yaml | 1 + .../metadata/databases/default/tables/public_indexer_state.yaml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/hasura/metadata/databases/default/tables/public_indexer_log_entries.yaml b/hasura/metadata/databases/default/tables/public_indexer_log_entries.yaml index 50b671595..ff2c158f4 100644 --- a/hasura/metadata/databases/default/tables/public_indexer_log_entries.yaml +++ b/hasura/metadata/databases/default/tables/public_indexer_log_entries.yaml @@ -3,6 +3,7 @@ table: schema: public insert_permissions: - permission: + backend_only: true check: {} columns: - block_height diff --git a/hasura/metadata/databases/default/tables/public_indexer_state.yaml b/hasura/metadata/databases/default/tables/public_indexer_state.yaml index 450b822e0..2bcc6c9b9 100644 --- a/hasura/metadata/databases/default/tables/public_indexer_state.yaml +++ b/hasura/metadata/databases/default/tables/public_indexer_state.yaml @@ -3,6 +3,7 @@ table: schema: public insert_permissions: - permission: + backend_only: true check: {} columns: - function_name @@ -22,6 +23,7 @@ select_permissions: role: append update_permissions: - permission: + backend_only: true check: {} columns: - function_name From e63024a204e90704999af19fa0aa9ed3f7ff95f2 Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Wed, 20 Dec 2023 09:45:57 -0800 Subject: [PATCH 03/32] fix: Prune Unnecessary Logs (#465) Logs are causing machine to run out of space, leading to crashes. I've removed some logs which are not particularly helpful for debugging problems anymore. These logs also tend to run basically every single iteration, bloating logs both on machine and in GCP. --- runner/src/dml-handler/dml-handler.ts | 15 --------------- runner/src/indexer/indexer.ts | 3 +-- runner/src/stream-handler/worker.ts | 1 - 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/runner/src/dml-handler/dml-handler.ts b/runner/src/dml-handler/dml-handler.ts index 15873e14f..a3519a15d 100644 --- a/runner/src/dml-handler/dml-handler.ts +++ b/runner/src/dml-handler/dml-handler.ts @@ -37,9 +37,6 @@ export default class DmlHandler { const query = `INSERT INTO ${schemaName}."${tableName}" (${keys.join(', ')}) VALUES %L RETURNING *`; const result = await wrapError(async () => await this.pgClient.query(this.pgClient.format(query, values), []), `Failed to execute '${query}' on ${schemaName}."${tableName}".`); - if (result.rows?.length === 0) { - console.log('No rows were inserted.'); - } return result.rows; } @@ -53,9 +50,6 @@ export default class DmlHandler { } const result = await wrapError(async () => await this.pgClient.query(this.pgClient.format(query), values), `Failed to execute '${query}' on ${schemaName}."${tableName}".`); - if (!(result.rows && result.rows.length > 0)) { - console.log('No rows were selected.'); - } return result.rows; } @@ -69,9 +63,6 @@ export default class DmlHandler { const query = `UPDATE ${schemaName}."${tableName}" SET ${updateParam} WHERE ${whereParam} RETURNING *`; const result = await wrapError(async () => await this.pgClient.query(this.pgClient.format(query), queryValues), `Failed to execute '${query}' on ${schemaName}."${tableName}".`); - if (!(result.rows && result.rows.length > 0)) { - console.log('No rows were selected.'); - } return result.rows; } @@ -87,9 +78,6 @@ export default class DmlHandler { const query = `INSERT INTO ${schemaName}."${tableName}" (${keys.join(', ')}) VALUES %L ON CONFLICT (${conflictColumns.join(', ')}) DO UPDATE SET ${updatePlaceholders} RETURNING *`; const result = await wrapError(async () => await this.pgClient.query(this.pgClient.format(query, values), []), `Failed to execute '${query}' on ${schemaName}."${tableName}".`); - if (result.rows?.length === 0) { - console.log('No rows were inserted or updated.'); - } return result.rows; } @@ -100,9 +88,6 @@ export default class DmlHandler { const query = `DELETE FROM ${schemaName}."${tableName}" WHERE ${param} RETURNING *`; const result = await wrapError(async () => await this.pgClient.query(this.pgClient.format(query), values), `Failed to execute '${query}' on ${schemaName}."${tableName}".`); - if (!(result.rows && result.rows.length > 0)) { - console.log('No rows were deleted.'); - } return result.rows; } } diff --git a/runner/src/indexer/indexer.ts b/runner/src/indexer/indexer.ts index f70cb6983..4bb631bdd 100644 --- a/runner/src/indexer/indexer.ts +++ b/runner/src/indexer/indexer.ts @@ -65,7 +65,7 @@ export default class Indexer { const indexerFunction = functions[functionName]; const runningMessage = `Running function ${functionName} on block ${blockHeight}` + (isHistorical ? ' historical backfill' : `, lag is: ${lag?.toString()}ms from block timestamp`); - console.log(runningMessage); // Print the running message to the console (Lambda logs) + console.log(runningMessage); // Print the running message to the console simultaneousPromises.push(this.writeLog(functionName, blockHeight, runningMessage)); @@ -192,7 +192,6 @@ export default class Indexer { } const tableNamesArray = Array.from(tableNames); - console.log('Retrieved the following table names from schema: ', tableNamesArray); return Array.from(tableNamesArray); } diff --git a/runner/src/stream-handler/worker.ts b/runner/src/stream-handler/worker.ts index 51305edb2..13947d0ad 100644 --- a/runner/src/stream-handler/worker.ts +++ b/runner/src/stream-handler/worker.ts @@ -68,7 +68,6 @@ async function blockQueueProducer (workerContext: WorkerContext, streamKey: stri streamMessageStartId = '0'; continue; } - console.log(`Fetched ${messages?.length} messages from stream ${streamKey}`); for (const streamMessage of messages) { const { id, message } = streamMessage; From 38ea895b11aeeb25b8929820daa2a6e76bde78bf Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Thu, 21 Dec 2023 11:36:25 -0800 Subject: [PATCH 04/32] feat: Runner gRPC endpoint (#446) As part of implementing a new control plane to oversee QueryApi resources, Runner needed endpoints with which control plane can send commands. This PR adds code to create a new gRPC server with endpoints to start, stop, or list Runner executors. This provides the control plane the ability to fully control Runner, and removes the need for bilateral decision making, which was a problem of the previous design. The changes will be changed further as needs become more concrete, closer to integration/release. --- runner/.gitignore | 1 + runner/package-lock.json | 2287 ++++++++++++++++--- runner/package.json | 8 +- runner/protos/runner.proto | 56 + runner/src/index.ts | 4 +- runner/src/server/index.ts | 1 + runner/src/server/runner-client.ts | 15 + runner/src/server/runner-server.ts | 32 + runner/src/server/runner-service.test.ts | 342 +++ runner/src/server/runner-service.ts | 185 ++ runner/src/stream-handler/stream-handler.ts | 15 +- runner/src/stream-handler/worker.ts | 8 +- 12 files changed, 2671 insertions(+), 283 deletions(-) create mode 100644 runner/protos/runner.proto create mode 100644 runner/src/server/index.ts create mode 100644 runner/src/server/runner-client.ts create mode 100644 runner/src/server/runner-server.ts create mode 100644 runner/src/server/runner-service.test.ts create mode 100644 runner/src/server/runner-service.ts diff --git a/runner/.gitignore b/runner/.gitignore index 7f277a13c..716d562d9 100644 --- a/runner/.gitignore +++ b/runner/.gitignore @@ -1,2 +1,3 @@ **/dist /node_modules +src/generated/ diff --git a/runner/package-lock.json b/runner/package-lock.json index bb7ece948..e7d1d570d 100644 --- a/runner/package-lock.json +++ b/runner/package-lock.json @@ -9,10 +9,14 @@ "version": "1.0.0", "license": "ISC", "dependencies": { + "@aws-sdk/client-s3": "^3.414.0", + "@grpc/grpc-js": "^1.9.12", + "@grpc/proto-loader": "^0.7.10", "@near-lake/primitives": "^0.1.0", - "aws-sdk": "^2.1402.0", "express": "^4.18.2", + "long": "^5.2.3", "node-fetch": "^2.6.11", + "node-sql-parser": "^4.10.0", "pg": "^8.11.1", "pg-format": "^1.0.4", "pluralize": "^8.0.0", @@ -71,6 +75,876 @@ "node": ">=6.0.0" } }, + "node_modules/@aws-crypto/crc32": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz", + "integrity": "sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==", + "dependencies": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/crc32c": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-3.0.0.tgz", + "integrity": "sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w==", + "dependencies": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/ie11-detection": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz", + "integrity": "sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==", + "dependencies": { + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/sha1-browser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha1-browser/-/sha1-browser-3.0.0.tgz", + "integrity": "sha512-NJth5c997GLHs6nOYTzFKTbYdMNA6/1XlKVgnZoaZcQ7z7UJlOgj2JdbHE8tiYLS3fzXNCguct77SPGat2raSw==", + "dependencies": { + "@aws-crypto/ie11-detection": "^3.0.0", + "@aws-crypto/supports-web-crypto": "^3.0.0", + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/sha256-browser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-3.0.0.tgz", + "integrity": "sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==", + "dependencies": { + "@aws-crypto/ie11-detection": "^3.0.0", + "@aws-crypto/sha256-js": "^3.0.0", + "@aws-crypto/supports-web-crypto": "^3.0.0", + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/sha256-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz", + "integrity": "sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==", + "dependencies": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/supports-web-crypto": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz", + "integrity": "sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg==", + "dependencies": { + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/util": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-3.0.0.tgz", + "integrity": "sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==", + "dependencies": { + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-sdk/client-s3": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.474.0.tgz", + "integrity": "sha512-uqji9u2yIhFMx6E18+iIlKqimZE1SUEewS78iYYzOKRoQQ+XqFnQXtHTvBGfTExEvdwZUXYg8FqSP2UpQiEf/g==", + "dependencies": { + "@aws-crypto/sha1-browser": "3.0.0", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.474.0", + "@aws-sdk/core": "3.474.0", + "@aws-sdk/credential-provider-node": "3.474.0", + "@aws-sdk/middleware-bucket-endpoint": "3.470.0", + "@aws-sdk/middleware-expect-continue": "3.468.0", + "@aws-sdk/middleware-flexible-checksums": "3.468.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-location-constraint": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-sdk-s3": "3.474.0", + "@aws-sdk/middleware-signing": "3.468.0", + "@aws-sdk/middleware-ssec": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/signature-v4-multi-region": "3.474.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@aws-sdk/xml-builder": "3.472.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/eventstream-serde-browser": "^2.0.15", + "@smithy/eventstream-serde-config-resolver": "^2.0.15", + "@smithy/eventstream-serde-node": "^2.0.15", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-blob-browser": "^2.0.16", + "@smithy/hash-node": "^2.0.17", + "@smithy/hash-stream-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/md5-js": "^2.0.17", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-stream": "^2.0.23", + "@smithy/util-utf8": "^2.0.2", + "@smithy/util-waiter": "^2.0.15", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/client-sso": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.474.0.tgz", + "integrity": "sha512-6toUmQUIHkDM/P2/nyLEO/mcWOIPByTlegqX9VCHhYh9Fs5MDT2nit7I6fZzBjZjB5oVTwKjbzgxae9cE3bhqw==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.474.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-sso/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/client-sts": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.474.0.tgz", + "integrity": "sha512-qPPMbrDVAUJgYiFWVewFG7dg0VyMfuGNNK4IC1nZr0eXejUTbdm8cio6IZ8OkWtK+A+L+wx1vX5686WYVgQ0dQ==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.474.0", + "@aws-sdk/credential-provider-node": "3.474.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/core": "^1.1.0", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-middleware": "^2.0.8", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/core": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.474.0.tgz", + "integrity": "sha512-eVRdeB+AoTNSzfc4viHfr0jfkHujSlf4ToExJtTuxS1wlgmIyyxRNrVKxbf0K78YK/TXRsRlJPoS5QCD5h1S2w==", + "dependencies": { + "@smithy/core": "^1.1.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/signature-v4": "^2.0.0", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/core/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/credential-provider-env": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.468.0.tgz", + "integrity": "sha512-k/1WHd3KZn0EQYjadooj53FC0z24/e4dUZhbSKTULgmxyO62pwh9v3Brvw4WRa/8o2wTffU/jo54tf4vGuP/ZA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-env/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.474.0.tgz", + "integrity": "sha512-3Y2fHI4ZCNjdOO47Vh/xBgLXOrKm3KwBkYkBKKT2g02FUGNT8NLjJg8WBo3D4RQX2h34qx4mtW5nTY6YcGP80Q==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.468.0", + "@aws-sdk/credential-provider-process": "3.468.0", + "@aws-sdk/credential-provider-sso": "3.474.0", + "@aws-sdk/credential-provider-web-identity": "3.468.0", + "@aws-sdk/types": "3.468.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-ini/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/credential-provider-node": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.474.0.tgz", + "integrity": "sha512-3OVVVGnb8Ru5hWeeHkg76YZT5mrufweIiWr6ge5zn7FYxc7WkyqIJ0XehqUqG5VQfaYhqh7uq/zmk8OE2B04lQ==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.468.0", + "@aws-sdk/credential-provider-ini": "3.474.0", + "@aws-sdk/credential-provider-process": "3.468.0", + "@aws-sdk/credential-provider-sso": "3.474.0", + "@aws-sdk/credential-provider-web-identity": "3.468.0", + "@aws-sdk/types": "3.468.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-node/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/credential-provider-process": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.468.0.tgz", + "integrity": "sha512-OYSn1A/UsyPJ7Z8Q2cNhTf55O36shPmSsvOfND04nSfu1nPaR+VUvvsP7v+brhGpwC/GAKTIdGAo4blH31BS6A==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-process/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.474.0.tgz", + "integrity": "sha512-ik4rzhQtcRLSHB/MLQfi/dSpILxPd3zITb79DIEnqT3gpZRNjoARkZ3Hi68pujkU2530NYf8NcFwLCWoV1hS7Q==", + "dependencies": { + "@aws-sdk/client-sso": "3.474.0", + "@aws-sdk/token-providers": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-sso/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.468.0.tgz", + "integrity": "sha512-rexymPmXjtkwCPfhnUq3EjO1rSkf39R4Jz9CqiM7OsqK2qlT5Y/V3gnMKn0ZMXsYaQOMfM3cT5xly5R+OKDHlw==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-bucket-endpoint": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.470.0.tgz", + "integrity": "sha512-vLXXNWtsRmEIwzJ9HUQfIuTNAsEzvCv0Icsnkvt2BiBZXnmHdp2vIC3e3+kfy1D7dVQloXqMmnfcLu/BUMu2Jw==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-arn-parser": "3.465.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "@smithy/util-config-provider": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-bucket-endpoint/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-expect-continue": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.468.0.tgz", + "integrity": "sha512-/wmLjmfgeulxhhmnxX3X3N933TvGsYckVIFjAtDSpLjqkbwzEcNiLq7AdmNJ4BfxG0MCMgcht561DCCD19x8Bg==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-expect-continue/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-flexible-checksums": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.468.0.tgz", + "integrity": "sha512-LQwL/N5MCj3Y5keLLewHTqeAXUIMsHFZyxDXRm/uxrOon9ufLKDvGvzAmfwn1/CuSUo66ZfT8VPSA4BsC90RtA==", + "dependencies": { + "@aws-crypto/crc32": "3.0.0", + "@aws-crypto/crc32c": "3.0.0", + "@aws-sdk/types": "3.468.0", + "@smithy/is-array-buffer": "^2.0.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-flexible-checksums/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-host-header": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.468.0.tgz", + "integrity": "sha512-gwQ+/QhX+lhof304r6zbZ/V5l5cjhGRxLL3CjH1uJPMcOAbw9wUlMdl+ibr8UwBZ5elfKFGiB1cdW/0uMchw0w==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-host-header/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-location-constraint": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.468.0.tgz", + "integrity": "sha512-0gBX/lDynQr4YIhM9h1dVnkVWqrg+34iOCVIUq8jHxzUzgZWglGkG9lHGGg0r1xkLTmegeoo1OKH8wrQ6n33Cg==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-location-constraint/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-logger": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.468.0.tgz", + "integrity": "sha512-X5XHKV7DHRXI3f29SAhJPe/OxWRFgDWDMMCALfzhmJfCi6Jfh0M14cJKoC+nl+dk9lB+36+jKjhjETZaL2bPlA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-logger/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.468.0.tgz", + "integrity": "sha512-vch9IQib2Ng9ucSyRW2eKNQXHUPb5jUPCLA5otTW/8nGjcOU37LxQG4WrxO7uaJ9Oe8hjHO+hViE3P0KISUhtA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-sdk-s3": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.474.0.tgz", + "integrity": "sha512-62aAo/8u5daIabeJ+gseYeHeShe9eYH6mH+kfWmLsHybXCCv1EaD/ZkdXWNhL0HZ3bUI1z1SF1p8jjTAWALnwA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-arn-parser": "3.465.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/protocol-http": "^3.0.11", + "@smithy/signature-v4": "^2.0.0", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/util-config-provider": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-sdk-s3/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-signing": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.468.0.tgz", + "integrity": "sha512-s+7fSB1gdnnTj5O0aCCarX3z5Vppop8kazbNSZADdkfHIDWCN80IH4ZNjY3OWqaAz0HmR4LNNrovdR304ojb4Q==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.7.0", + "@smithy/util-middleware": "^2.0.8", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-signing/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-ssec": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.468.0.tgz", + "integrity": "sha512-y1qLW24wRkOGBTK5d6eJXf6d8HYo4rzT4a1mNDN1rd18NSffwQ6Yke5qeUiIaxa0y/l+FvvNYErbhYtij2rJoQ==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-ssec/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.470.0.tgz", + "integrity": "sha512-s0YRGgf4fT5KwwTefpoNUQfB5JghzXyvmPfY1QuFEMeVQNxv0OPuydzo3rY2oXPkZjkulKDtpm5jzIHwut75hA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-user-agent/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.470.0.tgz", + "integrity": "sha512-C1o1J06iIw8cyAAOvHqT4Bbqf+PgQ/RDlSyjt2gFfP2OovDpc2o2S90dE8f8iZdSGpg70N5MikT1DBhW9NbhtQ==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.8", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/region-config-resolver/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/signature-v4-multi-region": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.474.0.tgz", + "integrity": "sha512-93OWRQgTJZASXLrlUNX7mmXknNkYxFYldRLARmYQccONmnIqgYQW0lQj8BFwqkHJTzSMik3/UsU0SHKwZ9ynYA==", + "dependencies": { + "@aws-sdk/middleware-sdk-s3": "3.474.0", + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/signature-v4-multi-region/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/token-providers": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.470.0.tgz", + "integrity": "sha512-rzxnJxEUJiV69Cxsf0AHXTqJqTACITwcSH/PL4lWP4uvtzdrzSi3KA3u2aWHWpOcdE6+JFvdICscsbBSo3/TOg==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/token-providers/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/types": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.468.0.tgz", + "integrity": "sha512-rx/9uHI4inRbp2tw3Y4Ih4PNZkVj32h7WneSg3MVgVjAoVD5Zti9KhS5hkvsBxfgmQmg0AQbE+b1sy5WGAgntA==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/types/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/util-arn-parser": { + "version": "3.465.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.465.0.tgz", + "integrity": "sha512-zOJ82vzDJFqBX9yZBlNeHHrul/kpx/DCoxzW5UBbZeb26kfV53QhMSoEmY8/lEbBqlqargJ/sgRC845GFhHNQw==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/util-arn-parser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/util-endpoints": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.470.0.tgz", + "integrity": "sha512-6N6VvPCmu+89p5Ez/+gLf+X620iQ9JpIs8p8ECZiCodirzFOe8NC1O2S7eov7YiG9IHSuodqn/0qNq+v+oLe0A==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/util-endpoints": "^1.0.7", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/util-endpoints/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/util-locate-window": { + "version": "3.465.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.465.0.tgz", + "integrity": "sha512-f+QNcWGswredzC1ExNAB/QzODlxwaTdXkNT5cvke2RLX8SFU5pYk6h4uCtWC0vWPELzOfMfloBrJefBzlarhsw==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/util-locate-window/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.468.0.tgz", + "integrity": "sha512-OJyhWWsDEizR3L+dCgMXSUmaCywkiZ7HSbnQytbeKGwokIhD69HTiJcibF/sgcM5gk4k3Mq3puUhGnEZ46GIig==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", + "bowser": "^2.11.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@aws-sdk/util-user-agent-browser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.470.0.tgz", + "integrity": "sha512-QxsZ9iVHcBB/XRdYvwfM5AMvNp58HfqkIrH88mY0cmxuvtlIGDfWjczdDrZMJk9y0vIq+cuoCHsGXHu7PyiEAQ==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, + "node_modules/@aws-sdk/util-user-agent-node/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/util-utf8-browser": { + "version": "3.259.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz", + "integrity": "sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==", + "dependencies": { + "tslib": "^2.3.1" + } + }, + "node_modules/@aws-sdk/util-utf8-browser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/xml-builder": { + "version": "3.472.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.472.0.tgz", + "integrity": "sha512-PwjVxz1hr9up8QkddabuScPZ/d5aDHgvHYgK4acHYzltXL4wngfvimi5ZqXTzVWF2QANxHmWnHUr45QJX71oJQ==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/xml-builder/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/@babel/code-frame": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", @@ -777,6 +1651,35 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@grpc/grpc-js": { + "version": "1.9.13", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.13.tgz", + "integrity": "sha512-OEZZu9v9AA+7/tghMDE8o5DAMD5THVnwSqDWuh7PPYO5287rTyqy0xEHT6/e4pbqSrhyLPdQFsam4TwFQVVIIw==", + "dependencies": { + "@grpc/proto-loader": "^0.7.8", + "@types/node": ">=12.12.47" + }, + "engines": { + "node": "^8.13.0 || >=10.10.0" + } + }, + "node_modules/@grpc/proto-loader": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.10.tgz", + "integrity": "sha512-CAqDfoaQ8ykFd9zqBDn4k6iWT9loLAlc2ETmDFS9JCD70gDcnA4L3AFEo2iV7KyAtAAHFW9ftq1Fz+Vsgq80RQ==", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.4", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", @@ -1352,116 +2255,1057 @@ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgr/utils": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", + "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.3.0", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.6.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/@pkgr/utils/node_modules/tslib": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", + "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", + "dev": true + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, + "node_modules/@redis/bloom": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-1.2.0.tgz", + "integrity": "sha512-HG2DFjYKbpNmVXsa0keLHp/3leGJz1mjh09f2RLGGLQZzSHpkmZWuwJbAvo3QcRY8p80m5+ZdXZdYOSBLlp7Cg==", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/client": { + "version": "1.5.8", + "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.5.8.tgz", + "integrity": "sha512-xzElwHIO6rBAqzPeVnCzgvrnBEcFL1P0w8P65VNLRkdVW8rOE58f52hdj0BDgmsdOm4f1EoXPZtH4Fh7M/qUpw==", + "dependencies": { + "cluster-key-slot": "1.1.2", + "generic-pool": "3.9.0", + "yallist": "4.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@redis/graph": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@redis/graph/-/graph-1.1.0.tgz", + "integrity": "sha512-16yZWngxyXPd+MJxeSr0dqh2AIOi8j9yXKcKCwVaKDbH3HTuETpDVPcLujhFYVPtYrngSco31BUcSa9TH31Gqg==", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/json": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@redis/json/-/json-1.0.4.tgz", + "integrity": "sha512-LUZE2Gdrhg0Rx7AN+cZkb1e6HjoSKaeeW8rYnt89Tly13GBI5eP4CwDVr+MY8BAYfCg4/N15OUrtLoona9uSgw==", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/search": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@redis/search/-/search-1.1.3.tgz", + "integrity": "sha512-4Dg1JjvCevdiCBTZqjhKkGoC5/BcB7k9j99kdMnaXFXg8x4eyOIVg9487CMv7/BUVkFLZCaIh8ead9mU15DNng==", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/time-series": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-1.0.4.tgz", + "integrity": "sha512-ThUIgo2U/g7cCuZavucQTQzA9g9JbDDY2f64u3AbAoz/8vE2lt2U37LamDUVChhaDA3IRT9R6VvJwqnUfTJzng==", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@smithy/abort-controller": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.15.tgz", + "integrity": "sha512-JkS36PIS3/UCbq/MaozzV7jECeL+BTt4R75bwY8i+4RASys4xOyUS1HsRyUNSqUXFP4QyCz5aNnh3ltuaxv+pw==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/abort-controller/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/chunked-blob-reader": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-2.0.0.tgz", + "integrity": "sha512-k+J4GHJsMSAIQPChGBrjEmGS+WbPonCXesoqP9fynIqjn7rdOThdH8FAeCmokP9mxTYKQAKoHCLPzNlm6gh7Wg==", + "dependencies": { + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/chunked-blob-reader-native": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-2.0.1.tgz", + "integrity": "sha512-N2oCZRglhWKm7iMBu7S6wDzXirjAofi7tAd26cxmgibRYOBS4D3hGfmkwCpHdASZzwZDD8rluh0Rcqw1JeZDRw==", + "dependencies": { + "@smithy/util-base64": "^2.0.1", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/chunked-blob-reader-native/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/chunked-blob-reader/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/config-resolver": { + "version": "2.0.21", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.21.tgz", + "integrity": "sha512-rlLIGT+BeqjnA6C2FWumPRJS1UW07iU5ZxDHtFuyam4W65gIaOFMjkB90ofKCIh+0mLVQrQFrl/VLtQT/6FWTA==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.8", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/config-resolver/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-1.1.0.tgz", + "integrity": "sha512-k1zaT5S4K0bG67Q5TmPZ6PdWNQBTMQErChuDvTi+NTx21kKDt+/4YRidsK6nDbHizN6fn1bafUxrougZdKrpxA==", + "dependencies": { + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/core/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/credential-provider-imds": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.1.4.tgz", + "integrity": "sha512-cwPJN1fa1YOQzhBlTXRavABEYRRchci1X79QRwzaNLySnIMJfztyv1Zkst0iZPLMnpn8+CnHu3wOHS11J5Dr3A==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/property-provider": "^2.0.16", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/credential-provider-imds/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/eventstream-codec": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.15.tgz", + "integrity": "sha512-crjvz3j1gGPwA0us6cwS7+5gAn35CTmqu/oIxVbYJo2Qm/sGAye6zGJnMDk3BKhWZw5kcU1G4MxciTkuBpOZPg==", + "dependencies": { + "@aws-crypto/crc32": "3.0.0", + "@smithy/types": "^2.7.0", + "@smithy/util-hex-encoding": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/eventstream-codec/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/eventstream-serde-browser": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.15.tgz", + "integrity": "sha512-WiFG5N9j3jmS5P0z5Xev6dO0c3lf7EJYC2Ncb0xDnWFvShwXNn741AF71ABr5EcZw8F4rQma0362MMjAwJeZog==", + "dependencies": { + "@smithy/eventstream-serde-universal": "^2.0.15", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-browser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/eventstream-serde-config-resolver": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.15.tgz", + "integrity": "sha512-o65d2LRjgCbWYH+VVNlWXtmsI231SO99ZTOL4UuIPa6WTjbSHWtlXvUcJG9libhEKWmEV9DIUiH2IqyPWi7ubA==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-config-resolver/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/eventstream-serde-node": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.15.tgz", + "integrity": "sha512-9OOXiIhHq1VeOG6xdHkn2ZayfMYM3vzdUTV3zhcCnt+tMqA3BJK3XXTJFRR2BV28rtRM778DzqbBTf+hqwQPTg==", + "dependencies": { + "@smithy/eventstream-serde-universal": "^2.0.15", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-node/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/eventstream-serde-universal": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.15.tgz", + "integrity": "sha512-dP8AQp/pXlWBjvL0TaPBJC3rM0GoYv7O0Uim8d/7UKZ2Wo13bFI3/BhQfY/1DeiP1m23iCHFNFtOQxfQNBB8rQ==", + "dependencies": { + "@smithy/eventstream-codec": "^2.0.15", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-universal/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/fetch-http-handler": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.3.1.tgz", + "integrity": "sha512-6MNk16fqb8EwcYY8O8WxB3ArFkLZ2XppsSNo1h7SQcFdDDwIumiJeO6wRzm7iB68xvsOQzsdQKbdtTieS3hfSQ==", + "dependencies": { + "@smithy/protocol-http": "^3.0.11", + "@smithy/querystring-builder": "^2.0.15", + "@smithy/types": "^2.7.0", + "@smithy/util-base64": "^2.0.1", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/fetch-http-handler/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/hash-blob-browser": { + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.16.tgz", + "integrity": "sha512-cSYRi05LA7DZDwjB1HL0BP8B56eUNNeLglVH147QTXFyuXJq/7erAIiLRfsyXB8+GfFHkSS5BHbc76a7k/AYPA==", + "dependencies": { + "@smithy/chunked-blob-reader": "^2.0.0", + "@smithy/chunked-blob-reader-native": "^2.0.1", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/hash-blob-browser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/hash-node": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.17.tgz", + "integrity": "sha512-Il6WuBcI1nD+e2DM7tTADMf01wEPGK8PAhz4D+YmDUVaoBqlA+CaH2uDJhiySifmuKBZj748IfygXty81znKhw==", + "dependencies": { + "@smithy/types": "^2.7.0", + "@smithy/util-buffer-from": "^2.0.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/hash-node/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/hash-stream-node": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.0.17.tgz", + "integrity": "sha512-ey8DtnATzp1mOXgS7rqMwSmAki6iJA+jgNucKcxRkhMB1rrICfHg+rhmIF50iLPDHUhTcS5pBMOrLzzpZftvNQ==", + "dependencies": { + "@smithy/types": "^2.7.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/hash-stream-node/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/invalid-dependency": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.15.tgz", + "integrity": "sha512-dlEKBFFwVfzA5QroHlBS94NpgYjXhwN/bFfun+7w3rgxNvVy79SK0w05iGc7UAeC5t+D7gBxrzdnD6hreZnDVQ==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/invalid-dependency/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/is-array-buffer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.0.0.tgz", + "integrity": "sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/is-array-buffer/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/md5-js": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.0.17.tgz", + "integrity": "sha512-jmISTCnEkOnm2oCNx/rMkvBT/eQh3aA6nktevkzbmn/VYqYEuc5Z2n5sTTqsciMSO01Lvf56wG1A4twDqovYeQ==", + "dependencies": { + "@smithy/types": "^2.7.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/md5-js/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/middleware-content-length": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.17.tgz", + "integrity": "sha512-OyadvMcKC7lFXTNBa8/foEv7jOaqshQZkjWS9coEXPRZnNnihU/Ls+8ZuJwGNCOrN2WxXZFmDWhegbnM4vak8w==", + "dependencies": { + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-content-length/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/middleware-endpoint": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.2.3.tgz", + "integrity": "sha512-nYfxuq0S/xoAjdLbyn1ixeVB6cyH9wYCMtbbOCpcCRYR5u2mMtqUtVjjPAZ/DIdlK3qe0tpB0Q76szFGNuz+kQ==", + "dependencies": { + "@smithy/middleware-serde": "^2.0.15", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/shared-ini-file-loader": "^2.2.7", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-middleware": "^2.0.8", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-endpoint/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/middleware-retry": { + "version": "2.0.24", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.24.tgz", + "integrity": "sha512-q2SvHTYu96N7lYrn3VSuX3vRpxXHR/Cig6MJpGWxd0BWodUQUWlKvXpWQZA+lTaFJU7tUvpKhRd4p4MU3PbeJg==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/protocol-http": "^3.0.11", + "@smithy/service-error-classification": "^2.0.8", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/util-middleware": "^2.0.8", + "@smithy/util-retry": "^2.0.8", + "tslib": "^2.5.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-retry/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/middleware-retry/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@smithy/middleware-serde": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.15.tgz", + "integrity": "sha512-FOZRFk/zN4AT4wzGuBY+39XWe+ZnCFd0gZtyw3f9Okn2CJPixl9GyWe98TIaljeZdqWkgrzGyPre20AcW2UMHQ==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-serde/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/middleware-stack": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.9.tgz", + "integrity": "sha512-bCB5dUtGQ5wh7QNL2ELxmDc6g7ih7jWU3Kx6MYH1h4mZbv9xL3WyhKHojRltThCB1arLPyTUFDi+x6fB/oabtA==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-stack/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/node-config-provider": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.8.tgz", + "integrity": "sha512-+w26OKakaBUGp+UG+dxYZtFb5fs3tgHg3/QrRrmUZj+rl3cIuw840vFUXX35cVPTUCQIiTqmz7CpVF7+hdINdQ==", + "dependencies": { + "@smithy/property-provider": "^2.0.16", + "@smithy/shared-ini-file-loader": "^2.2.7", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/node-config-provider/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/node-http-handler": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.2.1.tgz", + "integrity": "sha512-8iAKQrC8+VFHPAT8pg4/j6hlsTQh+NKOWlctJBrYtQa4ExcxX7aSg3vdQ2XLoYwJotFUurg/NLqFCmZaPRrogw==", + "dependencies": { + "@smithy/abort-controller": "^2.0.15", + "@smithy/protocol-http": "^3.0.11", + "@smithy/querystring-builder": "^2.0.15", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/node-http-handler/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/property-provider": { + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.16.tgz", + "integrity": "sha512-28Ky0LlOqtEjwg5CdHmwwaDRHcTWfPRzkT6HrhwOSRS2RryAvuDfJrZpM+BMcrdeCyEg1mbcgIMoqTla+rdL8Q==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/property-provider/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/protocol-http": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.11.tgz", + "integrity": "sha512-3ziB8fHuXIRamV/akp/sqiWmNPR6X+9SB8Xxnozzj+Nq7hSpyKdFHd1FLpBkgfGFUTzzcBJQlDZPSyxzmdcx5A==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/protocol-http/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/querystring-builder": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.15.tgz", + "integrity": "sha512-e1q85aT6HutvouOdN+dMsN0jcdshp50PSCvxDvo6aIM57LqeXimjfONUEgfqQ4IFpYWAtVixptyIRE5frMp/2A==", + "dependencies": { + "@smithy/types": "^2.7.0", + "@smithy/util-uri-escape": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/querystring-builder/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/querystring-parser": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.15.tgz", + "integrity": "sha512-jbBvoK3cc81Cj1c1TH1qMYxNQKHrYQ2DoTntN9FBbtUWcGhc+T4FP6kCKYwRLXyU4AajwGIZstvNAmIEgUUNTQ==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/querystring-parser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/service-error-classification": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.8.tgz", + "integrity": "sha512-jCw9+005im8tsfYvwwSc4TTvd29kXRFkH9peQBg5R/4DD03ieGm6v6Hpv9nIAh98GwgYg1KrztcINC1s4o7/hg==", + "dependencies": { + "@smithy/types": "^2.7.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/shared-ini-file-loader": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.7.tgz", + "integrity": "sha512-0Qt5CuiogIuvQIfK+be7oVHcPsayLgfLJGkPlbgdbl0lD28nUKu4p11L+UG3SAEsqc9UsazO+nErPXw7+IgDpQ==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/shared-ini-file-loader/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/signature-v4": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.18.tgz", + "integrity": "sha512-SJRAj9jT/l9ocm8D0GojMbnA1sp7I4JeStOQ4lEXI8A5eHE73vbjlzlqIFB7cLvIgau0oUl4cGVpF9IGCrvjlw==", + "dependencies": { + "@smithy/eventstream-codec": "^2.0.15", + "@smithy/is-array-buffer": "^2.0.0", + "@smithy/types": "^2.7.0", + "@smithy/util-hex-encoding": "^2.0.0", + "@smithy/util-middleware": "^2.0.8", + "@smithy/util-uri-escape": "^2.0.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/signature-v4/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/smithy-client": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.18.tgz", + "integrity": "sha512-7FqdbaJiVaHJDD9IfDhmzhSDbpjyx+ZsfdYuOpDJF09rl8qlIAIlZNoSaflKrQ3cEXZN2YxGPaNWGhbYimyIRQ==", + "dependencies": { + "@smithy/middleware-stack": "^2.0.9", + "@smithy/types": "^2.7.0", + "@smithy/util-stream": "^2.0.23", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/smithy-client/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/types": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.7.0.tgz", + "integrity": "sha512-1OIFyhK+vOkMbu4aN2HZz/MomREkrAC/HqY5mlJMUJfGrPRwijJDTeiN8Rnj9zUaB8ogXAfIOtZrrgqZ4w7Wnw==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/types/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/url-parser": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.15.tgz", + "integrity": "sha512-sADUncUj9rNbOTrdDGm4EXlUs0eQ9dyEo+V74PJoULY4jSQxS+9gwEgsPYyiu8PUOv16JC/MpHonOgqP/IEDZA==", + "dependencies": { + "@smithy/querystring-parser": "^2.0.15", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/url-parser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-base64": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.0.1.tgz", + "integrity": "sha512-DlI6XFYDMsIVN+GH9JtcRp3j02JEVuWIn/QOZisVzpIAprdsxGveFed0bjbMRCqmIFe8uetn5rxzNrBtIGrPIQ==", + "dependencies": { + "@smithy/util-buffer-from": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-base64/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-body-length-browser": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.1.tgz", + "integrity": "sha512-NXYp3ttgUlwkaug4bjBzJ5+yIbUbUx8VsSLuHZROQpoik+gRkIBeEG9MPVYfvPNpuXb/puqodeeUXcKFe7BLOQ==", + "dependencies": { + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/util-body-length-browser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-body-length-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.1.0.tgz", + "integrity": "sha512-/li0/kj/y3fQ3vyzn36NTLGmUwAICb7Jbe/CsWCktW363gh1MOcpEcSO3mJ344Gv2dqz8YJCLQpb6hju/0qOWw==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-body-length-node/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-buffer-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.0.0.tgz", + "integrity": "sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==", + "dependencies": { + "@smithy/is-array-buffer": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-buffer-from/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-config-provider": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.0.0.tgz", + "integrity": "sha512-xCQ6UapcIWKxXHEU4Mcs2s7LcFQRiU3XEluM2WcCjjBtQkUN71Tb+ydGmJFPxMUrW/GWMgQEEGipLym4XG0jZg==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-config-provider/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-defaults-mode-browser": { + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.22.tgz", + "integrity": "sha512-qcF20IHHH96FlktvBRICDXDhLPtpVmtksHmqNGtotb9B0DYWXsC6jWXrkhrrwF7tH26nj+npVTqh9isiFV1gdA==", + "dependencies": { + "@smithy/property-provider": "^2.0.16", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "bowser": "^2.11.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-browser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-defaults-mode-node": { + "version": "2.0.29", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.29.tgz", + "integrity": "sha512-+uG/15VoUh6JV2fdY9CM++vnSuMQ1VKZ6BdnkUM7R++C/vLjnlg+ToiSR1FqKZbMmKBXmsr8c/TsDWMAYvxbxQ==", + "dependencies": { + "@smithy/config-resolver": "^2.0.21", + "@smithy/credential-provider-imds": "^2.1.4", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/property-provider": "^2.0.16", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-node/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-endpoints": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.0.7.tgz", + "integrity": "sha512-Q2gEind3jxoLk6hdKWyESMU7LnXz8aamVwM+VeVjOYzYT1PalGlY/ETa48hv2YpV4+YV604y93YngyzzzQ4IIA==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" }, "engines": { - "node": ">= 8" + "node": ">= 14.0.0" } }, - "node_modules/@pkgr/utils": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", - "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", - "dev": true, + "node_modules/@smithy/util-endpoints/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-hex-encoding": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.0.0.tgz", + "integrity": "sha512-c5xY+NUnFqG6d7HFh1IFfrm3mGl29lC+vF+geHv4ToiuJCBmIfzx6IeHLg+OgRdPFKDXIw6pvi+p3CsscaMcMA==", "dependencies": { - "cross-spawn": "^7.0.3", - "fast-glob": "^3.3.0", - "is-glob": "^4.0.3", - "open": "^9.1.0", - "picocolors": "^1.0.0", - "tslib": "^2.6.0" + "tslib": "^2.5.0" }, "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" + "node": ">=14.0.0" } }, - "node_modules/@pkgr/utils/node_modules/tslib": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", - "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", - "dev": true + "node_modules/@smithy/util-hex-encoding/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, - "node_modules/@redis/bloom": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-1.2.0.tgz", - "integrity": "sha512-HG2DFjYKbpNmVXsa0keLHp/3leGJz1mjh09f2RLGGLQZzSHpkmZWuwJbAvo3QcRY8p80m5+ZdXZdYOSBLlp7Cg==", - "peerDependencies": { - "@redis/client": "^1.0.0" + "node_modules/@smithy/util-middleware": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.8.tgz", + "integrity": "sha512-qkvqQjM8fRGGA8P2ydWylMhenCDP8VlkPn8kiNuFEaFz9xnUKC2irfqsBSJrfrOB9Qt6pQsI58r3zvvumhFMkw==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@redis/client": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.5.8.tgz", - "integrity": "sha512-xzElwHIO6rBAqzPeVnCzgvrnBEcFL1P0w8P65VNLRkdVW8rOE58f52hdj0BDgmsdOm4f1EoXPZtH4Fh7M/qUpw==", + "node_modules/@smithy/util-middleware/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-retry": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.8.tgz", + "integrity": "sha512-cQTPnVaVFMjjS6cb44WV2yXtHVyXDC5icKyIbejMarJEApYeJWpBU3LINTxHqp/tyLI+MZOUdosr2mZ3sdziNg==", "dependencies": { - "cluster-key-slot": "1.1.2", - "generic-pool": "3.9.0", - "yallist": "4.0.0" + "@smithy/service-error-classification": "^2.0.8", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" }, "engines": { - "node": ">=14" + "node": ">= 14.0.0" } }, - "node_modules/@redis/graph": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@redis/graph/-/graph-1.1.0.tgz", - "integrity": "sha512-16yZWngxyXPd+MJxeSr0dqh2AIOi8j9yXKcKCwVaKDbH3HTuETpDVPcLujhFYVPtYrngSco31BUcSa9TH31Gqg==", - "peerDependencies": { - "@redis/client": "^1.0.0" - } + "node_modules/@smithy/util-retry/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, - "node_modules/@redis/json": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@redis/json/-/json-1.0.4.tgz", - "integrity": "sha512-LUZE2Gdrhg0Rx7AN+cZkb1e6HjoSKaeeW8rYnt89Tly13GBI5eP4CwDVr+MY8BAYfCg4/N15OUrtLoona9uSgw==", - "peerDependencies": { - "@redis/client": "^1.0.0" + "node_modules/@smithy/util-stream": { + "version": "2.0.23", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.23.tgz", + "integrity": "sha512-OJMWq99LAZJUzUwTk+00plyxX3ESktBaGPhqNIEVab+53gLULiWN9B/8bRABLg0K6R6Xg4t80uRdhk3B/LZqMQ==", + "dependencies": { + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/types": "^2.7.0", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-buffer-from": "^2.0.0", + "@smithy/util-hex-encoding": "^2.0.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@redis/search": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@redis/search/-/search-1.1.3.tgz", - "integrity": "sha512-4Dg1JjvCevdiCBTZqjhKkGoC5/BcB7k9j99kdMnaXFXg8x4eyOIVg9487CMv7/BUVkFLZCaIh8ead9mU15DNng==", - "peerDependencies": { - "@redis/client": "^1.0.0" - } + "node_modules/@smithy/util-stream/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, - "node_modules/@redis/time-series": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-1.0.4.tgz", - "integrity": "sha512-ThUIgo2U/g7cCuZavucQTQzA9g9JbDDY2f64u3AbAoz/8vE2lt2U37LamDUVChhaDA3IRT9R6VvJwqnUfTJzng==", - "peerDependencies": { - "@redis/client": "^1.0.0" + "node_modules/@smithy/util-uri-escape": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.0.0.tgz", + "integrity": "sha512-ebkxsqinSdEooQduuk9CbKcI+wheijxEb3utGXkCoYQkJnwTnLbH1JXGimJtUkQwNQbsbuYwG2+aFVyZf5TLaw==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true + "node_modules/@smithy/util-uri-escape/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, - "node_modules/@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", - "dev": true, + "node_modules/@smithy/util-utf8": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.2.tgz", + "integrity": "sha512-qOiVORSPm6Ce4/Yu6hbSgNHABLP2VMv8QOC3tTDNHHlWY19pPyc++fBTbZPtx6egPXi4HQxKDnMxVxpbtX2GoA==", "dependencies": { - "type-detect": "4.0.8" + "@smithy/util-buffer-from": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "dev": true, + "node_modules/@smithy/util-utf8/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-waiter": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.15.tgz", + "integrity": "sha512-9Y+btzzB7MhLADW7xgD6SjvmoYaRkrb/9SCbNGmNdfO47v38rxb90IGXyDtAK0Shl9bMthTmLgjlfYc+vtz2Qw==", "dependencies": { - "@sinonjs/commons": "^3.0.0" + "@smithy/abort-controller": "^2.0.15", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, + "node_modules/@smithy/util-waiter/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -1640,8 +3484,7 @@ "node_modules/@types/node": { "version": "20.3.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz", - "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==", - "dev": true + "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==" }, "node_modules/@types/node-fetch": { "version": "2.6.4", @@ -2074,7 +3917,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -2083,7 +3925,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -2258,6 +4099,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -2265,26 +4107,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/aws-sdk": { - "version": "2.1402.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1402.0.tgz", - "integrity": "sha512-ndyx3H+crHPIXJF+SO1dqzzBmQwMdoB9uCND/Ip4Ozfv5jse7X58LWpWucM9KBctQ8o37c8KvXjfTr14lE3ykA==", - "dependencies": { - "buffer": "4.9.2", - "events": "1.1.1", - "ieee754": "1.1.13", - "jmespath": "0.16.0", - "querystring": "0.2.0", - "sax": "1.2.1", - "url": "0.10.3", - "util": "^0.12.4", - "uuid": "8.0.0", - "xml2js": "0.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/babel-jest": { "version": "29.6.2", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.6.2.tgz", @@ -2382,30 +4204,10 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/big-integer": { "version": "1.6.51", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", - "dev": true, "engines": { "node": ">=0.6" } @@ -2451,6 +4253,11 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, + "node_modules/bowser": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==" + }, "node_modules/bplist-parser": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", @@ -2538,16 +4345,6 @@ "node-int64": "^0.4.0" } }, - "node_modules/buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -2694,7 +4491,6 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -2732,7 +4528,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -2743,8 +4538,7 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/combined-stream": { "version": "1.0.8", @@ -3038,8 +4832,7 @@ "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/encodeurl": { "version": "1.0.2", @@ -3155,7 +4948,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, "engines": { "node": ">=6" } @@ -3631,14 +5423,6 @@ "node": ">= 0.6" } }, - "node_modules/events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==", - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/execa": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", @@ -3802,6 +5586,27 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fast-xml-parser": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz", + "integrity": "sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==", + "funding": [ + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + }, + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -3913,6 +5718,7 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, "dependencies": { "is-callable": "^1.1.3" } @@ -4020,7 +5826,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -4162,6 +5967,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -4248,6 +6054,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, "dependencies": { "has-symbols": "^1.0.2" }, @@ -4299,11 +6106,6 @@ "node": ">=0.10.0" } }, - "node_modules/ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" - }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -4394,21 +6196,6 @@ "node": ">= 0.10" } }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -4461,6 +6248,7 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -4523,7 +6311,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, "engines": { "node": ">=8" } @@ -4537,20 +6324,6 @@ "node": ">=6" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -4700,6 +6473,7 @@ "version": "1.1.10", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", @@ -4753,11 +6527,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -5492,14 +7261,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/jmespath": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz", - "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==", - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -5612,6 +7373,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -5624,6 +7390,11 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -5835,6 +7606,17 @@ "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, + "node_modules/node-sql-parser": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/node-sql-parser/-/node-sql-parser-4.15.0.tgz", + "integrity": "sha512-zckPbcES2qfR5WqlL+p1s6TualZCUxYO4xtvMUpoYvTJA8BmG0W55Hd8sJJYTKN/8OmxqgwOK68rUId+qWl6UA==", + "dependencies": { + "big-integer": "^1.6.48" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -6483,6 +8265,29 @@ "node": ">= 6" } }, + "node_modules/protobufjs": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -6495,11 +8300,6 @@ "node": ">= 0.10" } }, - "node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" - }, "node_modules/pure-rand": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz", @@ -6530,15 +8330,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -6621,7 +8412,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -6896,11 +8686,6 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "node_modules/sax": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", - "integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==" - }, "node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -7110,7 +8895,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -7169,7 +8953,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -7210,6 +8993,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -7449,8 +9237,7 @@ "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/tsutils": { "version": "3.21.0", @@ -7670,27 +9457,6 @@ "node": ">=6" } }, - "node_modules/url": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "integrity": "sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==", - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", @@ -7699,14 +9465,6 @@ "node": ">= 0.4.0" } }, - "node_modules/uuid": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", - "integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -7852,6 +9610,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "dev": true, "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", @@ -7870,7 +9629,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -7902,26 +9660,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/xml2js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", - "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "engines": { - "node": ">=4.0" - } - }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -7934,7 +9672,6 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, "engines": { "node": ">=10" } @@ -7948,7 +9685,6 @@ "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -7966,7 +9702,6 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, "engines": { "node": ">=12" } diff --git a/runner/package.json b/runner/package.json index 213cc4e53..1d0e4402b 100644 --- a/runner/package.json +++ b/runner/package.json @@ -7,11 +7,12 @@ "node": "18.17" }, "scripts": { - "build": "rm -rf ./dist && tsc", + "build": "rm -rf ./dist && npm run codegen && tsc", + "codegen": "rm -rf ./src/generated && proto-loader-gen-types --longs=String --enums=String --defaults --oneofs --grpcLib=@grpc/grpc-js --outDir=src/generated/ protos/runner.proto", "start": "npm run build && node dist/index.js", "start:dev": "ts-node ./src/index.ts", "start:docker": "node dist/index.js", - "test": "node --experimental-vm-modules ./node_modules/.bin/jest", + "test": "npm run codegen && node --experimental-vm-modules ./node_modules/.bin/jest", "lint": "eslint -c .eslintrc.js" }, "keywords": [], @@ -43,8 +44,11 @@ }, "dependencies": { "@aws-sdk/client-s3": "^3.414.0", + "@grpc/grpc-js": "^1.9.12", + "@grpc/proto-loader": "^0.7.10", "@near-lake/primitives": "^0.1.0", "express": "^4.18.2", + "long": "^5.2.3", "node-fetch": "^2.6.11", "node-sql-parser": "^4.10.0", "pg": "^8.11.1", diff --git a/runner/protos/runner.proto b/runner/protos/runner.proto new file mode 100644 index 000000000..16c365ddc --- /dev/null +++ b/runner/protos/runner.proto @@ -0,0 +1,56 @@ +syntax = "proto3"; +package spec; + +service Runner { + // Starts a new Runner executor + rpc StartExecutor (StartExecutorRequest) returns (StartExecutorResponse); + + // Stops an existing Runner executor + rpc StopExecutor (StopExecutorRequest) returns (StopExecutorResponse); + + // Lists all Runner executor + rpc ListExecutors (ListExecutorsRequest) returns (ListExecutorsResponse); +} + +// Start Executor Request +message StartExecutorRequest { + string executor_id = 1; + string redis_stream = 2; + string account_id = 3; + string function_name = 4; + string code = 5; + string schema = 6; +} + +// Start Executor Response +message StartExecutorResponse { + string executor_id = 1; +} + +// Stop Executor Request +message StopExecutorRequest { + string executor_id = 1; +} + +// Stop Executor Response +message StopExecutorResponse { + string executor_id = 1; +} + +// List Executor Request +message ListExecutorsRequest { +} + +// List Executor Response +message ListExecutorsResponse { + // List of all executors, including stopped or crashed ones + repeated ExecutorInfo executors = 1; +} + +// Information about a single BlockExecutor instance. +message ExecutorInfo { + string executor_id = 1; + string account_id = 2; + string function_name = 3; + string status = 4; +} diff --git a/runner/src/index.ts b/runner/src/index.ts index a483a9336..a4f0d4070 100644 --- a/runner/src/index.ts +++ b/runner/src/index.ts @@ -2,14 +2,14 @@ import { startServer as startMetricsServer } from './metrics'; import RedisClient from './redis-client'; import StreamHandler from './stream-handler'; +const STREAM_HANDLER_THROTTLE_MS = 500; + const redisClient = new RedisClient(); startMetricsServer().catch((err) => { console.error('Failed to start metrics server', err); }); -const STREAM_HANDLER_THROTTLE_MS = 500; - type StreamHandlers = Record; void (async function main () { diff --git a/runner/src/server/index.ts b/runner/src/server/index.ts new file mode 100644 index 000000000..c543aa657 --- /dev/null +++ b/runner/src/server/index.ts @@ -0,0 +1 @@ +export { default } from './runner-server'; diff --git a/runner/src/server/runner-client.ts b/runner/src/server/runner-client.ts new file mode 100644 index 000000000..a7325104b --- /dev/null +++ b/runner/src/server/runner-client.ts @@ -0,0 +1,15 @@ +import * as grpc from '@grpc/grpc-js'; +import * as protoLoader from '@grpc/proto-loader'; +import { type ProtoGrpcType } from '../generated/runner'; +import { type RunnerClient } from '../generated/spec/Runner'; + +// TODO: Replace this client with a Rust client + +const PROTO_PATH = 'protos/runner.proto'; + +const packageDefinition = protoLoader.loadSync(PROTO_PATH); +const runner = (grpc.loadPackageDefinition(packageDefinition) as unknown) as ProtoGrpcType; +// TODO: Use secure creds with env variable Port number +const runnerClient: RunnerClient = new runner.spec.Runner('localhost:50007', grpc.credentials.createInsecure()); + +export default runnerClient; diff --git a/runner/src/server/runner-server.ts b/runner/src/server/runner-server.ts new file mode 100644 index 000000000..ff72fd46a --- /dev/null +++ b/runner/src/server/runner-server.ts @@ -0,0 +1,32 @@ +import * as grpc from '@grpc/grpc-js'; +import * as protoLoader from '@grpc/proto-loader'; +import getRunnerService from './runner-service'; +import { type ProtoGrpcType } from '../generated/runner'; +import StreamHandler from '../stream-handler/stream-handler'; + +const PROTO_PATH = 'protos/runner.proto'; + +export default function startRunnerServer (): grpc.Server { + const packageDefinition = protoLoader.loadSync(PROTO_PATH); + const runnerProto = (grpc.loadPackageDefinition( + packageDefinition + ) as unknown) as ProtoGrpcType; + + const server = new grpc.Server(); + server.addService(runnerProto.spec.Runner.service, getRunnerService(StreamHandler)); + const credentials = grpc.ServerCredentials; + + server.bindAsync( + '0.0.0.0:50007', // TODO: Read port from ENV + credentials.createInsecure(), // TODO: Use secure credentials with allow for Coordinator + (err: Error | null, port: number) => { + if (err) { + console.error(`Server error: ${err.message}`); + } else { + console.log(`Server bound on port: ${port}`); + server.start(); + } + } + ); + return server; +} diff --git a/runner/src/server/runner-service.test.ts b/runner/src/server/runner-service.test.ts new file mode 100644 index 000000000..2e9a27fd6 --- /dev/null +++ b/runner/src/server/runner-service.test.ts @@ -0,0 +1,342 @@ +import { type RunnerHandlers } from '../generated/spec/Runner'; +import type StreamHandler from '../stream-handler/stream-handler'; +import getRunnerService from './runner-service'; +import * as grpc from '@grpc/grpc-js'; + +const BASIC_EXECUTOR_ID = 'test-executor-id'; +const BASIC_REDIS_STREAM = 'test-redis-stream'; +const BASIC_ACCOUNT_ID = 'test-account-id'; +const BASIC_FUNCTION_NAME = 'test-function-name'; +const BASIC_CODE = 'test-code'; +const BASIC_SCHEMA = 'test-schema'; +const BASIC_INDEXER_CONFIG = { + account_id: BASIC_ACCOUNT_ID, + function_name: BASIC_FUNCTION_NAME, + code: BASIC_CODE, + schema: BASIC_SCHEMA, +}; + +describe('Runner gRPC Service', () => { + let genericStreamHandlerType: typeof StreamHandler; + beforeEach(() => { + genericStreamHandlerType = jest.fn().mockImplementation((...args) => { + return { + updateIndexerConfig: jest.fn(), + indexerConfig: { account_id: args[1].account_id, function_name: args[1].function_name } + }; + }); + }); + + it('starts a executor with correct settings', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + + service.StartExecutor(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledWith(BASIC_REDIS_STREAM, BASIC_INDEXER_CONFIG); + expect(mockCallback).toHaveBeenCalledWith(null, { executorId: BASIC_EXECUTOR_ID }); + }); + + it('Invalid start executor request with empty executor Id', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest('', BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + + service.StartExecutor(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid executorId. It must be a non-empty string.' + }, null); + }); + + it('Invalid start executor request with missing redis stream Id parameter', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest(BASIC_EXECUTOR_ID, undefined, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + + service.StartExecutor(request, mockCallback); + + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid redisStream. It must be a non-empty string.' + }, null); + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + }); + + it('Invalid start executor request with missing config parameters', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + let request = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, undefined, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + service.StartExecutor(request, mockCallback); + + request = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, '', BASIC_CODE, BASIC_SCHEMA); + service.StartExecutor(request, mockCallback); + + request = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, undefined, BASIC_SCHEMA); + service.StartExecutor(request, mockCallback); + + request = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, ''); + service.StartExecutor(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + expect(mockCallback.mock.calls).toEqual([ + [{ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid accountId. It must be a non-empty string.' + }, null], + [{ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid functionName. It must be a non-empty string.' + }, null], + [{ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid code. It must be a non-empty string.' + }, null], + [{ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid schema. It must be a non-empty string.' + }, null] + ]); + }); + + it('starts a executor twice with correct settings, gets error second time', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const startRequest = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + + service.StartExecutor(startRequest, mockCallback); + service.StartExecutor(startRequest, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(1); + expect(genericStreamHandlerType).toHaveBeenCalledWith(BASIC_REDIS_STREAM, BASIC_INDEXER_CONFIG); + expect(mockCallback.mock.calls).toEqual([ + [null, { executorId: BASIC_EXECUTOR_ID }], + [{ + code: grpc.status.ALREADY_EXISTS, + message: `Executor ${BASIC_EXECUTOR_ID} can't be started as it already exists.` + }, null] + ]); + }); + + it('stops a executor with correct settings', async () => { + const stop = jest.fn().mockImplementation(async () => { + await Promise.resolve(); + }); + const streamHandlerType = jest.fn().mockImplementation(() => { + return { stop }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const requestA = generateRequest(BASIC_EXECUTOR_ID + '-A', BASIC_REDIS_STREAM + '-A', BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + const requestB = generateRequest(BASIC_EXECUTOR_ID + '-B', BASIC_REDIS_STREAM + '-B', BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + + service.StartExecutor(requestA, mockCallback); + service.StartExecutor(requestB, mockCallback); + + const stopRequest = generateRequest(BASIC_EXECUTOR_ID + '-A', undefined, undefined); // Stops executor A + + await new Promise((resolve, reject) => { + service.StopExecutor(stopRequest, function (err, response) { + if (err) { + reject(err); return; + } + mockCallback(err, response); + resolve(response); + }); + }); + + service.StartExecutor(requestA, mockCallback); + + expect(streamHandlerType).toHaveBeenCalledTimes(3); + expect(stop).toHaveBeenCalledTimes(1); + expect(mockCallback.mock.calls).toEqual([ + [null, { executorId: BASIC_EXECUTOR_ID + '-A' }], // Start A + [null, { executorId: BASIC_EXECUTOR_ID + '-B' }], // Start B + [null, { executorId: BASIC_EXECUTOR_ID + '-A' }], // Stop A + [null, { executorId: BASIC_EXECUTOR_ID + '-A' }], // Stop B + ]); + }); + + it('Invalid stop executor request with empty executor Id', () => { + const stop = jest.fn().mockImplementation(async () => { + await Promise.resolve(); + }); + const streamHandlerType = jest.fn().mockImplementation(() => { + return { stop }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest(''); + + service.StopExecutor(request, mockCallback); + + expect(stop).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid executorId. It must be a non-empty string.' + }, null); + }); + + it('Invalid stop executor request with non-existent executor', () => { + const stop = jest.fn().mockImplementation(async () => { + await Promise.resolve(); + }); + const streamHandlerType = jest.fn().mockImplementation(() => { + return { stop }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest(BASIC_EXECUTOR_ID, undefined, undefined); + + service.StopExecutor(request, mockCallback); + + expect(stop).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: `Executor ${BASIC_EXECUTOR_ID} cannot be stopped as it does not exist.` + }, null); + }); + + it('Invalid stop executor request with somehow failing stop', async () => { + const stop = jest.fn().mockImplementation(async () => { + await Promise.reject(new Error('somehow fails')); + }); + const streamHandlerType = jest.fn().mockImplementation(() => { + return { stop }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const startRequest = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + const stopRequest = generateRequest(BASIC_EXECUTOR_ID, undefined, undefined); + + service.StartExecutor(startRequest, mockCallback); + + await new Promise((resolve, reject) => { + service.StopExecutor(stopRequest, function (err, response) { + if (err) { // Should get somehow fails error + mockCallback(err, response); + resolve(err.details); return; + } + reject(err); + }); + }); + + expect(stop).toHaveBeenCalledTimes(1); + expect(mockCallback.mock.calls).toEqual([ + [null, { executorId: BASIC_EXECUTOR_ID }], + [{ + code: grpc.status.INTERNAL, + message: 'somehow fails' + }, null] + ]); + }); + + it('valid list executor request lists executors correctly', async () => { + const stop = jest.fn().mockImplementation(async () => { + await Promise.resolve(); + }); + const streamHandlerType = jest.fn().mockImplementation((...args) => { + return { + stop, + indexerConfig: { account_id: args[1].account_id, function_name: args[1].function_name }, + }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const requestA = generateRequest(BASIC_EXECUTOR_ID + '-A', BASIC_REDIS_STREAM + '-A', BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + const requestB = generateRequest(BASIC_EXECUTOR_ID + '-B', BASIC_REDIS_STREAM + '-B', BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + const listRequest = generateRequest(undefined, undefined, undefined); + const stopRequest = generateRequest(BASIC_EXECUTOR_ID + '-A', undefined, undefined); // Stops executor A + + await listExecutorsPromise(listRequest, service, mockCallback); + + service.StartExecutor(requestA, mockCallback); + + await listExecutorsPromise(listRequest, service, mockCallback); + + service.StartExecutor(requestB, mockCallback); + + await listExecutorsPromise(listRequest, service, mockCallback); + + await new Promise((resolve, reject) => { + service.StopExecutor(stopRequest, function (err, response) { + if (err) { + reject(err); return; + } + mockCallback(err, response); + resolve(response); + }); + }); + + await listExecutorsPromise(listRequest, service, mockCallback); + + service.StartExecutor(requestA, mockCallback); + + await listExecutorsPromise(listRequest, service, mockCallback); + + expect(streamHandlerType).toHaveBeenCalledTimes(3); + expect(stop).toHaveBeenCalledTimes(1); + const emptyList: never[] = []; + const oneExecutorList = [{ + executorId: BASIC_EXECUTOR_ID + '-A', + accountId: BASIC_INDEXER_CONFIG.account_id, + functionName: BASIC_INDEXER_CONFIG.function_name, + status: 'RUNNING' + }]; + const twoExecutorList = [{ + executorId: BASIC_EXECUTOR_ID + '-A', + accountId: BASIC_INDEXER_CONFIG.account_id, + functionName: BASIC_INDEXER_CONFIG.function_name, + status: 'RUNNING' + }, + { + executorId: BASIC_EXECUTOR_ID + '-B', + accountId: BASIC_INDEXER_CONFIG.account_id, + functionName: BASIC_INDEXER_CONFIG.function_name, + status: 'RUNNING' + }]; + expect(mockCallback.mock.calls[0][1]).toEqual({ executors: emptyList }); + expect(mockCallback.mock.calls[2][1]).toEqual({ executors: oneExecutorList }); + expect(mockCallback.mock.calls[4][1]).toEqual({ executors: twoExecutorList }); + oneExecutorList[0].executorId = BASIC_EXECUTOR_ID + '-B'; + expect(mockCallback.mock.calls[6][1]).toEqual({ executors: oneExecutorList }); // After stop was called + twoExecutorList[0].executorId = BASIC_EXECUTOR_ID + '-B'; + twoExecutorList[1].executorId = BASIC_EXECUTOR_ID + '-A'; + expect(mockCallback.mock.calls[8][1]).toEqual({ executors: twoExecutorList }); // Order is reversed now + }); +}); + +async function listExecutorsPromise (listRequest: any, service: RunnerHandlers, mockCallback: jest.Mock): Promise { + await new Promise((resolve, reject) => { + service.ListExecutors(listRequest, function (err, response) { + if (err) { + reject(err); return; + } + mockCallback(err, response); + resolve(response); + }); + }); +} + +function generateRequest ( + executorId: string | undefined = undefined, + redisStream: string | undefined = undefined, + accountId: string | undefined = undefined, + functionName: string | undefined = undefined, + code: string | undefined = undefined, + schema: string | undefined = undefined): any { + const request = { + ...(executorId !== undefined && { executorId }), + ...(redisStream !== undefined && { redisStream }), + ...(accountId !== undefined && { accountId }), + ...(functionName !== undefined && { functionName }), + ...(code !== undefined && { code }), + ...(schema !== undefined && { schema }), + }; + return { + request + }; +} diff --git a/runner/src/server/runner-service.ts b/runner/src/server/runner-service.ts new file mode 100644 index 000000000..41acd7033 --- /dev/null +++ b/runner/src/server/runner-service.ts @@ -0,0 +1,185 @@ +import { type ServerUnaryCall, type sendUnaryData } from '@grpc/grpc-js'; +import { type RunnerHandlers } from '../generated/spec/Runner'; +import { type StartExecutorResponse__Output, type StartExecutorResponse } from '../generated/spec/StartExecutorResponse'; +import { type StartExecutorRequest__Output } from '../generated/spec/StartExecutorRequest'; +import { type StopExecutorRequest__Output } from '../generated/spec/StopExecutorRequest'; +import { type StopExecutorResponse__Output, type StopExecutorResponse } from '../generated/spec/StopExecutorResponse'; +import { type ListExecutorsRequest__Output } from '../generated/spec/ListExecutorsRequest'; +import { type ListExecutorsResponse__Output, type ListExecutorsResponse } from '../generated/spec/ListExecutorsResponse'; +import { type ExecutorInfo__Output } from '../generated/spec/ExecutorInfo'; +import type StreamHandler from '../stream-handler'; +import * as grpc from '@grpc/grpc-js'; +import assert from 'assert'; + +type StreamHandlers = Map; + +function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandlers { + const streamHandlers: StreamHandlers = new Map(); + + const RunnerService: RunnerHandlers = { + StartExecutor (call: ServerUnaryCall, callback: sendUnaryData): void { + console.log('StartExecutor called on', call.request.executorId); + // Validate request + const validationResult = validateStartExecutorRequest(call.request, streamHandlers); + if (validationResult !== null) { + callback(validationResult, null); + return; + } + + // Handle request + try { + const streamHandler = new StreamHandlerType(call.request.redisStream, { + account_id: call.request.accountId, + function_name: call.request.functionName, + code: call.request.code, + schema: call.request.schema + }); + streamHandlers.set(call.request.executorId, streamHandler); + callback(null, { executorId: call.request.executorId }); + } catch (error) { + callback(handleInternalError(error), null); + } + }, + + StopExecutor (call: ServerUnaryCall, callback: sendUnaryData): void { + console.log('StopExecutor called on', call.request.executorId); + // Validate request + const validationResult = validateStopExecutorRequest(call.request, streamHandlers); + if (validationResult !== null) { + callback(validationResult, null); + return; + } + + // Handle request + const executorId: string = call.request.executorId; + streamHandlers.get(executorId)?.stop() + .then(() => { + streamHandlers.delete(executorId); + callback(null, { executorId }); + }).catch(error => { + const grpcError = handleInternalError(error); + callback(grpcError, null); + }); + }, + + ListExecutors (_: ServerUnaryCall, callback: sendUnaryData): void { + // TODO: Refactor to make use of repeated field + console.log('ListExecutors called'); + // TODO: Return more information than just executorId + const response: ExecutorInfo__Output[] = []; + try { + streamHandlers.forEach((handler, executorId) => { + if (handler.indexerConfig?.account_id === undefined || handler.indexerConfig?.function_name === undefined) { + throw new Error(`Stream handler ${executorId} has no/invalid indexer config.`); + } + response.push({ + executorId, + accountId: handler.indexerConfig?.account_id, + functionName: handler.indexerConfig?.function_name, + status: 'RUNNING' // TODO: Keep updated status in stream handler + }); + }); + callback(null, { + executors: response + }); + } catch (error) { + callback(handleInternalError(error), null); + } + } + }; + return RunnerService; +} + +function handleInternalError (error: unknown): any { + let errorMessage = 'An unknown error occurred'; + + // Check if error is an instance of Error + if (error instanceof Error) { + errorMessage = error.message; + } + return { + code: grpc.status.INTERNAL, + message: errorMessage + }; +} + +function validateStringParameter (parameterName: string, parameterValue: string): any | null { + const grpcError = { + code: grpc.status.INVALID_ARGUMENT, + message: '' + }; + + if (parameterValue === undefined || parameterValue.trim() === '') { + grpcError.message = `Invalid ${parameterName}. It must be a non-empty string.`; + return grpcError; + } + return null; +} + +function validateStartExecutorRequest (request: StartExecutorRequest__Output, streamHandlers: StreamHandlers): any | null { + const grpcError = { + code: grpc.status.INVALID_ARGUMENT, + message: '' + }; + + // Validate request parameters + let validationResult = validateStringParameter('executorId', request.executorId); + if (validationResult !== null) { + return validationResult; + } + + validationResult = validateStringParameter('redisStream', request.redisStream); + if (validationResult !== null) { + return validationResult; + } + + validationResult = validateStringParameter('accountId', request.accountId); + if (validationResult !== null) { + return validationResult; + } + + validationResult = validateStringParameter('functionName', request.functionName); + if (validationResult !== null) { + return validationResult; + } + + validationResult = validateStringParameter('code', request.code); + if (validationResult !== null) { + return validationResult; + } + + validationResult = validateStringParameter('schema', request.schema); + if (validationResult !== null) { + return validationResult; + } + + // Validate executorId uniqueness + if (streamHandlers.get(request.executorId) !== undefined) { + grpcError.message = `Executor ${request.executorId} can't be started as it already exists.`; + grpcError.code = grpc.status.ALREADY_EXISTS; + return grpcError; + } + return null; +} + +function validateStopExecutorRequest (request: StopExecutorRequest__Output, streamHandlers: StreamHandlers): any | null { + const grpcError = { + code: grpc.status.INVALID_ARGUMENT, + message: '' + }; + + // Validate executorId + const validationResult = validateStringParameter('executorId', request.executorId); + if (validationResult !== null) { + return validationResult; + } + assert(request.executorId !== undefined); + if (streamHandlers.get(request.executorId) === undefined) { + grpcError.message = `Executor ${request.executorId} cannot be stopped as it does not exist.`; + return grpcError; + } + + return null; +} + +export default getRunnerService; diff --git a/runner/src/stream-handler/stream-handler.ts b/runner/src/stream-handler/stream-handler.ts index 13ffd600e..953a263a3 100644 --- a/runner/src/stream-handler/stream-handler.ts +++ b/runner/src/stream-handler/stream-handler.ts @@ -3,16 +3,25 @@ import { Worker, isMainThread } from 'worker_threads'; import { registerWorkerMetrics } from '../metrics'; +export interface IndexerConfig { + account_id: string + function_name: string + code: string + schema: string +} + export default class StreamHandler { private readonly worker: Worker; constructor ( - public readonly streamKey: string + public readonly streamKey: string, + public readonly indexerConfig: IndexerConfig | undefined = undefined ) { if (isMainThread) { this.worker = new Worker(path.join(__dirname, 'worker.js'), { workerData: { streamKey, + indexerConfig, }, }); @@ -23,6 +32,10 @@ export default class StreamHandler { } } + async stop (): Promise { + await this.worker.terminate(); + } + private handleError (error: Error): void { console.log(`Encountered error processing stream: ${this.streamKey}, terminating thread`, error); this.worker.terminate().catch(() => { diff --git a/runner/src/stream-handler/worker.ts b/runner/src/stream-handler/worker.ts index 13947d0ad..2b47f40b5 100644 --- a/runner/src/stream-handler/worker.ts +++ b/runner/src/stream-handler/worker.ts @@ -6,6 +6,7 @@ import RedisClient, { type StreamType } from '../redis-client'; import { METRICS } from '../metrics'; import type { Block } from '@near-lake/primitives'; import LakeClient from '../lake-client'; +import { type IndexerConfig } from './stream-handler'; if (isMainThread) { throw new Error('Worker should not be run on main thread'); @@ -26,8 +27,11 @@ interface WorkerContext { const sleep = async (ms: number): Promise => { await new Promise((resolve) => setTimeout(resolve, ms)); }; +let config: IndexerConfig | undefined; + void (async function main () { - const { streamKey } = workerData; + const { streamKey, indexerConfig } = workerData; + config = indexerConfig; const redisClient = new RedisClient(); const workerContext: WorkerContext = { redisClient, @@ -92,7 +96,7 @@ async function blockQueueConsumer (workerContext: WorkerContext, streamKey: stri continue; } const startTime = performance.now(); - const indexerConfig = await workerContext.redisClient.getStreamStorage(streamKey); + const indexerConfig = config ?? await workerContext.redisClient.getStreamStorage(streamKey); indexerName = `${indexerConfig.account_id}/${indexerConfig.function_name}`; const functions = { [indexerName]: { From a6c43d070b8307f0bc37730eda6d1d3ae11a6744 Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Tue, 2 Jan 2024 20:48:44 -0500 Subject: [PATCH 05/32] feat: Create function to validate types and format from SQL schema --- .../Editor/{Editor.js => Editor.jsx} | 0 .../Editor/ResizableLayoutEditor.jsx | 9 ++++++- frontend/src/constants/RegexExp.js | 1 + frontend/src/utils/validators.js | 25 ++++++++++++++++++- 4 files changed, 33 insertions(+), 2 deletions(-) rename frontend/src/components/Editor/{Editor.js => Editor.jsx} (100%) create mode 100644 frontend/src/constants/RegexExp.js diff --git a/frontend/src/components/Editor/Editor.js b/frontend/src/components/Editor/Editor.jsx similarity index 100% rename from frontend/src/components/Editor/Editor.js rename to frontend/src/components/Editor/Editor.jsx diff --git a/frontend/src/components/Editor/ResizableLayoutEditor.jsx b/frontend/src/components/Editor/ResizableLayoutEditor.jsx index 90dfb75e7..47a1a4b4b 100644 --- a/frontend/src/components/Editor/ResizableLayoutEditor.jsx +++ b/frontend/src/components/Editor/ResizableLayoutEditor.jsx @@ -3,6 +3,7 @@ import { MonacoEditorComponent } from "./MonacoEditorComponent"; import { defaultCode, defaultSchema } from "../../utils/formatters"; import { useDragResize } from "../../utils/resize"; import GraphqlPlayground from "./../Playground"; +import { validateSQLSchema } from "@/utils/validators"; // Define styles as separate objects const containerStyle = { @@ -57,6 +58,12 @@ const ResizableEditor = ({ sizeThresholdSecond: 60, }); + const handleOnChangeSchema = (value) => { + + setSchema(value); + validateSQLSchema(value) + } + // Render logic based on fileName const editorComponents = { GraphiQL: () => , @@ -98,7 +105,7 @@ const ResizableEditor = ({ defaultValue={defaultSchema} defaultLanguage="sql" readOnly={isCreateNewIndexer === true ? false : false} - onChange={(text) => setSchema(text)} + onChange={handleOnChangeSchema} handleEditorWillMount={undefined} /> ), diff --git a/frontend/src/constants/RegexExp.js b/frontend/src/constants/RegexExp.js new file mode 100644 index 000000000..787d3b477 --- /dev/null +++ b/frontend/src/constants/RegexExp.js @@ -0,0 +1 @@ +export const CONTRACT_NAME_REGEX = RegExp(/^(\*|([a-z\d]+[-_])*[a-z\d]+)(\.*(\*|([a-z\d]+[-_])*[a-z\d]+))*\.(\w+)$/); diff --git a/frontend/src/utils/validators.js b/frontend/src/utils/validators.js index f16506ac7..73bae1e65 100644 --- a/frontend/src/utils/validators.js +++ b/frontend/src/utils/validators.js @@ -1,4 +1,6 @@ -const CONTRACT_NAME_REGEX = RegExp(/^(\*|([a-z\d]+[-_])*[a-z\d]+)(\.*(\*|([a-z\d]+[-_])*[a-z\d]+))*\.(\w+)$/); +import { formatSQL } from "./formatters"; +import { PgSchemaTypeGen } from "./pgSchemaTypeGen"; +import { CONTRACT_NAME_REGEX } from '../constants/RegexExp'; export function validateContractId(accountId) { return ( @@ -12,3 +14,24 @@ export function validateContractIds(accountIds) { const ids = accountIds.split(',').map(id => id.trim()); return ids.every(accountId => validateContractId(accountId)); } + +/** + * Validates formatting and type generation from a SQL schema. + * + * @param {string} schema - The SQL schema to validate and format. + * @returns {{ data: string | null, error: string | null }} - An object containing the formatted schema and error (if any). + */ +export async function validateSQLSchema(schema) { + const pgSchemaTypeGen = new PgSchemaTypeGen(); + + try { + const formattedSchema = await formatSQL(schema); + pgSchemaTypeGen.generateTypes(formattedSchema); // Sanity check + + return { data: formattedSchema, error: null } + } catch (error) { + + console.error(error.message) + return { data: null, error }; + } +}; \ No newline at end of file From fb96993937a7311b4fd36be5b2e486c2924e0f94 Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Tue, 2 Jan 2024 21:19:31 -0500 Subject: [PATCH 06/32] refactor: Reduce the error states and remove unnecessary Alerts --- frontend/src/components/Editor/Editor.jsx | 237 ++++++++++------------ 1 file changed, 107 insertions(+), 130 deletions(-) diff --git a/frontend/src/components/Editor/Editor.jsx b/frontend/src/components/Editor/Editor.jsx index 75c478c72..5efbb3b07 100644 --- a/frontend/src/components/Editor/Editor.jsx +++ b/frontend/src/components/Editor/Editor.jsx @@ -22,6 +22,7 @@ import { ForkIndexerModal } from "../Modals/ForkIndexerModal"; import { getLatestBlockHeight } from "../../utils/getLatestBlockHeight"; import { IndexerDetailsContext } from '../../contexts/IndexerDetailsContext'; import { PgSchemaTypeGen } from "../../utils/pgSchemaTypeGen"; +import { validateSQLSchema } from "@/utils/validators"; const BLOCKHEIGHT_LIMIT = 3600; @@ -49,9 +50,7 @@ const Editor = ({ }`; const [blockHeightError, setBlockHeightError] = useState(undefined); - const [codeFormattingError, setCodeFormattingError] = useState(undefined); - const [schemaFormattingError, setSchemaFormattingError] = useState(undefined); - const [typesGenerationError, setTypesGenerationError] = useState(undefined); + const [error, setError] = useState(); const [fileName, setFileName] = useState("indexingLogic.js"); @@ -121,10 +120,10 @@ const Editor = ({ if (fileName === "indexingLogic.js") { try { setSchemaTypes(pgSchemaTypeGen.generateTypes(schema)); - setTypesGenerationError(undefined); - } catch (typesError) { - console.log("typesGenerationError generating types for saved schema.\n", typesError); - setTypesGenerationError("There was an error generating types from your schema. Please fix your schema or file a support ticket."); + setError(undefined); + } catch (error) { + console.error("Error generating types for saved schema.\n", error.message); + setError("There was an error with your schema. Check the console for more details."); } } }, [fileName]); @@ -150,47 +149,34 @@ const Editor = ({ } } - const checkSQLSchemaFormatting = () => { - try { - let formatted_sql = formatSQL(schema); - let formatted_schema = formatted_sql; - try { - pgSchemaTypeGen.generateTypes(formatted_sql); // Sanity check - } catch (typesError) { - console.log("Error generating types from schema", typesError); - setTypesGenerationError("There was an error generating types from your schema. Please fix your schema or file a support ticket." ); - } - setSchemaFormattingError(undefined); - return formatted_schema; - } catch (formattingError) { - console.log("formattingError", formattingError); - setSchemaFormattingError("Please check your SQL schema formatting and specify an Indexer Name"); - return undefined; - } - }; - - const forkIndexer = async(indexerName) => { - let code = indexingCode; - setAccountId(currentUserAccountId) - let prevAccountId = indexerDetails.accountId.replaceAll(".", "_"); - let newAccountId = currentUserAccountId.replaceAll(".", "_"); - let prevIndexerName = indexerDetails.indexerName.replaceAll("-", "_").trim().toLowerCase(); - let newIndexerName = indexerName.replaceAll("-", "_").trim().toLowerCase(); - code = code.replaceAll(prevAccountId, newAccountId); - code = code.replaceAll(prevIndexerName, newIndexerName); - setIndexingCode(formatIndexingCode(code)) + const forkIndexer = async (indexerName) => { + let code = indexingCode; + setAccountId(currentUserAccountId) + let prevAccountId = indexerDetails.accountId.replaceAll(".", "_"); + let newAccountId = currentUserAccountId.replaceAll(".", "_"); + let prevIndexerName = indexerDetails.indexerName.replaceAll("-", "_").trim().toLowerCase(); + let newIndexerName = indexerName.replaceAll("-", "_").trim().toLowerCase(); + code = code.replaceAll(prevAccountId, newAccountId); + code = code.replaceAll(prevIndexerName, newIndexerName); + setIndexingCode(formatIndexingCode(code)) } const registerFunction = async (indexerName, indexerConfig) => { - let formatted_schema = checkSQLSchemaFormatting(); + const { data: formattedSchema, error } = await validateSQLSchema(schema); + + if (error) { + setError("There was an error in your schema, please check the console for more details"); + return; + } + let innerCode = indexingCode.match(/getBlock\s*\([^)]*\)\s*{([\s\S]*)}/)[1]; indexerName = indexerName.replaceAll(" ", "_"); request("register-function", { indexerName: indexerName, code: innerCode, - schema: formatted_schema, + schema: formattedSchema, blockHeight: indexerConfig.startBlockHeight, contractFilter: indexerConfig.filter, }); @@ -250,16 +236,17 @@ const Editor = ({ let formattedSql = schema; try { formattedCode = formatIndexingCode(indexingCode); - setCodeFormattingError(undefined); + setError(undefined); } catch (error) { - console.log("error", error) - setCodeFormattingError("Oh snap! We could not format your code. Make sure it is proper Javascript code."); + console.error("error", error) + setError("Oh snap! We could not format your code. Make sure it is proper Javascript code."); } try { formattedSql = formatSQL(schema); - setSchemaFormattingError(undefined); + setError(undefined); } catch (error) { - setSchemaFormattingError("Could not format your SQL schema. Make sure it is proper SQL DDL"); + console.error(error); + setError("Could not format your SQL schema. Make sure it is proper SQL DDL"); } setIndexingCode(formattedCode); setSchema(formattedSql); @@ -270,10 +257,10 @@ const Editor = ({ try { setSchemaTypes(pgSchemaTypeGen.generateTypes(schema)); attachTypesToMonaco(); // Just in case schema types have been updated but weren't added to monaco - setTypesGenerationError(undefined); - } catch (typesError) { - console.log("typesGenerationError generating types for saved schema.\n", typesError); - setTypesGenerationError("Oh snap! We could not generate types for your SQL schema. Make sure it is proper SQL DDL."); + setError(undefined); + } catch (error) { + console.error("Error generating types for saved schema.\n", error); + setError("Oh snap! We could not generate types for your SQL schema. Make sure it is proper SQL DDL."); } } @@ -339,91 +326,81 @@ const Editor = ({ Indexer Function could not be found. Are you sure this indexer exists? )} - {(indexerDetails.code || isCreateNewIndexer) && <> - indexerRunner.stop()} - latestHeight={height} - isUserIndexer={indexerDetails.accountId === currentUserAccountId} - handleDeleteIndexer={handleDeleteIndexer} - /> - - - - -
- {codeFormattingError && ( - - {codeFormattingError} - - )} - {schemaFormattingError && ( - - {schemaFormattingError} - - )} - {typesGenerationError && ( - - {typesGenerationError} - - )} - {debugMode && !debugModeInfoDisabled && ( - setDebugModeInfoDisabled(true)} - variant="info" - > - To debug, you will need to open your browser console window in - order to see the logs. - - )} - - + indexerRunner.stop()} + latestHeight={height} + isUserIndexer={indexerDetails.accountId === currentUserAccountId} + handleDeleteIndexer={handleDeleteIndexer} + /> + + + -
+ +
+ {error && ( + setError(undefined)} className="px-3 pt-3" variant="danger"> + {error} + + )} + {debugMode && !debugModeInfoDisabled && ( + setDebugModeInfoDisabled(true)} + variant="info" + > + To debug, you will need to open your browser console window in + order to see the logs. + + )} + + +
} ); From 12bdb26be69aacf0a5386561052a33b022d90e94 Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Tue, 2 Jan 2024 21:39:33 -0500 Subject: [PATCH 07/32] refactor: Debounce the schema validation --- frontend/package.json | 3 +- .../Editor/ResizableLayoutEditor.jsx | 10 +- frontend/tsconfig.json | 2 +- frontend/yarn.lock | 869 +++++++++++++----- 4 files changed, 644 insertions(+), 240 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 5a83207d9..7392af227 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -42,6 +42,7 @@ "react-switch": "^7.0.0", "regenerator-runtime": "^0.13.11", "styled-components": "^5.3.6", - "typescript": "4.9.5" + "typescript": "4.9.5", + "use-debounce": "^10.0.0" } } diff --git a/frontend/src/components/Editor/ResizableLayoutEditor.jsx b/frontend/src/components/Editor/ResizableLayoutEditor.jsx index 47a1a4b4b..324ec7721 100644 --- a/frontend/src/components/Editor/ResizableLayoutEditor.jsx +++ b/frontend/src/components/Editor/ResizableLayoutEditor.jsx @@ -4,6 +4,7 @@ import { defaultCode, defaultSchema } from "../../utils/formatters"; import { useDragResize } from "../../utils/resize"; import GraphqlPlayground from "./../Playground"; import { validateSQLSchema } from "@/utils/validators"; +import { useDebouncedCallback } from "use-debounce"; // Define styles as separate objects const containerStyle = { @@ -58,10 +59,13 @@ const ResizableEditor = ({ sizeThresholdSecond: 60, }); - const handleOnChangeSchema = (value) => { + const debouncedValidateSQLSchema = useDebouncedCallback((_schema) => { + validateSQLSchema(_schema) + }, 1000); - setSchema(value); - validateSQLSchema(value) + const handleOnChangeSchema = (_schema) => { + setSchema(_schema); + debouncedValidateSQLSchema(_schema); } // Render logic based on fileName diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index cd38e7350..731c34b41 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -24,7 +24,7 @@ "next-env.d.ts", "**/*.ts", "**/*.tsx", - "src/components/Editor/Editor.js", + "src/components/Editor/Editor.jsx", "src/pages/query-api-editor/editor.js", "src/components/CreateNewIndexer/CreateNewIndexer.js" ], diff --git a/frontend/yarn.lock b/frontend/yarn.lock index d10e66f86..9f5a4dd49 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -2,6 +2,24 @@ # yarn lockfile v1 +"@apollo/client@^3.8.7": + version "3.8.8" + resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.8.8.tgz#1a004b2e6de4af38668249a7d7790f6a3431e475" + integrity sha512-omjd9ryGDkadZrKW6l5ktUAdS4SNaFOccYQ4ZST0HLW83y8kQaSZOCTNlpkoBUK8cv6qP8+AxOKwLm2ho8qQ+Q== + dependencies: + "@graphql-typed-document-node/core" "^3.1.1" + "@wry/equality" "^0.5.6" + "@wry/trie" "^0.5.0" + graphql-tag "^2.12.6" + hoist-non-react-statics "^3.3.2" + optimism "^0.18.0" + prop-types "^15.7.2" + response-iterator "^0.2.6" + symbol-observable "^4.0.0" + ts-invariant "^0.10.3" + tslib "^2.3.0" + zen-observable-ts "^1.2.5" + "@babel/code-frame@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz" @@ -84,19 +102,12 @@ resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.21.2.tgz" integrity sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ== -"@babel/runtime@^7.0.0": - version "7.22.3" - resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.3.tgz" - integrity sha512-XsDuspWKLUsxwCp6r7EhsExHtYfbe5oAGQ19kqngTdCPUoPQzOPdUbD/pB9PJiwb2ptYKQDjSJT3R6dC+EPqfQ== +"@babel/runtime@^7.13.10": + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.7.tgz#dd7c88deeb218a0f8bd34d5db1aa242e0f203193" + integrity sha512-w06OXVOFso7LcbzMiDGt+3X7Rh7Ho8MmgPoWU3rarH+8upf+wSU/grlGbWzQyr3DkdN6ZeuMFjpdwW0Q+HxobA== dependencies: - regenerator-runtime "^0.13.11" - -"@babel/runtime@^7.12.13": - version "7.21.0" - resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz" - integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw== - dependencies: - regenerator-runtime "^0.13.11" + regenerator-runtime "^0.14.0" "@babel/runtime@^7.17.2", "@babel/runtime@^7.20.7", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.7": version "7.20.13" @@ -139,6 +150,13 @@ "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" +"@emotion/is-prop-valid@^0.8.2": + version "0.8.8" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" + integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA== + dependencies: + "@emotion/memoize" "0.7.4" + "@emotion/is-prop-valid@^1.1.0": version "1.2.0" resolved "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.0.tgz" @@ -146,6 +164,11 @@ dependencies: "@emotion/memoize" "^0.8.0" +"@emotion/memoize@0.7.4": + version "0.7.4" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" + integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== + "@emotion/memoize@^0.8.0": version "0.8.0" resolved "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.0.tgz" @@ -176,48 +199,88 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@graphiql/plugin-code-exporter@0.3.0": - version "0.3.0" - resolved "https://registry.npmjs.org/@graphiql/plugin-code-exporter/-/plugin-code-exporter-0.3.0.tgz" - integrity sha512-IQvrNJEPRPdMIG9E3nVbznGgtYYsZv5kU8LRayBqHqXoIaOsL4CTXx2PjmjJptbFuDMQxzlkYCOyW+QUcLQ2XA== +"@floating-ui/core@^1.4.2": + version "1.5.2" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.5.2.tgz#53a0f7a98c550e63134d504f26804f6b83dbc071" + integrity sha512-Ii3MrfY/GAIN3OhXNzpCKaLxHQfJF9qvwq/kEJYdqDxeIHa01K8sldugal6TmeeXl+WMvhv9cnVzUTaFFJF09A== + dependencies: + "@floating-ui/utils" "^0.1.3" + +"@floating-ui/dom@^1.5.1": + version "1.5.3" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.5.3.tgz#54e50efcb432c06c23cd33de2b575102005436fa" + integrity sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA== + dependencies: + "@floating-ui/core" "^1.4.2" + "@floating-ui/utils" "^0.1.3" + +"@floating-ui/react-dom@^2.0.0": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.0.4.tgz#b076fafbdfeb881e1d86ae748b7ff95150e9f3ec" + integrity sha512-CF8k2rgKeh/49UrnIBs4BdxPUV6vize/Db1d/YbCLyp9GiVZ0BEwf5AiDSxJRCr6yOkGqTFHtmrULxkEfYZ7dQ== + dependencies: + "@floating-ui/dom" "^1.5.1" + +"@floating-ui/utils@^0.1.3": + version "0.1.6" + resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.1.6.tgz#22958c042e10b67463997bd6ea7115fe28cbcaf9" + integrity sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A== + +"@graphiql/plugin-code-exporter@0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@graphiql/plugin-code-exporter/-/plugin-code-exporter-0.3.5.tgz#3d926bdcd0f32c6ac7860f6cd5a2f0ae2e835bd9" + integrity sha512-14CmC6IWcfJyhC27pfUoPz3dmLQyNuOQIeEmPFH2M9k0z/GzZr6bnxMK/ImVsAmzTP3M7Jm0bCTXUwU7AVO0tA== dependencies: graphiql-code-exporter "^3.0.3" -"@graphiql/plugin-explorer@0.3.0": - version "0.3.0" - resolved "https://registry.npmjs.org/@graphiql/plugin-explorer/-/plugin-explorer-0.3.0.tgz" - integrity sha512-ZXAfzFXuqBPzD3HNSelh23eCRE1Qdsi2ndZyOqAjcy6bxo3lSj8wrM8cN1+T1Wo+0U39SiTkdmlElZTaip7RXA== +"@graphiql/plugin-explorer@0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@graphiql/plugin-explorer/-/plugin-explorer-0.3.5.tgz#cb1eb364bc3f3f6487061d0a54ef12a0393d2a64" + integrity sha512-oHn4cuH1uPWv70zy64mpG/x99BeFOFzGJ/tZXdx8wvb6c4aBMMCo4ouVnvNReVxE9N0KAwJfPvC6laWSbQ6lkQ== dependencies: graphiql-explorer "^0.9.0" -"@graphiql/react@^0.17.6": - version "0.17.6" - resolved "https://registry.npmjs.org/@graphiql/react/-/react-0.17.6.tgz" - integrity sha512-3k1paSRbRwVNxr2U80xnRhkws8tSErWlETJvEQBmqRcWbt0+WmwFJorkLnG1n3Wj0Ho6k4a2BAiTfJ6F4SPrLg== - dependencies: - "@graphiql/toolkit" "^0.8.4" - "@reach/combobox" "^0.17.0" - "@reach/dialog" "^0.17.0" - "@reach/listbox" "^0.17.0" - "@reach/menu-button" "^0.17.0" - "@reach/tooltip" "^0.17.0" - "@reach/visually-hidden" "^0.17.0" +"@graphiql/react@^0.19.4": + version "0.19.4" + resolved "https://registry.yarnpkg.com/@graphiql/react/-/react-0.19.4.tgz#7ce928c944cbac6ae36258de7ce96758365dee3f" + integrity sha512-qg3N2Zeuq2+GDMZddz7K/ak1p5O56kKuLM/idOJZD+Lxbk2e8Eye3KWM24lJuuCi2gdvJuqPMfCdewLXrHhEkw== + dependencies: + "@graphiql/toolkit" "^0.9.1" + "@headlessui/react" "^1.7.15" + "@radix-ui/react-dialog" "^1.0.4" + "@radix-ui/react-dropdown-menu" "^2.0.5" + "@radix-ui/react-tooltip" "^1.0.6" + "@radix-ui/react-visually-hidden" "^1.0.3" + "@types/codemirror" "^5.60.8" clsx "^1.2.1" codemirror "^5.65.3" - codemirror-graphql "^2.0.8" + codemirror-graphql "^2.0.10" copy-to-clipboard "^3.2.0" - graphql-language-service "^5.1.6" + framer-motion "^6.5.1" + graphql-language-service "^5.2.0" markdown-it "^12.2.0" set-value "^4.1.0" -"@graphiql/toolkit@^0.8.4": - version "0.8.4" - resolved "https://registry.npmjs.org/@graphiql/toolkit/-/toolkit-0.8.4.tgz" - integrity sha512-cFUGqh3Dau+SD3Vq9EFlZrhzYfaHKyOJveFtaCR+U5Cn/S68p7oy+vQBIdwtO6J2J58FncnwBbVRfr+IvVfZqQ== +"@graphiql/toolkit@^0.9.1": + version "0.9.1" + resolved "https://registry.yarnpkg.com/@graphiql/toolkit/-/toolkit-0.9.1.tgz#44bfa83aed79c8c18affac49efbb81f8e87bade3" + integrity sha512-LVt9pdk0830so50ZnU2Znb2rclcoWznG8r8asqAENzV0U1FM1kuY0sdPpc/rBc9MmmNgnB6A+WZzDhq6dbhTHA== dependencies: "@n1ru4l/push-pull-async-iterable-iterator" "^3.1.0" meros "^1.1.4" +"@graphql-typed-document-node/core@^3.1.1": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861" + integrity sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ== + +"@headlessui/react@^1.7.15": + version "1.7.17" + resolved "https://registry.yarnpkg.com/@headlessui/react/-/react-1.7.17.tgz#a0ec23af21b527c030967245fd99776aa7352bc6" + integrity sha512-4am+tzvkqDSSgiwrsEpGWqgGo9dz8qU5M3znCkC4PgkpY4HcCZzEDEvozltGGGHIKl9jbXbZPSH5TWn4sWJdow== + dependencies: + client-only "^0.0.1" + "@humanwhocodes/config-array@^0.11.8": version "0.11.8" resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz" @@ -284,6 +347,59 @@ "@monaco-editor/loader" "^1.3.2" prop-types "^15.7.2" +"@motionone/animation@^10.12.0": + version "10.16.3" + resolved "https://registry.yarnpkg.com/@motionone/animation/-/animation-10.16.3.tgz#f5b71e27fd8b88b61f983adb0ed6c8e3e89281f9" + integrity sha512-QUGWpLbMFLhyqKlngjZhjtxM8IqiJQjLK0DF+XOF6od9nhSvlaeEpOY/UMCRVcZn/9Tr2rZO22EkuCIjYdI74g== + dependencies: + "@motionone/easing" "^10.16.3" + "@motionone/types" "^10.16.3" + "@motionone/utils" "^10.16.3" + tslib "^2.3.1" + +"@motionone/dom@10.12.0": + version "10.12.0" + resolved "https://registry.yarnpkg.com/@motionone/dom/-/dom-10.12.0.tgz#ae30827fd53219efca4e1150a5ff2165c28351ed" + integrity sha512-UdPTtLMAktHiqV0atOczNYyDd/d8Cf5fFsd1tua03PqTwwCe/6lwhLSQ8a7TbnQ5SN0gm44N1slBfj+ORIhrqw== + dependencies: + "@motionone/animation" "^10.12.0" + "@motionone/generators" "^10.12.0" + "@motionone/types" "^10.12.0" + "@motionone/utils" "^10.12.0" + hey-listen "^1.0.8" + tslib "^2.3.1" + +"@motionone/easing@^10.16.3": + version "10.16.3" + resolved "https://registry.yarnpkg.com/@motionone/easing/-/easing-10.16.3.tgz#a62abe0ba2841861f167f286782e287eab8d7466" + integrity sha512-HWTMZbTmZojzwEuKT/xCdvoMPXjYSyQvuVM6jmM0yoGU6BWzsmYMeB4bn38UFf618fJCNtP9XeC/zxtKWfbr0w== + dependencies: + "@motionone/utils" "^10.16.3" + tslib "^2.3.1" + +"@motionone/generators@^10.12.0": + version "10.16.4" + resolved "https://registry.yarnpkg.com/@motionone/generators/-/generators-10.16.4.tgz#4a38708244bce733bfcebd4a26d19f4bbabd36af" + integrity sha512-geFZ3w0Rm0ZXXpctWsSf3REGywmLLujEjxPYpBR0j+ymYwof0xbV6S5kGqqsDKgyWKVWpUInqQYvQfL6fRbXeg== + dependencies: + "@motionone/types" "^10.16.3" + "@motionone/utils" "^10.16.3" + tslib "^2.3.1" + +"@motionone/types@^10.12.0", "@motionone/types@^10.16.3": + version "10.16.3" + resolved "https://registry.yarnpkg.com/@motionone/types/-/types-10.16.3.tgz#9284ea8a52f6b32c51c54b617214f20e43ac6c59" + integrity sha512-W4jkEGFifDq73DlaZs3HUfamV2t1wM35zN/zX7Q79LfZ2sc6C0R1baUHZmqc/K5F3vSw3PavgQ6HyHLd/MXcWg== + +"@motionone/utils@^10.12.0", "@motionone/utils@^10.16.3": + version "10.16.3" + resolved "https://registry.yarnpkg.com/@motionone/utils/-/utils-10.16.3.tgz#ddf07ab6cf3000d89e3bcbdc9a8c3e1fd64f8520" + integrity sha512-WNWDksJIxQkaI9p9Z9z0+K27xdqISGNFy1SsWVGaiedTHq0iaT6iZujby8fT/ZnZxj1EOaxJtSfUPCFNU5CRoA== + dependencies: + "@motionone/types" "^10.16.3" + hey-listen "^1.0.8" + tslib "^2.3.1" + "@n1ru4l/push-pull-async-iterable-iterator@^3.1.0": version "3.2.0" resolved "https://registry.npmjs.org/@n1ru4l/push-pull-async-iterable-iterator/-/push-pull-async-iterable-iterator-3.2.0.tgz" @@ -414,157 +530,295 @@ resolved "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz" integrity sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw== -"@reach/auto-id@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/auto-id/-/auto-id-0.17.0.tgz" - integrity sha512-ud8iPwF52RVzEmkHq1twuqGuPA+moreumUHdtgvU3sr3/15BNhwp3KyDLrKKSz0LP1r3V4pSdyF9MbYM8BoSjA== +"@radix-ui/primitive@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/primitive/-/primitive-1.0.1.tgz#e46f9958b35d10e9f6dc71c497305c22e3e55dbd" + integrity sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw== dependencies: - "@reach/utils" "0.17.0" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" -"@reach/combobox@^0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/combobox/-/combobox-0.17.0.tgz" - integrity sha512-2mYvU5agOBCQBMdlM4cri+P1BbNwp05P1OuDyc33xJSNiBG7BMy4+ZSHJ0X4fyle6rHwSgCAOCLOeWV1XUYjoQ== +"@radix-ui/react-arrow@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@radix-ui/react-arrow/-/react-arrow-1.0.3.tgz#c24f7968996ed934d57fe6cde5d6ec7266e1d25d" + integrity sha512-wSP+pHsB/jQRaL6voubsQ/ZlrGBHHrOjmBnr19hxYgtS0WvAFwZhK2WP/YY5yF9uKECCEEDGxuLxq1NBK51wFA== dependencies: - "@reach/auto-id" "0.17.0" - "@reach/descendants" "0.17.0" - "@reach/popover" "0.17.0" - "@reach/portal" "0.17.0" - "@reach/utils" "0.17.0" - prop-types "^15.7.2" - tiny-warning "^1.0.3" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" + "@radix-ui/react-primitive" "1.0.3" -"@reach/descendants@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/descendants/-/descendants-0.17.0.tgz" - integrity sha512-c7lUaBfjgcmKFZiAWqhG+VnXDMEhPkI4kAav/82XKZD6NVvFjsQOTH+v3tUkskrAPV44Yuch0mFW/u5Ntifr7Q== +"@radix-ui/react-collection@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@radix-ui/react-collection/-/react-collection-1.0.3.tgz#9595a66e09026187524a36c6e7e9c7d286469159" + integrity sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA== dependencies: - "@reach/utils" "0.17.0" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-slot" "1.0.2" -"@reach/dialog@^0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/dialog/-/dialog-0.17.0.tgz" - integrity sha512-AnfKXugqDTGbeG3c8xDcrQDE4h9b/vnc27Sa118oQSquz52fneUeX9MeFb5ZEiBJK8T5NJpv7QUTBIKnFCAH5A== +"@radix-ui/react-compose-refs@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz#7ed868b66946aa6030e580b1ffca386dd4d21989" + integrity sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw== dependencies: - "@reach/portal" "0.17.0" - "@reach/utils" "0.17.0" - prop-types "^15.7.2" - react-focus-lock "^2.5.2" - react-remove-scroll "^2.4.3" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" -"@reach/dropdown@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/dropdown/-/dropdown-0.17.0.tgz" - integrity sha512-qBTIGInhxtPHtdj4Pl2XZgZMz3e37liydh0xR3qc48syu7g71sL4nqyKjOzThykyfhA3Pb3/wFgsFJKGTSdaig== +"@radix-ui/react-context@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-context/-/react-context-1.0.1.tgz#fe46e67c96b240de59187dcb7a1a50ce3e2ec00c" + integrity sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg== dependencies: - "@reach/auto-id" "0.17.0" - "@reach/descendants" "0.17.0" - "@reach/popover" "0.17.0" - "@reach/utils" "0.17.0" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" -"@reach/listbox@^0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/listbox/-/listbox-0.17.0.tgz" - integrity sha512-AMnH1P6/3VKy2V/nPb4Es441arYR+t4YRdh9jdcFVrCOD6y7CQrlmxsYjeg9Ocdz08XpdoEBHM3PKLJqNAUr7A== +"@radix-ui/react-dialog@^1.0.4": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dialog/-/react-dialog-1.0.5.tgz#71657b1b116de6c7a0b03242d7d43e01062c7300" + integrity sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-dismissable-layer" "1.0.5" + "@radix-ui/react-focus-guards" "1.0.1" + "@radix-ui/react-focus-scope" "1.0.4" + "@radix-ui/react-id" "1.0.1" + "@radix-ui/react-portal" "1.0.4" + "@radix-ui/react-presence" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-slot" "1.0.2" + "@radix-ui/react-use-controllable-state" "1.0.1" + aria-hidden "^1.1.1" + react-remove-scroll "2.5.5" + +"@radix-ui/react-direction@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-direction/-/react-direction-1.0.1.tgz#9cb61bf2ccf568f3421422d182637b7f47596c9b" + integrity sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA== dependencies: - "@reach/auto-id" "0.17.0" - "@reach/descendants" "0.17.0" - "@reach/machine" "0.17.0" - "@reach/popover" "0.17.0" - "@reach/utils" "0.17.0" - prop-types "^15.7.2" + "@babel/runtime" "^7.13.10" -"@reach/machine@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/machine/-/machine-0.17.0.tgz" - integrity sha512-9EHnuPgXzkbRENvRUzJvVvYt+C2jp7PGN0xon7ffmKoK8rTO6eA/bb7P0xgloyDDQtu88TBUXKzW0uASqhTXGA== +"@radix-ui/react-dismissable-layer@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.5.tgz#3f98425b82b9068dfbab5db5fff3df6ebf48b9d4" + integrity sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g== dependencies: - "@reach/utils" "0.17.0" - "@xstate/fsm" "1.4.0" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-use-callback-ref" "1.0.1" + "@radix-ui/react-use-escape-keydown" "1.0.3" -"@reach/menu-button@^0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/menu-button/-/menu-button-0.17.0.tgz" - integrity sha512-YyuYVyMZKamPtivoEI6D0UEILYH3qZtg4kJzEAuzPmoR/aHN66NZO75Fx0gtjG1S6fZfbiARaCOZJC0VEiDOtQ== +"@radix-ui/react-dropdown-menu@^2.0.5": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.0.6.tgz#cdf13c956c5e263afe4e5f3587b3071a25755b63" + integrity sha512-i6TuFOoWmLWq+M/eCLGd/bQ2HfAX1RJgvrBQ6AQLmzfvsLdefxbWu8G9zczcPFfcSPehz9GcpF6K9QYreFV8hA== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-id" "1.0.1" + "@radix-ui/react-menu" "2.0.6" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-use-controllable-state" "1.0.1" + +"@radix-ui/react-focus-guards@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.1.tgz#1ea7e32092216b946397866199d892f71f7f98ad" + integrity sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA== dependencies: - "@reach/dropdown" "0.17.0" - "@reach/popover" "0.17.0" - "@reach/utils" "0.17.0" - prop-types "^15.7.2" - tiny-warning "^1.0.3" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" -"@reach/observe-rect@1.2.0": - version "1.2.0" - resolved "https://registry.npmjs.org/@reach/observe-rect/-/observe-rect-1.2.0.tgz" - integrity sha512-Ba7HmkFgfQxZqqaeIWWkNK0rEhpxVQHIoVyW1YDSkGsGIXzcaW4deC8B0pZrNSSyLTdIk7y+5olKt5+g0GmFIQ== - -"@reach/popover@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/popover/-/popover-0.17.0.tgz" - integrity sha512-yYbBF4fMz4Ml4LB3agobZjcZ/oPtPsNv70ZAd7lEC2h7cvhF453pA+zOBGYTPGupKaeBvgAnrMjj7RnxDU5hoQ== - dependencies: - "@reach/portal" "0.17.0" - "@reach/rect" "0.17.0" - "@reach/utils" "0.17.0" - tabbable "^4.0.0" - tslib "^2.3.0" +"@radix-ui/react-focus-scope@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.4.tgz#2ac45fce8c5bb33eb18419cdc1905ef4f1906525" + integrity sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-use-callback-ref" "1.0.1" -"@reach/portal@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/portal/-/portal-0.17.0.tgz" - integrity sha512-+IxsgVycOj+WOeNPL2NdgooUdHPSY285wCtj/iWID6akyr4FgGUK7sMhRM9aGFyrGpx2vzr+eggbUmAVZwOz+A== +"@radix-ui/react-id@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-id/-/react-id-1.0.1.tgz#73cdc181f650e4df24f0b6a5b7aa426b912c88c0" + integrity sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ== dependencies: - "@reach/utils" "0.17.0" - tiny-warning "^1.0.3" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" + "@radix-ui/react-use-layout-effect" "1.0.1" -"@reach/rect@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/rect/-/rect-0.17.0.tgz" - integrity sha512-3YB7KA5cLjbLc20bmPkJ06DIfXSK06Cb5BbD2dHgKXjUkT9WjZaLYIbYCO8dVjwcyO3GCNfOmPxy62VsPmZwYA== +"@radix-ui/react-menu@2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-menu/-/react-menu-2.0.6.tgz#2c9e093c1a5d5daa87304b2a2f884e32288ae79e" + integrity sha512-BVkFLS+bUC8HcImkRKPSiVumA1VPOOEC5WBMiT+QAVsPzW1FJzI9KnqgGxVDPBcql5xXrHkD3JOVoXWEXD8SYA== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-collection" "1.0.3" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-direction" "1.0.1" + "@radix-ui/react-dismissable-layer" "1.0.5" + "@radix-ui/react-focus-guards" "1.0.1" + "@radix-ui/react-focus-scope" "1.0.4" + "@radix-ui/react-id" "1.0.1" + "@radix-ui/react-popper" "1.1.3" + "@radix-ui/react-portal" "1.0.4" + "@radix-ui/react-presence" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-roving-focus" "1.0.4" + "@radix-ui/react-slot" "1.0.2" + "@radix-ui/react-use-callback-ref" "1.0.1" + aria-hidden "^1.1.1" + react-remove-scroll "2.5.5" + +"@radix-ui/react-popper@1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@radix-ui/react-popper/-/react-popper-1.1.3.tgz#24c03f527e7ac348fabf18c89795d85d21b00b42" + integrity sha512-cKpopj/5RHZWjrbF2846jBNacjQVwkP068DfmgrNJXpvVWrOvlAmE9xSiy5OqeE+Gi8D9fP+oDhUnPqNMY8/5w== + dependencies: + "@babel/runtime" "^7.13.10" + "@floating-ui/react-dom" "^2.0.0" + "@radix-ui/react-arrow" "1.0.3" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-use-callback-ref" "1.0.1" + "@radix-ui/react-use-layout-effect" "1.0.1" + "@radix-ui/react-use-rect" "1.0.1" + "@radix-ui/react-use-size" "1.0.1" + "@radix-ui/rect" "1.0.1" + +"@radix-ui/react-portal@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@radix-ui/react-portal/-/react-portal-1.0.4.tgz#df4bfd353db3b1e84e639e9c63a5f2565fb00e15" + integrity sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q== dependencies: - "@reach/observe-rect" "1.2.0" - "@reach/utils" "0.17.0" - prop-types "^15.7.2" - tiny-warning "^1.0.3" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" + "@radix-ui/react-primitive" "1.0.3" -"@reach/tooltip@^0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/tooltip/-/tooltip-0.17.0.tgz" - integrity sha512-HP8Blordzqb/Cxg+jnhGmWQfKgypamcYLBPlcx6jconyV5iLJ5m93qipr1giK7MqKT2wlsKWy44ZcOrJ+Wrf8w== +"@radix-ui/react-presence@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.0.1.tgz#491990ba913b8e2a5db1b06b203cb24b5cdef9ba" + integrity sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg== dependencies: - "@reach/auto-id" "0.17.0" - "@reach/portal" "0.17.0" - "@reach/rect" "0.17.0" - "@reach/utils" "0.17.0" - "@reach/visually-hidden" "0.17.0" - prop-types "^15.7.2" - tiny-warning "^1.0.3" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-use-layout-effect" "1.0.1" -"@reach/utils@0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/utils/-/utils-0.17.0.tgz" - integrity sha512-M5y8fCBbrWeIsxedgcSw6oDlAMQDkl5uv3VnMVJ7guwpf4E48Xlh1v66z/1BgN/WYe2y8mB/ilFD2nysEfdGeA== +"@radix-ui/react-primitive@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz#d49ea0f3f0b2fe3ab1cb5667eb03e8b843b914d0" + integrity sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g== dependencies: - tiny-warning "^1.0.3" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" + "@radix-ui/react-slot" "1.0.2" + +"@radix-ui/react-roving-focus@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.4.tgz#e90c4a6a5f6ac09d3b8c1f5b5e81aab2f0db1974" + integrity sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-collection" "1.0.3" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-direction" "1.0.1" + "@radix-ui/react-id" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-use-callback-ref" "1.0.1" + "@radix-ui/react-use-controllable-state" "1.0.1" + +"@radix-ui/react-slot@1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-slot/-/react-slot-1.0.2.tgz#a9ff4423eade67f501ffb32ec22064bc9d3099ab" + integrity sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-compose-refs" "1.0.1" -"@reach/visually-hidden@0.17.0", "@reach/visually-hidden@^0.17.0": - version "0.17.0" - resolved "https://registry.npmjs.org/@reach/visually-hidden/-/visually-hidden-0.17.0.tgz" - integrity sha512-T6xF3Nv8vVnjVkGU6cm0+kWtvliLqPAo8PcZ+WxkKacZsaHTjaZb4v1PaCcyQHmuTNT/vtTVNOJLG0SjQOIb7g== +"@radix-ui/react-tooltip@^1.0.6": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@radix-ui/react-tooltip/-/react-tooltip-1.0.7.tgz#8f55070f852e7e7450cc1d9210b793d2e5a7686e" + integrity sha512-lPh5iKNFVQ/jav/j6ZrWq3blfDJ0OH9R6FlNUHPMqdLuQ9vwDgFsRxvl8b7Asuy5c8xmoojHUxKHQSOAvMHxyw== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-dismissable-layer" "1.0.5" + "@radix-ui/react-id" "1.0.1" + "@radix-ui/react-popper" "1.1.3" + "@radix-ui/react-portal" "1.0.4" + "@radix-ui/react-presence" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-slot" "1.0.2" + "@radix-ui/react-use-controllable-state" "1.0.1" + "@radix-ui/react-visually-hidden" "1.0.3" + +"@radix-ui/react-use-callback-ref@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.1.tgz#f4bb1f27f2023c984e6534317ebc411fc181107a" + integrity sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ== dependencies: - prop-types "^15.7.2" - tslib "^2.3.0" + "@babel/runtime" "^7.13.10" + +"@radix-ui/react-use-controllable-state@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.1.tgz#ecd2ced34e6330caf89a82854aa2f77e07440286" + integrity sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-use-callback-ref" "1.0.1" + +"@radix-ui/react-use-escape-keydown@1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.0.3.tgz#217b840c250541609c66f67ed7bab2b733620755" + integrity sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-use-callback-ref" "1.0.1" + +"@radix-ui/react-use-layout-effect@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz#be8c7bc809b0c8934acf6657b577daf948a75399" + integrity sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ== + dependencies: + "@babel/runtime" "^7.13.10" + +"@radix-ui/react-use-rect@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-rect/-/react-use-rect-1.0.1.tgz#fde50b3bb9fd08f4a1cd204572e5943c244fcec2" + integrity sha512-Cq5DLuSiuYVKNU8orzJMbl15TXilTnJKUCltMVQg53BQOF1/C5toAaGrowkgksdBQ9H+SRL23g0HDmg9tvmxXw== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/rect" "1.0.1" + +"@radix-ui/react-use-size@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-size/-/react-use-size-1.0.1.tgz#1c5f5fea940a7d7ade77694bb98116fb49f870b2" + integrity sha512-ibay+VqrgcaI6veAojjofPATwledXiSmX+C0KrBk/xgpX9rBzPV3OsfwlhQdUOFbh+LKQorLYT+xTXW9V8yd0g== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-use-layout-effect" "1.0.1" + +"@radix-ui/react-visually-hidden@1.0.3", "@radix-ui/react-visually-hidden@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.0.3.tgz#51aed9dd0fe5abcad7dee2a234ad36106a6984ac" + integrity sha512-D4w41yN5YRKtu464TLnByKzMDG/JlMPHtfZgQAu9v6mNakUqGUI9vUrfQKz8NK41VMm/xbZbh76NUTVtIYqOMA== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/react-primitive" "1.0.3" + +"@radix-ui/rect@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@radix-ui/rect/-/rect-1.0.1.tgz#bf8e7d947671996da2e30f4904ece343bc4a883f" + integrity sha512-fyrgCaedtvMg9NK3en0pnOYJdtfwxUcNolezkNPUsoX57X8oQk+NkqcvzHXD2uKNij6GXmWU9NDru2IWjrO4BQ== + dependencies: + "@babel/runtime" "^7.13.10" "@react-aria/ssr@^3.4.1": version "3.5.0" @@ -607,6 +861,25 @@ dependencies: tslib "^2.4.0" +"@types/codemirror@^0.0.90": + version "0.0.90" + resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-0.0.90.tgz#9c5edafce2a780b4f8bc5e3b699fe1f4727c8f17" + integrity sha512-8Z9+tSg27NPRGubbUPUCrt5DDG/OWzLph5BvcDykwR5D7RyZh5mhHG0uS1ePKV1YFCA+/cwc4Ey2AJAEFfV3IA== + dependencies: + "@types/tern" "*" + +"@types/codemirror@^5.60.8": + version "5.60.15" + resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-5.60.15.tgz#0f82be6f4126d1e59cf4c4830e56dcd49d3c3e8a" + integrity sha512-dTOvwEQ+ouKJ/rE9LT1Ue2hmP6H1mZv5+CCnNWu2qtiOe2LQa9lCprEY20HxiDmV/Bxh+dXjywmy5aKvoGjULA== + dependencies: + "@types/tern" "*" + +"@types/estree@*": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== + "@types/json-schema@^7.0.8": version "7.0.12" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz" @@ -655,6 +928,13 @@ resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz" integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== +"@types/tern@*": + version "0.23.9" + resolved "https://registry.yarnpkg.com/@types/tern/-/tern-0.23.9.tgz#6f6093a4a9af3e6bb8dde528e024924d196b367c" + integrity sha512-ypzHFE/wBzh+BlH6rrBgS5I/Z7RD21pGhZ2rltb/+ZrVM1awdZwjx7hE5XfuYgHWk9uvV5HLZN3SloevCAp3Bw== + dependencies: + "@types/estree" "*" + "@types/warning@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@types/warning/-/warning-3.0.0.tgz" @@ -704,10 +984,40 @@ "@typescript-eslint/types" "5.52.0" eslint-visitor-keys "^3.3.0" -"@xstate/fsm@1.4.0": - version "1.4.0" - resolved "https://registry.npmjs.org/@xstate/fsm/-/fsm-1.4.0.tgz" - integrity sha512-uTHDeu2xI5E1IFwf37JFQM31RrH7mY7877RqPBS4ZqSNUwoLDuct8AhBWaXGnVizBAYyimVwgCyGa9z/NiRhXA== +"@wry/caches@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@wry/caches/-/caches-1.0.1.tgz#8641fd3b6e09230b86ce8b93558d44cf1ece7e52" + integrity sha512-bXuaUNLVVkD20wcGBWRyo7j9N3TxePEWFZj2Y+r9OoUzfqmavM84+mFykRicNsBqatba5JLay1t48wxaXaWnlA== + dependencies: + tslib "^2.3.0" + +"@wry/context@^0.7.0": + version "0.7.4" + resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.7.4.tgz#e32d750fa075955c4ab2cfb8c48095e1d42d5990" + integrity sha512-jmT7Sb4ZQWI5iyu3lobQxICu2nC/vbUhP0vIdd6tHC9PTfenmRmuIFqktc6GH9cgi+ZHnsLWPvfSvc4DrYmKiQ== + dependencies: + tslib "^2.3.0" + +"@wry/equality@^0.5.6": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.5.7.tgz#72ec1a73760943d439d56b7b1e9985aec5d497bb" + integrity sha512-BRFORjsTuQv5gxcXsuDXx6oGRhuVsEGwZy6LOzRRfgu+eSfxbhUQ9L9YtSEIuIjY/o7g3iWFjrc5eSY1GXP2Dw== + dependencies: + tslib "^2.3.0" + +"@wry/trie@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@wry/trie/-/trie-0.4.3.tgz#077d52c22365871bf3ffcbab8e95cb8bc5689af4" + integrity sha512-I6bHwH0fSf6RqQcnnXLJKhkSXG45MFral3GxPaY4uAl0LYDZM+YDVDAiU9bYwjTuysy1S0IeecWtmq1SZA3M1w== + dependencies: + tslib "^2.3.0" + +"@wry/trie@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@wry/trie/-/trie-0.5.0.tgz#11e783f3a53f6e4cd1d42d2d1323f5bc3fa99c94" + integrity sha512-FNoYzHawTMk/6KMQoEG5O4PuioX19UbwdQKF44yw0nLfOypfQdjtfZzo/UIJWAJ23sNIFbD1Ug9lbaDGMwbqQA== + dependencies: + tslib "^2.3.0" acorn-jsx@^5.3.2: version "5.3.2" @@ -758,6 +1068,13 @@ argparse@^2.0.1: resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +aria-hidden@^1.1.1: + version "1.2.3" + resolved "https://registry.yarnpkg.com/aria-hidden/-/aria-hidden-1.2.3.tgz#14aeb7fb692bbb72d69bebfa47279c1fd725e954" + integrity sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ== + dependencies: + tslib "^2.0.0" + aria-query@^5.1.3: version "5.1.3" resolved "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz" @@ -976,9 +1293,9 @@ classnames@^2.3.1: resolved "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz" integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw== -client-only@0.0.1: +client-only@0.0.1, client-only@^0.0.1: version "0.0.1" - resolved "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz" + resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1" integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== clsx@^1.2.1: @@ -986,12 +1303,13 @@ clsx@^1.2.1: resolved "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz" integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== -codemirror-graphql@^2.0.8: - version "2.0.8" - resolved "https://registry.npmjs.org/codemirror-graphql/-/codemirror-graphql-2.0.8.tgz" - integrity sha512-EU+pXsSKZJAFVdF8j5hbB5gqXsDDjsBiJoohQq09yhsr69pzaI8ZrXjmpuR4CMyf9jgqcz5KK7rsTmxDHmeJPQ== +codemirror-graphql@^2.0.10: + version "2.0.10" + resolved "https://registry.yarnpkg.com/codemirror-graphql/-/codemirror-graphql-2.0.10.tgz#c2ea5943b7c9426293dc158db1659b121d2cd55f" + integrity sha512-rC9NxibCsSzWtCQjHLfwKCkyYdGv2BT/BCgyDoKPrc/e7aGiyLyeT0fB60d+0imwlvhX3lIHncl6JMz2YxQ/jg== dependencies: - graphql-language-service "5.1.6" + "@types/codemirror" "^0.0.90" + graphql-language-service "5.2.0" codemirror@^5.65.3: version "5.65.13" @@ -1586,13 +1904,6 @@ flatted@^3.1.0: resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== -focus-lock@^0.11.6: - version "0.11.6" - resolved "https://registry.npmjs.org/focus-lock/-/focus-lock-0.11.6.tgz" - integrity sha512-KSuV3ur4gf2KqMNoZx3nXNVhqCkn42GuTYCX4tXPEwf0MjpFQmNMiN6m7dXaUXgIoivL6/65agoUMg4RLS0Vbg== - dependencies: - tslib "^2.0.3" - for-each@^0.3.3: version "0.3.3" resolved "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz" @@ -1600,6 +1911,27 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" +framer-motion@^6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-6.5.1.tgz#802448a16a6eb764124bf36d8cbdfa6dd6b931a7" + integrity sha512-o1BGqqposwi7cgDrtg0dNONhkmPsUFDaLcKXigzuTFC5x58mE8iyTazxSudFzmT6MEyJKfjjU8ItoMe3W+3fiw== + dependencies: + "@motionone/dom" "10.12.0" + framesync "6.0.1" + hey-listen "^1.0.8" + popmotion "11.0.3" + style-value-types "5.0.0" + tslib "^2.1.0" + optionalDependencies: + "@emotion/is-prop-valid" "^0.8.2" + +framesync@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/framesync/-/framesync-6.0.1.tgz#5e32fc01f1c42b39c654c35b16440e07a25d6f20" + integrity sha512-fUY88kXvGiIItgNC7wcTOl0SNRCVXMKSWW2Yzfmn7EKNc+MpCzcz9DhdHcdjbrtN3c6R4H5dTY2jiCpPdysEjA== + dependencies: + tslib "^2.1.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" @@ -1759,28 +2091,42 @@ graphiql-explorer@^0.9.0: resolved "https://registry.npmjs.org/graphiql-explorer/-/graphiql-explorer-0.9.0.tgz" integrity sha512-fZC/wsuatqiQDO2otchxriFO0LaWIo/ovF/CQJ1yOudmY0P7pzDiP+l9CEHUiWbizk3e99x6DQG4XG1VxA+d6A== -graphiql@^2.4.1: - version "2.4.7" - resolved "https://registry.npmjs.org/graphiql/-/graphiql-2.4.7.tgz" - integrity sha512-Fm3fVI65EPyXy+PdbeQUyODTwl2NhpZ47msGnGwpDvdEzYdgF7pPrxL96xCfF31KIauS4+ceEJ+ZwEe5iLWiQw== +graphiql@3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/graphiql/-/graphiql-3.0.6.tgz#c23b26874bab3f3a14ba74b91f8d4b870feb6548" + integrity sha512-PuyAhRQibTrwT3RUKmwIGrJAB+M1gg+TAftmChjBqQW0n5WMFFvP5Wcr2NEikomY0s06+oKeUGhBU2iPrq+cSQ== dependencies: - "@graphiql/react" "^0.17.6" - "@graphiql/toolkit" "^0.8.4" - graphql-language-service "^5.1.6" + "@graphiql/react" "^0.19.4" + "@graphiql/toolkit" "^0.9.1" + graphql-language-service "^5.2.0" markdown-it "^12.2.0" -graphql-language-service@5.1.6, graphql-language-service@^5.1.6: - version "5.1.6" - resolved "https://registry.npmjs.org/graphql-language-service/-/graphql-language-service-5.1.6.tgz" - integrity sha512-sl9HTlE/sBoFvZ2SPGnApwpp/a4ahl1d49SOxGm2OIYOslFv00MK7AYms9Yx91omOwAp74is10S7Cjamh5TRQw== +graphql-language-service@5.2.0, graphql-language-service@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/graphql-language-service/-/graphql-language-service-5.2.0.tgz#cfe22b2e911292d724451580632c67d908e5606a" + integrity sha512-o/ZgTS0pBxWm3hSF4+6GwiV1//DxzoLWEbS38+jqpzzy1d/QXBidwQuVYTOksclbtOJZ3KR/tZ8fi/tI6VpVMg== dependencies: nullthrows "^1.0.0" vscode-languageserver-types "^3.17.1" -graphql@^16.6.0: - version "16.6.0" - resolved "https://registry.npmjs.org/graphql/-/graphql-16.6.0.tgz" - integrity sha512-KPIBPDlW7NxrbT/eh4qPXz5FiFdL5UbaA0XUNz2Rp3Z3hqBSkbj0GVjwFDztsWVauZUWsbKHgMg++sk8UX0bkw== +graphql-tag@^2.12.6: + version "2.12.6" + resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.12.6.tgz#d441a569c1d2537ef10ca3d1633b48725329b5f1" + integrity sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg== + dependencies: + tslib "^2.1.0" + +graphql@^16.8.1: + version "16.8.1" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07" + integrity sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw== + +gridjs@6.0.6: + version "6.0.6" + resolved "https://registry.yarnpkg.com/gridjs/-/gridjs-6.0.6.tgz#7983f08d4bc9d4a9616ee2c7bbfc01ef6bf4ddd2" + integrity sha512-TZ20nY+weE/wlyXOd3A9FJyJlsJ/MrHr6frMgUHFN29RmWZCYtnyfF0zuspXC81oePwSJeSZ8HY651aeyX8+rQ== + dependencies: + preact "^10.11.3" has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" @@ -1828,9 +2174,14 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hoist-non-react-statics@^3.0.0: +hey-listen@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/hey-listen/-/hey-listen-1.0.8.tgz#8e59561ff724908de1aa924ed6ecc84a56a9aa68" + integrity sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q== + +hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.3.2: version "3.3.2" - resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== dependencies: react-is "^16.7.0" @@ -2461,6 +2812,16 @@ open@^8.4.0: is-docker "^2.1.1" is-wsl "^2.2.0" +optimism@^0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.18.0.tgz#e7bb38b24715f3fdad8a9a7fc18e999144bbfa63" + integrity sha512-tGn8+REwLRNFnb9WmcY5IfpOqeX2kpaYJ1s6Ae3mn12AeydLkR3j+jSCmVQFoXqU8D41PAJ1RG1rCRNWmNZVmQ== + dependencies: + "@wry/caches" "^1.0.0" + "@wry/context" "^0.7.0" + "@wry/trie" "^0.4.3" + tslib "^2.3.0" + optionator@^0.9.1: version "0.9.1" resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz" @@ -2529,6 +2890,16 @@ picomatch@^2.3.0, picomatch@^2.3.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +popmotion@11.0.3: + version "11.0.3" + resolved "https://registry.yarnpkg.com/popmotion/-/popmotion-11.0.3.tgz#565c5f6590bbcddab7a33a074bb2ba97e24b0cc9" + integrity sha512-Y55FLdj3UxkR7Vl3s7Qr4e9m0onSnP8W7d/xQLsoJM40vs6UKHFdygs6SWryasTZYqugMjm3BepCF4CWXDiHgA== + dependencies: + framesync "6.0.1" + hey-listen "^1.0.8" + style-value-types "5.0.0" + tslib "^2.1.0" + postcss-value-parser@^4.0.2: version "4.2.0" resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" @@ -2543,6 +2914,11 @@ postcss@8.4.14: picocolors "^1.0.0" source-map-js "^1.0.2" +preact@^10.11.3: + version "10.19.3" + resolved "https://registry.yarnpkg.com/preact/-/preact-10.19.3.tgz#7a7107ed2598a60676c943709ea3efb8aaafa899" + integrity sha512-nHHTeFVBTHRGxJXKkKu5hT8C/YWBkPso4/Gad6xuj5dbptt9iF9NZr9pHbPhBrnT2klheu7mHTxTZ/LjwJiEiQ== + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" @@ -2635,13 +3011,6 @@ react-bootstrap@^2.7.2: uncontrollable "^7.2.1" warning "^4.0.3" -react-clientside-effect@^1.2.6: - version "1.2.6" - resolved "https://registry.npmjs.org/react-clientside-effect/-/react-clientside-effect-1.2.6.tgz" - integrity sha512-XGGGRQAKY+q25Lz9a/4EPqom7WRjz3z9R2k4jhVKA/puQFH/5Nt27vFZYql4m4NVNdUvX8PS3O7r/Zzm7cjUlg== - dependencies: - "@babel/runtime" "^7.12.13" - react-dom@18.2.0: version "18.2.0" resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz" @@ -2650,18 +3019,6 @@ react-dom@18.2.0: loose-envify "^1.1.0" scheduler "^0.23.0" -react-focus-lock@^2.5.2: - version "2.9.4" - resolved "https://registry.npmjs.org/react-focus-lock/-/react-focus-lock-2.9.4.tgz" - integrity sha512-7pEdXyMseqm3kVjhdVH18sovparAzLg5h6WvIx7/Ck3ekjhrrDMEegHSa3swwC8wgfdd7DIdUVRGeiHT9/7Sgg== - dependencies: - "@babel/runtime" "^7.0.0" - focus-lock "^0.11.6" - prop-types "^15.6.2" - react-clientside-effect "^1.2.6" - use-callback-ref "^1.3.0" - use-sidecar "^1.1.2" - react-is@^16.13.1, react-is@^16.3.2, react-is@^16.7.0: version "16.13.1" resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" @@ -2672,20 +3029,20 @@ react-lifecycles-compat@^3.0.4: resolved "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== -react-remove-scroll-bar@^2.3.4: +react-remove-scroll-bar@^2.3.3: version "2.3.4" - resolved "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.4.tgz" + resolved "https://registry.yarnpkg.com/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.4.tgz#53e272d7a5cb8242990c7f144c44d8bd8ab5afd9" integrity sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A== dependencies: react-style-singleton "^2.2.1" tslib "^2.0.0" -react-remove-scroll@^2.4.3: - version "2.5.6" - resolved "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.6.tgz" - integrity sha512-bO856ad1uDYLefgArk559IzUNeQ6SWH4QnrevIUjH+GczV56giDfl3h0Idptf2oIKxQmd1p9BN25jleKodTALg== +react-remove-scroll@2.5.5: + version "2.5.5" + resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz#1e31a1260df08887a8a0e46d09271b52b3a37e77" + integrity sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw== dependencies: - react-remove-scroll-bar "^2.3.4" + react-remove-scroll-bar "^2.3.3" react-style-singleton "^2.2.1" tslib "^2.1.0" use-callback-ref "^1.3.0" @@ -2729,6 +3086,11 @@ regenerator-runtime@^0.13.11: resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz" integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + regexp.prototype.flags@^1.4.3: version "1.4.3" resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz" @@ -2766,6 +3128,11 @@ resolve@^2.0.0-next.4: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +response-iterator@^0.2.6: + version "0.2.6" + resolved "https://registry.yarnpkg.com/response-iterator/-/response-iterator-0.2.6.tgz#249005fb14d2e4eeb478a3f735a28fd8b4c9f3da" + integrity sha512-pVzEEzrsg23Sh053rmDUvLSkGXluZio0qu8VT6ukrYuvtjVfCbDZH9d6PGXb8HZfzdNZt8feXv/jvUzlhRgLnw== + ret@~0.1.10: version "0.1.15" resolved "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz" @@ -2960,6 +3327,14 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +style-value-types@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/style-value-types/-/style-value-types-5.0.0.tgz#76c35f0e579843d523187989da866729411fc8ad" + integrity sha512-08yq36Ikn4kx4YU6RD7jWEv27v4V+PUsOGa4n/as8Et3CuODMJQ00ENeAVXAeydX4Z2j1XHZF1K2sX4mGl18fA== + dependencies: + hey-listen "^1.0.8" + tslib "^2.1.0" + styled-components@^5.3.6: version "5.3.6" resolved "https://registry.npmjs.org/styled-components/-/styled-components-5.3.6.tgz" @@ -3002,6 +3377,11 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +symbol-observable@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-4.0.0.tgz#5b425f192279e87f2f9b937ac8540d1984b39205" + integrity sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ== + synckit@^0.8.4: version "0.8.5" resolved "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz" @@ -3010,11 +3390,6 @@ synckit@^0.8.4: "@pkgr/utils" "^2.3.1" tslib "^2.5.0" -tabbable@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/tabbable/-/tabbable-4.0.0.tgz" - integrity sha512-H1XoH1URcBOa/rZZWxLxHCtOdVUEev+9vo5YdYhC9tCY4wnybX+VQrCYuy9ubkg69fCBxCONJOSLGfw0DWMffQ== - tapable@^2.2.0: version "2.2.1" resolved "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz" @@ -3038,11 +3413,6 @@ tiny-glob@^0.2.9: globalyzer "0.1.0" globrex "^0.1.2" -tiny-warning@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz" - integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== - to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" @@ -3070,6 +3440,13 @@ tr46@~0.0.3: resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +ts-invariant@^0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.10.3.tgz#3e048ff96e91459ffca01304dbc7f61c1f642f6c" + integrity sha512-uivwYcQaxAucv1CzRp2n/QdYPo4ILf9VXgH19zEIjFx2EJufV16P0JtJVpYHy89DItG6Kwj2oIUjrcK5au+4tQ== + dependencies: + tslib "^2.1.0" + tsconfig-paths@^3.14.1: version "3.14.1" resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz" @@ -3090,11 +3467,16 @@ tslib@^2.0.0, tslib@^2.1.0, tslib@^2.4.0, tslib@^2.5.0: resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== -tslib@^2.0.3, tslib@^2.3.0: +tslib@^2.3.0: version "2.5.2" resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.2.tgz" integrity sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA== +tslib@^2.3.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz" @@ -3177,6 +3559,11 @@ use-callback-ref@^1.3.0: dependencies: tslib "^2.0.0" +use-debounce@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/use-debounce/-/use-debounce-10.0.0.tgz#5091b18d6c16292605f588bae3c0d2cfae756ff2" + integrity sha512-XRjvlvCB46bah9IBXVnq/ACP2lxqXyZj0D9hj4K5OzNroMDpTEBg8Anuh1/UfRTRs7pLhQ+RiNxxwZu9+MVl1A== + use-sidecar@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz" @@ -3269,3 +3656,15 @@ yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +zen-observable-ts@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-1.2.5.tgz#6c6d9ea3d3a842812c6e9519209365a122ba8b58" + integrity sha512-QZWQekv6iB72Naeake9hS1KxHlotfRpe+WGNbNx5/ta+R3DNjVO2bswf63gXlWDcs+EMd7XY8HfVQyP1X6T4Zg== + dependencies: + zen-observable "0.8.15" + +zen-observable@0.8.15: + version "0.8.15" + resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15" + integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== From 7f6d07cc749afd7784da146a6d1510e41ddad368 Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Tue, 2 Jan 2024 21:43:51 -0500 Subject: [PATCH 08/32] chore: Create __tests__ folder for improved folder structure --- frontend/src/components/Editor/{ => __tests__}/Editor.test.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename frontend/src/components/Editor/{ => __tests__}/Editor.test.js (100%) diff --git a/frontend/src/components/Editor/Editor.test.js b/frontend/src/components/Editor/__tests__/Editor.test.js similarity index 100% rename from frontend/src/components/Editor/Editor.test.js rename to frontend/src/components/Editor/__tests__/Editor.test.js From ed7237419556e756e865747e82a2ddbc13689573 Mon Sep 17 00:00:00 2001 From: Morgan McCauley Date: Fri, 5 Jan 2024 08:54:55 +1300 Subject: [PATCH 09/32] feat: Add created/updated at block heights to registry (#458) This PR adds the `created_at_block_height` and `updated_at_block_height` fields to `IndexerConfig` within the registry contract. The motive behind this is to provide Coordinator V2 with a way for comparing the actual and desired states of the system, i.e. if there is a mismatch between the registry and the system, action should be taken. Without versions, there is no way of making this comparison. ## Compilation Errors ~~I ran in to several issues trying to compile the `wasm32` binary, and have outlined all these issues in https://github.com/near/near-sdk-rs/issues/1125, as well as in the `README.md` so that the fixes are documented. These fixes are a bit janky, but I've tested the deployed contract and all seems to be ok.~~ These have been resolved, see: https://github.com/near/queryapi/pull/458#issuecomment-1874977342 ## Account Roles Migration I've also included `account_roles` in this migration as we have some incorrect accounts as `Owner`s (`pavelnear.near`). All owners will be wiped and re-written from the contract default state. All `User`s will remain. ## Coordinator V1 Coordinator V1 has been tested to ensure that it can still parse the registry after these new fields have been applied. --- block-streamer/Cargo.toml | 2 +- registry/contract/Cargo.lock | 1 - registry/contract/Cargo.toml | 5 +- registry/contract/src/lib.rs | 326 ++++++++++++++++++++++++++++++++--- registry/types/Cargo.toml | 8 +- registry/types/src/lib.rs | 2 + 6 files changed, 312 insertions(+), 32 deletions(-) diff --git a/block-streamer/Cargo.toml b/block-streamer/Cargo.toml index 768929cc0..9bd263c34 100644 --- a/block-streamer/Cargo.toml +++ b/block-streamer/Cargo.toml @@ -24,7 +24,7 @@ tokio-stream = "0.1.14" tonic = "0.10.2" wildmatch = "2.1.1" -registry-types = { path = "../registry/types" } +registry-types = { path = "../registry/types", features = ["near-primitives"] } near-lake-framework = "0.7.4" diff --git a/registry/contract/Cargo.lock b/registry/contract/Cargo.lock index 0e810f77e..86b8c78d1 100644 --- a/registry/contract/Cargo.lock +++ b/registry/contract/Cargo.lock @@ -2059,7 +2059,6 @@ name = "registry-types" version = "0.1.0" dependencies = [ "borsh 1.2.1", - "near-primitives", "near-sdk", "serde", ] diff --git a/registry/contract/Cargo.toml b/registry/contract/Cargo.toml index 15ff97ab5..f361ba790 100644 --- a/registry/contract/Cargo.toml +++ b/registry/contract/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib"] borsh = "1.0.0" near-sdk = "5.0.0-alpha.1" uint = { version = "0.9.3", default-features = false } -registry-types = { path = "../types", features = ["nearsdk"] } +registry-types = { path = "../types", features = ["near-sdk"] } [profile.release] codegen-units = 1 @@ -20,6 +20,3 @@ lto = true debug = false panic = "abort" overflow-checks = true - -[workspace] -members = [] diff --git a/registry/contract/src/lib.rs b/registry/contract/src/lib.rs index a7a4cf761..c9b000bff 100644 --- a/registry/contract/src/lib.rs +++ b/registry/contract/src/lib.rs @@ -21,6 +21,25 @@ pub type IndexersByAccount = UnorderedMap; +#[derive(BorshDeserialize, BorshSerialize, Debug)] +pub struct OldState { + registry: OldIndexersByAccount, + account_roles: Vec, +} + +#[derive(BorshSerialize, BorshDeserialize, Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] +#[serde(crate = "near_sdk::serde")] +pub struct OldIndexerConfig { + pub code: String, + pub start_block_height: Option, + pub schema: Option, + pub filter: IndexerRule, +} + +pub type OldIndexersByAccount = UnorderedMap; + +pub type OldIndexerConfigByFunctionName = UnorderedMap; + // Migration types #[derive(BorshStorageKey, BorshSerialize)] pub enum StorageKeys { @@ -28,6 +47,8 @@ pub enum StorageKeys { Account(CryptoHash), // can be removed after migration RegistryV1, AccountV1(CryptoHash), + RegistryV2, + AccountV2(CryptoHash), } /// These roles are used to control access across the various contract methods. @@ -75,14 +96,6 @@ impl Default for Contract { account_id: "flatirons.near".parse().unwrap(), role: Role::Owner, }, - AccountRole { - account_id: "root.near".parse().unwrap(), - role: Role::Owner, - }, - AccountRole { - account_id: "khorolets.near".parse().unwrap(), - role: Role::Owner, - }, AccountRole { account_id: "darunrs.near".parse().unwrap(), role: Role::Owner, @@ -99,6 +112,52 @@ impl Default for Contract { // Implement the contract structure #[near_bindgen] impl Contract { + #[private] + #[init(ignore_state)] + pub fn migrate() -> Self { + let state: OldState = env::state_read().expect("failed to parse existing state"); + + let mut registry = IndexersByAccount::new(StorageKeys::RegistryV2); + + for (account_id, indexers) in state.registry.iter() { + let mut new_indexers: IndexerConfigByFunctionName = IndexerConfigByFunctionName::new( + StorageKeys::AccountV2(env::sha256_array(account_id.as_bytes())), + ); + + for (function_name, indexer_config) in indexers.iter() { + new_indexers.insert( + function_name.to_string(), + IndexerConfig { + updated_at_block_height: None, + created_at_block_height: env::block_height(), + schema: indexer_config.schema.clone(), + code: indexer_config.code.clone(), + start_block_height: indexer_config.start_block_height, + filter: indexer_config.filter.clone(), + }, + ); + } + + registry.insert(account_id.clone(), new_indexers); + } + + let account_roles: Vec<_> = Contract::default() + .account_roles + .into_iter() + .chain( + state + .account_roles + .into_iter() + .filter(|account_role| account_role.role == Role::User), + ) + .collect(); + + Self { + registry, + account_roles, + } + } + pub fn near_social_indexer_rule() -> IndexerRule { let contract = "social.near"; let method = "set"; @@ -244,7 +303,7 @@ impl Contract { } }; - let filter_rule: IndexerRule = match filter_json { + let filter: IndexerRule = match filter_json { Some(filter_json) => { let filter_rule: IndexerRule = serde_json::from_str(&filter_json).unwrap_or_else(|_| { @@ -262,20 +321,36 @@ impl Contract { &account_id ); - self.registry - .entry(account_id.clone()) - .or_insert(IndexerConfigByFunctionName::new(StorageKeys::Account( - env::sha256_array(account_id.as_bytes()), - ))) - .insert( - function_name, - IndexerConfig { + let account_indexers = + self.registry + .entry(account_id.clone()) + .or_insert(IndexerConfigByFunctionName::new(StorageKeys::Account( + env::sha256_array(account_id.as_bytes()), + ))); + + match account_indexers.entry(function_name) { + near_sdk::store::unordered_map::Entry::Occupied(mut entry) => { + let indexer = entry.get(); + entry.insert(IndexerConfig { code, start_block_height, schema, - filter: filter_rule, - }, - ); + filter, + updated_at_block_height: Some(env::block_height()), + created_at_block_height: indexer.created_at_block_height, + }); + } + near_sdk::store::unordered_map::Entry::Vacant(entry) => { + entry.insert(IndexerConfig { + code, + start_block_height, + schema, + filter, + updated_at_block_height: None, + created_at_block_height: env::block_height(), + }); + } + } } pub fn remove_indexer_function(&mut self, function_name: String, account_id: Option) { @@ -368,6 +443,99 @@ mod tests { use std::collections::HashMap; + #[test] + fn migrate() { + let mut registry = OldIndexersByAccount::new(StorageKeys::RegistryV1); + let account_id = "morgs.near".parse::().unwrap(); + let mut functions = OldIndexerConfigByFunctionName::new(StorageKeys::AccountV1( + env::sha256_array(account_id.as_bytes()), + )); + + functions.insert( + "test".to_string(), + OldIndexerConfig { + code: "return block;".to_string(), + start_block_height: None, + schema: None, + filter: Contract::near_social_indexer_rule(), + }, + ); + functions.insert( + "test2".to_string(), + OldIndexerConfig { + code: "return block2;".to_string(), + start_block_height: None, + schema: None, + filter: Contract::near_social_indexer_rule(), + }, + ); + registry.insert(account_id.clone(), functions); + + env::state_write(&OldState { + registry, + account_roles: vec![ + AccountRole { + account_id: account_id.clone(), + role: Role::Owner, + }, + AccountRole { + account_id: "should-be-removed.near".parse().unwrap(), + role: Role::Owner, + }, + AccountRole { + account_id: "bob.near".parse().unwrap(), + role: Role::User, + }, + ], + }); + + let contract = Contract::migrate(); + + assert_eq!( + contract + .registry + .get(&account_id) + .unwrap() + .get("test") + .unwrap(), + &IndexerConfig { + code: "return block;".to_string(), + start_block_height: None, + schema: None, + filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: env::block_height(), + } + ); + assert_eq!( + contract + .registry + .get(&account_id) + .unwrap() + .get("test2") + .unwrap(), + &IndexerConfig { + code: "return block2;".to_string(), + start_block_height: None, + schema: None, + filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: env::block_height(), + } + ); + assert_eq!( + contract.account_roles, + Contract::default() + .account_roles + .into_iter() + .chain(std::iter::once(AccountRole { + account_id: "bob.near".parse().unwrap(), + role: Role::User, + })) + .collect::>() + ); + } + #[test] fn list_account_roles() { let admins = vec![ @@ -584,6 +752,8 @@ mod tests { start_block_height: Some(43434343), schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }; contract.register_indexer_function( @@ -615,6 +785,8 @@ mod tests { start_block_height: Some(43434343), schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }; contract.register_indexer_function( "test".to_string(), @@ -728,6 +900,8 @@ mod tests { start_block_height: None, schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }; contract.register_indexer_function( @@ -750,6 +924,36 @@ mod tests { ); } + #[test] + fn sets_updated_at_and_created_at_for_new_account() { + let mut contract = Contract { + registry: IndexersByAccount::new(StorageKeys::Registry), + account_roles: vec![AccountRole { + account_id: "bob.near".parse().unwrap(), + role: Role::User, + }], + }; + + contract.register_indexer_function( + "test".to_string(), + "".to_string(), + Some(100), + Some("".to_string()), + None, + None, + ); + + let indexer_config = contract + .registry + .get(&"bob.near".parse::().unwrap()) + .unwrap() + .get("test") + .unwrap(); + + assert_eq!(indexer_config.updated_at_block_height, None); + assert_eq!(indexer_config.created_at_block_height, env::block_height()); + } + #[test] fn register_indexer_function_with_filter_function_call() { let mut contract = Contract { @@ -773,6 +977,8 @@ mod tests { id: None, name: None, }, + updated_at_block_height: None, + created_at_block_height: 0, }; contract.register_indexer_function( @@ -817,6 +1023,8 @@ mod tests { id: None, name: None, }, + updated_at_block_height: None, + created_at_block_height: 0, }; contract.register_indexer_function( @@ -862,6 +1070,56 @@ mod tests { ); } + #[test] + fn sets_updated_at_and_created_at_for_existing_account() { + let account_id = "bob.near".parse::().unwrap(); + let mut account_indexers = IndexerConfigByFunctionName::new(StorageKeys::Account( + env::sha256_array(account_id.as_bytes()), + )); + account_indexers.insert( + "test".to_string(), + IndexerConfig { + code: "var x= 1;".to_string(), + start_block_height: Some(43434343), + schema: None, + filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 100, + }, + ); + let mut registry = IndexersByAccount::new(StorageKeys::Registry); + registry.insert(account_id, account_indexers); + let mut contract = Contract { + registry, + account_roles: vec![AccountRole { + account_id: "bob.near".parse().unwrap(), + role: Role::User, + }], + }; + + contract.register_indexer_function( + "test".to_string(), + "".to_string(), + Some(100), + Some("".to_string()), + None, + None, + ); + + let indexer_config = contract + .registry + .get(&"bob.near".parse::().unwrap()) + .unwrap() + .get("test") + .unwrap(); + + assert_eq!( + indexer_config.updated_at_block_height, + Some(env::block_height()) + ); + assert_eq!(indexer_config.created_at_block_height, 100); + } + #[test] fn register_indexer_function_for_existing_account() { let account_id = "bob.near".parse::().unwrap(); @@ -875,6 +1133,8 @@ mod tests { start_block_height: Some(43434343), schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }, ); let mut registry = IndexersByAccount::new(StorageKeys::Registry); @@ -891,6 +1151,8 @@ mod tests { start_block_height: None, schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }; contract.register_indexer_function( @@ -925,6 +1187,8 @@ mod tests { start_block_height: Some(43434343), schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }, ); let mut registry = IndexersByAccount::new(StorageKeys::Registry); @@ -958,6 +1222,8 @@ mod tests { start_block_height: Some(43434343), schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }, ); let mut registry = IndexersByAccount::new(StorageKeys::Registry); @@ -992,6 +1258,8 @@ mod tests { start_block_height: Some(43434343), schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }, ); let mut registry = IndexersByAccount::new(StorageKeys::Registry); @@ -1020,6 +1288,8 @@ mod tests { start_block_height: Some(43434343), schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }, ); let mut registry = IndexersByAccount::new(StorageKeys::Registry); @@ -1054,6 +1324,8 @@ mod tests { start_block_height: Some(43434343), schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }, ); let mut registry = IndexersByAccount::new(StorageKeys::Registry); @@ -1079,6 +1351,8 @@ mod tests { start_block_height: Some(43434343), schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }, ); account_indexers.insert( @@ -1088,6 +1362,8 @@ mod tests { start_block_height: Some(43434343), schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }, ); let mut registry = IndexersByAccount::new(StorageKeys::Registry); @@ -1136,6 +1412,8 @@ mod tests { start_block_height: None, schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }; let account_id = "bob.near".parse::().unwrap(); let mut account_indexers = IndexerConfigByFunctionName::new(StorageKeys::Account( @@ -1162,6 +1440,8 @@ mod tests { start_block_height: None, schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }; let account_id = "alice.near".parse::().unwrap(); let mut account_indexers = IndexerConfigByFunctionName::new(StorageKeys::Account( @@ -1196,6 +1476,8 @@ mod tests { start_block_height: Some(43434343), schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }; let account_id = "bob.near".parse::().unwrap(); let mut account_indexers = IndexerConfigByFunctionName::new(StorageKeys::Account( @@ -1225,6 +1507,8 @@ mod tests { start_block_height: Some(43434343), schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }; let account_id = "bob.near".parse::().unwrap(); let mut account_indexers = IndexerConfigByFunctionName::new(StorageKeys::Account( @@ -1262,6 +1546,8 @@ mod tests { start_block_height: Some(43434343), schema: None, filter: Contract::near_social_indexer_rule(), + updated_at_block_height: None, + created_at_block_height: 0, }; let account_id = "alice.near".parse::().unwrap(); let mut account_indexers = IndexerConfigByFunctionName::new(StorageKeys::Account( diff --git a/registry/types/Cargo.toml b/registry/types/Cargo.toml index 2965f121a..2b6264f88 100644 --- a/registry/types/Cargo.toml +++ b/registry/types/Cargo.toml @@ -4,12 +4,8 @@ version = "0.1.0" edition = "2021" [dependencies] -borsh = { version = "1.2.1", features = ["derive"], optional = true} -serde = { version = "1.0.193", optional = true } +borsh = { version = "1.2.1", features = ["derive"] } +serde = { version = "1.0.193" } near-primitives = { version = "0.17.0", optional = true} near-sdk = { version = "5.0.0-alpha.1", optional = true } - -[features] -default = ["near-primitives", "borsh", "serde"] -nearsdk = ["near-sdk"] diff --git a/registry/types/src/lib.rs b/registry/types/src/lib.rs index 6f42e09ba..ddbd16bd8 100644 --- a/registry/types/src/lib.rs +++ b/registry/types/src/lib.rs @@ -66,6 +66,8 @@ pub struct IndexerConfig { pub start_block_height: Option, pub schema: Option, pub filter: IndexerRule, + pub updated_at_block_height: Option, + pub created_at_block_height: u64, } #[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] From 313ccbe11ed37b73b423b5319c177816837279f5 Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Thu, 4 Jan 2024 17:28:22 -0500 Subject: [PATCH 10/32] remove side effects from reformatAll function --- frontend/src/components/Editor/Editor.jsx | 2 -- frontend/src/utils/validators.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/components/Editor/Editor.jsx b/frontend/src/components/Editor/Editor.jsx index 5efbb3b07..11cfabb3d 100644 --- a/frontend/src/components/Editor/Editor.jsx +++ b/frontend/src/components/Editor/Editor.jsx @@ -248,8 +248,6 @@ const Editor = ({ console.error(error); setError("Could not format your SQL schema. Make sure it is proper SQL DDL"); } - setIndexingCode(formattedCode); - setSchema(formattedSql); return { formattedCode, formattedSql } }; diff --git a/frontend/src/utils/validators.js b/frontend/src/utils/validators.js index 73bae1e65..901d54bdc 100644 --- a/frontend/src/utils/validators.js +++ b/frontend/src/utils/validators.js @@ -32,6 +32,6 @@ export async function validateSQLSchema(schema) { } catch (error) { console.error(error.message) - return { data: null, error }; + return { data: schema, error }; } }; \ No newline at end of file From d333b84b853ce30647257287654f2e71c803eebf Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Thu, 4 Jan 2024 17:55:06 -0500 Subject: [PATCH 11/32] refactor: make codeValidation reusable and separate concerns in reformatAll function --- frontend/src/components/Editor/Editor.jsx | 36 ++++++++++++----------- frontend/src/utils/validators.js | 14 ++++++++- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/frontend/src/components/Editor/Editor.jsx b/frontend/src/components/Editor/Editor.jsx index 11cfabb3d..efcf80e9a 100644 --- a/frontend/src/components/Editor/Editor.jsx +++ b/frontend/src/components/Editor/Editor.jsx @@ -22,7 +22,7 @@ import { ForkIndexerModal } from "../Modals/ForkIndexerModal"; import { getLatestBlockHeight } from "../../utils/getLatestBlockHeight"; import { IndexerDetailsContext } from '../../contexts/IndexerDetailsContext'; import { PgSchemaTypeGen } from "../../utils/pgSchemaTypeGen"; -import { validateSQLSchema } from "@/utils/validators"; +import { validateJSCode, validateSQLSchema } from "@/utils/validators"; const BLOCKHEIGHT_LIMIT = 3600; @@ -217,7 +217,9 @@ const Editor = ({ setSchema(unformatted_schema); } - reformatAll(unformatted_wrapped_indexing_code, unformatted_schema); + const { formattedCode, formattedSchema } = reformatAll(unformatted_wrapped_indexing_code, unformatted_schema); + setIndexingCode(formattedCode); + setSchema(formattedSchema); } catch (formattingError) { console.log(formattingError); } @@ -232,23 +234,21 @@ const Editor = ({ }; const reformatAll = (indexingCode, schema) => { - let formattedCode = indexingCode - let formattedSql = schema; - try { - formattedCode = formatIndexingCode(indexingCode); - setError(undefined); - } catch (error) { - console.error("error", error) + let { formattedCode, codeError } = validateJSCode(indexingCode); + + if (codeError) { + formattedCode = indexingCode setError("Oh snap! We could not format your code. Make sure it is proper Javascript code."); } - try { - formattedSql = formatSQL(schema); - setError(undefined); - } catch (error) { - console.error(error); - setError("Could not format your SQL schema. Make sure it is proper SQL DDL"); + + let { data: formattedSchema, error: schemaError } = validateSQLSchema(schema); + + if (schemaError) { + formattedSchema = schema; + setError("There was an error in your SQL schema. Make sure it is proper SQL DDL"); } - return { formattedCode, formattedSql } + + return { formattedCode, formattedSchema } }; function handleCodeGen() { @@ -263,7 +263,9 @@ const Editor = ({ } async function handleFormating() { - await reformatAll(indexingCode, schema); + const { formattedCode, formattedSchema } = await reformatAll(indexingCode, schema); + setIndexingCode(formattedCode); + setSchema(formattedSchema); } function handleEditorMount(editor) { diff --git a/frontend/src/utils/validators.js b/frontend/src/utils/validators.js index 901d54bdc..397425cdb 100644 --- a/frontend/src/utils/validators.js +++ b/frontend/src/utils/validators.js @@ -1,4 +1,4 @@ -import { formatSQL } from "./formatters"; +import { formatIndexingCode, formatSQL } from "./formatters"; import { PgSchemaTypeGen } from "./pgSchemaTypeGen"; import { CONTRACT_NAME_REGEX } from '../constants/RegexExp'; @@ -31,6 +31,18 @@ export async function validateSQLSchema(schema) { return { data: formattedSchema, error: null } } catch (error) { + console.error(error.message) + return { data: schema, error }; + } +}; + +export async function validateJSCode(code) { + + try { + const formattedCode = await formatIndexingCode(code); + return { data: formattedCode, error: null } + + } catch (error) { console.error(error.message) return { data: schema, error }; } From efb5bde7cd1a375e4ecc54825dbf48ea5bf19e03 Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Thu, 4 Jan 2024 18:35:37 -0500 Subject: [PATCH 12/32] refactor: separate concern con useEffect, and react separately to changes on the indexerDetails object. - Show the schema even if it fails the validations --- frontend/src/components/Editor/Editor.jsx | 41 ++++++++++++----------- frontend/src/utils/validators.js | 4 +++ 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/frontend/src/components/Editor/Editor.jsx b/frontend/src/components/Editor/Editor.jsx index efcf80e9a..464d0f1b5 100644 --- a/frontend/src/components/Editor/Editor.jsx +++ b/frontend/src/components/Editor/Editor.jsx @@ -83,13 +83,28 @@ const Editor = ({ const disposableRef = useRef(null); useEffect(() => { - if (!indexerDetails.code || !indexerDetails.schema) return - const { formattedCode, formattedSchema } = reformatAll(indexerDetails.code, indexerDetails.schema) - setOriginalSQLCode(formattedSchema) - setOriginalIndexingCode(formattedCode) - setIndexingCode(formattedCode) - setSchema(formattedSchema) - }, [indexerDetails.code, indexerDetails.schema]); + if (!indexerDetails.code) { + const { data: formattedCode, error } = validateJSCode(indexerDetails.code) + + if (error) { + setError("There was an error while formatting your code. Please check the console for more details") + } + setOriginalIndexingCode(formattedCode) + setIndexingCode(formattedCode) + } + }, [indexerDetails.code]); + + useEffect(() => { + if (indexerDetails.schema) { + const { data: formattedSchema, error } = validateSQLSchema(indexerDetails.schema); + + if (error) { + setError("There was an error in your schema. Please check the console for more details") + } + + setSchema(formattedSchema) + } + }, [indexerDetails.schema]) useEffect(() => { const savedSchema = localStorage.getItem(SCHEMA_STORAGE_KEY); @@ -116,18 +131,6 @@ const Editor = ({ return blockHeight } - useEffect(() => { - if (fileName === "indexingLogic.js") { - try { - setSchemaTypes(pgSchemaTypeGen.generateTypes(schema)); - setError(undefined); - } catch (error) { - console.error("Error generating types for saved schema.\n", error.message); - setError("There was an error with your schema. Check the console for more details."); - } - } - }, [fileName]); - useEffect(() => { localStorage.setItem(DEBUG_LIST_STORAGE_KEY, heights); }, [heights]); diff --git a/frontend/src/utils/validators.js b/frontend/src/utils/validators.js index 397425cdb..abcba2cfa 100644 --- a/frontend/src/utils/validators.js +++ b/frontend/src/utils/validators.js @@ -22,6 +22,8 @@ export function validateContractIds(accountIds) { * @returns {{ data: string | null, error: string | null }} - An object containing the formatted schema and error (if any). */ export async function validateSQLSchema(schema) { + if (!schema) return { data: null, error: null }; + const pgSchemaTypeGen = new PgSchemaTypeGen(); try { @@ -38,6 +40,8 @@ export async function validateSQLSchema(schema) { export async function validateJSCode(code) { + if (!code) return { data: null, error: null }; + try { const formattedCode = await formatIndexingCode(code); return { data: formattedCode, error: null } From e43d57e5be5e6c9e27bdd9b865c5ec7ef59090b9 Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Thu, 4 Jan 2024 18:45:10 -0500 Subject: [PATCH 13/32] fix: remove dead code --- frontend/src/components/Editor/Editor.jsx | 13 ------------- .../src/components/Editor/ResizableLayoutEditor.jsx | 1 - 2 files changed, 14 deletions(-) diff --git a/frontend/src/components/Editor/Editor.jsx b/frontend/src/components/Editor/Editor.jsx index 464d0f1b5..afd9ecc27 100644 --- a/frontend/src/components/Editor/Editor.jsx +++ b/frontend/src/components/Editor/Editor.jsx @@ -271,18 +271,6 @@ const Editor = ({ setSchema(formattedSchema); } - function handleEditorMount(editor) { - const modifiedEditor = editor.getModifiedEditor(); - modifiedEditor.onDidChangeModelContent((_) => { - if (fileName == "indexingLogic.js") { - setIndexingCode(modifiedEditor.getValue()); - } - if (fileName == "schema.sql") { - setSchema(modifiedEditor.getValue()); - } - }); - } - function handleEditorWillMount(monaco) { monaco.languages.typescript.typescriptDefaults.addExtraLib( `${primitives}}`, @@ -401,7 +389,6 @@ const Editor = ({ schema={schema} isCreateNewIndexer={isCreateNewIndexer} handleEditorWillMount={handleEditorWillMount} - handleEditorMount={handleEditorMount} /> } diff --git a/frontend/src/components/Editor/ResizableLayoutEditor.jsx b/frontend/src/components/Editor/ResizableLayoutEditor.jsx index 324ec7721..1d125fc19 100644 --- a/frontend/src/components/Editor/ResizableLayoutEditor.jsx +++ b/frontend/src/components/Editor/ResizableLayoutEditor.jsx @@ -48,7 +48,6 @@ const ResizableEditor = ({ schema, indexingCode, handleEditorWillMount, - handleEditorMount, isCreateNewIndexer }) => { const { firstRef, secondRef, dragBarRef } = useDragResize({ From fabed5c879b950f72c6cb8fe0c20421062d87bf8 Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Thu, 4 Jan 2024 18:48:08 -0500 Subject: [PATCH 14/32] refactor: Replace requestLatestBlockHeight with direct getLatestBlockHeight call --- frontend/src/components/Editor/Editor.jsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/frontend/src/components/Editor/Editor.jsx b/frontend/src/components/Editor/Editor.jsx index afd9ecc27..389ee1c0d 100644 --- a/frontend/src/components/Editor/Editor.jsx +++ b/frontend/src/components/Editor/Editor.jsx @@ -126,11 +126,6 @@ const Editor = ({ attachTypesToMonaco(); }, [schemaTypes, monacoMount]); - const requestLatestBlockHeight = async () => { - const blockHeight = getLatestBlockHeight() - return blockHeight - } - useEffect(() => { localStorage.setItem(DEBUG_LIST_STORAGE_KEY, heights); }, [heights]); @@ -297,7 +292,7 @@ const Editor = ({ await indexerRunner.start(startingBlockHeight, indexingCode, schema, schemaName, option) break case "latest": - const latestHeight = await requestLatestBlockHeight() + const latestHeight = getLatestBlockHeight(); if (latestHeight) await indexerRunner.start(latestHeight - 10, indexingCode, schema, schemaName, option) } setIsExecutingIndexerFunction(() => false) From ae8315e32b2601faa4f4f0aa3abc231b081c4fa1 Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Thu, 4 Jan 2024 18:48:08 -0500 Subject: [PATCH 15/32] refactor: Replace requestLatestBlockHeight with direct getLatestBlockHeight call --- frontend/src/components/Editor/Editor.jsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/frontend/src/components/Editor/Editor.jsx b/frontend/src/components/Editor/Editor.jsx index afd9ecc27..f7315d87f 100644 --- a/frontend/src/components/Editor/Editor.jsx +++ b/frontend/src/components/Editor/Editor.jsx @@ -126,11 +126,6 @@ const Editor = ({ attachTypesToMonaco(); }, [schemaTypes, monacoMount]); - const requestLatestBlockHeight = async () => { - const blockHeight = getLatestBlockHeight() - return blockHeight - } - useEffect(() => { localStorage.setItem(DEBUG_LIST_STORAGE_KEY, heights); }, [heights]); @@ -297,7 +292,7 @@ const Editor = ({ await indexerRunner.start(startingBlockHeight, indexingCode, schema, schemaName, option) break case "latest": - const latestHeight = await requestLatestBlockHeight() + const latestHeight = await getLatestBlockHeight(); if (latestHeight) await indexerRunner.start(latestHeight - 10, indexingCode, schema, schemaName, option) } setIsExecutingIndexerFunction(() => false) From 1dcdb3b636ac68efe77678c8d0ee210b8d238a99 Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Thu, 4 Jan 2024 19:41:29 -0500 Subject: [PATCH 16/32] refactor: only validate schemas different from the default --- frontend/src/components/Editor/Editor.jsx | 65 +++++++++++++++-------- frontend/src/utils/validators.js | 8 ++- 2 files changed, 48 insertions(+), 25 deletions(-) diff --git a/frontend/src/components/Editor/Editor.jsx b/frontend/src/components/Editor/Editor.jsx index f7315d87f..aad67d8dc 100644 --- a/frontend/src/components/Editor/Editor.jsx +++ b/frontend/src/components/Editor/Editor.jsx @@ -83,29 +83,49 @@ const Editor = ({ const disposableRef = useRef(null); useEffect(() => { - if (!indexerDetails.code) { - const { data: formattedCode, error } = validateJSCode(indexerDetails.code) + if (indexerDetails.code != null) { + (async () => { + const { data: formattedCode, error: codeError } = await validateJSCode(indexerDetails.code) - if (error) { - setError("There was an error while formatting your code. Please check the console for more details") - } - setOriginalIndexingCode(formattedCode) - setIndexingCode(formattedCode) + if (codeError) { + setError("There was an error while formatting your code. Please check the console for more details") + } + + setOriginalIndexingCode(formattedCode) + setIndexingCode(formattedCode) + })() } + }, [indexerDetails.code]); useEffect(() => { - if (indexerDetails.schema) { - const { data: formattedSchema, error } = validateSQLSchema(indexerDetails.schema); - - if (error) { - setError("There was an error in your schema. Please check the console for more details") - } + if (indexerDetails.schema != null) { + (async () => { + const { data: formattedSchema, error: schemaError } = await validateSQLSchema(indexerDetails.schema); + if (schemaError) { + setError("There was an error in your schema. Please check the console for more details") + } - setSchema(formattedSchema) + setSchema(formattedSchema) + })(); } }, [indexerDetails.schema]) + useEffect(() => { + (async () => { + if (fileName === 'indexingLogic.js') { + const { _, error: schemaError } = await validateSQLSchema(schema); + if (schemaError) setError("There is an error in your schema. Please check the console for more details") + else setError(); + } else { + const { _, error: codeError } = await validateJSCode(indexingCode); + if (codeError) setError("There is an error in your code. Please check the console for more details") + else setError(); + } + })() + + }, [fileName]) + useEffect(() => { const savedSchema = localStorage.getItem(SCHEMA_STORAGE_KEY); const savedCode = localStorage.getItem(CODE_STORAGE_KEY); @@ -161,9 +181,9 @@ const Editor = ({ } const registerFunction = async (indexerName, indexerConfig) => { - const { data: formattedSchema, error } = await validateSQLSchema(schema); + const { data: formattedSchema, error: schemaError } = await validateSQLSchema(schema); - if (error) { + if (schemaError) { setError("There was an error in your schema, please check the console for more details"); return; } @@ -231,15 +251,15 @@ const Editor = ({ return isUserIndexer ? actionButtonText : "Fork Indexer"; }; - const reformatAll = (indexingCode, schema) => { - let { formattedCode, codeError } = validateJSCode(indexingCode); + const reformatAll = async (indexingCode, schema) => { + let { formattedCode, codeError } = await validateJSCode(indexingCode); if (codeError) { formattedCode = indexingCode setError("Oh snap! We could not format your code. Make sure it is proper Javascript code."); } - let { data: formattedSchema, error: schemaError } = validateSQLSchema(schema); + let { data: formattedSchema, error: schemaError } = await validateSQLSchema(schema); if (schemaError) { formattedSchema = schema; @@ -253,9 +273,8 @@ const Editor = ({ try { setSchemaTypes(pgSchemaTypeGen.generateTypes(schema)); attachTypesToMonaco(); // Just in case schema types have been updated but weren't added to monaco - setError(undefined); - } catch (error) { - console.error("Error generating types for saved schema.\n", error); + } catch (_error) { + console.error("Error generating types for saved schema.\n", _error); setError("Oh snap! We could not generate types for your SQL schema. Make sure it is proper SQL DDL."); } } @@ -350,7 +369,7 @@ const Editor = ({ }} > {error && ( - setError(undefined)} className="px-3 pt-3" variant="danger"> + {error} )} diff --git a/frontend/src/utils/validators.js b/frontend/src/utils/validators.js index abcba2cfa..394035436 100644 --- a/frontend/src/utils/validators.js +++ b/frontend/src/utils/validators.js @@ -1,4 +1,4 @@ -import { formatIndexingCode, formatSQL } from "./formatters"; +import { defaultSchema, formatIndexingCode, formatSQL } from "./formatters"; import { PgSchemaTypeGen } from "./pgSchemaTypeGen"; import { CONTRACT_NAME_REGEX } from '../constants/RegexExp'; @@ -24,10 +24,14 @@ export function validateContractIds(accountIds) { export async function validateSQLSchema(schema) { if (!schema) return { data: null, error: null }; + if (schema === formatSQL(defaultSchema)) return { data: schema, error: null }; + const pgSchemaTypeGen = new PgSchemaTypeGen(); + console.log(schema) + try { - const formattedSchema = await formatSQL(schema); + const formattedSchema = formatSQL(schema); pgSchemaTypeGen.generateTypes(formattedSchema); // Sanity check return { data: formattedSchema, error: null } From f844da08451b2728a5dd0baba6df49e7415f8e4f Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Thu, 4 Jan 2024 19:47:20 -0500 Subject: [PATCH 17/32] refactor: remove log --- frontend/src/utils/validators.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/src/utils/validators.js b/frontend/src/utils/validators.js index 394035436..0a8a5596e 100644 --- a/frontend/src/utils/validators.js +++ b/frontend/src/utils/validators.js @@ -28,8 +28,6 @@ export async function validateSQLSchema(schema) { const pgSchemaTypeGen = new PgSchemaTypeGen(); - console.log(schema) - try { const formattedSchema = formatSQL(schema); pgSchemaTypeGen.generateTypes(formattedSchema); // Sanity check From 37157826ffc7110b8973b679b62e1aedb8c58617 Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Thu, 4 Jan 2024 22:14:55 -0500 Subject: [PATCH 18/32] fix: fix issue when generating types, based on response type from astify method --- frontend/src/utils/pgSchemaTypeGen.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/utils/pgSchemaTypeGen.js b/frontend/src/utils/pgSchemaTypeGen.js index 8db5f2fb7..355b60afd 100644 --- a/frontend/src/utils/pgSchemaTypeGen.js +++ b/frontend/src/utils/pgSchemaTypeGen.js @@ -55,8 +55,10 @@ export class PgSchemaTypeGen { const schemaSyntaxTree = this.parser.astify(sqlSchema, { database: "Postgresql" }); const dbSchema = {}; + const statements = Array.isArray(schemaSyntaxTree) ? schemaSyntaxTree : [schemaSyntaxTree]; + // Process each statement in the schema - for (const statement of schemaSyntaxTree) { + for (const statement of statements) { if (statement.type === "create" && statement.keyword === "table") { // Process CREATE TABLE statements const tableName = statement.table[0].table; From ed081657b71f9161c0ae42176331fee799d6f87b Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Thu, 4 Jan 2024 22:29:24 -0500 Subject: [PATCH 19/32] refactor: decouple ResizableLayourEditor from Editor --- frontend/src/components/Editor/Editor.jsx | 39 ++++++++++++------- .../Editor/ResizableLayoutEditor.jsx | 26 ++++--------- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/frontend/src/components/Editor/Editor.jsx b/frontend/src/components/Editor/Editor.jsx index aad67d8dc..ba3ca9074 100644 --- a/frontend/src/components/Editor/Editor.jsx +++ b/frontend/src/components/Editor/Editor.jsx @@ -23,6 +23,7 @@ import { getLatestBlockHeight } from "../../utils/getLatestBlockHeight"; import { IndexerDetailsContext } from '../../contexts/IndexerDetailsContext'; import { PgSchemaTypeGen } from "../../utils/pgSchemaTypeGen"; import { validateJSCode, validateSQLSchema } from "@/utils/validators"; +import { useDebouncedCallback } from "use-debounce"; const BLOCKHEIGHT_LIMIT = 3600; @@ -67,6 +68,7 @@ const Editor = ({ const [diffView, setDiffView] = useState(false); const [blockView, setBlockView] = useState(false); + const [isExecutingIndexerFunction, setIsExecutingIndexerFunction] = useState(false); const { height, selectedTab, currentUserAccountId } = useInitialPayload(); @@ -81,6 +83,12 @@ const Editor = ({ const indexerRunner = useMemo(() => new IndexerRunner(handleLog), []); const pgSchemaTypeGen = new PgSchemaTypeGen(); const disposableRef = useRef(null); + const debouncedValidateSQLSchema = useDebouncedCallback((_schema) => { + const { error: schemaError } = validateSQLSchema(_schema); + if (!schemaError) { + setError(); + } + }, 500); useEffect(() => { if (indexerDetails.code != null) { @@ -113,15 +121,12 @@ const Editor = ({ useEffect(() => { (async () => { - if (fileName === 'indexingLogic.js') { - const { _, error: schemaError } = await validateSQLSchema(schema); - if (schemaError) setError("There is an error in your schema. Please check the console for more details") - else setError(); - } else { - const { _, error: codeError } = await validateJSCode(indexingCode); - if (codeError) setError("There is an error in your code. Please check the console for more details") - else setError(); - } + const { error: schemaError } = await validateSQLSchema(schema); + const { error: codeError } = await validateJSCode(indexingCode); + + if (schemaError) setError("There is an error in your schema. Please check the console for more details") + else if (codeError) setError("There is an error in your code. Please check the console for more details") + else setError(); })() }, [fileName]) @@ -167,7 +172,6 @@ const Editor = ({ } } - const forkIndexer = async (indexerName) => { let code = indexingCode; setAccountId(currentUserAccountId) @@ -317,6 +321,15 @@ const Editor = ({ setIsExecutingIndexerFunction(() => false) } + function handleOnChangeSchema(_schema) { + setSchema(_schema); + debouncedValidateSQLSchema(_schema); + } + + function handleOnChangeCode(_code) { + setIndexingCode(_code); + } + return (
{error && ( - + setError()} className="px-3 pt-3" variant="danger"> {error} )} @@ -395,8 +408,8 @@ const Editor = ({ indexingCode={indexingCode} blockView={blockView} diffView={diffView} - setIndexingCode={setIndexingCode} - setSchema={setSchema} + onChangeCode={handleOnChangeCode} + onChangeSchema={handleOnChangeSchema} block_details={block_details} originalSQLCode={originalSQLCode} originalIndexingCode={originalIndexingCode} diff --git a/frontend/src/components/Editor/ResizableLayoutEditor.jsx b/frontend/src/components/Editor/ResizableLayoutEditor.jsx index 1d125fc19..049191965 100644 --- a/frontend/src/components/Editor/ResizableLayoutEditor.jsx +++ b/frontend/src/components/Editor/ResizableLayoutEditor.jsx @@ -4,7 +4,6 @@ import { defaultCode, defaultSchema } from "../../utils/formatters"; import { useDragResize } from "../../utils/resize"; import GraphqlPlayground from "./../Playground"; import { validateSQLSchema } from "@/utils/validators"; -import { useDebouncedCallback } from "use-debounce"; // Define styles as separate objects const containerStyle = { @@ -40,8 +39,8 @@ const ResizableEditor = ({ blockView, diffView, consoleView, - setIndexingCode, - setSchema, + onChangeCode, + onChangeSchema, block_details, originalSQLCode, originalIndexingCode, @@ -58,15 +57,6 @@ const ResizableEditor = ({ sizeThresholdSecond: 60, }); - const debouncedValidateSQLSchema = useDebouncedCallback((_schema) => { - validateSQLSchema(_schema) - }, 1000); - - const handleOnChangeSchema = (_schema) => { - setSchema(_schema); - debouncedValidateSQLSchema(_schema); - } - // Render logic based on fileName const editorComponents = { GraphiQL: () => , @@ -87,7 +77,7 @@ const ResizableEditor = ({ defaultValue={defaultCode} defaultLanguage="typescript" readOnly={false} - onChange={(text) => setIndexingCode(text)} + onChange={onChangeCode} handleEditorWillMount={handleEditorWillMount} /> ), @@ -108,7 +98,7 @@ const ResizableEditor = ({ defaultValue={defaultSchema} defaultLanguage="sql" readOnly={isCreateNewIndexer === true ? false : false} - onChange={handleOnChangeSchema} + onChange={onChangeSchema} handleEditorWillMount={undefined} /> ), @@ -135,8 +125,8 @@ export default function ResizableLayoutEditor({ blockView, diffView, consoleView, - setIndexingCode, - setSchema, + onChangeCode, + onChangeSchema, block_details, originalSQLCode, originalIndexingCode, @@ -168,8 +158,8 @@ export default function ResizableLayoutEditor({ indexingCode={indexingCode} blockView={blockView} diffView={diffView} - setIndexingCode={setIndexingCode} - setSchema={setSchema} + onChangeCode={onChangeCode} + onChangeSchema={onChangeSchema} block_details={block_details} originalSQLCode={originalSQLCode} originalIndexingCode={originalIndexingCode} From 55cbb72c00e32406db7924d81daaa4f968aebc46 Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Fri, 5 Jan 2024 10:24:22 -0500 Subject: [PATCH 20/32] chore: Add description to function --- frontend/src/utils/validators.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/utils/validators.js b/frontend/src/utils/validators.js index 0a8a5596e..3456ec492 100644 --- a/frontend/src/utils/validators.js +++ b/frontend/src/utils/validators.js @@ -40,6 +40,12 @@ export async function validateSQLSchema(schema) { } }; +/** + * Asynchronously validates and formats JavaScript code. + * + * @param {string} code - The JavaScript code to be validated and formatted. + * @returns {{ data: string | null, error: string | null }} An object containing either the formatted code or an error. + */ export async function validateJSCode(code) { if (!code) return { data: null, error: null }; From 83c861db7316733e7de298fe431fb74eef44d743 Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Fri, 5 Jan 2024 14:57:12 -0500 Subject: [PATCH 21/32] fix: change reference to variable --- frontend/src/utils/validators.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/utils/validators.js b/frontend/src/utils/validators.js index 3456ec492..66193be17 100644 --- a/frontend/src/utils/validators.js +++ b/frontend/src/utils/validators.js @@ -56,6 +56,6 @@ export async function validateJSCode(code) { } catch (error) { console.error(error.message) - return { data: schema, error }; + return { data: code, error }; } }; \ No newline at end of file From 8634c39dbe8d20b30d0ae45eaf57ae54413418ad Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Fri, 5 Jan 2024 15:13:01 -0500 Subject: [PATCH 22/32] refactor: Make error messages constants --- frontend/src/components/Editor/Editor.jsx | 17 +++++++++-------- frontend/src/constants/Strings.js | 5 +++++ 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 frontend/src/constants/Strings.js diff --git a/frontend/src/components/Editor/Editor.jsx b/frontend/src/components/Editor/Editor.jsx index ba3ca9074..418c74237 100644 --- a/frontend/src/components/Editor/Editor.jsx +++ b/frontend/src/components/Editor/Editor.jsx @@ -24,6 +24,7 @@ import { IndexerDetailsContext } from '../../contexts/IndexerDetailsContext'; import { PgSchemaTypeGen } from "../../utils/pgSchemaTypeGen"; import { validateJSCode, validateSQLSchema } from "@/utils/validators"; import { useDebouncedCallback } from "use-debounce"; +import { SCHEMA_GENERAL_ERROR, CODE_GENERAL_ERROR, CODE_FORMATTING_ERROR, SCHEMA_FORMATTING_ERROR } from '../../constants/Strings'; const BLOCKHEIGHT_LIMIT = 3600; @@ -96,7 +97,7 @@ const Editor = ({ const { data: formattedCode, error: codeError } = await validateJSCode(indexerDetails.code) if (codeError) { - setError("There was an error while formatting your code. Please check the console for more details") + setError(CODE_FORMATTING_ERROR) } setOriginalIndexingCode(formattedCode) @@ -111,7 +112,7 @@ const Editor = ({ (async () => { const { data: formattedSchema, error: schemaError } = await validateSQLSchema(indexerDetails.schema); if (schemaError) { - setError("There was an error in your schema. Please check the console for more details") + setError(SCHEMA_GENERAL_ERROR) } setSchema(formattedSchema) @@ -124,8 +125,8 @@ const Editor = ({ const { error: schemaError } = await validateSQLSchema(schema); const { error: codeError } = await validateJSCode(indexingCode); - if (schemaError) setError("There is an error in your schema. Please check the console for more details") - else if (codeError) setError("There is an error in your code. Please check the console for more details") + if (schemaError) setError(SCHEMA_GENERAL_ERROR) + else if (codeError) setError(CODE_GENERAL_ERROR) else setError(); })() @@ -188,7 +189,7 @@ const Editor = ({ const { data: formattedSchema, error: schemaError } = await validateSQLSchema(schema); if (schemaError) { - setError("There was an error in your schema, please check the console for more details"); + setError(SCHEMA_GENERAL_ERROR); return; } @@ -260,14 +261,14 @@ const Editor = ({ if (codeError) { formattedCode = indexingCode - setError("Oh snap! We could not format your code. Make sure it is proper Javascript code."); + setError(CODE_FORMATTING_ERROR); } let { data: formattedSchema, error: schemaError } = await validateSQLSchema(schema); if (schemaError) { formattedSchema = schema; - setError("There was an error in your SQL schema. Make sure it is proper SQL DDL"); + setError(SCHEMA_GENERAL_ERROR); } return { formattedCode, formattedSchema } @@ -279,7 +280,7 @@ const Editor = ({ attachTypesToMonaco(); // Just in case schema types have been updated but weren't added to monaco } catch (_error) { console.error("Error generating types for saved schema.\n", _error); - setError("Oh snap! We could not generate types for your SQL schema. Make sure it is proper SQL DDL."); + setError(SCHEMA_FORMATTING_ERROR); } } diff --git a/frontend/src/constants/Strings.js b/frontend/src/constants/Strings.js new file mode 100644 index 000000000..427b42154 --- /dev/null +++ b/frontend/src/constants/Strings.js @@ -0,0 +1,5 @@ +//errors +export const SCHEMA_GENERAL_ERROR = "There was an error in your schema. Please check the console for more details"; +export const CODE_GENERAL_ERROR = "There is an error in your code. Please check the console for more details"; +export const CODE_FORMATTING_ERROR = "There was an error while formatting your code. Please check the console for more details"; +export const SCHEMA_FORMATTING_ERROR = "Oh snap! We could not generate types for your SQL schema. Make sure it is proper SQL DDL."; \ No newline at end of file From b1e0a5f314c83d3fe185990d2984efd6d5bd8040 Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Fri, 5 Jan 2024 15:54:18 -0500 Subject: [PATCH 23/32] fix: Solve an issue on the reformatAll function, also added real-time validation when user is changing the code --- frontend/src/components/Editor/Editor.jsx | 59 ++++++++++++----------- frontend/src/utils/validators.js | 6 +-- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/frontend/src/components/Editor/Editor.jsx b/frontend/src/components/Editor/Editor.jsx index 418c74237..ef5c93074 100644 --- a/frontend/src/components/Editor/Editor.jsx +++ b/frontend/src/components/Editor/Editor.jsx @@ -91,44 +91,46 @@ const Editor = ({ } }, 500); + const debouncedValidateCode = useDebouncedCallback((_code) => { + const { error: codeError } = validateJSCode(_code); + if (!codeError) { + setError(); + } + }, 500); + useEffect(() => { if (indexerDetails.code != null) { - (async () => { - const { data: formattedCode, error: codeError } = await validateJSCode(indexerDetails.code) + const { data: formattedCode, error: codeError } = validateJSCode(indexerDetails.code) - if (codeError) { - setError(CODE_FORMATTING_ERROR) - } + if (codeError) { + setError(CODE_FORMATTING_ERROR) + } - setOriginalIndexingCode(formattedCode) - setIndexingCode(formattedCode) - })() + setOriginalIndexingCode(formattedCode) + setIndexingCode(formattedCode) } }, [indexerDetails.code]); useEffect(() => { if (indexerDetails.schema != null) { - (async () => { - const { data: formattedSchema, error: schemaError } = await validateSQLSchema(indexerDetails.schema); - if (schemaError) { - setError(SCHEMA_GENERAL_ERROR) - } + const { data: formattedSchema, error: schemaError } = validateSQLSchema(indexerDetails.schema); + if (schemaError) { + setError(SCHEMA_GENERAL_ERROR) + } - setSchema(formattedSchema) - })(); + setSchema(formattedSchema) } }, [indexerDetails.schema]) useEffect(() => { - (async () => { - const { error: schemaError } = await validateSQLSchema(schema); - const { error: codeError } = await validateJSCode(indexingCode); - if (schemaError) setError(SCHEMA_GENERAL_ERROR) - else if (codeError) setError(CODE_GENERAL_ERROR) - else setError(); - })() + const { error: schemaError } = validateSQLSchema(schema); + const { error: codeError } = validateJSCode(indexingCode); + + if (schemaError) setError(SCHEMA_GENERAL_ERROR) + else if (codeError) setError(CODE_GENERAL_ERROR) + else setError(); }, [fileName]) @@ -186,7 +188,7 @@ const Editor = ({ } const registerFunction = async (indexerName, indexerConfig) => { - const { data: formattedSchema, error: schemaError } = await validateSQLSchema(schema); + const { data: formattedSchema, error: schemaError } = validateSQLSchema(schema); if (schemaError) { setError(SCHEMA_GENERAL_ERROR); @@ -256,15 +258,15 @@ const Editor = ({ return isUserIndexer ? actionButtonText : "Fork Indexer"; }; - const reformatAll = async (indexingCode, schema) => { - let { formattedCode, codeError } = await validateJSCode(indexingCode); + const reformatAll = (indexingCode, schema) => { + let { data: formattedCode, error: codeError } = validateJSCode(indexingCode); if (codeError) { formattedCode = indexingCode setError(CODE_FORMATTING_ERROR); } - let { data: formattedSchema, error: schemaError } = await validateSQLSchema(schema); + let { data: formattedSchema, error: schemaError } = validateSQLSchema(schema); if (schemaError) { formattedSchema = schema; @@ -284,8 +286,8 @@ const Editor = ({ } } - async function handleFormating() { - const { formattedCode, formattedSchema } = await reformatAll(indexingCode, schema); + function handleFormating() { + const { formattedCode, formattedSchema } = reformatAll(indexingCode, schema); setIndexingCode(formattedCode); setSchema(formattedSchema); } @@ -329,6 +331,7 @@ const Editor = ({ function handleOnChangeCode(_code) { setIndexingCode(_code); + debouncedValidateCode(_code); } return ( diff --git a/frontend/src/utils/validators.js b/frontend/src/utils/validators.js index 66193be17..8d9db540d 100644 --- a/frontend/src/utils/validators.js +++ b/frontend/src/utils/validators.js @@ -21,7 +21,7 @@ export function validateContractIds(accountIds) { * @param {string} schema - The SQL schema to validate and format. * @returns {{ data: string | null, error: string | null }} - An object containing the formatted schema and error (if any). */ -export async function validateSQLSchema(schema) { +export function validateSQLSchema(schema) { if (!schema) return { data: null, error: null }; if (schema === formatSQL(defaultSchema)) return { data: schema, error: null }; @@ -46,12 +46,12 @@ export async function validateSQLSchema(schema) { * @param {string} code - The JavaScript code to be validated and formatted. * @returns {{ data: string | null, error: string | null }} An object containing either the formatted code or an error. */ -export async function validateJSCode(code) { +export function validateJSCode(code) { if (!code) return { data: null, error: null }; try { - const formattedCode = await formatIndexingCode(code); + const formattedCode = formatIndexingCode(code); return { data: formattedCode, error: null } } catch (error) { From 538cd39a933e5ee80d0c71aab1bbc668eb10556f Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Fri, 5 Jan 2024 22:25:16 -0500 Subject: [PATCH 24/32] fix: Reset errors if code/schemar are ok when reloading --- frontend/src/components/Editor/Editor.jsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/Editor/Editor.jsx b/frontend/src/components/Editor/Editor.jsx index ef5c93074..af5b77a54 100644 --- a/frontend/src/components/Editor/Editor.jsx +++ b/frontend/src/components/Editor/Editor.jsx @@ -260,17 +260,16 @@ const Editor = ({ const reformatAll = (indexingCode, schema) => { let { data: formattedCode, error: codeError } = validateJSCode(indexingCode); + let { data: formattedSchema, error: schemaError } = validateSQLSchema(schema); if (codeError) { formattedCode = indexingCode setError(CODE_FORMATTING_ERROR); - } - - let { data: formattedSchema, error: schemaError } = validateSQLSchema(schema); - - if (schemaError) { + } else if (schemaError) { formattedSchema = schema; - setError(SCHEMA_GENERAL_ERROR); + setError(SCHEMA_GENERAL_ERROR) + } else { + setError() } return { formattedCode, formattedSchema } From 7655aef45bc4141cc2cc97fdaa0b8ac3fbf09469 Mon Sep 17 00:00:00 2001 From: Morgan McCauley Date: Tue, 9 Jan 2024 10:24:16 +1300 Subject: [PATCH 25/32] feat: Create rust GRPC client for Runner (#491) This PR creates a rust based GRPC client for Runner, for use within Coordinator V2. For now, this exists as its own crate within the top-level directory. The Coordinator PR was becoming quite large so I decided to separate this out. Additionally, I've made a couple changes to the Runner proto: - Rename the package: `spec` -> `runner` - Remove `executorId` from `StartExecutorRequest` - it should be deterministic and assigned internally - Add `version` to the executor - this will be used to determine whether an executor should be restarted --- runner-client/Cargo.lock | 1212 +++++++++++++++++++ runner-client/Cargo.toml | 12 + runner-client/build.rs | 5 + runner-client/examples/list_executors.rs | 17 + runner-client/examples/start_executor.rs | 23 + runner-client/examples/stop_executor.rs | 21 + runner-client/proto/runner.proto | 59 + runner-client/src/lib.rs | 5 + runner/protos/runner.proto | 17 +- runner/src/server/runner-client.ts | 15 - runner/src/server/runner-server.ts | 2 +- runner/src/server/runner-service.test.ts | 247 ++-- runner/src/server/runner-service.ts | 80 +- runner/src/stream-handler/stream-handler.ts | 1 + 14 files changed, 1502 insertions(+), 214 deletions(-) create mode 100644 runner-client/Cargo.lock create mode 100644 runner-client/Cargo.toml create mode 100644 runner-client/build.rs create mode 100644 runner-client/examples/list_executors.rs create mode 100644 runner-client/examples/start_executor.rs create mode 100644 runner-client/examples/stop_executor.rs create mode 100644 runner-client/proto/runner.proto create mode 100644 runner-client/src/lib.rs delete mode 100644 runner/src/server/runner-client.ts diff --git a/runner-client/Cargo.lock b/runner-client/Cargo.lock new file mode 100644 index 000000000..23410da01 --- /dev/null +++ b/runner-client/Cargo.lock @@ -0,0 +1,1212 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "anyhow" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" + +[[package]] +name = "async-stream" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "async-trait" +version = "0.1.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "axum" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "pin-utils", +] + +[[package]] +name = "getrandom" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "h2" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.1.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "http" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + +[[package]] +name = "libc" +version = "0.2.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" + +[[package]] +name = "linux-raw-sys" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "memchr" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap 2.1.0", +] + +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "prettyplease" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" +dependencies = [ + "bytes", + "heck", + "itertools", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn", + "tempfile", + "which", +] + +[[package]] +name = "prost-derive" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "prost-types" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" +dependencies = [ + "prost", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "regex" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "runner" +version = "0.1.0" +dependencies = [ + "prost", + "tokio", + "tonic", + "tonic-build", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustix" +version = "0.38.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.194" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b114498256798c94a0689e1a15fec6005dee8ac1f41de56404b67afc2a4b773" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.194" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3385e45322e8f9931410f01b3031ec534c3947d0e94c18049af4d9f9907d4e0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" + +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "syn" +version = "2.0.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "tempfile" +version = "3.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio" +version = "1.35.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "tonic" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" +dependencies = [ + "async-stream", + "async-trait", + "axum", + "base64", + "bytes", + "h2", + "http", + "http-body", + "hyper", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost", + "tokio", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-build" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "quote", + "syn", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "indexmap 1.9.3", + "pin-project", + "pin-project-lite", + "rand", + "slab", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" diff --git a/runner-client/Cargo.toml b/runner-client/Cargo.toml new file mode 100644 index 000000000..c93ebf91b --- /dev/null +++ b/runner-client/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "runner" +version = "0.1.0" +edition = "2021" + +[dependencies] +prost = "0.12.3" +tonic = "0.10.2" +tokio = { version = "1.28.0", features = ["full"]} + +[build-dependencies] +tonic-build = "0.10" diff --git a/runner-client/build.rs b/runner-client/build.rs new file mode 100644 index 000000000..618200337 --- /dev/null +++ b/runner-client/build.rs @@ -0,0 +1,5 @@ +fn main() -> Result<(), Box> { + tonic_build::compile_protos("proto/runner.proto")?; + + Ok(()) +} diff --git a/runner-client/examples/list_executors.rs b/runner-client/examples/list_executors.rs new file mode 100644 index 000000000..220bfd39c --- /dev/null +++ b/runner-client/examples/list_executors.rs @@ -0,0 +1,17 @@ +use tonic::Request; + +use runner::runner_client::RunnerClient; +use runner::ListExecutorsRequest; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let mut client = RunnerClient::connect("http://localhost:50007").await?; + + let response = client + .list_executors(Request::new(ListExecutorsRequest {})) + .await?; + + println!("{:#?}", response.into_inner()); + + Ok(()) +} diff --git a/runner-client/examples/start_executor.rs b/runner-client/examples/start_executor.rs new file mode 100644 index 000000000..9fc513d36 --- /dev/null +++ b/runner-client/examples/start_executor.rs @@ -0,0 +1,23 @@ +use tonic::Request; + +use runner::runner_client::RunnerClient; +use runner::StartExecutorRequest; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let mut client = RunnerClient::connect("http://localhost:50007").await?; + + let response = client + .start_executor(Request::new(StartExecutorRequest { + account_id: "morgs.near".to_string(), + function_name: "test".to_string(), + code: "console.log('hi')".to_string(), + schema: "CREATE TABLE blocks()".to_string(), + redis_stream: "morgs.near/test:block_stream".to_string(), + })) + .await?; + + println!("{:#?}", response.into_inner()); + + Ok(()) +} diff --git a/runner-client/examples/stop_executor.rs b/runner-client/examples/stop_executor.rs new file mode 100644 index 000000000..93595b019 --- /dev/null +++ b/runner-client/examples/stop_executor.rs @@ -0,0 +1,21 @@ +use tonic::Request; + +use runner::runner_client::RunnerClient; +use runner::StopExecutorRequest; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let mut client = RunnerClient::connect("http://localhost:50007").await?; + + let response = client + .stop_executor(Request::new(StopExecutorRequest { + // Deterministic ID for morgs.near/test + executor_id: "be21b48c307671c1b3768ed84439f736c1cbbd77f815986354e855d44efd16e6" + .to_string(), + })) + .await?; + + println!("{:#?}", response.into_inner()); + + Ok(()) +} diff --git a/runner-client/proto/runner.proto b/runner-client/proto/runner.proto new file mode 100644 index 000000000..82c457f7d --- /dev/null +++ b/runner-client/proto/runner.proto @@ -0,0 +1,59 @@ +syntax = "proto3"; +package runner; + +service Runner { + // Starts a new Runner executor + rpc StartExecutor (StartExecutorRequest) returns (StartExecutorResponse); + + // Stops an existing Runner executor + rpc StopExecutor (StopExecutorRequest) returns (StopExecutorResponse); + + // Lists all Runner executor + rpc ListExecutors (ListExecutorsRequest) returns (ListExecutorsResponse); +} + +// Start Executor Request +message StartExecutorRequest { + string redis_stream = 1; + string account_id = 2; + string function_name = 3; + string code = 4; + string schema = 5; + // Block height corresponding to the created/updated height of the indexer + uint64 version = 6; +} + +// Start Executor Response +message StartExecutorResponse { + string executor_id = 1; +} + +// Stop Executor Request +message StopExecutorRequest { + string executor_id = 1; +} + +// Stop Executor Response +message StopExecutorResponse { + string executor_id = 1; +} + +// List Executor Request +message ListExecutorsRequest { +} + +// List Executor Response +message ListExecutorsResponse { + // List of all executors, including stopped or crashed ones + repeated ExecutorInfo executors = 1; +} + +// Information about a single BlockExecutor instance. +message ExecutorInfo { + string executor_id = 1; + string account_id = 2; + string function_name = 3; + string status = 4; + // Block height corresponding to the created/updated height of the indexer + uint64 version = 5; +} diff --git a/runner-client/src/lib.rs b/runner-client/src/lib.rs new file mode 100644 index 000000000..c7a7a57fd --- /dev/null +++ b/runner-client/src/lib.rs @@ -0,0 +1,5 @@ +mod runner { + tonic::include_proto!("runner"); +} + +pub use runner::*; diff --git a/runner/protos/runner.proto b/runner/protos/runner.proto index 16c365ddc..82c457f7d 100644 --- a/runner/protos/runner.proto +++ b/runner/protos/runner.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package spec; +package runner; service Runner { // Starts a new Runner executor @@ -14,12 +14,13 @@ service Runner { // Start Executor Request message StartExecutorRequest { - string executor_id = 1; - string redis_stream = 2; - string account_id = 3; - string function_name = 4; - string code = 5; - string schema = 6; + string redis_stream = 1; + string account_id = 2; + string function_name = 3; + string code = 4; + string schema = 5; + // Block height corresponding to the created/updated height of the indexer + uint64 version = 6; } // Start Executor Response @@ -53,4 +54,6 @@ message ExecutorInfo { string account_id = 2; string function_name = 3; string status = 4; + // Block height corresponding to the created/updated height of the indexer + uint64 version = 5; } diff --git a/runner/src/server/runner-client.ts b/runner/src/server/runner-client.ts deleted file mode 100644 index a7325104b..000000000 --- a/runner/src/server/runner-client.ts +++ /dev/null @@ -1,15 +0,0 @@ -import * as grpc from '@grpc/grpc-js'; -import * as protoLoader from '@grpc/proto-loader'; -import { type ProtoGrpcType } from '../generated/runner'; -import { type RunnerClient } from '../generated/spec/Runner'; - -// TODO: Replace this client with a Rust client - -const PROTO_PATH = 'protos/runner.proto'; - -const packageDefinition = protoLoader.loadSync(PROTO_PATH); -const runner = (grpc.loadPackageDefinition(packageDefinition) as unknown) as ProtoGrpcType; -// TODO: Use secure creds with env variable Port number -const runnerClient: RunnerClient = new runner.spec.Runner('localhost:50007', grpc.credentials.createInsecure()); - -export default runnerClient; diff --git a/runner/src/server/runner-server.ts b/runner/src/server/runner-server.ts index ff72fd46a..fa80c81fc 100644 --- a/runner/src/server/runner-server.ts +++ b/runner/src/server/runner-server.ts @@ -13,7 +13,7 @@ export default function startRunnerServer (): grpc.Server { ) as unknown) as ProtoGrpcType; const server = new grpc.Server(); - server.addService(runnerProto.spec.Runner.service, getRunnerService(StreamHandler)); + server.addService(runnerProto.runner.Runner.service, getRunnerService(StreamHandler)); const credentials = grpc.ServerCredentials; server.bindAsync( diff --git a/runner/src/server/runner-service.test.ts b/runner/src/server/runner-service.test.ts index 2e9a27fd6..ea7468f17 100644 --- a/runner/src/server/runner-service.test.ts +++ b/runner/src/server/runner-service.test.ts @@ -1,19 +1,21 @@ -import { type RunnerHandlers } from '../generated/spec/Runner'; import type StreamHandler from '../stream-handler/stream-handler'; import getRunnerService from './runner-service'; import * as grpc from '@grpc/grpc-js'; -const BASIC_EXECUTOR_ID = 'test-executor-id'; const BASIC_REDIS_STREAM = 'test-redis-stream'; const BASIC_ACCOUNT_ID = 'test-account-id'; const BASIC_FUNCTION_NAME = 'test-function-name'; +// Deterministic ID for above account ID/function name +const BASIC_EXECUTOR_ID = '964551da443042a0c834d5fe9bb2c07023b69f1528404f0f0a3fc8a27c2d1c44'; const BASIC_CODE = 'test-code'; const BASIC_SCHEMA = 'test-schema'; +const BASIC_VERSION = 1; const BASIC_INDEXER_CONFIG = { account_id: BASIC_ACCOUNT_ID, function_name: BASIC_FUNCTION_NAME, code: BASIC_CODE, schema: BASIC_SCHEMA, + version: BASIC_VERSION }; describe('Runner gRPC Service', () => { @@ -30,7 +32,7 @@ describe('Runner gRPC Service', () => { it('starts a executor with correct settings', () => { const service = getRunnerService(genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; - const request = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + const request = generateRequest(BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA, BASIC_VERSION); service.StartExecutor(request, mockCallback); @@ -38,24 +40,10 @@ describe('Runner gRPC Service', () => { expect(mockCallback).toHaveBeenCalledWith(null, { executorId: BASIC_EXECUTOR_ID }); }); - it('Invalid start executor request with empty executor Id', () => { - const service = getRunnerService(genericStreamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const request = generateRequest('', BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); - - service.StartExecutor(request, mockCallback); - - expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); - expect(mockCallback).toHaveBeenCalledWith({ - code: grpc.status.INVALID_ARGUMENT, - message: 'Invalid executorId. It must be a non-empty string.' - }, null); - }); - it('Invalid start executor request with missing redis stream Id parameter', () => { const service = getRunnerService(genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; - const request = generateRequest(BASIC_EXECUTOR_ID, undefined, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + const request = generateRequest(undefined, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); service.StartExecutor(request, mockCallback); @@ -69,16 +57,16 @@ describe('Runner gRPC Service', () => { it('Invalid start executor request with missing config parameters', () => { const service = getRunnerService(genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; - let request = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, undefined, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + let request = generateRequest(BASIC_REDIS_STREAM, undefined, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); service.StartExecutor(request, mockCallback); - request = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, '', BASIC_CODE, BASIC_SCHEMA); + request = generateRequest(BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, '', BASIC_CODE, BASIC_SCHEMA); service.StartExecutor(request, mockCallback); - request = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, undefined, BASIC_SCHEMA); + request = generateRequest(BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, undefined, BASIC_SCHEMA); service.StartExecutor(request, mockCallback); - request = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, ''); + request = generateRequest(BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, ''); service.StartExecutor(request, mockCallback); expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); @@ -105,7 +93,7 @@ describe('Runner gRPC Service', () => { it('starts a executor twice with correct settings, gets error second time', () => { const service = getRunnerService(genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; - const startRequest = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + const startRequest = generateRequest(BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA, BASIC_VERSION); service.StartExecutor(startRequest, mockCallback); service.StartExecutor(startRequest, mockCallback); @@ -121,7 +109,7 @@ describe('Runner gRPC Service', () => { ]); }); - it('stops a executor with correct settings', async () => { + it('stops a executor with correct settings', (done) => { const stop = jest.fn().mockImplementation(async () => { await Promise.resolve(); }); @@ -130,34 +118,22 @@ describe('Runner gRPC Service', () => { }); const service = getRunnerService(streamHandlerType); const mockCallback = jest.fn() as unknown as any; - const requestA = generateRequest(BASIC_EXECUTOR_ID + '-A', BASIC_REDIS_STREAM + '-A', BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); - const requestB = generateRequest(BASIC_EXECUTOR_ID + '-B', BASIC_REDIS_STREAM + '-B', BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + const requestA = generateRequest(BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); service.StartExecutor(requestA, mockCallback); - service.StartExecutor(requestB, mockCallback); - const stopRequest = generateRequest(BASIC_EXECUTOR_ID + '-A', undefined, undefined); // Stops executor A - - await new Promise((resolve, reject) => { - service.StopExecutor(stopRequest, function (err, response) { - if (err) { - reject(err); return; - } - mockCallback(err, response); - resolve(response); - }); - }); + service.StopExecutor({ request: { executorId: BASIC_EXECUTOR_ID } } as any, (err, response) => { + mockCallback(err, response); - service.StartExecutor(requestA, mockCallback); + expect(streamHandlerType).toHaveBeenCalledTimes(1); + expect(stop).toHaveBeenCalledTimes(1); + expect(mockCallback.mock.calls).toEqual([ + [null, { executorId: BASIC_EXECUTOR_ID }], // Start + [null, { executorId: BASIC_EXECUTOR_ID }], // Stop + ]); - expect(streamHandlerType).toHaveBeenCalledTimes(3); - expect(stop).toHaveBeenCalledTimes(1); - expect(mockCallback.mock.calls).toEqual([ - [null, { executorId: BASIC_EXECUTOR_ID + '-A' }], // Start A - [null, { executorId: BASIC_EXECUTOR_ID + '-B' }], // Start B - [null, { executorId: BASIC_EXECUTOR_ID + '-A' }], // Stop A - [null, { executorId: BASIC_EXECUTOR_ID + '-A' }], // Stop B - ]); + done(); + }); }); it('Invalid stop executor request with empty executor Id', () => { @@ -180,7 +156,7 @@ describe('Runner gRPC Service', () => { }, null); }); - it('Invalid stop executor request with non-existent executor', () => { + it('Invalid stop executor request with non-existent executor', (done) => { const stop = jest.fn().mockImplementation(async () => { await Promise.resolve(); }); @@ -188,19 +164,19 @@ describe('Runner gRPC Service', () => { return { stop }; }); const service = getRunnerService(streamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const request = generateRequest(BASIC_EXECUTOR_ID, undefined, undefined); - service.StopExecutor(request, mockCallback); + service.StopExecutor({ request: { executorId: 'non-existant' } } as any, (err) => { + expect(err).toEqual({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Executor non-existant cannot be stopped as it does not exist.' + }); + expect(stop).toHaveBeenCalledTimes(0); - expect(stop).toHaveBeenCalledTimes(0); - expect(mockCallback).toHaveBeenCalledWith({ - code: grpc.status.INVALID_ARGUMENT, - message: `Executor ${BASIC_EXECUTOR_ID} cannot be stopped as it does not exist.` - }, null); + done(); + }); }); - it('Invalid stop executor request with somehow failing stop', async () => { + it('Invalid stop executor request with somehow failing stop', (done) => { const stop = jest.fn().mockImplementation(async () => { await Promise.reject(new Error('somehow fails')); }); @@ -209,132 +185,93 @@ describe('Runner gRPC Service', () => { }); const service = getRunnerService(streamHandlerType); const mockCallback = jest.fn() as unknown as any; - const startRequest = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); - const stopRequest = generateRequest(BASIC_EXECUTOR_ID, undefined, undefined); + const startRequest = generateRequest(BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); service.StartExecutor(startRequest, mockCallback); - await new Promise((resolve, reject) => { - service.StopExecutor(stopRequest, function (err, response) { - if (err) { // Should get somehow fails error - mockCallback(err, response); - resolve(err.details); return; - } - reject(err); - }); - }); - - expect(stop).toHaveBeenCalledTimes(1); - expect(mockCallback.mock.calls).toEqual([ - [null, { executorId: BASIC_EXECUTOR_ID }], - [{ + service.StopExecutor({ request: { executorId: BASIC_EXECUTOR_ID } } as any, (err) => { + expect(err).toEqual({ code: grpc.status.INTERNAL, message: 'somehow fails' - }, null] - ]); + }); + expect(stop).toHaveBeenCalledTimes(1); + expect(mockCallback.mock.calls).toEqual([ + [null, { executorId: BASIC_EXECUTOR_ID }], + ]); + + done(); + }); }); it('valid list executor request lists executors correctly', async () => { const stop = jest.fn().mockImplementation(async () => { await Promise.resolve(); }); - const streamHandlerType = jest.fn().mockImplementation((...args) => { + const streamHandlerType = jest.fn().mockImplementation((_, indexerConfig) => { return { stop, - indexerConfig: { account_id: args[1].account_id, function_name: args[1].function_name }, + indexerConfig: { account_id: indexerConfig.account_id, function_name: indexerConfig.function_name, version: indexerConfig.version } }; }); const service = getRunnerService(streamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const requestA = generateRequest(BASIC_EXECUTOR_ID + '-A', BASIC_REDIS_STREAM + '-A', BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); - const requestB = generateRequest(BASIC_EXECUTOR_ID + '-B', BASIC_REDIS_STREAM + '-B', BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); - const listRequest = generateRequest(undefined, undefined, undefined); - const stopRequest = generateRequest(BASIC_EXECUTOR_ID + '-A', undefined, undefined); // Stops executor A - - await listExecutorsPromise(listRequest, service, mockCallback); - - service.StartExecutor(requestA, mockCallback); - - await listExecutorsPromise(listRequest, service, mockCallback); - - service.StartExecutor(requestB, mockCallback); - - await listExecutorsPromise(listRequest, service, mockCallback); + const request = generateRequest(BASIC_REDIS_STREAM + '-A', BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA, BASIC_VERSION); await new Promise((resolve, reject) => { - service.StopExecutor(stopRequest, function (err, response) { - if (err) { - reject(err); return; - } - mockCallback(err, response); - resolve(response); + service.StartExecutor(request, (err) => { + if (err) reject(err); + resolve(null); }); }); - await listExecutorsPromise(listRequest, service, mockCallback); - - service.StartExecutor(requestA, mockCallback); + await new Promise((resolve, reject) => { + service.ListExecutors({} as any, (err, response) => { + if (err) reject(err); + expect(response).toEqual({ + executors: [{ + executorId: BASIC_EXECUTOR_ID, + accountId: BASIC_INDEXER_CONFIG.account_id, + functionName: BASIC_INDEXER_CONFIG.function_name, + status: 'RUNNING', + version: '1' + }] + }); + resolve(null); + }); + }); - await listExecutorsPromise(listRequest, service, mockCallback); - - expect(streamHandlerType).toHaveBeenCalledTimes(3); - expect(stop).toHaveBeenCalledTimes(1); - const emptyList: never[] = []; - const oneExecutorList = [{ - executorId: BASIC_EXECUTOR_ID + '-A', - accountId: BASIC_INDEXER_CONFIG.account_id, - functionName: BASIC_INDEXER_CONFIG.function_name, - status: 'RUNNING' - }]; - const twoExecutorList = [{ - executorId: BASIC_EXECUTOR_ID + '-A', - accountId: BASIC_INDEXER_CONFIG.account_id, - functionName: BASIC_INDEXER_CONFIG.function_name, - status: 'RUNNING' - }, - { - executorId: BASIC_EXECUTOR_ID + '-B', - accountId: BASIC_INDEXER_CONFIG.account_id, - functionName: BASIC_INDEXER_CONFIG.function_name, - status: 'RUNNING' - }]; - expect(mockCallback.mock.calls[0][1]).toEqual({ executors: emptyList }); - expect(mockCallback.mock.calls[2][1]).toEqual({ executors: oneExecutorList }); - expect(mockCallback.mock.calls[4][1]).toEqual({ executors: twoExecutorList }); - oneExecutorList[0].executorId = BASIC_EXECUTOR_ID + '-B'; - expect(mockCallback.mock.calls[6][1]).toEqual({ executors: oneExecutorList }); // After stop was called - twoExecutorList[0].executorId = BASIC_EXECUTOR_ID + '-B'; - twoExecutorList[1].executorId = BASIC_EXECUTOR_ID + '-A'; - expect(mockCallback.mock.calls[8][1]).toEqual({ executors: twoExecutorList }); // Order is reversed now - }); -}); + await new Promise((resolve, reject) => { + service.StopExecutor({ request: { executorId: BASIC_EXECUTOR_ID } } as any, (err) => { + if (err) reject(err); + resolve(null); + }); + }); -async function listExecutorsPromise (listRequest: any, service: RunnerHandlers, mockCallback: jest.Mock): Promise { - await new Promise((resolve, reject) => { - service.ListExecutors(listRequest, function (err, response) { - if (err) { - reject(err); return; - } - mockCallback(err, response); - resolve(response); + await new Promise((resolve, reject) => { + service.ListExecutors({} as any, (err, response) => { + if (err) reject(err); + expect(response).toEqual({ + executors: [] + }); + resolve(null); + }); }); }); -} +}); function generateRequest ( - executorId: string | undefined = undefined, - redisStream: string | undefined = undefined, - accountId: string | undefined = undefined, - functionName: string | undefined = undefined, - code: string | undefined = undefined, - schema: string | undefined = undefined): any { + redisStream?: string, + accountId?: string, + functionName?: string, + code?: string, + schema?: string, + version?: number): any { const request = { - ...(executorId !== undefined && { executorId }), - ...(redisStream !== undefined && { redisStream }), - ...(accountId !== undefined && { accountId }), - ...(functionName !== undefined && { functionName }), - ...(code !== undefined && { code }), - ...(schema !== undefined && { schema }), + ...(redisStream && { redisStream }), + ...(accountId && { accountId }), + ...(functionName && { functionName }), + ...(code && { code }), + ...(schema && { schema }), + ...(version && { version: Number(version) }) }; return { request diff --git a/runner/src/server/runner-service.ts b/runner/src/server/runner-service.ts index 41acd7033..881bd5b63 100644 --- a/runner/src/server/runner-service.ts +++ b/runner/src/server/runner-service.ts @@ -1,41 +1,64 @@ import { type ServerUnaryCall, type sendUnaryData } from '@grpc/grpc-js'; -import { type RunnerHandlers } from '../generated/spec/Runner'; -import { type StartExecutorResponse__Output, type StartExecutorResponse } from '../generated/spec/StartExecutorResponse'; -import { type StartExecutorRequest__Output } from '../generated/spec/StartExecutorRequest'; -import { type StopExecutorRequest__Output } from '../generated/spec/StopExecutorRequest'; -import { type StopExecutorResponse__Output, type StopExecutorResponse } from '../generated/spec/StopExecutorResponse'; -import { type ListExecutorsRequest__Output } from '../generated/spec/ListExecutorsRequest'; -import { type ListExecutorsResponse__Output, type ListExecutorsResponse } from '../generated/spec/ListExecutorsResponse'; -import { type ExecutorInfo__Output } from '../generated/spec/ExecutorInfo'; -import type StreamHandler from '../stream-handler'; import * as grpc from '@grpc/grpc-js'; import assert from 'assert'; +import crypto from 'crypto'; + +import { type RunnerHandlers } from '../generated/runner/Runner'; +import { type StartExecutorResponse__Output, type StartExecutorResponse } from '../generated/runner/StartExecutorResponse'; +import { type StartExecutorRequest__Output } from '../generated/runner/StartExecutorRequest'; +import { type StopExecutorRequest__Output } from '../generated/runner/StopExecutorRequest'; +import { type StopExecutorResponse__Output, type StopExecutorResponse } from '../generated/runner/StopExecutorResponse'; +import { type ListExecutorsRequest__Output } from '../generated/runner/ListExecutorsRequest'; +import { type ListExecutorsResponse__Output, type ListExecutorsResponse } from '../generated/runner/ListExecutorsResponse'; +import { type ExecutorInfo__Output } from '../generated/runner/ExecutorInfo'; +import type StreamHandler from '../stream-handler'; type StreamHandlers = Map; +const hashString = (input: string): string => { + const hash = crypto.createHash('sha256'); + hash.update(input); + return hash.digest('hex'); +}; + function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandlers { const streamHandlers: StreamHandlers = new Map(); const RunnerService: RunnerHandlers = { StartExecutor (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('StartExecutor called on', call.request.executorId); // Validate request - const validationResult = validateStartExecutorRequest(call.request, streamHandlers); + const validationResult = validateStartExecutorRequest(call.request); if (validationResult !== null) { callback(validationResult, null); return; } + const { accountId, functionName, code, schema, redisStream, version } = call.request; + const executorId = hashString(`${accountId}/${functionName}`); + + if (streamHandlers.has(executorId)) { + const alreadyExistsError = { + code: grpc.status.ALREADY_EXISTS, + message: `Executor ${executorId} can't be started as it already exists.` + }; + callback(alreadyExistsError, null); + + return; + } + + console.log('Starting executor: ', { accountId, functionName, executorId, version }); + // Handle request try { - const streamHandler = new StreamHandlerType(call.request.redisStream, { - account_id: call.request.accountId, - function_name: call.request.functionName, - code: call.request.code, - schema: call.request.schema + const streamHandler = new StreamHandlerType(redisStream, { + account_id: accountId, + function_name: functionName, + version: Number(version), + code, + schema, }); - streamHandlers.set(call.request.executorId, streamHandler); - callback(null, { executorId: call.request.executorId }); + streamHandlers.set(executorId, streamHandler); + callback(null, { executorId }); } catch (error) { callback(handleInternalError(error), null); } @@ -76,6 +99,7 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl executorId, accountId: handler.indexerConfig?.account_id, functionName: handler.indexerConfig?.function_name, + version: handler.indexerConfig?.version.toString(), status: 'RUNNING' // TODO: Keep updated status in stream handler }); }); @@ -116,19 +140,9 @@ function validateStringParameter (parameterName: string, parameterValue: string) return null; } -function validateStartExecutorRequest (request: StartExecutorRequest__Output, streamHandlers: StreamHandlers): any | null { - const grpcError = { - code: grpc.status.INVALID_ARGUMENT, - message: '' - }; - +function validateStartExecutorRequest (request: StartExecutorRequest__Output): any | null { // Validate request parameters - let validationResult = validateStringParameter('executorId', request.executorId); - if (validationResult !== null) { - return validationResult; - } - - validationResult = validateStringParameter('redisStream', request.redisStream); + let validationResult = validateStringParameter('redisStream', request.redisStream); if (validationResult !== null) { return validationResult; } @@ -153,12 +167,6 @@ function validateStartExecutorRequest (request: StartExecutorRequest__Output, st return validationResult; } - // Validate executorId uniqueness - if (streamHandlers.get(request.executorId) !== undefined) { - grpcError.message = `Executor ${request.executorId} can't be started as it already exists.`; - grpcError.code = grpc.status.ALREADY_EXISTS; - return grpcError; - } return null; } diff --git a/runner/src/stream-handler/stream-handler.ts b/runner/src/stream-handler/stream-handler.ts index 953a263a3..096b97edb 100644 --- a/runner/src/stream-handler/stream-handler.ts +++ b/runner/src/stream-handler/stream-handler.ts @@ -8,6 +8,7 @@ export interface IndexerConfig { function_name: string code: string schema: string + version: number } export default class StreamHandler { From b76fac0e3ab85e4b1c8cfb08939717edae7b104c Mon Sep 17 00:00:00 2001 From: Morgan McCauley Date: Thu, 11 Jan 2024 15:02:30 +1300 Subject: [PATCH 26/32] feat: Create initial Coordinator V2 service (#444) This PR adds the initial Coordinator V2 service, which acts as the main driver for the Control Plane. ## Coordinator Overview Coordinator V2 will exist as a new standalone service with it's primary goal being ensuring the current registry configuration is mapped to the system. It's core logic is just an infinite loop which reads the registry, and sends necessary requests to the Block Streamer and Runner services to synchronise that config. ## Block Streamer Changes Some changes have been made to Block Streamer to enable the above: 1. `version` and `redis_stream` have been added to the proto so that Coordinator can configure them. 2. Support for `ActionFunctionCall` has been added - Initially I thought only `ActionAny` allowed, but the current registry has `ActionFunctionCall` and therefore needs to be supported. 3. `last_published_block` is now written to Redis to enable "Start from interruption" ## What's not been done I wanted to limit the scope of this PR as it was starting to get big, I'll address these tasks in follow up PRs: - Provisioning - Coordinator should check the status of provisioning, and act when the state isn't as expected. This can be done after https://github.com/near/queryapi/issues/426 is implemented. - Retry recoverable errors - Any error will be propagated cause the error to exit, this includes connection errors to the Block Streamer and Runner services. As these are very likely to occur (across restarts) we should retry these errors. - Environment configuration - There are many hard coded values (endpoints, registry contract, etc.) which should be configurable via the environment. - Logging and Metrics --- .github/workflows/block-streamer-ci.yml | 8 + .github/workflows/coordinator-ci.yml | 81 + block-streamer/Cargo.toml | 2 +- block-streamer/examples/start_stream.rs | 2 + block-streamer/proto/block_streamer.proto | 69 +- block-streamer/src/block_stream.rs | 98 +- block-streamer/src/redis.rs | 20 +- .../src/server/block_streamer_service.rs | 64 +- coordinator/Cargo.lock | 4538 +++++++++++++++++ coordinator/Cargo.toml | 24 + coordinator/src/block_streams_handler.rs | 107 + coordinator/src/executors_handler.rs | 70 + coordinator/src/main.rs | 657 +++ coordinator/src/redis.rs | 38 + coordinator/src/registry.rs | 111 + 15 files changed, 5797 insertions(+), 92 deletions(-) create mode 100644 .github/workflows/coordinator-ci.yml create mode 100644 coordinator/Cargo.lock create mode 100644 coordinator/Cargo.toml create mode 100644 coordinator/src/block_streams_handler.rs create mode 100644 coordinator/src/executors_handler.rs create mode 100644 coordinator/src/main.rs create mode 100644 coordinator/src/redis.rs create mode 100644 coordinator/src/registry.rs diff --git a/.github/workflows/block-streamer-ci.yml b/.github/workflows/block-streamer-ci.yml index 507b03112..f9edb9b1a 100644 --- a/.github/workflows/block-streamer-ci.yml +++ b/.github/workflows/block-streamer-ci.yml @@ -19,6 +19,8 @@ jobs: - uses: actions/checkout@v3 - name: Install Protoc uses: arduino/setup-protoc@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Check working-directory: ./block-streamer run: cargo check @@ -29,6 +31,8 @@ jobs: - uses: actions/checkout@v3 - name: Install Protoc uses: arduino/setup-protoc@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Test working-directory: ./block-streamer run: cargo test @@ -41,6 +45,8 @@ jobs: uses: actions/checkout@v3 - name: Install Protoc uses: arduino/setup-protoc@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Install Rust uses: actions-rs/toolchain@v1 with: @@ -60,6 +66,8 @@ jobs: uses: actions/checkout@v3 - name: Install Protoc uses: arduino/setup-protoc@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Install Rust uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/coordinator-ci.yml b/.github/workflows/coordinator-ci.yml new file mode 100644 index 000000000..45d5e9cda --- /dev/null +++ b/.github/workflows/coordinator-ci.yml @@ -0,0 +1,81 @@ +name: Coordinator + +on: + push: + branches: [ main ] + paths: + - "coordinator/**" + pull_request: + paths: + - "coordinator/**" + +env: + CARGO_TERM_COLOR: always + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Protoc + uses: arduino/setup-protoc@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Check + working-directory: ./coordinator + run: cargo check + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Protoc + uses: arduino/setup-protoc@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Test + working-directory: ./coordinator + run: cargo test + + + format: + runs-on: ubuntu-20.04 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Protoc + uses: arduino/setup-protoc@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.70.0 + override: true + profile: minimal + components: rustfmt + - name: Check formatting + working-directory: ./coordinator + run: | + cargo fmt -- --check + + clippy: + runs-on: ubuntu-20.04 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Protoc + uses: arduino/setup-protoc@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.70.0 + override: true + profile: minimal + components: clippy + - name: Clippy check + working-directory: ./coordinator + run: | + cargo clippy diff --git a/block-streamer/Cargo.toml b/block-streamer/Cargo.toml index 9bd263c34..1d393b667 100644 --- a/block-streamer/Cargo.toml +++ b/block-streamer/Cargo.toml @@ -26,7 +26,7 @@ wildmatch = "2.1.1" registry-types = { path = "../registry/types", features = ["near-primitives"] } -near-lake-framework = "0.7.4" +near-lake-framework = "=0.7.4" [build-dependencies] tonic-build = "0.10" diff --git a/block-streamer/examples/start_stream.rs b/block-streamer/examples/start_stream.rs index 3802037dd..79bead1ea 100644 --- a/block-streamer/examples/start_stream.rs +++ b/block-streamer/examples/start_stream.rs @@ -12,6 +12,8 @@ async fn main() -> Result<(), Box> { start_block_height: 106700000, account_id: "morgs.near".to_string(), function_name: "test".to_string(), + version: 0, + redis_stream: "morgs.near/test:block_stream".to_string(), rule: Some(Rule::ActionAnyRule(ActionAnyRule { affected_account_id: "social.near".to_string(), status: Status::Success.into(), diff --git a/block-streamer/proto/block_streamer.proto b/block-streamer/proto/block_streamer.proto index 6ad4b35f0..5d1e0517a 100644 --- a/block-streamer/proto/block_streamer.proto +++ b/block-streamer/proto/block_streamer.proto @@ -2,48 +2,52 @@ syntax = "proto3"; package blockstreamer; -// The BlockStreamer service provides RPCs to manage BlockStream instances. +// The BlockStreamer service provides RPCs to manage BlockStream instances service BlockStreamer { - // Starts a new BlockStream process. + // Starts a new BlockStream process rpc StartStream (StartStreamRequest) returns (StartStreamResponse); - // Stops an existing BlockStream process. + // Stops an existing BlockStream process rpc StopStream (StopStreamRequest) returns (StopStreamResponse); - // Lists all current BlockStream processes. + // Lists all current BlockStream processes rpc ListStreams (ListStreamsRequest) returns (ListStreamsResponse); } -// Request message for starting a BlockStream. +// Request message for starting a BlockStream message StartStreamRequest { - // Which block height to start from. + // Which block height to start from uint64 start_block_height = 1; - // The account ID which the indexer is defined under + // Account ID which the indexer is defined under string account_id = 2; - // The name of the indexer + // Name of the indexer string function_name = 3; - // The filter rule to apply to incoming blocks + // Block height corresponding to the created/updated height of the indexer + uint64 version = 4; + // Key of Redis Stream to publish blocks to + string redis_stream = 5; + // Filter rule to apply to incoming blocks oneof rule { - ActionAnyRule action_any_rule = 4; - ActionFunctionCallRule action_function_call_rule = 5; + ActionAnyRule action_any_rule = 6; + ActionFunctionCallRule action_function_call_rule = 7; } } // Match any action against the specified account message ActionAnyRule { - // The account ID pattern to match against + // Account ID pattern to match against string affected_account_id = 1; - // The status of the action to match against + // Status of the action to match against Status status = 2; } // Match a specific function call against the specified account message ActionFunctionCallRule { - // The account ID pattern to match against + // Account ID pattern to match against string affected_account_id = 1; - // The function name to match against + // Function name to match against string function_name = 2; - // The status of the action to match against + // Status of the action to match against Status status = 3; } @@ -54,40 +58,43 @@ enum Status { STATUS_ANY = 3; } -// Response message for starting a BlockStream. +// Response message for starting a BlockStream message StartStreamResponse { - // ID or handle of the started BlockStream. + // ID or handle of the started BlockStream string stream_id = 1; } -// Request message for stopping a BlockStream. +// Request message for stopping a BlockStream message StopStreamRequest { - // ID or handle of the BlockStream to stop. + // ID or handle of the BlockStream to stop string stream_id = 1; } -// Response message for stopping a BlockStream. +// Response message for stopping a BlockStream message StopStreamResponse { - // Confirmation message or status. + // Confirmation message or status string status = 1; } -// Request message for listing BlockStreams. +// Request message for listing BlockStreams message ListStreamsRequest { - // Optional filters or parameters for listing streams. + // Optional filters or parameters for listing streams } -// Response message for listing BlockStreams. +// Response message for listing BlockStreams message ListStreamsResponse { - // List of active BlockStreams. + // List of active BlockStreams repeated StreamInfo streams = 1; } -// Information about a single BlockStream instance. +// Information about a single BlockStream instance message StreamInfo { + // ID or handle of the BlockStream string stream_id = 1; - int64 start_block_height = 2; - string indexer_name = 3; - string chain_id = 4; - string status = 5; + // Account ID of the indexer + string account_id = 3; + // Function name of the indexer + string function_name = 4; + // Block height corresponding to the created/updated height of the indexer + uint64 version = 5; } diff --git a/block-streamer/src/block_stream.rs b/block-streamer/src/block_stream.rs index 630ac47ac..fd98e03cd 100644 --- a/block-streamer/src/block_stream.rs +++ b/block-streamer/src/block_stream.rs @@ -1,4 +1,4 @@ -use anyhow::{bail, Context}; +use anyhow::Context; use near_lake_framework::near_indexer_primitives; use tokio::task::JoinHandle; @@ -19,14 +19,23 @@ pub struct BlockStream { task: Option, pub indexer_config: IndexerConfig, pub chain_id: ChainId, + pub version: u64, + pub redis_stream: String, } impl BlockStream { - pub fn new(indexer_config: IndexerConfig, chain_id: ChainId) -> Self { + pub fn new( + indexer_config: IndexerConfig, + chain_id: ChainId, + version: u64, + redis_stream: String, + ) -> Self { Self { task: None, indexer_config, chain_id, + version, + redis_stream, } } @@ -46,13 +55,15 @@ impl BlockStream { let indexer_config = self.indexer_config.clone(); let chain_id = self.chain_id.clone(); + let redis_stream = self.redis_stream.clone(); let handle = tokio::spawn(async move { tokio::select! { _ = cancellation_token_clone.cancelled() => { tracing::info!( - "Cancelling block stream task for indexer: {}", - indexer_config.get_full_name(), + account_id = indexer_config.account_id.as_str(), + function_name = indexer_config.function_name, + "Cancelling block stream task", ); Ok(()) @@ -64,12 +75,14 @@ impl BlockStream { delta_lake_client, lake_s3_config, &chain_id, - LAKE_PREFETCH_SIZE + LAKE_PREFETCH_SIZE, + redis_stream ) => { result.map_err(|err| { tracing::error!( - "Block stream task for indexer: {} stopped due to error: {:?}", - indexer_config.get_full_name(), + account_id = indexer_config.account_id.as_str(), + function_name = indexer_config.function_name, + "Block stream task stopped due to error: {:?}", err, ); err @@ -108,10 +121,13 @@ pub(crate) async fn start_block_stream( lake_s3_config: aws_sdk_s3::Config, chain_id: &ChainId, lake_prefetch_size: usize, + redis_stream: String, ) -> anyhow::Result<()> { tracing::info!( - "Starting block stream at {start_block_height} for indexer: {}", - indexer.get_full_name(), + account_id = indexer.account_id.as_str(), + function_name = indexer.function_name, + start_block_height, + "Starting block stream", ); let latest_block_metadata = delta_lake_client.get_latest_block_metadata().await?; @@ -125,9 +141,10 @@ pub(crate) async fn start_block_stream( .. } => { tracing::debug!( - "Fetching block heights starting from {} from delta lake for indexer: {}", + account_id = indexer.account_id.as_str(), + function_name = indexer.function_name, + "Fetching block heights starting from {} from delta lake", start_block_height, - indexer.get_full_name() ); delta_lake_client @@ -135,27 +152,35 @@ pub(crate) async fn start_block_stream( .await } MatchingRule::ActionFunctionCall { .. } => { - bail!("ActionFunctionCall matching rule not yet supported for historical processing, function: {:?} {:?}", indexer.account_id, indexer.function_name); + tracing::error!("ActionFunctionCall matching rule not yet supported for delta lake processing, function: {:?} {:?}", indexer.account_id, indexer.function_name); + Ok(vec![]) } MatchingRule::Event { .. } => { - bail!("Event matching rule not yet supported for historical processing, function {:?} {:?}", indexer.account_id, indexer.function_name); + tracing::error!("Event matching rule not yet supported for delta lake processing, function {:?} {:?}", indexer.account_id, indexer.function_name); + Ok(vec![]) } }?; tracing::debug!( - "Flushing {} block heights from index files to historical Stream for indexer: {}", + account_id = indexer.account_id.as_str(), + function_name = indexer.function_name, + "Flushing {} block heights from index files to Redis Stream", blocks_from_index.len(), - indexer.get_full_name(), ); for block in &blocks_from_index { + let block = block.to_owned(); redis_client - .xadd( - crate::redis::generate_historical_stream_key(&indexer.get_full_name()), - &[("block_height".to_string(), block.to_owned())], - ) + .xadd(redis_stream.clone(), &[("block_height".to_string(), block)]) .await .context("Failed to add block to Redis Stream")?; + redis_client + .set( + format!("{}:last_published_block", indexer.get_full_name()), + block, + ) + .await + .context("Failed to set last_published_block")?; } let mut last_indexed_block = @@ -167,8 +192,9 @@ pub(crate) async fn start_block_stream( }); tracing::debug!( - "Starting near-lake-framework from {last_indexed_block} for indexer: {}", - indexer.get_full_name(), + account_id = indexer.account_id.as_str(), + function_name = indexer.function_name, + "Starting near-lake-framework from {last_indexed_block} for indexer", ); let lake_config = match &chain_id { @@ -187,6 +213,14 @@ pub(crate) async fn start_block_stream( let block_height = streamer_message.block.header.height; last_indexed_block = block_height; + redis_client + .set( + format!("{}:last_published_block", indexer.get_full_name()), + last_indexed_block, + ) + .await + .context("Failed to set last_published_block")?; + let matches = crate::rules::reduce_indexer_rule_matches( &indexer.indexer_rule, &streamer_message, @@ -196,7 +230,7 @@ pub(crate) async fn start_block_stream( if !matches.is_empty() { redis_client .xadd( - crate::redis::generate_historical_stream_key(&indexer.get_full_name()), + redis_stream.clone(), &[("block_height".to_string(), block_height.to_owned())], ) .await @@ -207,9 +241,10 @@ pub(crate) async fn start_block_stream( drop(sender); tracing::debug!( - "Stopped block stream at {} for indexer: {}", + account_id = indexer.account_id.as_str(), + function_name = indexer.function_name, + "Stopped block stream at {}", last_indexed_block, - indexer.get_full_name(), ); Ok(()) @@ -219,10 +254,10 @@ pub(crate) async fn start_block_stream( mod tests { use super::*; + use mockall::predicate; + #[tokio::test] async fn adds_matching_blocks_from_index_and_lake() { - let expected_matching_block_height_count = 3; - let mut mock_delta_lake_client = crate::delta_lake_client::DeltaLakeClient::default(); mock_delta_lake_client .expect_get_latest_block_metadata() @@ -242,8 +277,16 @@ mod tests { let mut mock_redis_client = crate::redis::RedisClient::default(); mock_redis_client .expect_xadd::() + .with(predicate::eq("stream key".to_string()), predicate::always()) + .returning(|_, fields| { + assert!(vec![107503702, 107503703, 107503705].contains(&fields[0].1)); + Ok(()) + }) + .times(3); + mock_redis_client + .expect_set::() .returning(|_, _| Ok(())) - .times(expected_matching_block_height_count); + .times(4); let indexer_config = crate::indexer_config::IndexerConfig { account_id: near_indexer_primitives::types::AccountId::try_from( @@ -272,6 +315,7 @@ mod tests { lake_s3_config, &ChainId::Mainnet, 1, + "stream key".to_string(), ) .await .unwrap(); diff --git a/block-streamer/src/redis.rs b/block-streamer/src/redis.rs index a5ca22e30..583742bbc 100644 --- a/block-streamer/src/redis.rs +++ b/block-streamer/src/redis.rs @@ -7,10 +7,6 @@ pub use MockRedisClientImpl as RedisClient; #[cfg(not(test))] pub use RedisClientImpl as RedisClient; -pub fn generate_historical_stream_key(prefix: &str) -> String { - format!("{}:historical:stream", prefix) -} - pub struct RedisClientImpl { connection: ConnectionManager, } @@ -18,7 +14,6 @@ pub struct RedisClientImpl { #[cfg_attr(test, mockall::automock)] impl RedisClientImpl { pub async fn connect(redis_connection_str: &str) -> Result { - println!("called this"); let connection = redis::Client::open(redis_connection_str)? .get_tokio_connection_manager() .await?; @@ -44,4 +39,19 @@ impl RedisClientImpl { Ok(()) } + + pub async fn set(&self, key: T, value: U) -> Result<(), RedisError> + where + T: ToRedisArgs + Debug + Send + Sync + 'static, + U: ToRedisArgs + Debug + Send + Sync + 'static, + { + tracing::debug!("SET: {:?}, {:?}", key, value); + + let mut cmd = redis::cmd("SET"); + cmd.arg(key).arg(value); + + cmd.query_async(&mut self.connection.clone()).await?; + + Ok(()) + } } diff --git a/block-streamer/src/server/block_streamer_service.rs b/block-streamer/src/server/block_streamer_service.rs index 8cd9ce7b7..829ec4876 100644 --- a/block-streamer/src/server/block_streamer_service.rs +++ b/block-streamer/src/server/block_streamer_service.rs @@ -43,6 +43,18 @@ impl BlockStreamerService { .lock() .map_err(|err| Status::internal(format!("Failed to acquire lock: {}", err))) } + + fn match_status(grpc_status: i32) -> Result { + match grpc_status { + 1 => Ok(registry_types::Status::Success), + 2 => Ok(registry_types::Status::Fail), + 3 => Ok(registry_types::Status::Any), + status => Err(Status::invalid_argument(format!( + "Invalid Status provided: {}", + status + ))), + } + } } #[tonic::async_trait] @@ -58,27 +70,17 @@ impl blockstreamer::block_streamer_server::BlockStreamer for BlockStreamerServic .ok_or(Status::invalid_argument("Rule must be provided"))?; let matching_rule = match rule { - start_stream_request::Rule::ActionAnyRule(action_any_rule) => { - let affected_account_id = action_any_rule.affected_account_id; - let status = match action_any_rule.status { - 0 => Ok(registry_types::Status::Success), - 1 => Ok(registry_types::Status::Fail), - 2 => Ok(registry_types::Status::Any), - _ => Err(Status::invalid_argument( - "Invalid status value for ActionAnyRule", - )), - }?; - - MatchingRule::ActionAny { - affected_account_id, - status, + start_stream_request::Rule::ActionAnyRule(action_any) => MatchingRule::ActionAny { + affected_account_id: action_any.affected_account_id, + status: Self::match_status(action_any.status)?, + }, + start_stream_request::Rule::ActionFunctionCallRule(action_function_call) => { + MatchingRule::ActionFunctionCall { + affected_account_id: action_function_call.affected_account_id, + status: Self::match_status(action_function_call.status)?, + function: action_function_call.function_name, } } - _ => { - return Err(Status::unimplemented( - "Rules other than ActionAny are not supported yet", - )) - } }; let filter_rule = IndexerRule { // TODO: Remove kind as it is unused @@ -107,8 +109,12 @@ impl blockstreamer::block_streamer_server::BlockStreamer for BlockStreamerServic None => drop(lock), } - let mut block_stream = - block_stream::BlockStream::new(indexer_config.clone(), self.chain_id.clone()); + let mut block_stream = block_stream::BlockStream::new( + indexer_config.clone(), + self.chain_id.clone(), + request.version, + request.redis_stream, + ); block_stream .start( @@ -169,11 +175,9 @@ impl blockstreamer::block_streamer_server::BlockStreamer for BlockStreamerServic .values() .map(|block_stream| StreamInfo { stream_id: block_stream.indexer_config.get_hash_id(), - chain_id: self.chain_id.to_string(), - indexer_name: block_stream.indexer_config.get_full_name(), - start_block_height: 0, - status: "OK".to_string(), - // last_indexed_block + account_id: block_stream.indexer_config.account_id.to_string(), + function_name: block_stream.indexer_config.function_name.clone(), + version: block_stream.version, }) .collect(); @@ -236,9 +240,11 @@ mod tests { start_block_height: 0, account_id: "morgs.near".to_string(), function_name: "test".to_string(), + version: 0, + redis_stream: "stream".to_string(), rule: Some(start_stream_request::Rule::ActionAnyRule(ActionAnyRule { affected_account_id: "queryapi.dataplatform.near".to_string(), - status: 0, + status: 1, })), })) .await @@ -268,9 +274,11 @@ mod tests { start_block_height: 0, account_id: "morgs.near".to_string(), function_name: "test".to_string(), + version: 0, + redis_stream: "stream".to_string(), rule: Some(start_stream_request::Rule::ActionAnyRule(ActionAnyRule { affected_account_id: "queryapi.dataplatform.near".to_string(), - status: 0, + status: 1, })), })) .await diff --git a/coordinator/Cargo.lock b/coordinator/Cargo.lock new file mode 100644 index 000000000..f31530543 --- /dev/null +++ b/coordinator/Cargo.lock @@ -0,0 +1,4538 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "actix" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cba56612922b907719d4a01cf11c8d5b458e7d3dba946d0435f20f58d6795ed2" +dependencies = [ + "actix-macros", + "actix-rt", + "actix_derive", + "bitflags 2.4.1", + "bytes", + "crossbeam-channel", + "futures-core", + "futures-sink", + "futures-task", + "futures-util", + "log", + "once_cell", + "parking_lot", + "pin-project-lite", + "smallvec", + "tokio", + "tokio-util 0.7.10", +] + +[[package]] +name = "actix-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" +dependencies = [ + "quote", + "syn 2.0.40", +] + +[[package]] +name = "actix-rt" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d" +dependencies = [ + "futures-core", + "tokio", +] + +[[package]] +name = "actix_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c7db3d5a9718568e4cf4a537cfd7070e6e6ff7481510d0237fb529ac850f6d3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "ahash" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + +[[package]] +name = "async-stream" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "async-trait" +version = "0.1.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "aws-config" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11382bd8ac4c6c182a9775990935f96c916a865f1414486595f18eb8cfa9d90b" +dependencies = [ + "aws-credential-types", + "aws-http", + "aws-runtime", + "aws-sdk-sso", + "aws-sdk-ssooidc", + "aws-sdk-sts", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "hex", + "http", + "hyper", + "ring", + "time", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-credential-types" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a1629320d319dc715c6189b172349186557e209d2a7b893ff3d14efd33a47c" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "zeroize", +] + +[[package]] +name = "aws-http" +version = "0.60.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30e4199d5d62ab09be6a64650c06cc5c4aa45806fed4c74bc4a5c8eaf039a6fa" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "http", + "http-body", + "pin-project-lite", + "tracing", +] + +[[package]] +name = "aws-runtime" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87116d357c905b53f1828d15366363fd27b330a0393cbef349e653f686d36bad" +dependencies = [ + "aws-credential-types", + "aws-http", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-eventstream", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "fastrand", + "http", + "percent-encoding", + "tracing", + "uuid", +] + +[[package]] +name = "aws-sdk-s3" +version = "0.39.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29223b1074621f1d011bac836d995c002936663052b1e7ad02927551b17d6625" +dependencies = [ + "aws-credential-types", + "aws-http", + "aws-runtime", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-checksums", + "aws-smithy-eventstream", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-smithy-xml", + "aws-types", + "bytes", + "http", + "http-body", + "once_cell", + "percent-encoding", + "regex", + "tracing", + "url", +] + +[[package]] +name = "aws-sdk-sso" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b1779a72c60d45e5699512310d7f6fb965fecc8f7419ce1b993b716f0026fd" +dependencies = [ + "aws-credential-types", + "aws-http", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "http", + "once_cell", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-ssooidc" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fb130cc2a21a2a6ef2b7730565cffb447aebb18c9a468e56ffb5cc97bfc077" +dependencies = [ + "aws-credential-types", + "aws-http", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "http", + "once_cell", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-sts" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27259dcd835b6069260edec09487383f40f45c1cc7f02c74258eff8a22555a4" +dependencies = [ + "aws-credential-types", + "aws-http", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-query", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-smithy-xml", + "aws-types", + "http", + "once_cell", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sigv4" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d222297ca90209dc62245f0a490355795f29de362eb5c19caea4f7f55fe69078" +dependencies = [ + "aws-credential-types", + "aws-smithy-eventstream", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "crypto-bigint 0.5.5", + "form_urlencoded", + "hex", + "hmac", + "http", + "once_cell", + "p256", + "percent-encoding", + "ring", + "sha2 0.10.8", + "subtle", + "time", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-smithy-async" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9f65000917e3aa94c259d67fe01fa9e4cd456187d026067d642436e6311a81" +dependencies = [ + "futures-util", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "aws-smithy-checksums" +version = "0.60.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c2a63681f82fb85ca58d566534b7dc619c782fee0c61c1aa51e2b560c21cb4f" +dependencies = [ + "aws-smithy-http", + "aws-smithy-types", + "bytes", + "crc32c", + "crc32fast", + "hex", + "http", + "http-body", + "md-5", + "pin-project-lite", + "sha1 0.10.6", + "sha2 0.10.8", + "tracing", +] + +[[package]] +name = "aws-smithy-eventstream" +version = "0.60.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a85e16fa903c70c49ab3785e5f4ac2ad2171b36e0616f321011fa57962404bb6" +dependencies = [ + "aws-smithy-types", + "bytes", + "crc32fast", +] + +[[package]] +name = "aws-smithy-http" +version = "0.60.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e816425a6b9caea4929ac97d0cb33674849bd5f0086418abc0d02c63f7a1bf" +dependencies = [ + "aws-smithy-eventstream", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "bytes-utils", + "futures-core", + "http", + "http-body", + "once_cell", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tracing", +] + +[[package]] +name = "aws-smithy-json" +version = "0.60.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ab3f6d49e08df2f8d05e1bb5b68998e1e67b76054d3c43e7b954becb9a5e9ac" +dependencies = [ + "aws-smithy-types", +] + +[[package]] +name = "aws-smithy-query" +version = "0.60.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f94a7a3aa509ff9e8b8d80749851d04e5eee0954c43f2e7d6396c4740028737" +dependencies = [ + "aws-smithy-types", + "urlencoding", +] + +[[package]] +name = "aws-smithy-runtime" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da5b0a3617390e769576321816112f711c13d7e1114685e022505cf51fe5e48" +dependencies = [ + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "fastrand", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "once_cell", + "pin-project-lite", + "pin-utils", + "rustls", + "tokio", + "tracing", +] + +[[package]] +name = "aws-smithy-runtime-api" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2404c9eb08bfe9af255945254d9afc69a367b7ee008b8db75c05e3bca485fc65" +dependencies = [ + "aws-smithy-async", + "aws-smithy-types", + "bytes", + "http", + "pin-project-lite", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-smithy-types" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2aba8136605d14ac88f57dc3a693a9f8a4eab4a3f52bc03ff13746f0cd704e97" +dependencies = [ + "base64-simd", + "bytes", + "bytes-utils", + "futures-core", + "http", + "http-body", + "itoa", + "num-integer", + "pin-project-lite", + "pin-utils", + "ryu", + "serde", + "time", + "tokio", + "tokio-util 0.7.10", +] + +[[package]] +name = "aws-smithy-xml" +version = "0.60.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e8f03926587fc881b12b102048bb04305bf7fb8c83e776f0ccc51eaa2378263" +dependencies = [ + "xmlparser", +] + +[[package]] +name = "aws-types" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e5d5ee29077e0fcd5ddd0c227b521a33aaf02434b7cdba1c55eec5c1f18ac47" +dependencies = [ + "aws-credential-types", + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "http", + "rustc_version", + "tracing", +] + +[[package]] +name = "axum" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + +[[package]] +name = "base16ct" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + +[[package]] +name = "base64-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +dependencies = [ + "outref", + "vsimd", +] + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + +[[package]] +name = "blake2" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" +dependencies = [ + "crypto-mac", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-streamer" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-trait", + "aws-config", + "aws-sdk-s3", + "borsh 0.10.3", + "chrono", + "futures", + "mockall", + "near-lake-framework", + "prost 0.12.3", + "redis 0.21.7", + "registry-types", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tokio-util 0.7.10", + "tonic 0.10.2", + "tonic-build 0.10.2", + "tracing", + "tracing-subscriber", + "wildmatch", +] + +[[package]] +name = "borsh" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +dependencies = [ + "borsh-derive 0.10.3", + "hashbrown 0.13.2", +] + +[[package]] +name = "borsh" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9897ef0f1bd2362169de6d7e436ea2237dc1085d7d1e4db75f4be34d86f309d1" +dependencies = [ + "borsh-derive 1.2.1", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +dependencies = [ + "borsh-derive-internal", + "borsh-schema-derive-internal", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478b41ff04256c5c8330f3dfdaaae2a5cc976a8e75088bafa4625b0d0208de8c" +dependencies = [ + "once_cell", + "proc-macro-crate 2.0.1", + "proc-macro2", + "quote", + "syn 2.0.40", + "syn_derive", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + +[[package]] +name = "bytes-utils" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" +dependencies = [ + "bytes", + "either", +] + +[[package]] +name = "bytesize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" +dependencies = [ + "serde", +] + +[[package]] +name = "c2-chacha" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" +dependencies = [ + "cipher", + "ppv-lite86", +] + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "chrono" +version = "0.4.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-targets 0.48.5", +] + +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array", +] + +[[package]] +name = "clap" +version = "4.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "clap_lex" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "combine" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +dependencies = [ + "bytes", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", + "tokio-util 0.7.10", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "coordinator" +version = "0.1.0" +dependencies = [ + "anyhow", + "block-streamer", + "mockall", + "near-jsonrpc-client", + "near-jsonrpc-primitives", + "near-primitives", + "redis 0.24.0", + "registry-types", + "runner", + "serde_json", + "tokio", + "tonic 0.10.2", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32c" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8f48d60e5b4d2c53d5c2b1d8a58c849a70ae5e5509b08a48d047e3b65714a74" +dependencies = [ + "rustc_version", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +dependencies = [ + "darling_core 0.20.3", + "darling_macro 0.20.3", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", +] + +[[package]] +name = "darling_core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.40", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +dependencies = [ + "darling_core 0.20.3", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "der" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "derive_builder" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" +dependencies = [ + "derive_builder_core", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 1.0.109", +] + +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "downcast" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" + +[[package]] +name = "easy-ext" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53aff6fdc1b181225acdcb5b14c47106726fd8e486707315b1b138baed68ee31" + +[[package]] +name = "ecdsa" +version = "0.14.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +dependencies = [ + "der", + "elliptic-curve", + "rfc6979", + "signature", +] + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "elliptic-curve" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +dependencies = [ + "base16ct", + "crypto-bigint 0.4.9", + "der", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encoding_rs" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum-map" +version = "2.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6866f3bfdf8207509a033af1a75a7b08abda06bbaaeae6669323fd5a097df2e9" +dependencies = [ + "enum-map-derive", +] + +[[package]] +name = "enum-map-derive" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "ff" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fixed-hash" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" +dependencies = [ + "static_assertions", +] + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +dependencies = [ + "num-traits", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fragile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" + +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "futures" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" + +[[package]] +name = "futures-executor" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" + +[[package]] +name = "futures-macro" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "futures-sink" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" + +[[package]] +name = "futures-task" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" + +[[package]] +name = "futures-util" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "group" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.1.0", + "slab", + "tokio", + "tokio-util 0.7.10", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "home" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "http" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http", + "hyper", + "log", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", + "serde", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + +[[package]] +name = "js-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "json_comments" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dbbfed4e59ba9750e15ba154fdfd9329cee16ff3df539c2666b70f58cc32105" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" + +[[package]] +name = "linux-raw-sys" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + +[[package]] +name = "memchr" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mio" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", +] + +[[package]] +name = "mockall" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" +dependencies = [ + "cfg-if", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "near-account-id" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc0cb40869cab7f5232f934f45db35bffe0f2d2a7cb0cd0346202fbe4ebf2dd7" +dependencies = [ + "borsh 0.10.3", + "serde", +] + +[[package]] +name = "near-chain-configs" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4f9a1c805846237d56f99b328ba6ab77e5d43ef59aaaf8d2a41d42fdc708a7b" +dependencies = [ + "anyhow", + "chrono", + "derive_more", + "near-config-utils", + "near-crypto", + "near-o11y", + "near-primitives", + "num-rational", + "once_cell", + "serde", + "serde_json", + "sha2 0.10.8", + "smart-default", + "tracing", +] + +[[package]] +name = "near-config-utils" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5523e7dce493c45bc3241eb3100d943ec471852f9b1f84b46a34789eadf17031" +dependencies = [ + "anyhow", + "json_comments", + "thiserror", + "tracing", +] + +[[package]] +name = "near-crypto" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff6b382b626e7e0cd372d027c6672ac97b4b6ee6114288c9e58d8180b935d315" +dependencies = [ + "blake2", + "borsh 0.10.3", + "bs58", + "c2-chacha", + "curve25519-dalek", + "derive_more", + "ed25519-dalek", + "hex", + "near-account-id", + "near-config-utils", + "near-stdx", + "once_cell", + "primitive-types", + "rand 0.7.3", + "secp256k1", + "serde", + "serde_json", + "subtle", + "thiserror", +] + +[[package]] +name = "near-fmt" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c44c842c6cfcd9b8c387cccd4cd0619a5f21920cde5d5c292af3cc5d40510672" +dependencies = [ + "near-primitives-core", +] + +[[package]] +name = "near-indexer-primitives" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b76c87827dcae78979748c3864d209d5906163958a01551afc2092a8ad56fa39" +dependencies = [ + "near-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "near-jsonrpc-client" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "118f44c02ad211db805c1370ad3ff26576af6ff554093c9fece1b835d29d233a" +dependencies = [ + "borsh 0.10.3", + "lazy_static", + "log", + "near-chain-configs", + "near-crypto", + "near-jsonrpc-primitives", + "near-primitives", + "reqwest", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "near-jsonrpc-primitives" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b2934b5ab243e25e951c984525ba0aff0e719ed915c988c5195405aa0f6987" +dependencies = [ + "arbitrary", + "near-chain-configs", + "near-crypto", + "near-primitives", + "near-rpc-error-macro", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "near-lake-framework" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a4259d516729a7d938e3024064fe53c005673169383daa1db5ea360e0950c9d" +dependencies = [ + "anyhow", + "async-stream", + "async-trait", + "aws-config", + "aws-credential-types", + "aws-sdk-s3", + "aws-types", + "derive_builder", + "futures", + "near-indexer-primitives", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "near-o11y" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af7d35397b02b131c188c72f3885e97daeccab134ec2fc8cc0073a94cf1cfe19" +dependencies = [ + "actix", + "atty", + "clap", + "near-crypto", + "near-primitives-core", + "once_cell", + "opentelemetry", + "opentelemetry-otlp", + "opentelemetry-semantic-conventions", + "prometheus", + "serde", + "strum", + "thiserror", + "tokio", + "tracing", + "tracing-appender", + "tracing-opentelemetry", + "tracing-subscriber", +] + +[[package]] +name = "near-primitives" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f7051aaf199adc4d068620fca6d5f70f906a1540d03a8bb3701271f8881835" +dependencies = [ + "arbitrary", + "borsh 0.10.3", + "bytesize", + "cfg-if", + "chrono", + "derive_more", + "easy-ext", + "enum-map", + "hex", + "near-crypto", + "near-fmt", + "near-primitives-core", + "near-rpc-error-macro", + "near-stdx", + "near-vm-errors", + "num-rational", + "once_cell", + "primitive-types", + "rand 0.8.5", + "reed-solomon-erasure", + "serde", + "serde_json", + "serde_with", + "serde_yaml", + "smart-default", + "strum", + "thiserror", + "time", + "tracing", +] + +[[package]] +name = "near-primitives-core" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775fec19ef51a341abdbf792a9dda5b4cb89f488f681b2fd689b9321d24db47b" +dependencies = [ + "arbitrary", + "base64 0.21.5", + "borsh 0.10.3", + "bs58", + "derive_more", + "enum-map", + "near-account-id", + "num-rational", + "serde", + "serde_repr", + "serde_with", + "sha2 0.10.8", + "strum", + "thiserror", +] + +[[package]] +name = "near-rpc-error-core" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c1eda300e2e78f4f945ae58117d49e806899f4a51ee2faa09eda5ebc2e6571" +dependencies = [ + "quote", + "serde", + "syn 2.0.40", +] + +[[package]] +name = "near-rpc-error-macro" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31d2dadd765101c77e664029dd6fbec090e696877d4ae903c620d02ceda4969a" +dependencies = [ + "fs2", + "near-rpc-error-core", + "serde", + "syn 2.0.40", +] + +[[package]] +name = "near-stdx" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6540152fba5e96fe5d575b79e8cd244cf2add747bb01362426bdc069bc3a23bc" + +[[package]] +name = "near-vm-errors" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec545d1bede0579e7c15dd2dce9b998dc975c52f2165702ff40bec7ff69728bb" +dependencies = [ + "borsh 0.10.3", + "near-account-id", + "near-rpc-error-macro", + "serde", + "strum", + "thiserror", +] + +[[package]] +name = "normalize-line-endings" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", + "serde", +] + +[[package]] +name = "num-traits" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.3", + "libc", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl" +version = "0.10.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b8419dc8cc6d866deb801274bba2e6f8f6108c1bb7fcc10ee5ab864931dbb45" +dependencies = [ + "bitflags 2.4.1", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3eaad34cdd97d81de97964fc7f29e2d104f483840d906ef56daa1912338460b" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "opentelemetry" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8" +dependencies = [ + "async-trait", + "crossbeam-channel", + "futures-channel", + "futures-executor", + "futures-util", + "js-sys", + "lazy_static", + "percent-encoding", + "pin-project", + "rand 0.8.5", + "thiserror", + "tokio", + "tokio-stream", +] + +[[package]] +name = "opentelemetry-otlp" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1a6ca9de4c8b00aa7f1a153bd76cb263287155cec642680d79d98706f3d28a" +dependencies = [ + "async-trait", + "futures", + "futures-util", + "http", + "opentelemetry", + "prost 0.9.0", + "thiserror", + "tokio", + "tonic 0.6.2", + "tonic-build 0.6.2", +] + +[[package]] +name = "opentelemetry-semantic-conventions" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985cc35d832d412224b2cffe2f9194b1b89b6aa5d0bef76d080dce09d90e62bd" +dependencies = [ + "opentelemetry", +] + +[[package]] +name = "outref" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "p256" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" +dependencies = [ + "ecdsa", + "elliptic-curve", + "sha2 0.10.8", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap 2.1.0", +] + +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "predicates" +version = "2.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" +dependencies = [ + "difflib", + "float-cmp", + "itertools", + "normalize-line-endings", + "predicates-core", + "regex", +] + +[[package]] +name = "predicates-core" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" + +[[package]] +name = "predicates-tree" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +dependencies = [ + "predicates-core", + "termtree", +] + +[[package]] +name = "prettyplease" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +dependencies = [ + "proc-macro2", + "syn 2.0.40", +] + +[[package]] +name = "primitive-types" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" +dependencies = [ + "fixed-hash", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +dependencies = [ + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prometheus" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "memchr", + "parking_lot", + "protobuf", + "thiserror", +] + +[[package]] +name = "prost" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001" +dependencies = [ + "bytes", + "prost-derive 0.9.0", +] + +[[package]] +name = "prost" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +dependencies = [ + "bytes", + "prost-derive 0.12.3", +] + +[[package]] +name = "prost-build" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5" +dependencies = [ + "bytes", + "heck 0.3.3", + "itertools", + "lazy_static", + "log", + "multimap", + "petgraph", + "prost 0.9.0", + "prost-types 0.9.0", + "regex", + "tempfile", + "which", +] + +[[package]] +name = "prost-build" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" +dependencies = [ + "bytes", + "heck 0.4.1", + "itertools", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost 0.12.3", + "prost-types 0.12.3", + "regex", + "syn 2.0.40", + "tempfile", + "which", +] + +[[package]] +name = "prost-derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "prost-derive" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "prost-types" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a" +dependencies = [ + "bytes", + "prost 0.9.0", +] + +[[package]] +name = "prost-types" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" +dependencies = [ + "prost 0.12.3", +] + +[[package]] +name = "protobuf" +version = "2.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.11", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "redis" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "152f3863635cbb76b73bc247845781098302c6c9ad2060e1a9a7de56840346b6" +dependencies = [ + "arc-swap", + "async-trait", + "bytes", + "combine", + "futures", + "futures-util", + "itoa", + "percent-encoding", + "pin-project-lite", + "ryu", + "sha1 0.6.1", + "tokio", + "tokio-util 0.7.10", + "url", +] + +[[package]] +name = "redis" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c580d9cbbe1d1b479e8d67cf9daf6a62c957e6846048408b80b43ac3f6af84cd" +dependencies = [ + "arc-swap", + "async-trait", + "bytes", + "combine", + "futures", + "futures-util", + "itoa", + "percent-encoding", + "pin-project-lite", + "ryu", + "sha1_smol", + "socket2", + "tokio", + "tokio-retry", + "tokio-util 0.7.10", + "url", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "reed-solomon-erasure" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a415a013dd7c5d4221382329a5a3482566da675737494935cbbbcdec04662f9d" +dependencies = [ + "smallvec", +] + +[[package]] +name = "regex" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-lite" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "registry-types" +version = "0.1.0" +dependencies = [ + "borsh 1.2.1", + "near-primitives", + "serde", +] + +[[package]] +name = "reqwest" +version = "0.11.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +dependencies = [ + "base64 0.21.5", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "rfc6979" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +dependencies = [ + "crypto-bigint 0.4.9", + "hmac", + "zeroize", +] + +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom 0.2.11", + "libc", + "spin", + "untrusted", + "windows-sys 0.48.0", +] + +[[package]] +name = "runner" +version = "0.1.0" +dependencies = [ + "prost 0.12.3", + "tokio", + "tonic 0.10.2", + "tonic-build 0.10.2", +] + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.5", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "ryu" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" + +[[package]] +name = "schannel" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "sec1" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" +dependencies = [ + "rand 0.8.5", + "secp256k1-sys", +] + +[[package]] +name = "secp256k1-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +dependencies = [ + "cc", +] + +[[package]] +name = "security-framework" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" + +[[package]] +name = "serde" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "serde_json" +version = "1.0.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" +dependencies = [ + "base64 0.21.5", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.1.0", + "serde", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" +dependencies = [ + "darling 0.20.3", + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "serde_yaml" +version = "0.9.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" +dependencies = [ + "indexmap 2.1.0", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "sha1" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" +dependencies = [ + "sha1_smol", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha1_smol" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" + +[[package]] +name = "smart-default" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "133659a15339456eeeb07572eb02a91c91e9815e9cbc89566944d2c8d3efdbf6" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13fa70a4ee923979ffb522cacce59d34421ebdea5625e1073c4326ef9d2dd42e" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tempfile" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys 0.48.0", +] + +[[package]] +name = "termtree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" + +[[package]] +name = "thiserror" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "time" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +dependencies = [ + "deranged", + "itoa", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +dependencies = [ + "time-core", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.28.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +dependencies = [ + "autocfg", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-macros" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-retry" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" +dependencies = [ + "pin-project", + "rand 0.8.5", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tonic" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff08f4649d10a70ffa3522ca559031285d8e421d727ac85c60825761818f5d0a" +dependencies = [ + "async-stream", + "async-trait", + "base64 0.13.1", + "bytes", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost 0.9.0", + "prost-derive 0.9.0", + "tokio", + "tokio-stream", + "tokio-util 0.6.10", + "tower", + "tower-layer", + "tower-service", + "tracing", + "tracing-futures", +] + +[[package]] +name = "tonic" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" +dependencies = [ + "async-stream", + "async-trait", + "axum", + "base64 0.21.5", + "bytes", + "h2", + "http", + "http-body", + "hyper", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost 0.12.3", + "tokio", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-build" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9403f1bafde247186684b230dc6f38b5cd514584e8bec1dd32514be4745fa757" +dependencies = [ + "proc-macro2", + "prost-build 0.9.0", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "tonic-build" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build 0.12.3", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "indexmap 1.9.3", + "pin-project", + "pin-project-lite", + "rand 0.8.5", + "slab", + "tokio", + "tokio-util 0.7.10", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror", + "time", + "tracing-subscriber", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "tracing-log" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-opentelemetry" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbbe89715c1dbbb790059e2565353978564924ee85017b5fff365c872ff6721f" +dependencies = [ + "once_cell", + "opentelemetry", + "tracing", + "tracing-core", + "tracing-log 0.1.4", + "tracing-subscriber", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log 0.2.0", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "unsafe-libyaml" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "uuid" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.40", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" + +[[package]] +name = "web-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "wildmatch" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee583bdc5ff1cf9db20e9db5bb3ff4c3089a8f6b8b31aff265c9aba85812db86" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c830786f7720c2fd27a1a0e27a709dbd3c4d009b56d098fc742d4f4eab91fe2" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "xmlparser" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" + +[[package]] +name = "zerocopy" +version = "0.7.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306dca4455518f1f31635ec308b6b3e4eb1b11758cefafc782827d0aa7acb5c7" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be912bf68235a88fbefd1b73415cb218405958d1655b2ece9035a19920bdf6ba" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] diff --git a/coordinator/Cargo.toml b/coordinator/Cargo.toml new file mode 100644 index 000000000..c9dd8804e --- /dev/null +++ b/coordinator/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "coordinator" +version = "0.1.0" +edition = "2021" + +[dependencies] +anyhow = "1.0.75" +redis = { version = "0.24", features = ["tokio-comp", "connection-manager"] } +tokio = "1.28" +tonic = "0.10.2" +tracing = "0.1.40" +tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } +serde_json = "1.0.108" + +block-streamer = { path = "../block-streamer" } +runner = { path = "../runner-client"} +registry-types = { path = "../registry/types", features = ["near-primitives"] } + +near-jsonrpc-client = "0.6.0" +near-primitives = "0.17.0" +near-jsonrpc-primitives = "0.17.0" + +[dev-dependencies] +mockall = "0.11.4" diff --git a/coordinator/src/block_streams_handler.rs b/coordinator/src/block_streams_handler.rs new file mode 100644 index 000000000..a62e9b20d --- /dev/null +++ b/coordinator/src/block_streams_handler.rs @@ -0,0 +1,107 @@ +use anyhow::Context; +use tonic::transport::channel::Channel; +use tonic::Request; + +use block_streamer::block_streamer_client::BlockStreamerClient; +use block_streamer::{ + start_stream_request::Rule, ActionAnyRule, ActionFunctionCallRule, ListStreamsRequest, + StartStreamRequest, Status, StopStreamRequest, StreamInfo, +}; + +#[cfg(not(test))] +pub use BlockStreamsHandlerImpl as BlockStreamsHandler; +#[cfg(test)] +pub use MockBlockStreamsHandlerImpl as BlockStreamsHandler; + +pub struct BlockStreamsHandlerImpl { + client: BlockStreamerClient, +} + +#[cfg_attr(test, mockall::automock)] +impl BlockStreamsHandlerImpl { + pub async fn connect() -> anyhow::Result { + let client = BlockStreamerClient::connect("http://[::1]:10000") + .await + .context("Unable to connect to Block Streamer")?; + + Ok(Self { client }) + } + + pub async fn list(&mut self) -> anyhow::Result> { + let response = self + .client + .list_streams(Request::new(ListStreamsRequest {})) + .await?; + + Ok(response.into_inner().streams) + } + + pub async fn stop(&mut self, stream_id: String) -> anyhow::Result<()> { + let request = Request::new(StopStreamRequest { stream_id }); + + tracing::debug!("Sending stop stream request: {:#?}", request); + + let _ = self.client.stop_stream(request).await?; + + Ok(()) + } + + fn match_status(status: ®istry_types::Status) -> i32 { + match status { + registry_types::Status::Success => Status::Success, + registry_types::Status::Fail => Status::Failure, + registry_types::Status::Any => Status::Any, + } + .into() + } + + pub async fn start( + &mut self, + start_block_height: u64, + account_id: String, + function_name: String, + version: u64, + redis_stream: String, + rule: registry_types::MatchingRule, + ) -> anyhow::Result<()> { + let rule = match &rule { + registry_types::MatchingRule::ActionAny { + affected_account_id, + status, + } => Rule::ActionAnyRule(ActionAnyRule { + affected_account_id: affected_account_id.to_owned(), + status: Self::match_status(status), + }), + registry_types::MatchingRule::ActionFunctionCall { + affected_account_id, + status, + function, + } => Rule::ActionFunctionCallRule(ActionFunctionCallRule { + affected_account_id: affected_account_id.to_owned(), + function_name: function.to_owned(), + status: Self::match_status(status), + }), + unsupported_rule => { + anyhow::bail!( + "Encountered unsupported indexer rule: {:?}", + unsupported_rule + ) + } + }; + + let request = Request::new(StartStreamRequest { + start_block_height, + account_id, + function_name, + version, + redis_stream, + rule: Some(rule), + }); + + tracing::debug!("Sending start stream request: {:#?}", request); + + let _ = self.client.start_stream(request).await?; + + Ok(()) + } +} diff --git a/coordinator/src/executors_handler.rs b/coordinator/src/executors_handler.rs new file mode 100644 index 000000000..44405c29b --- /dev/null +++ b/coordinator/src/executors_handler.rs @@ -0,0 +1,70 @@ +use anyhow::Context; +use tonic::transport::channel::Channel; +use tonic::Request; + +use runner::runner_client::RunnerClient; +use runner::{ExecutorInfo, ListExecutorsRequest, StartExecutorRequest, StopExecutorRequest}; + +#[cfg(not(test))] +pub use ExecutorsHandlerImpl as ExecutorsHandler; +#[cfg(test)] +pub use MockExecutorsHandlerImpl as ExecutorsHandler; + +pub struct ExecutorsHandlerImpl { + client: RunnerClient, +} + +#[cfg_attr(test, mockall::automock)] +impl ExecutorsHandlerImpl { + pub async fn connect() -> anyhow::Result { + let client = RunnerClient::connect("http://localhost:50007") + .await + .context("Unable to connect to Runner")?; + + Ok(Self { client }) + } + + pub async fn list(&mut self) -> anyhow::Result> { + let response = self + .client + .list_executors(Request::new(ListExecutorsRequest {})) + .await?; + + Ok(response.into_inner().executors) + } + + pub async fn start( + &mut self, + account_id: String, + function_name: String, + code: String, + schema: String, + redis_stream: String, + version: u64, + ) -> anyhow::Result<()> { + let request = Request::new(StartExecutorRequest { + account_id, + function_name, + code, + schema, + redis_stream, + version, + }); + + tracing::debug!("Sending start executor request: {:#?}", request); + + self.client.start_executor(request).await?; + + Ok(()) + } + + pub async fn stop(&mut self, executor_id: String) -> anyhow::Result<()> { + let request = Request::new(StopExecutorRequest { executor_id }); + + tracing::debug!("Sending stop executor request: {:#?}", request); + + self.client.stop_executor(request).await?; + + Ok(()) + } +} diff --git a/coordinator/src/main.rs b/coordinator/src/main.rs new file mode 100644 index 000000000..67c6c60f4 --- /dev/null +++ b/coordinator/src/main.rs @@ -0,0 +1,657 @@ +use tracing_subscriber::prelude::*; + +use crate::block_streams_handler::BlockStreamsHandler; +use crate::executors_handler::ExecutorsHandler; +use crate::redis::RedisClient; +use crate::registry::{IndexerRegistry, Registry}; + +mod block_streams_handler; +mod executors_handler; +mod redis; +mod registry; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + tracing_subscriber::registry() + .with(tracing_subscriber::fmt::layer()) + .with(tracing_subscriber::EnvFilter::from_default_env()) + .init(); + + let registry = Registry::connect("https://rpc.mainnet.near.org"); + let redis_client = RedisClient::connect("redis://127.0.0.1").await?; + let mut block_streams_handler = BlockStreamsHandler::connect().await?; + let mut executors_handler = ExecutorsHandler::connect().await?; + + loop { + let indexer_registry = registry.fetch().await?; + + synchronise_executors(&indexer_registry, &mut executors_handler).await?; + synchronise_block_streams(&indexer_registry, &redis_client, &mut block_streams_handler) + .await?; + } +} + +async fn synchronise_executors( + indexer_registry: &IndexerRegistry, + executors_handler: &mut ExecutorsHandler, +) -> anyhow::Result<()> { + let mut active_executors = executors_handler.list().await?; + + for (account_id, indexers) in indexer_registry.iter() { + for (function_name, indexer_config) in indexers.iter() { + let active_executor = active_executors + .iter() + .position(|stream| { + stream.account_id == account_id.to_string() + && &stream.function_name == function_name + }) + .map(|index| active_executors.swap_remove(index)); + + let registry_version = indexer_config + .updated_at_block_height + .unwrap_or(indexer_config.created_at_block_height); + + if let Some(active_executor) = active_executor { + if active_executor.version == registry_version { + continue; + } + + executors_handler.stop(active_executor.executor_id).await?; + } + + executors_handler + .start( + account_id.to_string(), + function_name.to_string(), + indexer_config.code.clone(), + indexer_config.schema.clone().unwrap_or_default(), + indexer_config.get_redis_stream(), + registry_version, + ) + .await?; + } + } + + for unregistered_executor in active_executors { + executors_handler + .stop(unregistered_executor.executor_id) + .await?; + } + + Ok(()) +} + +async fn synchronise_block_streams( + indexer_registry: &IndexerRegistry, + redis_client: &RedisClient, + block_streams_handler: &mut BlockStreamsHandler, +) -> anyhow::Result<()> { + let mut active_block_streams = block_streams_handler.list().await?; + + for (account_id, indexers) in indexer_registry.iter() { + for (function_name, indexer_config) in indexers.iter() { + let active_block_stream = active_block_streams + .iter() + .position(|stream| { + stream.account_id == account_id.to_string() + && &stream.function_name == function_name + }) + .map(|index| active_block_streams.swap_remove(index)); + + let registry_version = indexer_config + .updated_at_block_height + .unwrap_or(indexer_config.created_at_block_height); + + if let Some(active_block_stream) = active_block_stream { + if active_block_stream.version == registry_version { + continue; + } + + block_streams_handler + .stop(active_block_stream.stream_id) + .await?; + } + + let start_block_height = if let Some(start_block_height) = + indexer_config.start_block_height + { + start_block_height + } else if let Ok(last_published_block) = redis_client + .get::(format!( + "{}:last_published_block", + indexer_config.get_full_name() + )) + .await + { + last_published_block + } else if let Some(updated_at_block_height) = indexer_config.updated_at_block_height { + updated_at_block_height + } else { + indexer_config.created_at_block_height + }; + + block_streams_handler + .start( + start_block_height, + indexer_config.account_id.to_string(), + indexer_config.function_name.clone(), + registry_version, + indexer_config.get_redis_stream(), + indexer_config.filter.matching_rule.clone(), + ) + .await?; + } + } + + for unregistered_block_stream in active_block_streams { + block_streams_handler + .stop(unregistered_block_stream.stream_id) + .await?; + } + + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + + use mockall::predicate; + use std::collections::HashMap; + + use registry_types::{IndexerRule, IndexerRuleKind, MatchingRule, Status}; + + use crate::registry::IndexerConfig; + + mod executors { + use super::*; + + #[tokio::test] + async fn starts_executors() { + let indexer_registry = HashMap::from([( + "morgs.near".parse().unwrap(), + HashMap::from([( + "test".to_string(), + IndexerConfig { + account_id: "morgs.near".parse().unwrap(), + function_name: "test".to_string(), + code: "code".to_string(), + schema: Some("schema".to_string()), + filter: IndexerRule { + id: None, + name: None, + indexer_rule_kind: IndexerRuleKind::Action, + matching_rule: MatchingRule::ActionAny { + affected_account_id: "queryapi.dataplatform.near".to_string(), + status: Status::Any, + }, + }, + created_at_block_height: 1, + updated_at_block_height: None, + start_block_height: Some(100), + }, + )]), + )]); + + let mut executors_handler = ExecutorsHandler::default(); + executors_handler.expect_list().returning(|| Ok(vec![])); + executors_handler + .expect_start() + .with( + predicate::eq("morgs.near".to_string()), + predicate::eq("test".to_string()), + predicate::eq("code".to_string()), + predicate::eq("schema".to_string()), + predicate::eq("morgs.near/test:block_stream".to_string()), + predicate::eq(1), + ) + .returning(|_, _, _, _, _, _| Ok(())); + + synchronise_executors(&indexer_registry, &mut executors_handler) + .await + .unwrap(); + } + + #[tokio::test] + async fn restarts_executors_with_mismatched_versions() { + let indexer_registry = HashMap::from([( + "morgs.near".parse().unwrap(), + HashMap::from([( + "test".to_string(), + IndexerConfig { + account_id: "morgs.near".parse().unwrap(), + function_name: "test".to_string(), + code: "code".to_string(), + schema: Some("schema".to_string()), + filter: IndexerRule { + id: None, + name: None, + indexer_rule_kind: IndexerRuleKind::Action, + matching_rule: MatchingRule::ActionAny { + affected_account_id: "queryapi.dataplatform.near".to_string(), + status: Status::Any, + }, + }, + created_at_block_height: 1, + updated_at_block_height: Some(2), + start_block_height: Some(100), + }, + )]), + )]); + + let mut executors_handler = ExecutorsHandler::default(); + executors_handler.expect_list().returning(|| { + Ok(vec![runner::ExecutorInfo { + executor_id: "executor_id".to_string(), + account_id: "morgs.near".to_string(), + function_name: "test".to_string(), + status: "running".to_string(), + version: 1, + }]) + }); + executors_handler + .expect_stop() + .with(predicate::eq("executor_id".to_string())) + .returning(|_| Ok(())) + .once(); + + executors_handler + .expect_start() + .with( + predicate::eq("morgs.near".to_string()), + predicate::eq("test".to_string()), + predicate::eq("code".to_string()), + predicate::eq("schema".to_string()), + predicate::eq("morgs.near/test:block_stream".to_string()), + predicate::eq(2), + ) + .returning(|_, _, _, _, _, _| Ok(())); + + synchronise_executors(&indexer_registry, &mut executors_handler) + .await + .unwrap(); + } + + #[tokio::test] + async fn ignores_executors_with_matching_versions() { + let indexer_registry = HashMap::from([( + "morgs.near".parse().unwrap(), + HashMap::from([( + "test".to_string(), + IndexerConfig { + account_id: "morgs.near".parse().unwrap(), + function_name: "test".to_string(), + code: "code".to_string(), + schema: Some("schema".to_string()), + filter: IndexerRule { + id: None, + name: None, + indexer_rule_kind: IndexerRuleKind::Action, + matching_rule: MatchingRule::ActionAny { + affected_account_id: "queryapi.dataplatform.near".to_string(), + status: Status::Any, + }, + }, + created_at_block_height: 1, + updated_at_block_height: Some(2), + start_block_height: Some(100), + }, + )]), + )]); + + let mut executors_handler = ExecutorsHandler::default(); + executors_handler.expect_list().returning(|| { + Ok(vec![runner::ExecutorInfo { + executor_id: "executor_id".to_string(), + account_id: "morgs.near".to_string(), + function_name: "test".to_string(), + status: "running".to_string(), + version: 2, + }]) + }); + executors_handler.expect_stop().never(); + + executors_handler.expect_start().never(); + + synchronise_executors(&indexer_registry, &mut executors_handler) + .await + .unwrap(); + } + + #[tokio::test] + async fn stops_executors_not_in_registry() { + let indexer_registry = HashMap::from([]); + + let mut executors_handler = ExecutorsHandler::default(); + executors_handler.expect_list().returning(|| { + Ok(vec![runner::ExecutorInfo { + executor_id: "executor_id".to_string(), + account_id: "morgs.near".to_string(), + function_name: "test".to_string(), + status: "running".to_string(), + version: 2, + }]) + }); + + executors_handler + .expect_stop() + .with(predicate::eq("executor_id".to_string())) + .returning(|_| Ok(())) + .once(); + + synchronise_executors(&indexer_registry, &mut executors_handler) + .await + .unwrap(); + } + } + + mod block_stream { + use super::*; + + #[tokio::test] + async fn uses_start_block_height_when_set() { + let indexer_registry = HashMap::from([( + "morgs.near".parse().unwrap(), + HashMap::from([( + "test".to_string(), + IndexerConfig { + account_id: "morgs.near".parse().unwrap(), + function_name: "test".to_string(), + code: String::new(), + schema: Some(String::new()), + filter: IndexerRule { + id: None, + name: None, + indexer_rule_kind: IndexerRuleKind::Action, + matching_rule: MatchingRule::ActionAny { + affected_account_id: "queryapi.dataplatform.near".to_string(), + status: Status::Any, + }, + }, + created_at_block_height: 1, + updated_at_block_height: None, + start_block_height: Some(100), + }, + )]), + )]); + + let mut redis_client = RedisClient::default(); + redis_client + .expect_get::() + .returning(|_| anyhow::bail!("none")); + + let mut block_stream_handler = BlockStreamsHandler::default(); + block_stream_handler.expect_list().returning(|| Ok(vec![])); + block_stream_handler + .expect_start() + .with( + predicate::eq(100), + predicate::eq("morgs.near".to_string()), + predicate::eq("test".to_string()), + predicate::eq(1), + predicate::eq("morgs.near/test:block_stream".to_string()), + predicate::eq(MatchingRule::ActionAny { + affected_account_id: "queryapi.dataplatform.near".to_string(), + status: Status::Any, + }), + ) + .returning(|_, _, _, _, _, _| Ok(())); + + synchronise_block_streams(&indexer_registry, &redis_client, &mut block_stream_handler) + .await + .unwrap(); + } + + #[tokio::test] + async fn uses_updated_at_when_no_start_block_height() { + let indexer_registry = HashMap::from([( + "morgs.near".parse().unwrap(), + HashMap::from([( + "test".to_string(), + IndexerConfig { + account_id: "morgs.near".parse().unwrap(), + function_name: "test".to_string(), + code: String::new(), + schema: Some(String::new()), + filter: IndexerRule { + id: None, + name: None, + indexer_rule_kind: IndexerRuleKind::Action, + matching_rule: MatchingRule::ActionAny { + affected_account_id: "queryapi.dataplatform.near".to_string(), + status: Status::Any, + }, + }, + created_at_block_height: 101, + updated_at_block_height: Some(200), + start_block_height: None, + }, + )]), + )]); + + let mut redis_client = RedisClient::default(); + redis_client + .expect_get::() + .returning(|_| anyhow::bail!("none")); + + let mut block_stream_handler = BlockStreamsHandler::default(); + block_stream_handler.expect_list().returning(|| Ok(vec![])); + block_stream_handler + .expect_start() + .with( + predicate::eq(200), + predicate::eq("morgs.near".to_string()), + predicate::eq("test".to_string()), + predicate::eq(200), + predicate::eq("morgs.near/test:block_stream".to_string()), + predicate::eq(MatchingRule::ActionAny { + affected_account_id: "queryapi.dataplatform.near".to_string(), + status: Status::Any, + }), + ) + .returning(|_, _, _, _, _, _| Ok(())); + + synchronise_block_streams(&indexer_registry, &redis_client, &mut block_stream_handler) + .await + .unwrap(); + } + + #[tokio::test] + async fn uses_created_at_when_no_updated_at_block_height() { + let indexer_registry = HashMap::from([( + "morgs.near".parse().unwrap(), + HashMap::from([( + "test".to_string(), + IndexerConfig { + account_id: "morgs.near".parse().unwrap(), + function_name: "test".to_string(), + code: String::new(), + schema: Some(String::new()), + filter: IndexerRule { + id: None, + name: None, + indexer_rule_kind: IndexerRuleKind::Action, + matching_rule: MatchingRule::ActionAny { + affected_account_id: "queryapi.dataplatform.near".to_string(), + status: Status::Any, + }, + }, + created_at_block_height: 101, + updated_at_block_height: None, + start_block_height: None, + }, + )]), + )]); + + let mut redis_client = RedisClient::default(); + redis_client + .expect_get::() + .returning(|_| anyhow::bail!("none")); + + let mut block_stream_handler = BlockStreamsHandler::default(); + block_stream_handler.expect_list().returning(|| Ok(vec![])); + block_stream_handler + .expect_start() + .with( + predicate::eq(101), + predicate::eq("morgs.near".to_string()), + predicate::eq("test".to_string()), + predicate::eq(101), + predicate::eq("morgs.near/test:block_stream".to_string()), + predicate::eq(MatchingRule::ActionAny { + affected_account_id: "queryapi.dataplatform.near".to_string(), + status: Status::Any, + }), + ) + .returning(|_, _, _, _, _, _| Ok(())); + + synchronise_block_streams(&indexer_registry, &redis_client, &mut block_stream_handler) + .await + .unwrap(); + } + + #[tokio::test] + async fn stops_streams_not_in_registry() { + let indexer_registry = HashMap::from([]); + + let mut redis_client = RedisClient::default(); + redis_client + .expect_get::() + .returning(|_| anyhow::bail!("none")); + + let mut block_stream_handler = BlockStreamsHandler::default(); + block_stream_handler.expect_list().returning(|| { + Ok(vec![block_streamer::StreamInfo { + stream_id: "stream_id".to_string(), + account_id: "morgs.near".to_string(), + function_name: "test".to_string(), + version: 1, + }]) + }); + block_stream_handler + .expect_stop() + .with(predicate::eq("stream_id".to_string())) + .returning(|_| Ok(())) + .once(); + + synchronise_block_streams(&indexer_registry, &redis_client, &mut block_stream_handler) + .await + .unwrap(); + } + + #[tokio::test] + async fn ignores_streams_with_matching_versions() { + let indexer_registry = HashMap::from([( + "morgs.near".parse().unwrap(), + HashMap::from([( + "test".to_string(), + IndexerConfig { + account_id: "morgs.near".parse().unwrap(), + function_name: "test".to_string(), + code: String::new(), + schema: Some(String::new()), + filter: IndexerRule { + id: None, + name: None, + indexer_rule_kind: IndexerRuleKind::Action, + matching_rule: MatchingRule::ActionAny { + affected_account_id: "queryapi.dataplatform.near".to_string(), + status: Status::Any, + }, + }, + created_at_block_height: 101, + updated_at_block_height: None, + start_block_height: None, + }, + )]), + )]); + + let mut redis_client = RedisClient::default(); + redis_client + .expect_get::() + .returning(|_| anyhow::bail!("none")); + + let mut block_stream_handler = BlockStreamsHandler::default(); + block_stream_handler.expect_list().returning(|| { + Ok(vec![block_streamer::StreamInfo { + stream_id: "stream_id".to_string(), + account_id: "morgs.near".to_string(), + function_name: "test".to_string(), + version: 101, + }]) + }); + block_stream_handler.expect_stop().never(); + block_stream_handler.expect_start().never(); + + synchronise_block_streams(&indexer_registry, &redis_client, &mut block_stream_handler) + .await + .unwrap(); + } + + #[tokio::test] + async fn restarts_streams_with_mismatched_versions() { + let indexer_registry = HashMap::from([( + "morgs.near".parse().unwrap(), + HashMap::from([( + "test".to_string(), + IndexerConfig { + account_id: "morgs.near".parse().unwrap(), + function_name: "test".to_string(), + code: String::new(), + schema: Some(String::new()), + filter: IndexerRule { + id: None, + name: None, + indexer_rule_kind: IndexerRuleKind::Action, + matching_rule: MatchingRule::ActionAny { + affected_account_id: "queryapi.dataplatform.near".to_string(), + status: Status::Any, + }, + }, + created_at_block_height: 101, + updated_at_block_height: Some(200), + start_block_height: Some(1000), + }, + )]), + )]); + + let mut redis_client = RedisClient::default(); + redis_client + .expect_get::() + .returning(|_| anyhow::bail!("none")); + + let mut block_stream_handler = BlockStreamsHandler::default(); + block_stream_handler.expect_list().returning(|| { + Ok(vec![block_streamer::StreamInfo { + stream_id: "stream_id".to_string(), + account_id: "morgs.near".to_string(), + function_name: "test".to_string(), + version: 101, + }]) + }); + block_stream_handler + .expect_stop() + .with(predicate::eq("stream_id".to_string())) + .returning(|_| Ok(())) + .once(); + block_stream_handler + .expect_start() + .with( + predicate::eq(1000), + predicate::eq("morgs.near".to_string()), + predicate::eq("test".to_string()), + predicate::eq(200), + predicate::eq("morgs.near/test:block_stream".to_string()), + predicate::eq(MatchingRule::ActionAny { + affected_account_id: "queryapi.dataplatform.near".to_string(), + status: Status::Any, + }), + ) + .returning(|_, _, _, _, _, _| Ok(())); + + synchronise_block_streams(&indexer_registry, &redis_client, &mut block_stream_handler) + .await + .unwrap(); + } + } +} diff --git a/coordinator/src/redis.rs b/coordinator/src/redis.rs new file mode 100644 index 000000000..4b37fa42b --- /dev/null +++ b/coordinator/src/redis.rs @@ -0,0 +1,38 @@ +use std::fmt::Debug; + +pub use redis::RedisError; +use redis::{aio::ConnectionManager, FromRedisValue, ToRedisArgs}; + +#[cfg(test)] +pub use MockRedisClientImpl as RedisClient; +#[cfg(not(test))] +pub use RedisClientImpl as RedisClient; + +pub struct RedisClientImpl { + connection: ConnectionManager, +} + +#[cfg_attr(test, mockall::automock)] +impl RedisClientImpl { + pub async fn connect(redis_connection_str: &str) -> Result { + let connection = redis::Client::open(redis_connection_str)? + .get_connection_manager() + .await?; + + Ok(Self { connection }) + } + + pub async fn get(&self, key: T) -> anyhow::Result + where + T: ToRedisArgs + Debug + Send + Sync + 'static, + U: FromRedisValue + Send + Sync + 'static, + { + tracing::debug!("GET: {:?}", key); + + redis::cmd("GET") + .arg(key) + .query_async(&mut self.connection.clone()) + .await + .map_err(|e| e.into()) + } +} diff --git a/coordinator/src/registry.rs b/coordinator/src/registry.rs new file mode 100644 index 000000000..8f3205665 --- /dev/null +++ b/coordinator/src/registry.rs @@ -0,0 +1,111 @@ +use anyhow::Context; +use std::collections::HashMap; + +use near_jsonrpc_client::methods::query::RpcQueryRequest; +use near_jsonrpc_client::JsonRpcClient; +use near_jsonrpc_primitives::types::query::QueryResponseKind; +use near_primitives::types::{AccountId, BlockReference, Finality, FunctionArgs}; +use near_primitives::views::QueryRequest; +use registry_types::{AccountOrAllIndexers, IndexerRule}; + +pub type IndexerRegistry = HashMap>; + +#[derive(Debug, Clone)] +pub struct IndexerConfig { + pub account_id: AccountId, + pub function_name: String, + pub code: String, + pub start_block_height: Option, + pub schema: Option, + pub filter: IndexerRule, + pub updated_at_block_height: Option, + pub created_at_block_height: u64, +} + +impl IndexerConfig { + pub fn get_full_name(&self) -> String { + format!("{}/{}", self.account_id, self.function_name) + } + + pub fn get_redis_stream(&self) -> String { + format!("{}:block_stream", self.get_full_name()) + } +} + +#[cfg(test)] +pub use MockRegistryImpl as Registry; +#[cfg(not(test))] +pub use RegistryImpl as Registry; + +pub struct RegistryImpl { + json_rpc_client: JsonRpcClient, +} + +#[cfg_attr(test, mockall::automock)] +impl RegistryImpl { + pub fn connect(rpc_url: &str) -> Self { + let json_rpc_client = JsonRpcClient::connect(rpc_url); + + Self { json_rpc_client } + } + + fn enrich_indexer_registry( + &self, + registry: HashMap>, + ) -> IndexerRegistry { + registry + .into_iter() + .map(|(account_id, indexers)| { + let indexers = indexers + .into_iter() + .map(|(function_name, indexer)| { + ( + function_name.to_owned(), + IndexerConfig { + account_id: account_id.clone(), + function_name, + code: indexer.code, + start_block_height: indexer.start_block_height, + schema: indexer.schema, + filter: indexer.filter, + updated_at_block_height: indexer.updated_at_block_height, + created_at_block_height: indexer.created_at_block_height, + }, + ) + }) + .collect::>(); + + (account_id, indexers) + }) + .collect::>() + } + + pub async fn fetch(&self) -> anyhow::Result { + let response = self + .json_rpc_client + .call(RpcQueryRequest { + block_reference: BlockReference::Finality(Finality::Final), + request: QueryRequest::CallFunction { + method_name: "list_indexer_functions".to_string(), + account_id: "dev-queryapi.dataplatform.near" + .to_string() + .try_into() + .unwrap(), + args: FunctionArgs::from("{}".as_bytes().to_vec()), + }, + }) + .await + .context("Failed to list registry contract")?; + + if let QueryResponseKind::CallResult(call_result) = response.kind { + let list_registry_response: AccountOrAllIndexers = + serde_json::from_slice(&call_result.result)?; + + if let AccountOrAllIndexers::All(all_indexers) = list_registry_response { + return Ok(self.enrich_indexer_registry(all_indexers)); + } + } + + anyhow::bail!("Invalid registry response") + } +} From 81edb7e09629966eb4c4be265e558b3ed60a6589 Mon Sep 17 00:00:00 2001 From: Juan Luis Santana Date: Thu, 11 Jan 2024 10:25:58 -0500 Subject: [PATCH 27/32] Improve code/schema validation before registering (#495) More info about this can be found on this [issue](https://github.com/near/queryapi/issues/483) Changes on this PR: - Validate code & schema before registering the indexer Logic: If formatting either the code or the schema fails, the `Publish` button is disabled. Only if type generation errors or no errors are detected, the `Publish` button will be enabled. More about this on this [discussion](https://github.com/near/queryapi/pull/480#issuecomment-1878884650) https://github.com/near/queryapi/assets/15988846/68f89cb4-f561-4e8a-9fa7-81c1a38e548c Additionally - Created a reusable Modal with a global context to manage it, so we can trigger it from any component to display some info - Updated schema with granular error types for improved clarity - Created a custom error class to filter by type Error. We can add more fields on it if needed --------- Co-authored-by: Juan Luis Santana Co-authored-by: Roshaan Siddiqui --- frontend/src/classes/ValidationError.js | 6 + frontend/src/components/Editor/Editor.jsx | 264 ++++++++++-------- .../src/components/Editor/EditorButtons.jsx | 70 +++-- frontend/src/constants/Strings.js | 15 +- frontend/src/contexts/ModalContext.js | 35 +++ frontend/src/core/InfoModal.jsx | 66 +++++ frontend/src/pages/{_app.tsx => _app.jsx} | 16 +- .../pages/{_document.tsx => _document.jsx} | 0 frontend/src/pages/{index.tsx => index.jsx} | 0 frontend/src/utils/validators.js | 21 +- frontend/tsconfig.json | 5 +- 11 files changed, 330 insertions(+), 168 deletions(-) create mode 100644 frontend/src/classes/ValidationError.js create mode 100644 frontend/src/contexts/ModalContext.js create mode 100644 frontend/src/core/InfoModal.jsx rename frontend/src/pages/{_app.tsx => _app.jsx} (66%) rename frontend/src/pages/{_document.tsx => _document.jsx} (100%) rename frontend/src/pages/{index.tsx => index.jsx} (100%) diff --git a/frontend/src/classes/ValidationError.js b/frontend/src/classes/ValidationError.js new file mode 100644 index 000000000..877defe81 --- /dev/null +++ b/frontend/src/classes/ValidationError.js @@ -0,0 +1,6 @@ +export class ValidationError extends Error { + constructor(message, type) { + super(message); + this.type = type; + } +} \ No newline at end of file diff --git a/frontend/src/components/Editor/Editor.jsx b/frontend/src/components/Editor/Editor.jsx index af5b77a54..c0ab8f849 100644 --- a/frontend/src/components/Editor/Editor.jsx +++ b/frontend/src/components/Editor/Editor.jsx @@ -24,12 +24,11 @@ import { IndexerDetailsContext } from '../../contexts/IndexerDetailsContext'; import { PgSchemaTypeGen } from "../../utils/pgSchemaTypeGen"; import { validateJSCode, validateSQLSchema } from "@/utils/validators"; import { useDebouncedCallback } from "use-debounce"; -import { SCHEMA_GENERAL_ERROR, CODE_GENERAL_ERROR, CODE_FORMATTING_ERROR, SCHEMA_FORMATTING_ERROR } from '../../constants/Strings'; - -const BLOCKHEIGHT_LIMIT = 3600; +import { CODE_GENERAL_ERROR_MESSAGE, CODE_FORMATTING_ERROR_MESSAGE, SCHEMA_TYPE_GENERATION_ERROR_MESSAGE, SCHEMA_FORMATTING_ERROR_MESSAGE, FORMATTING_ERROR_TYPE, TYPE_GENERATION_ERROR_TYPE, INDEXER_REGISTER_TYPE_GENERATION_ERROR } from '../../constants/Strings'; +import { InfoModal } from '@/core/InfoModal'; +import { useModal } from "@/contexts/ModalContext"; const Editor = ({ - onLoadErrorText, actionButtonText, }) => { const { @@ -38,7 +37,6 @@ const Editor = ({ setShowPublishModal, debugMode, isCreateNewIndexer, - indexerNameField, setAccountId, } = useContext(IndexerDetailsContext); @@ -68,11 +66,11 @@ const Editor = ({ const [debugModeInfoDisabled, setDebugModeInfoDisabled] = useState(false); const [diffView, setDiffView] = useState(false); const [blockView, setBlockView] = useState(false); - + const { openModal, showModal, data, message, hideModal } = useModal(); const [isExecutingIndexerFunction, setIsExecutingIndexerFunction] = useState(false); - const { height, selectedTab, currentUserAccountId } = useInitialPayload(); + const { height, currentUserAccountId } = useInitialPayload(); const handleLog = (_, log, callback) => { if (log) console.log(log); @@ -86,14 +84,18 @@ const Editor = ({ const disposableRef = useRef(null); const debouncedValidateSQLSchema = useDebouncedCallback((_schema) => { const { error: schemaError } = validateSQLSchema(_schema); - if (!schemaError) { + if (schemaError?.type === FORMATTING_ERROR_TYPE) { + setError(SCHEMA_FORMATTING_ERROR_MESSAGE); + } else { setError(); } }, 500); const debouncedValidateCode = useDebouncedCallback((_code) => { const { error: codeError } = validateJSCode(_code); - if (!codeError) { + if (codeError) { + setError(CODE_FORMATTING_ERROR_MESSAGE) + } else { setError(); } }, 500); @@ -103,7 +105,7 @@ const Editor = ({ const { data: formattedCode, error: codeError } = validateJSCode(indexerDetails.code) if (codeError) { - setError(CODE_FORMATTING_ERROR) + setError(CODE_FORMATTING_ERROR_MESSAGE) } setOriginalIndexingCode(formattedCode) @@ -115,8 +117,11 @@ const Editor = ({ useEffect(() => { if (indexerDetails.schema != null) { const { data: formattedSchema, error: schemaError } = validateSQLSchema(indexerDetails.schema); - if (schemaError) { - setError(SCHEMA_GENERAL_ERROR) + + if (schemaError?.type === FORMATTING_ERROR_TYPE) { + setError(SCHEMA_FORMATTING_ERROR_MESSAGE); + } else if (schemaError?.type === TYPE_GENERATION_ERROR_TYPE) { + setError(SCHEMA_TYPE_GENERATION_ERROR_MESSAGE); } setSchema(formattedSchema) @@ -128,9 +133,14 @@ const Editor = ({ const { error: schemaError } = validateSQLSchema(schema); const { error: codeError } = validateJSCode(indexingCode); - if (schemaError) setError(SCHEMA_GENERAL_ERROR) - else if (codeError) setError(CODE_GENERAL_ERROR) - else setError(); + if (schemaError?.type === FORMATTING_ERROR_TYPE) { + setError(SCHEMA_FORMATTING_ERROR_MESSAGE); + } else if (schemaError?.type === TYPE_GENERATION_ERROR_TYPE) { + setError(SCHEMA_TYPE_GENERATION_ERROR_MESSAGE); + } else if (codeError) setError(CODE_GENERAL_ERROR_MESSAGE) + else { + setError() + }; }, [fileName]) @@ -188,23 +198,39 @@ const Editor = ({ } const registerFunction = async (indexerName, indexerConfig) => { - const { data: formattedSchema, error: schemaError } = validateSQLSchema(schema); + const { data: validatedSchema, error: schemaValidationError } = validateSQLSchema(schema); + const { data: validatedCode, error: codeValidationError } = validateJSCode(indexingCode); - if (schemaError) { - setError(SCHEMA_GENERAL_ERROR); + if (codeValidationError) { + setError(CODE_FORMATTING_ERROR_MESSAGE); return; } - let innerCode = indexingCode.match(/getBlock\s*\([^)]*\)\s*{([\s\S]*)}/)[1]; + let innerCode = validatedCode.match(/getBlock\s*\([^)]*\)\s*{([\s\S]*)}/)[1]; indexerName = indexerName.replaceAll(" ", "_"); + if (schemaValidationError?.type === FORMATTING_ERROR_TYPE) { + setError(SCHEMA_FORMATTING_ERROR_MESSAGE); + return; + } else if (schemaValidationError?.type === TYPE_GENERATION_ERROR_TYPE) { + showModal(INDEXER_REGISTER_TYPE_GENERATION_ERROR, { + indexerName, + code: innerCode, + schema: validatedSchema, + blockHeight: indexerConfig.startBlockHeight, + contractFilter: indexerConfig.filter + }); + return; + } + request("register-function", { indexerName: indexerName, code: innerCode, - schema: formattedSchema, + schema: validatedSchema, blockHeight: indexerConfig.startBlockHeight, contractFilter: indexerConfig.filter, }); + setShowPublishModal(false); }; @@ -264,10 +290,13 @@ const Editor = ({ if (codeError) { formattedCode = indexingCode - setError(CODE_FORMATTING_ERROR); - } else if (schemaError) { + setError(CODE_FORMATTING_ERROR_MESSAGE); + } else if (schemaError?.type === FORMATTING_ERROR_TYPE) { + formattedSchema = schema; + setError(SCHEMA_FORMATTING_ERROR_MESSAGE); + } else if (schemaError?.type === TYPE_GENERATION_ERROR_TYPE) { formattedSchema = schema; - setError(SCHEMA_GENERAL_ERROR) + setError(SCHEMA_TYPE_GENERATION_ERROR_MESSAGE) } else { setError() } @@ -281,7 +310,7 @@ const Editor = ({ attachTypesToMonaco(); // Just in case schema types have been updated but weren't added to monaco } catch (_error) { console.error("Error generating types for saved schema.\n", _error); - setError(SCHEMA_FORMATTING_ERROR); + setError(SCHEMA_TYPE_GENERATION_ERROR_MESSAGE); } } @@ -333,96 +362,109 @@ const Editor = ({ debouncedValidateCode(_code); } + function handleRegisterIndexerWithErrors(args) { + request("register-function", args); + } + return ( -
- {!indexerDetails.code && !isCreateNewIndexer && ( - - Indexer Function could not be found. Are you sure this indexer exists? - - )} - {(indexerDetails.code || isCreateNewIndexer) && <> - indexerRunner.stop()} - latestHeight={height} - isUserIndexer={indexerDetails.accountId === currentUserAccountId} - handleDeleteIndexer={handleDeleteIndexer} - /> - - - - -
- {error && ( - setError()} className="px-3 pt-3" variant="danger"> - {error} - - )} - {debugMode && !debugModeInfoDisabled && ( - setDebugModeInfoDisabled(true)} - variant="info" - > - To debug, you will need to open your browser console window in - order to see the logs. - - )} - - +
+ {!indexerDetails.code && !isCreateNewIndexer && ( + + Indexer Function could not be found. Are you sure this indexer exists? + + )} + {(indexerDetails.code || isCreateNewIndexer) && <> + indexerRunner.stop()} + latestHeight={height} + isUserIndexer={indexerDetails.accountId === currentUserAccountId} + handleDeleteIndexer={handleDeleteIndexer} + /> + + -
- } -
+ + +
+ {error && ( + setError()} className="px-3 pt-3" variant="danger"> + {error} + + )} + {debugMode && !debugModeInfoDisabled && ( + setDebugModeInfoDisabled(true)} + variant="info" + > + To debug, you will need to open your browser console window in + order to see the logs. + + )} + + +
+ } +
+ handleRegisterIndexerWithErrors(data)} + onCancelButtonPressed={hideModal} + onClose={hideModal} /> + ); }; diff --git a/frontend/src/components/Editor/EditorButtons.jsx b/frontend/src/components/Editor/EditorButtons.jsx index 83ac5dba8..0ad440a2a 100644 --- a/frontend/src/components/Editor/EditorButtons.jsx +++ b/frontend/src/components/Editor/EditorButtons.jsx @@ -24,13 +24,12 @@ import { } from "react-bootstrap-icons"; import { BlockPicker } from "./BlockPicker"; import { IndexerDetailsContext } from '../../contexts/IndexerDetailsContext'; +import { SCHEMA_TYPE_GENERATION_ERROR_MESSAGE, TYPE_GENERATION_ERROR_TYPE } from "@/constants/Strings"; const EditorButtons = ({ handleFormating, handleCodeGen, executeIndexerFunction, - currentUserAccountId, - getActionButtonText, isExecuting, stopExecution, heights, @@ -38,6 +37,7 @@ const EditorButtons = ({ latestHeight, isUserIndexer, handleDeleteIndexer, + error }) => { const { @@ -49,10 +49,7 @@ const EditorButtons = ({ setShowForkIndexerModal, debugMode, isCreateNewIndexer, - indexerNameField, - setIndexerNameField, setShowLogsView, - showLogsView, } = useContext(IndexerDetailsContext); const removeHeight = (index) => { @@ -76,11 +73,11 @@ const EditorButtons = ({ {accountId} - {indexerName && ( - - {indexerName} - - )} + {indexerName && ( + + {indexerName} + + )} {!isCreateNewIndexer && Contract Filter @@ -117,33 +114,33 @@ const EditorButtons = ({ > {isUserIndexer && !isCreateNewIndexer && ( <> - Delete Indexer} - > - - - Fork this Indexer} - > - - - + + + Fork this Indexer} + > + + + )} {!isCreateNewIndexer && ( @@ -183,6 +180,7 @@ const EditorButtons = ({ + )} + {onOkButtonPressed && ( + + )} + + + ); +}; + +InfoModal.propTypes = { + open: PropTypes.bool.isRequired, + title: PropTypes.string.isRequired, + message: PropTypes.string.isRequired, + okButtonText: PropTypes.string, + onOkButtonPressed: PropTypes.func, + cancelButtonText: PropTypes.string, + onCancelButtonPressed: PropTypes.func, + onClose: PropTypes.func, +}; diff --git a/frontend/src/pages/_app.tsx b/frontend/src/pages/_app.jsx similarity index 66% rename from frontend/src/pages/_app.tsx rename to frontend/src/pages/_app.jsx index bcc5afaf0..36b39051b 100644 --- a/frontend/src/pages/_app.tsx +++ b/frontend/src/pages/_app.jsx @@ -1,4 +1,3 @@ -import type { AppProps } from "next/app"; import "bootstrap/dist/css/bootstrap.min.css"; import "near-social-bridge/near-social-bridge.css"; import { Spinner } from "near-social-bridge"; @@ -6,22 +5,27 @@ import { overrideLocalStorage, NearSocialBridgeProvider, } from "near-social-bridge"; +import { ModalProvider } from '@/contexts/ModalContext'; import { IndexerDetailsProvider } from '../contexts/IndexerDetailsContext'; import 'regenerator-runtime/runtime'; -import { ApolloClient, InMemoryCache, ApolloProvider, gql } from '@apollo/client'; +import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client'; overrideLocalStorage(); -export default function App({ Component, pageProps }: AppProps) { +export default function App({ Component, pageProps }) { + const client = new ApolloClient({ uri: `${process.env.NEXT_PUBLIC_HASURA_ENDPOINT}/v1/graphql`, cache: new InMemoryCache() }); + return ( }> - - - + + + + + ); diff --git a/frontend/src/pages/_document.tsx b/frontend/src/pages/_document.jsx similarity index 100% rename from frontend/src/pages/_document.tsx rename to frontend/src/pages/_document.jsx diff --git a/frontend/src/pages/index.tsx b/frontend/src/pages/index.jsx similarity index 100% rename from frontend/src/pages/index.tsx rename to frontend/src/pages/index.jsx diff --git a/frontend/src/utils/validators.js b/frontend/src/utils/validators.js index 8d9db540d..986c0bb26 100644 --- a/frontend/src/utils/validators.js +++ b/frontend/src/utils/validators.js @@ -1,6 +1,8 @@ import { defaultSchema, formatIndexingCode, formatSQL } from "./formatters"; import { PgSchemaTypeGen } from "./pgSchemaTypeGen"; import { CONTRACT_NAME_REGEX } from '../constants/RegexExp'; +import { ValidationError } from '../classes/ValidationError'; +import { FORMATTING_ERROR_TYPE, TYPE_GENERATION_ERROR_TYPE } from "@/constants/Strings"; export function validateContractId(accountId) { return ( @@ -27,16 +29,23 @@ export function validateSQLSchema(schema) { if (schema === formatSQL(defaultSchema)) return { data: schema, error: null }; const pgSchemaTypeGen = new PgSchemaTypeGen(); + let formattedSchema; try { - const formattedSchema = formatSQL(schema); - pgSchemaTypeGen.generateTypes(formattedSchema); // Sanity check - - return { data: formattedSchema, error: null } + formattedSchema = formatSQL(schema); } catch (error) { - console.error(error.message) - return { data: schema, error }; + return { data: schema, error: new ValidationError(error.message, FORMATTING_ERROR_TYPE) }; + } + + if (formattedSchema) { + try { + pgSchemaTypeGen.generateTypes(formattedSchema); // Sanity check + return { data: formattedSchema, error: null } + } catch (error) { + console.error(error.message) + return { data: schema, error: new ValidationError(error.message, TYPE_GENERATION_ERROR_TYPE) }; + } } }; diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 731c34b41..52ff25187 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -23,10 +23,7 @@ "include": [ "next-env.d.ts", "**/*.ts", - "**/*.tsx", - "src/components/Editor/Editor.jsx", - "src/pages/query-api-editor/editor.js", - "src/components/CreateNewIndexer/CreateNewIndexer.js" + "**/*.tsx" ], "exclude": ["node_modules"] } From c4f47bf22dba1339c9200079a23e6634e312128a Mon Sep 17 00:00:00 2001 From: Morgan McCauley Date: Wed, 17 Jan 2024 08:25:56 +1300 Subject: [PATCH 28/32] refactor: Remove hard-coded shard count (#502) Currently, the `shard`/`chunk` count is hard-coded to 4 so that we can fetch the block header and shards in parallel. This PR removes the hard-coded value by using the chunk count specified in the block header to fetch the relevant shards. --- block-server/handler.js | 14 +++++--------- runner/src/lake-client/lake-client.test.ts | 6 +++--- runner/src/lake-client/lake-client.ts | 13 +++++-------- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/block-server/handler.js b/block-server/handler.js index 70d6703e6..02cd23bc3 100644 --- a/block-server/handler.js +++ b/block-server/handler.js @@ -35,16 +35,12 @@ const normalizeBlockHeight = function(block_height) { } const fetchStreamerMessage = async function(block_height, options) { - const blockPromise = fetchBlockPromise(block_height, options); - // hardcoding 4 shards to test performance - const shardsPromises = await fetchShardsPromises(block_height, 4, options); // block.chunks.length) + const block = await fetchBlockPromise(block_height, options); + const shards = await Promise.all(fetchShardsPromises(block_height, block.chunks.length, options)) - const results = await Promise.all([blockPromise, ...shardsPromises]); - const block = results.shift(); - const shards = results; return { - block: block, - shards: shards, + block, + shards, }; } @@ -101,4 +97,4 @@ const renameUnderscoreFieldsToCamelCase = function(value) { return newValue; } return value; -} \ No newline at end of file +} diff --git a/runner/src/lake-client/lake-client.test.ts b/runner/src/lake-client/lake-client.test.ts index f04a18a28..9c3aea795 100644 --- a/runner/src/lake-client/lake-client.test.ts +++ b/runner/src/lake-client/lake-client.test.ts @@ -14,7 +14,7 @@ describe('LakeClient', () => { .mockReturnValueOnce({ // block Body: { transformToString: () => JSON.stringify({ - chunks: [0], + chunks: [0, 1, 2, 3], header: { height: blockHeight, hash: blockHash, @@ -88,7 +88,7 @@ describe('LakeClient', () => { .mockReturnValueOnce({ // block Body: { transformToString: () => JSON.stringify({ - chunks: [0], + chunks: [0, 1, 2, 3], header: { height: blockHeight, hash: blockHash, @@ -130,7 +130,7 @@ describe('LakeClient', () => { .mockReturnValueOnce({ // block Body: { transformToString: () => JSON.stringify({ - chunks: [0], + chunks: [0, 1, 2, 3], header: { height: blockHeight, hash: blockHash, diff --git a/runner/src/lake-client/lake-client.ts b/runner/src/lake-client/lake-client.ts index d06d5cef9..5ae9e6494 100644 --- a/runner/src/lake-client/lake-client.ts +++ b/runner/src/lake-client/lake-client.ts @@ -15,13 +15,13 @@ export default class LakeClient { return blockHeight.toString().padStart(12, '0'); } - private async fetchShardsPromises (blockHeight: number, numberOfShards: number): Promise>> { + private fetchShards (blockHeight: number, numberOfShards: number): Array> { return ([...Array(numberOfShards).keys()].map(async (shardId) => - await this.fetchShardPromise(blockHeight, shardId) + await this.fetchShard(blockHeight, shardId) )); } - private async fetchShardPromise (blockHeight: number, shardId: number): Promise { + private async fetchShard (blockHeight: number, shardId: number): Promise { const params = { Bucket: `near-lake-data-${this.network}`, Key: `${this.normalizeBlockHeight(blockHeight)}/shard_${shardId}.json`, @@ -76,12 +76,9 @@ export default class LakeClient { } } - const blockPromise = this.fetchBlockPromise(blockHeight); - const shardsPromises = await this.fetchShardsPromises(blockHeight, 4); + const block = await this.fetchBlockPromise(blockHeight); + const shards = await Promise.all(this.fetchShards(blockHeight, block.chunks.length)); - const results = await Promise.all([blockPromise, ...shardsPromises]); - const block = results.shift(); - const shards = results; return Block.fromStreamerMessage({ block, shards, From 13f7094116880870191a5438870bc2777bb80b63 Mon Sep 17 00:00:00 2001 From: Morgan McCauley Date: Wed, 17 Jan 2024 09:35:06 +1300 Subject: [PATCH 29/32] fix: Ensure array is returned to `Promise.all` (#504) `fetchShardsPromises` is used within `Promise.all` to fetch all shards simultaneously. The `async` modifier means this function returns a `Promise`. `Promise.all` complains since it's passed a `Promise` rather than an `Array`. This PR removes the unnecessary `async` modifier so it works with `Promise.all` --- block-server/handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block-server/handler.js b/block-server/handler.js index 02cd23bc3..1fda7b24c 100644 --- a/block-server/handler.js +++ b/block-server/handler.js @@ -44,7 +44,7 @@ const fetchStreamerMessage = async function(block_height, options) { }; } -const fetchShardsPromises = async function(block_height, number_of_shards, options) { +const fetchShardsPromises = function(block_height, number_of_shards, options) { return ([...Array(number_of_shards).keys()].map((shard_id) => fetchShardPromise(block_height, shard_id, options))); } From a4d8c3402322400ff03916b0c22aa082052be280 Mon Sep 17 00:00:00 2001 From: Morgan McCauley Date: Wed, 17 Jan 2024 09:36:43 +1300 Subject: [PATCH 30/32] refactor: Configure `coordinator`/`block-streamer` via environment (#503) - refactor: Configure `coordinator` via environment - refactor: Configure `block-streamer` via environment --- block-streamer/src/main.rs | 7 +++++-- block-streamer/src/redis.rs | 4 ++-- block-streamer/src/server/mod.rs | 5 ++--- coordinator/src/block_streams_handler.rs | 4 ++-- coordinator/src/executors_handler.rs | 4 ++-- coordinator/src/main.rs | 18 ++++++++++++++---- coordinator/src/redis.rs | 4 ++-- coordinator/src/registry.rs | 13 +++++++------ 8 files changed, 36 insertions(+), 23 deletions(-) diff --git a/block-streamer/src/main.rs b/block-streamer/src/main.rs index 38560737b..39d114a55 100644 --- a/block-streamer/src/main.rs +++ b/block-streamer/src/main.rs @@ -18,9 +18,12 @@ async fn main() -> anyhow::Result<()> { .with(tracing_subscriber::EnvFilter::from_default_env()) .init(); + let redis_url = std::env::var("REDIS_URL").expect("REDIS_URL is not set"); + let server_port = std::env::var("SERVER_PORT").expect("SERVER_PORT is not set"); + tracing::info!("Starting Block Streamer Service..."); - let redis_client = std::sync::Arc::new(redis::RedisClient::connect("redis://127.0.0.1").await?); + let redis_client = std::sync::Arc::new(redis::RedisClient::connect(&redis_url).await?); let aws_config = aws_config::from_env().load().await; let s3_config = aws_sdk_s3::Config::from(&aws_config); @@ -29,7 +32,7 @@ async fn main() -> anyhow::Result<()> { let delta_lake_client = std::sync::Arc::new(crate::delta_lake_client::DeltaLakeClient::new(s3_client)); - server::init(redis_client, delta_lake_client, s3_config).await?; + server::init(&server_port, redis_client, delta_lake_client, s3_config).await?; Ok(()) } diff --git a/block-streamer/src/redis.rs b/block-streamer/src/redis.rs index 583742bbc..dfaee7d78 100644 --- a/block-streamer/src/redis.rs +++ b/block-streamer/src/redis.rs @@ -13,8 +13,8 @@ pub struct RedisClientImpl { #[cfg_attr(test, mockall::automock)] impl RedisClientImpl { - pub async fn connect(redis_connection_str: &str) -> Result { - let connection = redis::Client::open(redis_connection_str)? + pub async fn connect(redis_url: &str) -> Result { + let connection = redis::Client::open(redis_url)? .get_tokio_connection_manager() .await?; diff --git a/block-streamer/src/server/mod.rs b/block-streamer/src/server/mod.rs index f5855cbb3..f72dc3c1d 100644 --- a/block-streamer/src/server/mod.rs +++ b/block-streamer/src/server/mod.rs @@ -5,13 +5,12 @@ pub mod blockstreamer { } pub async fn init( + port: &str, redis_client: std::sync::Arc, delta_lake_client: std::sync::Arc, lake_s3_config: aws_sdk_s3::Config, ) -> anyhow::Result<()> { - let addr = "[::1]:10000" - .parse() - .expect("Failed to parse RPC socket address"); + let addr = format!("[::1]:{}", port).parse()?; tracing::info!("Starting RPC server at {}", addr); diff --git a/coordinator/src/block_streams_handler.rs b/coordinator/src/block_streams_handler.rs index a62e9b20d..93f2cd45f 100644 --- a/coordinator/src/block_streams_handler.rs +++ b/coordinator/src/block_streams_handler.rs @@ -19,8 +19,8 @@ pub struct BlockStreamsHandlerImpl { #[cfg_attr(test, mockall::automock)] impl BlockStreamsHandlerImpl { - pub async fn connect() -> anyhow::Result { - let client = BlockStreamerClient::connect("http://[::1]:10000") + pub async fn connect(block_streamer_url: String) -> anyhow::Result { + let client = BlockStreamerClient::connect(block_streamer_url) .await .context("Unable to connect to Block Streamer")?; diff --git a/coordinator/src/executors_handler.rs b/coordinator/src/executors_handler.rs index 44405c29b..d15a4e28d 100644 --- a/coordinator/src/executors_handler.rs +++ b/coordinator/src/executors_handler.rs @@ -16,8 +16,8 @@ pub struct ExecutorsHandlerImpl { #[cfg_attr(test, mockall::automock)] impl ExecutorsHandlerImpl { - pub async fn connect() -> anyhow::Result { - let client = RunnerClient::connect("http://localhost:50007") + pub async fn connect(runner_url: String) -> anyhow::Result { + let client = RunnerClient::connect(runner_url) .await .context("Unable to connect to Runner")?; diff --git a/coordinator/src/main.rs b/coordinator/src/main.rs index 67c6c60f4..4192db35c 100644 --- a/coordinator/src/main.rs +++ b/coordinator/src/main.rs @@ -17,10 +17,20 @@ async fn main() -> anyhow::Result<()> { .with(tracing_subscriber::EnvFilter::from_default_env()) .init(); - let registry = Registry::connect("https://rpc.mainnet.near.org"); - let redis_client = RedisClient::connect("redis://127.0.0.1").await?; - let mut block_streams_handler = BlockStreamsHandler::connect().await?; - let mut executors_handler = ExecutorsHandler::connect().await?; + let rpc_url = std::env::var("RPC_URL").expect("RPC_URL is not set"); + let registry_contract_id = std::env::var("REGISTRY_CONTRACT_ID") + .expect("REGISTRY_CONTRACT_ID is not set") + .parse() + .expect("REGISTRY_CONTRACT_ID is not a valid account ID"); + let redis_url = std::env::var("REDIS_URL").expect("REDIS_URL is not set"); + let block_streamer_url = + std::env::var("BLOCK_STREAMER_URL").expect("BLOCK_STREAMER_URL is not set"); + let runner_url = std::env::var("RUNNER_URL").expect("RUNNER_URL is not set"); + + let registry = Registry::connect(registry_contract_id, &rpc_url); + let redis_client = RedisClient::connect(&redis_url).await?; + let mut block_streams_handler = BlockStreamsHandler::connect(block_streamer_url).await?; + let mut executors_handler = ExecutorsHandler::connect(runner_url).await?; loop { let indexer_registry = registry.fetch().await?; diff --git a/coordinator/src/redis.rs b/coordinator/src/redis.rs index 4b37fa42b..daaf8a481 100644 --- a/coordinator/src/redis.rs +++ b/coordinator/src/redis.rs @@ -14,8 +14,8 @@ pub struct RedisClientImpl { #[cfg_attr(test, mockall::automock)] impl RedisClientImpl { - pub async fn connect(redis_connection_str: &str) -> Result { - let connection = redis::Client::open(redis_connection_str)? + pub async fn connect(redis_url: &str) -> Result { + let connection = redis::Client::open(redis_url)? .get_connection_manager() .await?; diff --git a/coordinator/src/registry.rs b/coordinator/src/registry.rs index 8f3205665..7936a8524 100644 --- a/coordinator/src/registry.rs +++ b/coordinator/src/registry.rs @@ -39,14 +39,18 @@ pub use RegistryImpl as Registry; pub struct RegistryImpl { json_rpc_client: JsonRpcClient, + registry_contract_id: AccountId, } #[cfg_attr(test, mockall::automock)] impl RegistryImpl { - pub fn connect(rpc_url: &str) -> Self { + pub fn connect(registry_contract_id: AccountId, rpc_url: &str) -> Self { let json_rpc_client = JsonRpcClient::connect(rpc_url); - Self { json_rpc_client } + Self { + registry_contract_id, + json_rpc_client, + } } fn enrich_indexer_registry( @@ -87,10 +91,7 @@ impl RegistryImpl { block_reference: BlockReference::Finality(Finality::Final), request: QueryRequest::CallFunction { method_name: "list_indexer_functions".to_string(), - account_id: "dev-queryapi.dataplatform.near" - .to_string() - .try_into() - .unwrap(), + account_id: self.registry_contract_id.clone(), args: FunctionArgs::from("{}".as_bytes().to_vec()), }, }) From d403006accda0ebe4daff66978c66b71286884b8 Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Wed, 17 Jan 2024 09:56:38 -0800 Subject: [PATCH 31/32] feat: Toggle Runner Version (#488) Runner will need the ability to manage V1 (Polling Redis to start streams) and V2 (Starting streams upon receiving calls to gRPC server) indexers. The rollout plan for V2 involves a rolling migration with automatic migration. In order to do this, the main thread needs to have a shared map of executors. The server should be available always and the list API should return both V1 and V2 indexers, and Stop should be able to terminate any indexer. In order for stopped V1 indexers to be not restarted, the stream must be removed from the streams set before Runner performs stop. Finally, I addressed some remaining TODOs leftover. Mainly returning more information, tracking status of executors, and returning all. information available when listing executors. --- docker-compose.yml | 2 + runner/package-lock.json | 174 ++++++++++++++------ runner/package.json | 2 +- runner/src/index.ts | 22 +-- runner/src/server/runner-server.ts | 14 +- runner/src/server/runner-service.test.ts | 37 +++-- runner/src/server/runner-service.ts | 76 +++++---- runner/src/stream-handler/stream-handler.ts | 15 ++ runner/src/stream-handler/worker.ts | 4 +- 9 files changed, 224 insertions(+), 122 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8911aa97e..7674161c9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,6 +42,8 @@ services: PORT: 9180 AWS_ACCESS_KEY_ID: AWS_SECRET_ACCESS_KEY: + RUNNER_HOST: localhost + RUNNER_PORT: 7001 redis: image: redis diff --git a/runner/package-lock.json b/runner/package-lock.json index e7d1d570d..37e5ca78b 100644 --- a/runner/package-lock.json +++ b/runner/package-lock.json @@ -946,17 +946,89 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dev": true, "dependencies": { - "@babel/highlight": "^7.22.5" + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/compat-data": { "version": "7.22.9", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz", @@ -1024,12 +1096,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.9.tgz", - "integrity": "sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", + "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5", + "@babel/types": "^7.23.6", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -1107,22 +1179,22 @@ "dev": true }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -1205,18 +1277,18 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -1246,13 +1318,13 @@ } }, "node_modules/@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -1331,9 +1403,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.22.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz", - "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", + "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -1520,34 +1592,34 @@ } }, "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.22.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz", - "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.7.tgz", + "integrity": "sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", - "debug": "^4.1.0", + "@babel/parser": "^7.23.6", + "@babel/types": "^7.23.6", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -1564,13 +1636,13 @@ } }, "node_modules/@babel/types": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", - "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", + "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { diff --git a/runner/package.json b/runner/package.json index 1d0e4402b..0afa1dce5 100644 --- a/runner/package.json +++ b/runner/package.json @@ -8,7 +8,7 @@ }, "scripts": { "build": "rm -rf ./dist && npm run codegen && tsc", - "codegen": "rm -rf ./src/generated && proto-loader-gen-types --longs=String --enums=String --defaults --oneofs --grpcLib=@grpc/grpc-js --outDir=src/generated/ protos/runner.proto", + "codegen": "proto-loader-gen-types --longs=String --enums=String --defaults --oneofs --grpcLib=@grpc/grpc-js --outDir=src/generated/ protos/runner.proto", "start": "npm run build && node dist/index.js", "start:dev": "ts-node ./src/index.ts", "start:docker": "node dist/index.js", diff --git a/runner/src/index.ts b/runner/src/index.ts index a4f0d4070..ddacbd02f 100644 --- a/runner/src/index.ts +++ b/runner/src/index.ts @@ -1,39 +1,33 @@ import { startServer as startMetricsServer } from './metrics'; import RedisClient from './redis-client'; +import startRunnerServer from './server/runner-server'; import StreamHandler from './stream-handler'; -const STREAM_HANDLER_THROTTLE_MS = 500; - +const executors = new Map(); const redisClient = new RedisClient(); +const grpcServer = startRunnerServer(executors); startMetricsServer().catch((err) => { console.error('Failed to start metrics server', err); }); -type StreamHandlers = Record; - void (async function main () { try { - const streamHandlers: StreamHandlers = {}; - + const STREAM_HANDLER_THROTTLE_MS = 500; while (true) { const streamKeys = await redisClient.getStreams(); - streamKeys.forEach((streamKey) => { - if (streamHandlers[streamKey] !== undefined) { - return; + if (executors.get(streamKey) === undefined) { + const streamHandler = new StreamHandler(streamKey); + executors.set(streamKey, streamHandler); } - - const streamHandler = new StreamHandler(streamKey); - - streamHandlers[streamKey] = streamHandler; }); - await new Promise((resolve) => setTimeout(resolve, STREAM_HANDLER_THROTTLE_MS), ); } } finally { await redisClient.disconnect(); + grpcServer.forceShutdown(); } })(); diff --git a/runner/src/server/runner-server.ts b/runner/src/server/runner-server.ts index fa80c81fc..23c6b5d29 100644 --- a/runner/src/server/runner-server.ts +++ b/runner/src/server/runner-server.ts @@ -2,28 +2,32 @@ import * as grpc from '@grpc/grpc-js'; import * as protoLoader from '@grpc/proto-loader'; import getRunnerService from './runner-service'; import { type ProtoGrpcType } from '../generated/runner'; -import StreamHandler from '../stream-handler/stream-handler'; +import type StreamHandler from '../stream-handler/stream-handler'; +import assert from 'assert'; const PROTO_PATH = 'protos/runner.proto'; -export default function startRunnerServer (): grpc.Server { +export default function startRunnerServer (executors: Map): grpc.Server { const packageDefinition = protoLoader.loadSync(PROTO_PATH); const runnerProto = (grpc.loadPackageDefinition( packageDefinition ) as unknown) as ProtoGrpcType; const server = new grpc.Server(); - server.addService(runnerProto.runner.Runner.service, getRunnerService(StreamHandler)); + server.addService(runnerProto.runner.Runner.service, getRunnerService(executors)); const credentials = grpc.ServerCredentials; + assert(process.env.RUNNER_HOST, 'RUNNER_HOST is not defined'); + assert(process.env.RUNNER_PORT, 'RUNNER_PORT is not defined'); + server.bindAsync( - '0.0.0.0:50007', // TODO: Read port from ENV + `${process.env.RUNNER_HOST}:${process.env.RUNNER_PORT}`, credentials.createInsecure(), // TODO: Use secure credentials with allow for Coordinator (err: Error | null, port: number) => { if (err) { console.error(`Server error: ${err.message}`); } else { - console.log(`Server bound on port: ${port}`); + console.log(`gRPC server bound on port: ${port}`); server.start(); } } diff --git a/runner/src/server/runner-service.test.ts b/runner/src/server/runner-service.test.ts index ea7468f17..1e72a5cff 100644 --- a/runner/src/server/runner-service.test.ts +++ b/runner/src/server/runner-service.test.ts @@ -1,4 +1,5 @@ import type StreamHandler from '../stream-handler/stream-handler'; +import { Status } from '../stream-handler/stream-handler'; import getRunnerService from './runner-service'; import * as grpc from '@grpc/grpc-js'; @@ -15,7 +16,10 @@ const BASIC_INDEXER_CONFIG = { function_name: BASIC_FUNCTION_NAME, code: BASIC_CODE, schema: BASIC_SCHEMA, - version: BASIC_VERSION + version: BASIC_VERSION, +}; +const BASIC_EXECUTOR_CONTEXT = { + status: Status.RUNNING, }; describe('Runner gRPC Service', () => { @@ -30,7 +34,7 @@ describe('Runner gRPC Service', () => { }); it('starts a executor with correct settings', () => { - const service = getRunnerService(genericStreamHandlerType); + const service = getRunnerService(new Map(), genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; const request = generateRequest(BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA, BASIC_VERSION); @@ -41,7 +45,7 @@ describe('Runner gRPC Service', () => { }); it('Invalid start executor request with missing redis stream Id parameter', () => { - const service = getRunnerService(genericStreamHandlerType); + const service = getRunnerService(new Map(), genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; const request = generateRequest(undefined, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); @@ -55,7 +59,7 @@ describe('Runner gRPC Service', () => { }); it('Invalid start executor request with missing config parameters', () => { - const service = getRunnerService(genericStreamHandlerType); + const service = getRunnerService(new Map(), genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; let request = generateRequest(BASIC_REDIS_STREAM, undefined, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); service.StartExecutor(request, mockCallback); @@ -91,7 +95,7 @@ describe('Runner gRPC Service', () => { }); it('starts a executor twice with correct settings, gets error second time', () => { - const service = getRunnerService(genericStreamHandlerType); + const service = getRunnerService(new Map(), genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; const startRequest = generateRequest(BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA, BASIC_VERSION); @@ -116,7 +120,7 @@ describe('Runner gRPC Service', () => { const streamHandlerType = jest.fn().mockImplementation(() => { return { stop }; }); - const service = getRunnerService(streamHandlerType); + const service = getRunnerService(new Map(), streamHandlerType); const mockCallback = jest.fn() as unknown as any; const requestA = generateRequest(BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); @@ -143,7 +147,7 @@ describe('Runner gRPC Service', () => { const streamHandlerType = jest.fn().mockImplementation(() => { return { stop }; }); - const service = getRunnerService(streamHandlerType); + const service = getRunnerService(new Map(), streamHandlerType); const mockCallback = jest.fn() as unknown as any; const request = generateRequest(''); @@ -163,11 +167,11 @@ describe('Runner gRPC Service', () => { const streamHandlerType = jest.fn().mockImplementation(() => { return { stop }; }); - const service = getRunnerService(streamHandlerType); + const service = getRunnerService(new Map(), streamHandlerType); service.StopExecutor({ request: { executorId: 'non-existant' } } as any, (err) => { expect(err).toEqual({ - code: grpc.status.INVALID_ARGUMENT, + code: grpc.status.NOT_FOUND, message: 'Executor non-existant cannot be stopped as it does not exist.' }); expect(stop).toHaveBeenCalledTimes(0); @@ -183,7 +187,7 @@ describe('Runner gRPC Service', () => { const streamHandlerType = jest.fn().mockImplementation(() => { return { stop }; }); - const service = getRunnerService(streamHandlerType); + const service = getRunnerService(new Map(), streamHandlerType); const mockCallback = jest.fn() as unknown as any; const startRequest = generateRequest(BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); @@ -203,17 +207,22 @@ describe('Runner gRPC Service', () => { }); }); - it('valid list executor request lists executors correctly', async () => { + it('valid list executor request lists executors correctly, with stopped indexer', async () => { const stop = jest.fn().mockImplementation(async () => { await Promise.resolve(); }); const streamHandlerType = jest.fn().mockImplementation((_, indexerConfig) => { return { stop, - indexerConfig: { account_id: indexerConfig.account_id, function_name: indexerConfig.function_name, version: indexerConfig.version } + indexerConfig: { + account_id: indexerConfig.account_id, + function_name: indexerConfig.function_name, + version: indexerConfig.version + }, + executorContext: BASIC_EXECUTOR_CONTEXT }; }); - const service = getRunnerService(streamHandlerType); + const service = getRunnerService(new Map(), streamHandlerType); const request = generateRequest(BASIC_REDIS_STREAM + '-A', BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA, BASIC_VERSION); await new Promise((resolve, reject) => { @@ -231,7 +240,7 @@ describe('Runner gRPC Service', () => { executorId: BASIC_EXECUTOR_ID, accountId: BASIC_INDEXER_CONFIG.account_id, functionName: BASIC_INDEXER_CONFIG.function_name, - status: 'RUNNING', + status: Status.RUNNING, version: '1' }] }); diff --git a/runner/src/server/runner-service.ts b/runner/src/server/runner-service.ts index 881bd5b63..ef5995b7d 100644 --- a/runner/src/server/runner-service.ts +++ b/runner/src/server/runner-service.ts @@ -1,6 +1,6 @@ import { type ServerUnaryCall, type sendUnaryData } from '@grpc/grpc-js'; import * as grpc from '@grpc/grpc-js'; -import assert from 'assert'; +import { Status } from '../stream-handler/stream-handler'; import crypto from 'crypto'; import { type RunnerHandlers } from '../generated/runner/Runner'; @@ -11,9 +11,7 @@ import { type StopExecutorResponse__Output, type StopExecutorResponse } from '.. import { type ListExecutorsRequest__Output } from '../generated/runner/ListExecutorsRequest'; import { type ListExecutorsResponse__Output, type ListExecutorsResponse } from '../generated/runner/ListExecutorsResponse'; import { type ExecutorInfo__Output } from '../generated/runner/ExecutorInfo'; -import type StreamHandler from '../stream-handler'; - -type StreamHandlers = Map; +import StreamHandler from '../stream-handler'; const hashString = (input: string): string => { const hash = crypto.createHash('sha256'); @@ -21,9 +19,7 @@ const hashString = (input: string): string => { return hash.digest('hex'); }; -function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandlers { - const streamHandlers: StreamHandlers = new Map(); - +function getRunnerService (executors: Map, StreamHandlerType: typeof StreamHandler = StreamHandler): RunnerHandlers { const RunnerService: RunnerHandlers = { StartExecutor (call: ServerUnaryCall, callback: sendUnaryData): void { // Validate request @@ -36,7 +32,7 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl const { accountId, functionName, code, schema, redisStream, version } = call.request; const executorId = hashString(`${accountId}/${functionName}`); - if (streamHandlers.has(executorId)) { + if (executors.has(executorId)) { const alreadyExistsError = { code: grpc.status.ALREADY_EXISTS, message: `Executor ${executorId} can't be started as it already exists.` @@ -57,7 +53,7 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl code, schema, }); - streamHandlers.set(executorId, streamHandler); + executors.set(executorId, streamHandler); callback(null, { executorId }); } catch (error) { callback(handleInternalError(error), null); @@ -65,19 +61,28 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl }, StopExecutor (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('StopExecutor called on', call.request.executorId); + const executorId: string = call.request.executorId; // Validate request - const validationResult = validateStopExecutorRequest(call.request, streamHandlers); + const validationResult = validateStopExecutorRequest(call.request); if (validationResult !== null) { callback(validationResult, null); return; } + if (executors.get(executorId) === undefined) { + const notFoundError = { + code: grpc.status.NOT_FOUND, + message: `Executor ${executorId} cannot be stopped as it does not exist.` + }; + callback(notFoundError, null); + return; + } + + console.log('Stopping executor: ', { executorId }); // Handle request - const executorId: string = call.request.executorId; - streamHandlers.get(executorId)?.stop() + executors.get(executorId)?.stop() .then(() => { - streamHandlers.delete(executorId); + executors.delete(executorId); callback(null, { executorId }); }).catch(error => { const grpcError = handleInternalError(error); @@ -86,21 +91,31 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl }, ListExecutors (_: ServerUnaryCall, callback: sendUnaryData): void { - // TODO: Refactor to make use of repeated field - console.log('ListExecutors called'); - // TODO: Return more information than just executorId const response: ExecutorInfo__Output[] = []; try { - streamHandlers.forEach((handler, executorId) => { - if (handler.indexerConfig?.account_id === undefined || handler.indexerConfig?.function_name === undefined) { - throw new Error(`Stream handler ${executorId} has no/invalid indexer config.`); + executors.forEach((handler, executorId) => { + let config = handler.indexerConfig; + let context = handler.executorContext; + if (config === undefined) { + // TODO: Throw error instead when V1 is deprecated + const [accountId, functionName] = executorId.substring(0, executorId.indexOf(':')).split('/', 2); + config = { + account_id: accountId, + function_name: functionName, + version: -1, // Ensure Coordinator V2 sees version mismatch + code: '', + schema: '', + }; + context = { + status: Status.RUNNING + }; } response.push({ executorId, - accountId: handler.indexerConfig?.account_id, - functionName: handler.indexerConfig?.function_name, - version: handler.indexerConfig?.version.toString(), - status: 'RUNNING' // TODO: Keep updated status in stream handler + accountId: config.account_id, + functionName: config.function_name, + version: config.version.toString(), + status: context.status }); }); callback(null, { @@ -121,6 +136,7 @@ function handleInternalError (error: unknown): any { if (error instanceof Error) { errorMessage = error.message; } + console.error(errorMessage); return { code: grpc.status.INTERNAL, message: errorMessage @@ -170,22 +186,12 @@ function validateStartExecutorRequest (request: StartExecutorRequest__Output): a return null; } -function validateStopExecutorRequest (request: StopExecutorRequest__Output, streamHandlers: StreamHandlers): any | null { - const grpcError = { - code: grpc.status.INVALID_ARGUMENT, - message: '' - }; - +function validateStopExecutorRequest (request: StopExecutorRequest__Output): any | null { // Validate executorId const validationResult = validateStringParameter('executorId', request.executorId); if (validationResult !== null) { return validationResult; } - assert(request.executorId !== undefined); - if (streamHandlers.get(request.executorId) === undefined) { - grpcError.message = `Executor ${request.executorId} cannot be stopped as it does not exist.`; - return grpcError; - } return null; } diff --git a/runner/src/stream-handler/stream-handler.ts b/runner/src/stream-handler/stream-handler.ts index 096b97edb..90a744a2f 100644 --- a/runner/src/stream-handler/stream-handler.ts +++ b/runner/src/stream-handler/stream-handler.ts @@ -3,6 +3,10 @@ import { Worker, isMainThread } from 'worker_threads'; import { registerWorkerMetrics } from '../metrics'; +export enum Status { + RUNNING = 'RUNNING', + STOPPED = 'STOPPED', +} export interface IndexerConfig { account_id: string function_name: string @@ -11,8 +15,13 @@ export interface IndexerConfig { version: number } +interface ExecutorContext { + status: Status +} + export default class StreamHandler { private readonly worker: Worker; + public readonly executorContext: ExecutorContext; constructor ( public readonly streamKey: string, @@ -25,6 +34,9 @@ export default class StreamHandler { indexerConfig, }, }); + this.executorContext = { + status: Status.RUNNING, + }; this.worker.on('message', this.handleMessage.bind(this)); this.worker.on('error', this.handleError.bind(this)); @@ -39,6 +51,9 @@ export default class StreamHandler { private handleError (error: Error): void { console.log(`Encountered error processing stream: ${this.streamKey}, terminating thread`, error); + if (this.indexerConfig !== undefined) { + this.executorContext.status = Status.STOPPED; + } this.worker.terminate().catch(() => { console.log(`Failed to terminate thread for stream: ${this.streamKey}`); }); diff --git a/runner/src/stream-handler/worker.ts b/runner/src/stream-handler/worker.ts index 2b47f40b5..116a6bfe6 100644 --- a/runner/src/stream-handler/worker.ts +++ b/runner/src/stream-handler/worker.ts @@ -57,7 +57,7 @@ function incrementId (id: string): string { } async function blockQueueProducer (workerContext: WorkerContext, streamKey: string): Promise { - const HISTORICAL_BATCH_SIZE = 10; + const HISTORICAL_BATCH_SIZE = parseInt(process.env.BATCH_SIZE ?? '10'); let streamMessageStartId = '0'; while (true) { @@ -96,6 +96,7 @@ async function blockQueueConsumer (workerContext: WorkerContext, streamKey: stri continue; } const startTime = performance.now(); + // TODO: Remove redis storage call after full V2 migration const indexerConfig = config ?? await workerContext.redisClient.getStreamStorage(streamKey); indexerName = `${indexerConfig.account_id}/${indexerConfig.function_name}`; const functions = { @@ -122,7 +123,6 @@ async function blockQueueConsumer (workerContext: WorkerContext, streamKey: stri } METRICS.BLOCK_WAIT_DURATION.labels({ indexer: indexerName, type: workerContext.streamType }).observe(performance.now() - blockStartTime); await indexer.runFunctions(block, functions, isHistorical, { provision: true }); - await workerContext.redisClient.deleteStreamMessage(streamKey, streamMessageId); await workerContext.queue.shift(); From 420405b077f9401866cb63ff759d2c109b57389e Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Wed, 17 Jan 2024 10:54:40 -0800 Subject: [PATCH 32/32] fix: Resolve Proto File Not Found Build Error (#514) Build fails in Dev due to Rpto file not being found. Copying the file explicitly in the Dockerfile resolves the issue. Issue was reproducible uding docker compose to build and run image locally. --- docker-compose.yml | 3 +-- runner/Dockerfile | 1 + runner/src/server/runner-server.ts | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7674161c9..13760b95d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,8 +42,7 @@ services: PORT: 9180 AWS_ACCESS_KEY_ID: AWS_SECRET_ACCESS_KEY: - RUNNER_HOST: localhost - RUNNER_PORT: 7001 + GRPC_SERVER_PORT: 7001 redis: image: redis diff --git a/runner/Dockerfile b/runner/Dockerfile index 779b3adde..c5b68c113 100644 --- a/runner/Dockerfile +++ b/runner/Dockerfile @@ -9,4 +9,5 @@ WORKDIR /usr/src/app COPY --from=builder /usr/src/app/package*.json ./ RUN npm install --omit=dev COPY --from=builder /usr/src/app/dist ./dist +COPY protos ./protos CMD [ "npm", "run", "start:docker" ] diff --git a/runner/src/server/runner-server.ts b/runner/src/server/runner-server.ts index 23c6b5d29..64b1d4652 100644 --- a/runner/src/server/runner-server.ts +++ b/runner/src/server/runner-server.ts @@ -17,11 +17,10 @@ export default function startRunnerServer (executors: Map server.addService(runnerProto.runner.Runner.service, getRunnerService(executors)); const credentials = grpc.ServerCredentials; - assert(process.env.RUNNER_HOST, 'RUNNER_HOST is not defined'); - assert(process.env.RUNNER_PORT, 'RUNNER_PORT is not defined'); + assert(process.env.GRPC_SERVER_PORT, 'GRPC_SERVER_PORT is not defined'); server.bindAsync( - `${process.env.RUNNER_HOST}:${process.env.RUNNER_PORT}`, + `localhost:${process.env.GRPC_SERVER_PORT}`, credentials.createInsecure(), // TODO: Use secure credentials with allow for Coordinator (err: Error | null, port: number) => { if (err) {