Repository Name
stringlengths
1
28
Git URL
stringlengths
26
64
SHA
stringlengths
40
40
Author
stringlengths
2
37
Commit Date
stringlengths
19
19
Description
stringlengths
13
160
Body
stringlengths
8
30.2k
Full Commit Message
stringlengths
36
42.6k
Git Diff
stringlengths
22
22.6M
next.js
https://github.com/vercel/next.js
61bfaa507ca4a0249c013b2bfa941bc7508eae0f
Sam Ko
2024-12-17 06:32:43
chore: add eslint check for mdx (#74009)
## Why? MDX changes are not getting properly linted, causing upstream issues. When trying to push this incorrect change: ``` <Image alt="Route segments for dynamic MDX components" srcLight="/docs/light/mdx-files.png" srcDark="/docs/dark/mdx-files.png" width="1600" height="849" > ``` ![CleanShot 2024-12-16 at 16 14 00@2x](https://github.com/user-attachments/assets/bac31213-3996-4d56-ba35-be895c401671)
chore: add eslint check for mdx (#74009) ## Why? MDX changes are not getting properly linted, causing upstream issues. When trying to push this incorrect change: ``` <Image alt="Route segments for dynamic MDX components" srcLight="/docs/light/mdx-files.png" srcDark="/docs/dark/mdx-files.png" width="1600" height="849" > ``` ![CleanShot 2024-12-16 at 16 14 00@2x](https://github.com/user-attachments/assets/bac31213-3996-4d56-ba35-be895c401671)
diff --git a/.eslintrc.json b/.eslintrc.json index 821101586227a..e032cc9590a0b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -225,6 +225,15 @@ ], "@typescript-eslint/no-import-type-side-effects": "error" } + }, + { + "files": ["*.mdx"], + "extends": ["plugin:mdx/recommended"], + "parser": "eslint-mdx", + "rules": { + "react/jsx-no-undef": "off", + "react/self-closing-comp": "error" + } } ], "rules": { diff --git a/lint-staged.config.js b/lint-staged.config.js index 063eef661cce3..5510f46225e22 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -1,9 +1,9 @@ module.exports = { - '*.{js,jsx,mjs,ts,tsx,mts}': [ + '*.{js,jsx,mjs,ts,tsx,mts,mdx}': [ 'prettier --with-node-modules --ignore-path .prettierignore --write', 'cross-env ESLINT_USE_FLAT_CONFIG=false eslint --config .eslintrc.json --fix', ], - '*.{json,md,mdx,css,html,yml,yaml,scss}': [ + '*.{json,md,css,html,yml,yaml,scss}': [ 'prettier --with-node-modules --ignore-path .prettierignore --write', ], '*.rs': ['cargo fmt --'], diff --git a/package.json b/package.json index fb5d3003e22f1..355bbeef94f86 100644 --- a/package.json +++ b/package.json @@ -150,6 +150,7 @@ "eslint-plugin-import": "2.31.0", "eslint-plugin-jest": "27.6.3", "eslint-plugin-jsdoc": "48.0.4", + "eslint-plugin-mdx": "3.1.5", "eslint-plugin-react": "7.35.0", "eslint-plugin-react-hooks": "5.0.0", "eslint-v8": "npm:eslint@^8.57.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fc52f1501eab4..592e7d9a5ee94 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -276,6 +276,9 @@ importers: eslint-plugin-jsdoc: specifier: 48.0.4 version: 48.0.4([email protected]) + eslint-plugin-mdx: + specifier: 3.1.5 + version: 3.1.5([email protected]) eslint-plugin-react: specifier: 7.35.0 version: 7.35.0([email protected]) @@ -4521,28 +4524,52 @@ packages: resolution: {integrity: sha512-oN3y7FAROHhrAt7Rr7PnTSwrHrZVRTS2ZbyxeQwSSYD0ifwM3YNgQqbaRmjcWoPyq77MjchusjJDspbzMmip1Q==} deprecated: this package has been deprecated, use `ci-info` instead + '@npmcli/[email protected]': + resolution: {integrity: sha512-01rtHedemDNhUXdicU7s+QYz/3JyV5Naj84cvdXGH4mgCdL+agmSYaLF4LUG4vMCLzhBO8YtS0gPpH1FGvbgAw==} + engines: {node: ^16.14.0 || >=18.0.0} + '@npmcli/[email protected]': resolution: {integrity: sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==} '@npmcli/[email protected]': resolution: {integrity: sha512-OJZCmJ9DNn1cz9HPXXsPmUBnqaArot3CGYo63CyajHQk+g87rPXVOJByGsskQJhPsUUEXJcsZ2Q6bWd2jSwnBA==} + '@npmcli/[email protected]': + resolution: {integrity: sha512-liASfw5cqhjNW9UFd+ruwwdEf/lbOAQjLL2XY2dFW/bkJheXDYZgOyul/4gVvEV4BWkTXjYGmDqMw9uegdbJNQ==} + engines: {node: ^16.14.0 || >=18.0.0} + '@npmcli/[email protected]': resolution: {integrity: sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==} engines: {node: '>= 10'} hasBin: true + '@npmcli/[email protected]': + resolution: {integrity: sha512-tkYs0OYnzQm6iIRdfy+LcLBjcKuQCeE5YLb8KnrIlutJfheNaPvPpgoFEyEFgbjzl5PLZ3IA/BWAwRU0eHuQDA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + '@npmcli/[email protected]': resolution: {integrity: sha512-Uv6h1sT+0DrblvIrolFtbvM1FgWm+/sy4B3pvLp67Zys+thcukzS5ekn7HsZFGpWP4Q3fYJCljbWQE/XivMRLw==} engines: {node: '>=10'} deprecated: This functionality has been moved to @npmcli/fs + '@npmcli/[email protected]': + resolution: {integrity: sha512-pwK+BfEBZJbKdNYpHHRTNBwBoqrN/iIMO0AiGvYsp3Hoaq0WbgGSWQR6SCldZovoDpY3yje5lkFUe6gsDgJ2vg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + '@npmcli/[email protected]': resolution: {integrity: sha512-yrJUe6reVMpktcvagumoqD9r08fH1iRo01gn1u0zoCApa9lnZGEigVKUd2hzsCId4gdtkZZIVscLhNxMECKgRg==} + '@npmcli/[email protected]': + resolution: {integrity: sha512-f7zYC6kQautXHvNbLEWgD/uGu1+xCn9izgqBfgItWSx22U0ZDekxN08A1vM8cTxj/cRVe0Q94Ode+tdoYmIOOQ==} + engines: {node: ^16.14.0 || >=18.0.0} + '@npmcli/[email protected]': resolution: {integrity: sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==} + '@npmcli/[email protected]': + resolution: {integrity: sha512-xhfYPXoV5Dy4UkY0D+v2KkwvnDfiA/8Mt3sWCGI/hM03NsYIH8ZaG6QzS9x7pje5vHZBZJ2v6VRFVTWACnqcmQ==} + engines: {node: ^16.14.0 || >=18.0.0} + '@npmcli/[email protected]': resolution: {integrity: sha512-ELPGWAVU/xyU+A+H3pEPj0QOvYwLTX71RArXcClFzeiyJ/b/McsZ+d0QxpznvfFtZzxGN/gz/1cvlqICR4/suQ==} @@ -5146,6 +5173,9 @@ packages: '@types/[email protected]': resolution: {integrity: sha512-B66iZCIcD2eB2F8e8YDIVtCUKgfiseOR5YOIbmMN2tM57Wu55j1xSdxdSw78aVzsPmbZ6G+hINc+1xe1tt4NBg==} + '@types/[email protected]': + resolution: {integrity: sha512-3qe4oQAPNwVNwK4C9c8u+VJqv9kez+2MR4qJpoPFfXtgxxif1QbFusvXzK0/Wra2VX07smostI2VMmJNSpZjuQ==} + '@types/[email protected]': resolution: {integrity: sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A==} @@ -5222,6 +5252,9 @@ packages: '@types/[email protected]': resolution: {integrity: sha512-viwwrB+6xGzw+G1eWpF9geV3fnsDgXqHG+cqgiHrvQfDUW5hzhCyV7Sy3UJxhfRFBsgky2SSW33qi/YrIkjX5Q==} + '@types/[email protected]': + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + '@types/[email protected]': resolution: {integrity: sha512-QcKpR0cAWhLy7T3J24dwCuviRyS8xj/gVtFxcfZer9lfRgHdSAUFvE02nI/rsgIxSr71Z/2moXVYvWl2fTAzHQ==} @@ -5234,6 +5267,9 @@ packages: '@types/[email protected]': resolution: {integrity: sha512-Q0zyBupO6NxGRZut/JdmqYKOnN95Eg5V8Csg3PGKkP+FnvsUZx1jAyK7fztIszxxMuoBA6E3KXWvdZVXIpx60g==} + '@types/[email protected]': + resolution: {integrity: sha512-4J1l5d79hoIvsrKh5VUKVRA1aIdsOb10Hu5j3J2VfP/msDnfTdGPmNp2E1Wg+vs97Bktzo+MZePFFXSGoykYJw==} + '@types/[email protected]': resolution: {integrity: sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==} @@ -5294,6 +5330,9 @@ packages: '@types/[email protected]': resolution: {integrity: sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA==} + '@types/[email protected]': + resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} + '@types/[email protected]': resolution: {integrity: sha512-IgHxcT3RC8LzFLhKwP3gbMPeaK7BM9eBH46OdapPA7yvuIUJ8H6zHZV53J8hGZcTSnt95jANt+rTBNUUc22ACQ==} @@ -5403,6 +5442,9 @@ packages: '@types/[email protected]': resolution: {integrity: sha512-ijt3zdHi2DmZxQpQTmozXszzDo78V4R3EdvX0jFMfnMH2ZzQSmCbaWOMPGXFUYSzSIdStv78HDjg32m5dxc+tA==} + '@types/[email protected]': + resolution: {integrity: sha512-Hy6UMpxhE3j1tLpl27exp1XqHD7n8chAiNPzWfz16LPZoMMoSc4dzLl6w9qijkEb/r5O1ozdu1CWGA2L83ZeZg==} + '@types/[email protected]': resolution: {integrity: sha512-IznnlmU5f4WcGTh2ltRu/Ijpmk8wiWXfF0VA4s+HPjHZgvFggk1YaIkbo5krX/zUCzWF8N/l4+W/LNxnvAJ8nw==} @@ -5427,6 +5469,9 @@ packages: '@types/[email protected]': resolution: {integrity: sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==} + '@types/[email protected]': + resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + '@types/[email protected]': resolution: {integrity: sha512-lrpDziQipxCEeK5kWxvljWYhUvOiB2A9izZd9B2AFarYAkqZshb4lPbRs7zKEic6eGtH8V/2qJW+dPp9OtF6bw==} @@ -5721,6 +5766,10 @@ packages: [email protected]: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} + [email protected]: + resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + [email protected]: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} @@ -5734,6 +5783,7 @@ packages: [email protected]: resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} + deprecated: package has been renamed to acorn-import-attributes peerDependencies: acorn: ^8 @@ -7667,6 +7717,9 @@ packages: [email protected]: resolution: {integrity: sha512-I2TiqT5iWBEyB8GRfTDP0hiLZ0YeDJZ+upDxjBfOC2lebO5LezQMv7QvIUTzdb64jQyAKLf1AHADtGN+jw6v8Q==} + [email protected]: + resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + [email protected]: resolution: {integrity: sha512-K7i4zNfT2kgQz3GylDw40ot9GAE47sFZ9EXHFSPP6zONLgH6kWXE0KWJchkbQJLBkRazq4APwZ4OwiFFlT95OQ==} @@ -8070,6 +8123,12 @@ packages: eslint-plugin-import-x: optional: true + [email protected]: + resolution: {integrity: sha512-ynztX0k7CQ3iDL7fDEIeg3g0O/d6QPv7IBI9fdYLhXp5fAp0fi8X22xF/D3+Pk0f90R27uwqa1clHpay6t0l8Q==} + engines: {node: '>=18.0.0'} + peerDependencies: + eslint: '>=8.0.0' + [email protected]: resolution: {integrity: sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==} engines: {node: '>=4'} @@ -8138,6 +8197,18 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 + [email protected]: + resolution: {integrity: sha512-8rqoc148DWdGdmYF6WSQFT3uQ6PO7zXYgeBpHAOAakX/zpq+NvFYbDA/H7PYzHajwtmaOzAwfxyl++x0g1/N9A==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + + [email protected]: + resolution: {integrity: sha512-lUE7tP7IrIRHU3gTtASDe5u4YM2SvQveYVJfuo82yn3MLh/B/v05FNySURCK4aIxIYF1QYo3IRemQG/lyQzpAg==} + engines: {node: '>=18.0.0'} + peerDependencies: + eslint: '>=8.0.0' + [email protected]: resolution: {integrity: sha512-hIOwI+5hYGpJEc4uPRmz2ulCjAGD/N13Lukkh8cLV0i2IRk/bdZDYjgLVHj+U9Z704kLIdIO6iueGvxNur0sgw==} engines: {node: '>=10'} @@ -8271,12 +8342,18 @@ packages: [email protected]: resolution: {integrity: sha512-bEN9VHRyXAUOjkKVQVvArFym08BTWB0aJPppZZr0UNyAqWsLaVfAqP7hbaTJjzHifmB5ebnR8Wm7r7yGN/HonQ==} + [email protected]: + resolution: {integrity: sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==} + [email protected]: resolution: {integrity: sha512-tW/ADSJON4o+T8rSmSX1ZXdat4n6bVOu0iTUFY9ZFF2dD/1/Hug8Lc/HYuJRA4Mop9zDZHQMo1m4lIxxJHkTjQ==} [email protected]: resolution: {integrity: sha512-xbgqcrkIVbIG+lI/gzbvd9SGTJL4zqJKBFttUl5pP27KhAjtMKbX/mQXJ7qgyXpMgVy/zvpm0xoQQaGL8OloOw==} + [email protected]: + resolution: {integrity: sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==} + [email protected]: resolution: {integrity: sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==} @@ -9101,6 +9178,10 @@ packages: resolution: {integrity: sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==} engines: {node: '>=10'} + [email protected]: + resolution: {integrity: sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==} + engines: {node: ^16.14.0 || >=18.0.0} + [email protected]: resolution: {integrity: sha512-M5ezZw4LzXbBKMruP+BNANf0k+19hDQMgpzBIYnya//Al+fjNct9Wf3b1WedLqdEs2hKBvxq/jh+DsHJLj0F9A==} @@ -9253,6 +9334,10 @@ packages: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} + [email protected]: + resolution: {integrity: sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==} + engines: {node: '>= 4'} + [email protected]: resolution: {integrity: sha512-541xKlUw6jr/6gGuk92F+mYM5zaFAc5ahphvkqvNe2bQ6gVBkd6bfrmVJ2t4KDAfikAYZyIqTnktX3i6/aQDrQ==} engines: {node: '>=16.x'} @@ -9292,6 +9377,9 @@ packages: engines: {node: '>=8'} hasBin: true + [email protected]: + resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==} + [email protected]: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -9326,6 +9414,10 @@ packages: [email protected]: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + [email protected]: + resolution: {integrity: sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + [email protected]: resolution: {integrity: sha512-PO64kVeArePvhX7Ff0jVWkpnE1DfGRvaWcStYrPugcJz9twQGYibagKJuIMHCX7ENcp0M6LJlcjLBuLD5KeJMg==} engines: {node: '>=10'} @@ -9778,6 +9870,10 @@ packages: [email protected]: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + [email protected]: + resolution: {integrity: sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==} + engines: {node: '>=16'} + [email protected]: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} @@ -10119,6 +10215,10 @@ packages: [email protected]: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + [email protected]: + resolution: {integrity: sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + [email protected]: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} @@ -10307,6 +10407,10 @@ packages: [email protected]: resolution: {integrity: sha512-8ZmlJFVK9iCmtLz19HpSsR8HaAMWBT284VMNednLwlIMDP2hJDCIhUp0IZ2xUcZ+Ob6BM0VvCSJwzASDM45NLQ==} + [email protected]: + resolution: {integrity: sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + [email protected]: resolution: {integrity: sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw==} engines: {node: '>=18.12.0'} @@ -10340,6 +10444,9 @@ packages: [email protected]: resolution: {integrity: sha512-od7eKCCZ62ITvFf8nHHrIiYmgOHb4xVNDRDqxBWSaao5FZyyZVX8OmRCbwjDGPrSrgIulwPNyBsWCGnhiDC0oQ==} + [email protected]: + resolution: {integrity: sha512-kc0X2FEUZr145odl68frm+lMJuQ23+rTXYmR6TImqPtbpmXC4vVXbWKDQ9IzndA0HfyQamWfKLhzsqGSTxE63w==} + [email protected]: resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} engines: {node: '>=6.11.5'} @@ -10614,36 +10721,57 @@ packages: [email protected]: resolution: {integrity: sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==} + [email protected]: + resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} + [email protected]: resolution: {integrity: sha512-HN3W1gRIuN/ZW295c7zi7g9lVBllMgZE40RxCX37wrTPWXCWtpvOZdfnuK+1WNpvZje6XuJeI3Wnb4TJEUem+g==} + [email protected]: + resolution: {integrity: sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==} + [email protected]: resolution: {integrity: sha512-SoO8y1B9NjMOYlNdwXMchuTVvqSTlUmXm1P5QvZNPv7OH7aa8qJV+3aA+vl1DHK9Vk1uZAlgwokjvDQhS6bINA==} [email protected]: resolution: {integrity: sha512-xIPmR5ReJDu/DHH1OoIT1HkuybIfRGYRywC+gJtI7qHjCJp/M9jrmBEJW22O8lskDWm562BX2W8TiAwRTb0rKA==} + [email protected]: + resolution: {integrity: sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==} + [email protected]: resolution: {integrity: sha512-67KOAvCmypBSpr+AJEAVQg1Obig5Wnguo4ETTxASe5WVP4TLt57bZjDX/9EW5sWYQsO4gPqLxkUOlypVn5rkhg==} [email protected]: resolution: {integrity: sha512-dV398twlcAKiqQfj3BkC4PWinVlG1YSL/qs71M7z8xmSksqp3lATH+qrmWUJBOIjOYcD5xuIu6k1ld2btB3EqQ==} + [email protected]: + resolution: {integrity: sha512-bfOjvNt+1AcbPLTFMFWY149nJz0OjmewJs3LQQ5pIyVGxP4CdOqNVJL6kTaM5c68p8q82Xv3nCyFfUnuEcH3UQ==} + [email protected]: resolution: {integrity: sha512-9nncdnHNYSb4HNxY3AwE6gU632jhbXsDGXe9PkkJoEawYWJ8tTwmEOHGlGa2TCRidtkd6FF5I8ogDU9pTDlQyA==} [email protected]: resolution: {integrity: sha512-38w5y+r8nyKlGvNjSEqWrhG0w5PmnRA+wnBvm+ulYCct7nsGYhFVb0lljS9bQav4psDAS1eGkP2LMVcZBi/aqw==} + [email protected]: + resolution: {integrity: sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w==} + [email protected]: resolution: {integrity: sha512-kBiYeashz+nuhfv+712nc4THQhzXIH2gBFUDbuLxuDCqU/fZeg+9FAcdRBx9E13dkpk1p2Xwufzs3wsGJ+mISQ==} [email protected]: resolution: {integrity: sha512-SXqglS0HrEvSdUEfoXFtcg7DRl7S2cwOXc7jkuusG472Mmjag34DUDeOJUZtl+BVnyeO1frIgVpHlNRWc2gk/w==} + [email protected]: + resolution: {integrity: sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==} + [email protected]: resolution: {integrity: sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg==} + [email protected]: + resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==} + [email protected]: resolution: {integrity: sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw==} @@ -10653,6 +10781,9 @@ packages: [email protected]: resolution: {integrity: sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==} + [email protected]: + resolution: {integrity: sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==} + [email protected]: resolution: {integrity: sha512-Y4ffygj85MTt70STKnEquw6k73jYWJBaYcb4ITAKgSNokZF7fH8rEHZ1GsRY/JaxqUevMaEnsDmkVv5Z9uVRdg==} @@ -10662,6 +10793,9 @@ packages: [email protected]: resolution: {integrity: sha512-tGvhT94e+cVnQt8JWE9/b3cUQZWS732TJxXHktvP+BYo62PpYD53Ls/6cC60rW21dW+txxiM4zMdc6abASvZKA==} + [email protected]: + resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} + [email protected]: resolution: {integrity: sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==} @@ -10715,24 +10849,36 @@ packages: [email protected]: resolution: {integrity: sha512-K+PkJTxqjFfSNkfAhp4GB+cZPfQd6dxtTXnf+RjZOV7T4EEXnvgzOcnp+eSTmpGk9d1S9sL6/lqrgSNn/s0HZA==} + [email protected]: + resolution: {integrity: sha512-FKjQKbxd1cibWMM1P9N+H8TwlgGgSkWZMmfuVucLCHaYqeSvJ0hFeHsIa65pA2nYbes0f8LDHPMrd9X7Ujxg9w==} + [email protected]: resolution: {integrity: sha512-Sh8YHLSAlbm/7TZkVKEC4wDcJE8XhVpZ9hUXBue1TcAicrrzs/oXu7PHH3NcyMemjGyMkiVS34Y0AHC5KG3y4A==} [email protected]: resolution: {integrity: sha512-TCgLxqW6ReQ3AJgtj1P0P+8ZThBTloLbeb7jNaqr6mCOLDpxUiBFE/9STgooMZttEwOQu5iEcCCa3ZSDhY9FGw==} + [email protected]: + resolution: {integrity: sha512-sI0nwhUDz97xyzqJAbHQhp5TfaxEvZZZ2JDqUo+7NvyIYG6BZ5CPPqj2ogUoPJlmXHBnyZUzISg9+oUmU6tUjQ==} + [email protected]: resolution: {integrity: sha512-kG3VwaJlzAPdtIVDznfDfBfNGMTIzsHqKpTmMlew/iPnUCDRNkX+48ElpaOzXAtK5axtpFKE3Hu3VBriZDnRTQ==} [email protected]: resolution: {integrity: sha512-VfA369RdqUISF0qGgv2FfV7gGjHDfn9+Qfiv5hEwpyr1xscRj/CiVRkU7rywGFCO7JwJ5L0e7CJz60lY52+qOA==} + [email protected]: + resolution: {integrity: sha512-vNuFb9czP8QCtAQcEJn0UJQJZA8Dk6DXKBqx+bg/w0WGuSxDxNr7hErW89tHUY31dUW4NqEOWwmEUNhjTFmHkg==} + [email protected]: resolution: {integrity: sha512-emlFQEyfx/2aPhwyEqeNDfKE6jPH1cvLTb5ANRo4qZBjaUObnzjLRdzK8RJ4Xc8+/dOmKN8TTRxFnOYF5/EAwQ==} [email protected]: resolution: {integrity: sha512-xaRAMoSkKdqZXDAoSgp20Azm0aRQKGOl0RrS81yGu8Hr/JhMsBmfs4wR7m9kgVUIO36cMUQjNyiyDKPrsv8gOw==} + [email protected]: + resolution: {integrity: sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ==} + [email protected]: resolution: {integrity: sha512-J+nZegf1ExPz1Ft6shxu8M9WfRom1gwRIx6gpJK1SEEqKzY5LjOR1d/WHRtjwV4KoMXrL53+PoN7T1Rw1euJew==} @@ -10742,81 +10888,153 @@ packages: [email protected]: resolution: {integrity: sha512-2N13ol4KMoxb85rdDwTAC6uzs8lMX0zeqpcyx7FhS7PxXomOnLactu8WI8iBNXW8AVyea3KIJd/1CKnUmwrK9A==} + [email protected]: + resolution: {integrity: sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A==} + [email protected]: resolution: {integrity: sha512-NQuiYA0lw+eFDtSG4+c7ao3RG9dM4P0Kx/sn8OLyPhxtIc6k+9n14k5VfLxRKfAxYRTo8c5PLZPaRNmslGWxJw==} [email protected]: resolution: {integrity: sha512-TZZRZgeHvtgm+IhtgC2+uDMR7h8eTKF0QUX9YsgoL9+bADBpBY6SiLvWqnBlLbCEevITmTqmEuY3FoxMKVs1rQ==} + [email protected]: + resolution: {integrity: sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ==} + [email protected]: resolution: {integrity: sha512-eUBA7Rs1/xtTVun9TmV3gjfPz2wEwgK5R5xcbIM5ZYAtvGF6JkyaDsj0agx8urXnO31tEO6Ug83iVH3tdedLnw==} + [email protected]: + resolution: {integrity: sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==} + [email protected]: resolution: {integrity: sha512-CTIwxlOnU7dEshXDQ+dsr2n+yxpP0+fn271pu0bwDIS8uqfFcumXpj5mLn3hSC8iw2MUr6Gx8EcKng1dD7i6hg==} + [email protected]: + resolution: {integrity: sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==} + [email protected]: resolution: {integrity: sha512-QAdFbkQagTZ/eKb8zDGqmjvgevgJH3+aQpvvKrXWxNJp3o8/l2cAbbrBd0E04r0Gx6nssPpqWIjnbHFvZu5qsQ==} + [email protected]: + resolution: {integrity: sha512-5E5I2pFzJyg2CtemqAbcyCktpHXuJbABnsb32wX2U8IQKhhVFBqkcZR5LRm1WVoFqa4kTueZK4abep7wdo9nrw==} + [email protected]: resolution: {integrity: sha512-qUmqs4kj9a5yBnk3JMLyjtWYN6Mzfcx8uJfi5XAveBniDevmZasdGBba5b4QsvRcAkmvGo5ACmSUmyGiKTLZew==} + [email protected]: + resolution: {integrity: sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==} + [email protected]: resolution: {integrity: sha512-zily+Nr4yFqgMGRKLpTVsNl5L4PMu485fGFDOQJQBl2NFpjGte1e86zC0da93wf97jrc4+2G2GQudFMHn3IX+A==} + [email protected]: + resolution: {integrity: sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==} + [email protected]: resolution: {integrity: sha512-Qx7uEyahU1lt1RnsECBiuEbfr9INjQTGa6Err+gF3g0Tx4YEviPbqqGKNv/NrBaE7dVHdn1bVZKM/n5I/Bak7A==} + [email protected]: + resolution: {integrity: sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==} + [email protected]: resolution: {integrity: sha512-agJ5B3unGNJ9rJvADMJ5ZiYjBRyDpzKAOk01Kpi1TKhlT1APx3XZk6eN7RtSz1erbWHC2L8T3xLZ81wdtGRZzg==} + [email protected]: + resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} + [email protected]: resolution: {integrity: sha512-5e8xTis5tEZKgesfbQMKRCyzvffRRUX+lK/y+DvsMFdabAicPkkZV6gO+FEWi9RfuKKoxxPwNL+dFF0SMImc1g==} + [email protected]: + resolution: {integrity: sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==} + [email protected]: resolution: {integrity: sha512-F8oW2KKrQRb3vS5ud5HIqBVkCqQi224Nm55o5wYLzY/9PwHGXC01tr3d7+TqHHz6zrKQ72Okwtvm/xQm6OVNZA==} + [email protected]: + resolution: {integrity: sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==} + [email protected]: resolution: {integrity: sha512-J8H058vFBdo/6+AsjHp2NF7AJ02SZtWaVUjsayNFeAiydTxUwViQPxN0Hf8dp4FmCQi0UUFovFsEyRSUmFH3MA==} + [email protected]: + resolution: {integrity: sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==} + [email protected]: resolution: {integrity: sha512-OzO9AI5VUtrTD7KSdagf4MWgHMtET17Ua1fIpXTpuhclCqD8egFWo85GxSGvxgkGS74bEahvtM0WP0HjvV0e4w==} + [email protected]: + resolution: {integrity: sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==} + [email protected]: resolution: {integrity: sha512-DLT5Ho02qr6QWVNYbRZ3RYOSSWWFuH3tJexd3dgN1odEuPNxCngTCXJum7+ViRAd9BbdxCvMToPOD/IvVhzG6Q==} + [email protected]: + resolution: {integrity: sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==} + [email protected]: resolution: {integrity: sha512-U2s5YdnAYexjKDel31SVMPbfi+eF8y1U4pfiRW/Y8EFVCy/vgxk/2wWTxzcqE71LHtCuCzlBDRU2a5CQ5j+mQA==} + [email protected]: + resolution: {integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==} + [email protected]: resolution: {integrity: sha512-mkg3BaWlw6ZTkQORrKVBW4o9ICXPxLtGz51vml5mQpKFdo9vqIX68CAx5JhTOdjQyAHH7JFmm4rh8toSPQZUmg==} + [email protected]: + resolution: {integrity: sha512-Fk+xmBrOv9QZnEDguL9OI9/NQQp6Hz4FuQ4YmCb/5V7+9eAh1s6AYSvL20kHkD67YIg7EpE54TiSlcsf3vyZgA==} + [email protected]: resolution: {integrity: sha512-BKlClMmYROy9UiV03SwNmckkjn8QHVaWkqoAqzivabvdGcwNGMMMH/5szAnywmsTBUzDsU57/mFi0sp4BQO6dA==} + [email protected]: + resolution: {integrity: sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==} + [email protected]: resolution: {integrity: sha512-yg+zrL14bBTFrQ7n35CmByWUTFsgst5JhA4gJYoty4Dqzj4Z4Fr/DHekSS5aLfH9bdlfnSvKAWsAgJhIbogyBg==} + [email protected]: + resolution: {integrity: sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==} + [email protected]: resolution: {integrity: sha512-CB/AGk98u50k42kvgaMM94wzBqozSzDDaonKU7P7jwQIuH2RU0TeBqGYJz2WY1UdihhjweivStrJ2JdkdEmcfw==} + [email protected]: + resolution: {integrity: sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==} + [email protected]: resolution: {integrity: sha512-RoxtuSCX6sUNtxhbmsEFQfWzs8VN7cTctmBPvYivo98xb/kDEoTCtJQX5wyzIYEmk/lvNFTat4hL8oW0KndFpg==} + [email protected]: + resolution: {integrity: sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==} + [email protected]: resolution: {integrity: sha512-d90uqCnXp/cy4G881Ub4psE57Sf8YD0pim9QdjCRNjfas2M1u6Lbt+XZK9gnHL2XFhnozZiEdCa9CNfXSfQ6xA==} + [email protected]: + resolution: {integrity: sha512-VXJJuNxYWSoYL6AJ6OQECCFGhIU2GGHMw8tahogePBrjkG8aCCas3ibkp7RnVOSTClg2is05/R7maAhF1XyQMg==} + [email protected]: resolution: {integrity: sha512-oKDEMK2u5qqAptasDAwWDXq0tG9AssVwAx3E9bBF3t/shRIGsWIRG+cGafs2p/SnDSOecnt6hZPCE2o6lHfFmQ==} + [email protected]: + resolution: {integrity: sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==} + [email protected]: resolution: {integrity: sha512-DCfg/T8fcrhrRKTPjRrw/5LLvdGV7BHySf/1LOZx7TzWZdYRjogNtyNq885z3nNallwr3QUKARjqvHqX1/7t+w==} + [email protected]: + resolution: {integrity: sha512-534m2WhVTddrcKVepwmVEVnUAmtrx9bfIjNoQHRqfnvdaHQiFytEhJoTgpWJvDEXCO5gLTQh3wYC1PgOJA4NSQ==} + [email protected]: resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} [email protected]: resolution: {integrity: sha512-6Mj0yHLdUZjHnOPgr5xfWIMqMWS12zDN6iws9SLuSz76W8jTtAv24MN4/CL7gJrl5vtxGInkkqDv/JIoRsQOvA==} + [email protected]: + resolution: {integrity: sha512-eBPdkcoCNvYcxQOAKAlceo5SNdzZWfF+FcSupREAzdAh9rRmE239CEQAiTwIgblwnoM8zzj35sZ5ZwvSEOF6Kw==} + [email protected]: resolution: {integrity: sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==} engines: {node: '>=8.6'} @@ -11183,6 +11401,11 @@ packages: engines: {node: '>=6'} hasBin: true + [email protected]: + resolution: {integrity: sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + hasBin: true + [email protected]: resolution: {integrity: sha512-9ui7CGtOOlehQu0t/OhhlmDyc71mKVlv+4vF+me4iZLPrNtRL2xoquEdfZxasC/bdQi/Hr3iTrpyRKIG+ocabA==} engines: {node: '>= 8'} @@ -11194,6 +11417,10 @@ packages: resolution: {integrity: sha512-6lUjEI0d3v6kFrtgA/lOx4zHCWULXsFNIjHolnZCKCTLA6m/G625cdn3O7eNmT0iD3jfo6HZ9cdImGZwf21prw==} engines: {node: '>=10'} + [email protected]: + resolution: {integrity: sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==} + engines: {node: ^16.14.0 || >=18.0.0} + [email protected]: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -11217,6 +11444,10 @@ packages: resolution: {integrity: sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w==} engines: {node: '>=10'} + [email protected]: + resolution: {integrity: sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + [email protected]: resolution: {integrity: sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g==} deprecated: The lifecycle script runner used in npm is now @npmcli/run-script. Please use that module moving forward @@ -11224,6 +11455,14 @@ packages: [email protected]: resolution: {integrity: sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==} + [email protected]: + resolution: {integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + [email protected]: + resolution: {integrity: sha512-sHGJy8sOC1YraBywpzQlIKBE4pBbGbiF95U6Auspzyem956E0+FtDtsx1ZxlOJkQCZ1AFXAY/yuvtFYrOxF+Bw==} + engines: {node: ^16.14.0 || >=18.0.0} + [email protected]: resolution: {integrity: sha512-/ep6QDxBkm9HvOhOg0heitSd7JHA1U7y1qhhlRlteYYAi9Pdb/ZV7FW5aHpkrpM8+P+4p/jjR8zCyKPBMBjSig==} engines: {node: '>=10'} @@ -11236,6 +11475,10 @@ packages: [email protected]: resolution: {integrity: sha512-ygs4k6f54ZxJXrzT0x34NybRlLeZ4+6nECAIbr2i0foTnijtS1TJiyzpqtuUAJOps/hO0tNDr8fRV5g+BtRlTw==} + [email protected]: + resolution: {integrity: sha512-nkc+3pIIhqHVQr085X9d2JzPzLyjzQS96zbruppqC9aZRm/x8xx6xhI98gHtsfELP2bE+loHq8ZaHFHhe+NauA==} + engines: {node: ^16.14.0 || >=18.0.0} + [email protected]: resolution: {integrity: sha512-PuFYYtnQ8IyVl6ib9d3PepeehcUeHN9IO5N/iCRhyg9tStQcqGQBRVHmfmMWPDERU3KwZoHFvbJ4FPXPspvzbA==} engines: {node: '>=10'} @@ -11592,6 +11835,10 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} + [email protected]: + resolution: {integrity: sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==} + engines: {node: '>=16'} + [email protected]: resolution: {integrity: sha512-TYKL+K98dcAWoCw/Ac1yrPviU8Trk+/gmjQVaoWEFDZmVD4KRg6c/80xKqNNFQObo2mTONgF8trzAf2UTwKafw==} @@ -12545,6 +12792,10 @@ packages: resolution: {integrity: sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==} engines: {node: '>=10'} + [email protected]: + resolution: {integrity: sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + [email protected]: resolution: {integrity: sha512-yN0WQmuCX63LP/TMvAg31nvT6m4vDqJEiiv2CAZqWOGNWutc9DfDk1NPYYmKUFmaVM2UwDowH4u5AHWYP/jxKw==} @@ -12893,6 +13144,10 @@ packages: resolution: {integrity: sha512-bp6z0tdgLy9KzdfENDIw/53HWAolOVoQTRWXv7PUiqAo3YvvoUVeLr7RWPWq+mu7KUOu9kiT4DvxhUgNUBsvug==} engines: {node: '>=10'} + [email protected]: + resolution: {integrity: sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + [email protected]: resolution: {integrity: sha512-dAiqGtVc/q5doFz6096CcnXhpYk0ZN8dEKVkGLU0CsASt8SrgF6SF7OTKAYubfvFhWaqofl+Y8HK19GR8jwW+A==} deprecated: This package is no longer supported. Please use @npmcli/package-json instead. @@ -13076,12 +13331,18 @@ packages: [email protected]: resolution: {integrity: sha512-R9wcN+/THRXTKyRBp6Npo/mcbGA2iT3N4G8qUqLA5pOEg7kBidHv8K2hHidCMYZ6DXmwK18umu0K4cicgA2PPQ==} + [email protected]: + resolution: {integrity: sha512-Ngl/H3YXyBV9RcRNdlYsZujAmhsxwzxpDzpDEhFBVAGthS4GDgnctpDjgFl/ULx5UEDzqtW1cyBSNKqYYrqLBA==} + [email protected]: resolution: {integrity: sha512-k9bt7BYc3G7YBdmeAhvd3VavrPa/XlKWR3CyHjr4sLO9xJyly8WHHT3Sp+8HPR8lEUv+/sZaffL7IjMLV0f6BA==} [email protected]: resolution: {integrity: sha512-1fUyHr2jLsVOkhbvPRBJ5zTKZZyD6yZzYaWCS6BPBdQ8vEMBCH+9zNCDA6tET/zHCi/jLqjCWtlJZUPk+DbnFw==} + [email protected]: + resolution: {integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==} + [email protected]: resolution: {integrity: sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q==} @@ -13091,6 +13352,9 @@ packages: [email protected]: resolution: {integrity: sha512-cYCchalpf25bTtfXF24ribYvqytPKq0TiEhqQDBHvVEEsApebwruPWP1cTcvTFBidmpXyqzycm+y8ng7Kmvc8Q==} + [email protected]: + resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==} + [email protected]: resolution: {integrity: sha512-crQ7Xk1m/F2IiwBx5oTqk/c0hjoumrEz+a36+ZoVupskQRE/q7pAwHKsTNeiZ31sbSTELvVlVv4h1W0Xo5szKg==} engines: {node: '>= 0.8.0'} @@ -13811,6 +14075,10 @@ packages: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} engines: {node: '>=12'} + [email protected]: + resolution: {integrity: sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ==} + engines: {node: '>=16'} + [email protected]: resolution: {integrity: sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==} engines: {node: '>=18'} @@ -14013,6 +14281,10 @@ packages: resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} engines: {node: '>=10'} + [email protected]: + resolution: {integrity: sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==} + engines: {node: '>=12'} + [email protected]: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -14344,9 +14616,6 @@ packages: [email protected]: resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==} - [email protected]: - resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} - [email protected]: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -14452,6 +14721,10 @@ packages: resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} engines: {node: '>=8'} + [email protected]: + resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==} + engines: {node: '>=14.16'} + [email protected]: resolution: {integrity: sha512-Q08/0IrpvM+NMY9PA2rti9Jb+JejTddwmwmVQGskAlhtcrw1wsRzoR6ode6mR+OAabNa75w/dxedSUY2mlphaQ==} engines: {node: '>=16'} @@ -14570,6 +14843,9 @@ packages: [email protected]: resolution: {integrity: sha512-d29qhcADmrvjgSYDLDUmmE/zvVyKUW+O3gRz6Bjj7fcv8kGBlrYBmMjnuBI+wuTou/PXaVl3hPeSh9mXZ0iGSA==} + [email protected]: + resolution: {integrity: sha512-15g/gWE7qQl9tQ3nAEbMd5h9HV1EACtFs6N9xaRBZICoCwnNGbal1kOs++ICf4aiTdItZxU2s/kYWhW7htlqJg==} + [email protected]: resolution: {integrity: sha512-ptXTWUf9HZ2L9xto7tre+hSdSN7M9S0rypUpMAcFhiDYjrXLrND4If+8AZOtPFySKI/Zhfxf7GVAR34BqixDUA==} @@ -14579,6 +14855,9 @@ packages: [email protected]: resolution: {integrity: sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==} + [email protected]: + resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==} + [email protected]: resolution: {integrity: sha512-juWjuI8Z4xFg8pJbnEZ41b5xjGUWGHqXALmBZ3FC3WX0PIx1CZBIIJ6mXbYMcf6Yw4Fi0rFUTA1cdz/BglbOhA==} @@ -14608,18 +14887,27 @@ packages: [email protected]: resolution: {integrity: sha512-fPNWewS593JSmg49HbnE86BJKuBi1/nMWhDSccBvbARfxezEuJV85EaARR9/VplveiwCoLm2kWq+DhP8TBaDpw==} + [email protected]: + resolution: {integrity: sha512-mOlg8Mp33pR0eeFpo5d2902ojqFFOKMMG2hF8bmH7ZlhnmjFgh0NI3/ZDwdaBJNbvrS7LZFVrBVtIE9KZ9s7vQ==} + [email protected]: resolution: {integrity: sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==} [email protected]: resolution: {integrity: sha512-Glt17jWwZeyqrFqOK0pF1Ded5U3yzJnFr8CG1GMjCWTp9zDo2p+cmD6pWbZU8AgM5WU3IzRv6+rBwhzsGh6hBQ==} + [email protected]: + resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==} + [email protected]: resolution: {integrity: sha512-HGrj7JQo9DwZt8XFsX8UD4gGqOsIlCih9opG6Y+N11XqkBGKzHo8cvDi+MfQQgiZ7zXRUiQREYHhjOBHERTMdg==} [email protected]: resolution: {integrity: sha512-poZa0eXpS+/XpoQwGwl79UUdea4ol2ZuCYguVaJS4qzIOMDzbqz8a3erUCOmubSZkaOuGamb3tX790iwOIROww==} + [email protected]: + resolution: {integrity: sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ==} + [email protected]: resolution: {integrity: sha512-tWvIbV8goayTjobxDIr4zVTyG+Q7ragMSMeKC3xnPl9xzIc0+she8mxXLM3JVNDDsfARPbCd3XdzkyLdo7fF3g==} @@ -14641,6 +14929,9 @@ packages: [email protected]: resolution: {integrity: sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==} + [email protected]: + resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} + [email protected]: resolution: {integrity: sha512-sA/nXwYRCQVRwZU2/tQWUqJ9JSFM1X3x7JIOsIgSzrFHcfVt6NkzDtKzyxg2cZWkCwGF9CO8x4QNZRJRMK8FeQ==} @@ -14650,12 +14941,18 @@ packages: [email protected]: resolution: {integrity: sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==} + [email protected]: + resolution: {integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==} + [email protected]: resolution: {integrity: sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==} [email protected]: resolution: {integrity: sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==} + [email protected]: + resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==} + [email protected]: resolution: {integrity: sha512-p2Ej8qqrqcD10Ah0ZUKUU/mhRB8pM4q6gzjxq9kZpgxa8dks7oHT8jDP4CqLhoRof3RXOZLKB9EBV1DTzHiJRw==} peerDependencies: @@ -14871,21 +15168,36 @@ packages: [email protected]: resolution: {integrity: sha512-0yaU+rj2gKAyEk12ffdSbBfjnnj+b1zqTBv3OQCTn8yEB02bsPizwdBPrLJjHnK+cU9EMMcUnNv938XcZIkmdA==} + [email protected]: + resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==} + [email protected]: resolution: {integrity: sha512-GN2bH2gs4eLnw/4jPSgfBjo+XCuvnX9elHICJZjVD4+NM0nsUrMTvdjGY5Sc/XG69XVTgLwj7hknQVc6M9FukA==} + [email protected]: + resolution: {integrity: sha512-qxRZcnFSQt6pWKn3PAk81yLK2rO2i7CDXpy8v8ZquiEOMLSnPw6BMSi9Y1sUCwGGl7a9b3CJT1CKpnRF7pp66g==} + [email protected]: resolution: {integrity: sha512-tAyUqD2R1l/7Rn7ixdGkhXLD3zsg+XLAeUDUhXearjfIcpL1Hcsj5hHpCoy/gvfK/Ws61+e972fm0F7up7hfYA==} + [email protected]: + resolution: {integrity: sha512-lffPI1JrbHDTToJwcq0rl6rBmkjQmMuXkAxsZPRS9DXbaJQvc642eCg6EGxcX2i1L+esbuhq+2l9tBll5v8AeQ==} + [email protected]: resolution: {integrity: sha512-lXhElVO0Rq3frgPvFBwahmed3X03vjPF8OcjKMy8+F1xU/3Q3QU3tKEDp743SFtb74PdF0UWpxPvtOP0GCLheA==} + [email protected]: + resolution: {integrity: sha512-/qlwqwWBWFOmpXujL/20P+Iuydil0rZZNglR+VNm6J0gpLHwuVM5s7g2TfVoswbXjZ4HuIhLMySEyIw5i7/D8w==} + [email protected]: resolution: {integrity: sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==} [email protected]: resolution: {integrity: sha512-ADBsmerdGBs2WYckrLBEmuETSPyTD4TuLxTrw0DvjirxW1ra4ZwkbzG8ndsv3Q57smvHxo677MHaQrY9yxH8cA==} + [email protected]: + resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} + [email protected]: resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} @@ -14897,6 +15209,9 @@ packages: resolution: {integrity: sha512-I1aZYWBQeNxz0fKQZZQd1LmVAj1tMR55Cud6uc7h9gx9UYZSd6GHPpYnOOU9nWVTQNjSDeTkWbpQ5aXijvKrmQ==} hasBin: true + [email protected]: + resolution: {integrity: sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==} + [email protected]: resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} @@ -15039,6 +15354,11 @@ packages: engines: {node: '>= 8'} hasBin: true + [email protected]: + resolution: {integrity: sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==} + engines: {node: ^16.13.0 || >=18.0.0} + hasBin: true + [email protected]: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} @@ -18965,6 +19285,19 @@ snapshots: '@npmcli/[email protected]': {} + '@npmcli/[email protected]': + dependencies: + '@npmcli/map-workspaces': 3.0.6 + '@npmcli/package-json': 5.2.1 + ci-info: 4.0.0 + ini: 4.1.3 + nopt: 7.2.1 + proc-log: 4.2.0 + semver: 7.6.3 + walk-up-path: 3.0.1 + transitivePeerDependencies: + - bluebird + '@npmcli/[email protected]': dependencies: '@gar/promisify': 1.1.3 @@ -18984,21 +19317,60 @@ snapshots: transitivePeerDependencies: - bluebird + '@npmcli/[email protected]': + dependencies: + '@npmcli/promise-spawn': 7.0.2 + ini: 4.1.3 + lru-cache: 10.4.3 + npm-pick-manifest: 9.1.0 + proc-log: 4.2.0 + promise-inflight: 1.0.1 + promise-retry: 2.0.1 + semver: 7.6.3 + which: 4.0.0 + transitivePeerDependencies: + - bluebird + '@npmcli/[email protected]': dependencies: npm-bundled: 1.1.2 npm-normalize-package-bin: 1.0.1 + '@npmcli/[email protected]': + dependencies: + '@npmcli/name-from-folder': 2.0.0 + glob: 10.4.5 + minimatch: 9.0.5 + read-package-json-fast: 3.0.2 + '@npmcli/[email protected]': dependencies: mkdirp: 1.0.4 + '@npmcli/[email protected]': {} + '@npmcli/[email protected]': {} + '@npmcli/[email protected]': + dependencies: + '@npmcli/git': 5.0.8 + glob: 10.4.5 + hosted-git-info: 7.0.2 + json-parse-even-better-errors: 3.0.2 + normalize-package-data: 6.0.2 + proc-log: 4.2.0 + semver: 7.6.3 + transitivePeerDependencies: + - bluebird + '@npmcli/[email protected]': dependencies: infer-owner: 1.0.4 + '@npmcli/[email protected]': + dependencies: + which: 4.0.0 + '@npmcli/[email protected]': dependencies: '@npmcli/node-gyp': 1.0.2 @@ -19698,6 +20070,10 @@ snapshots: dependencies: '@types/express': 4.17.2 + '@types/[email protected]': + dependencies: + '@types/node': 20.17.6 + '@types/[email protected]': dependencies: '@types/node': 20.17.6 @@ -19784,6 +20160,10 @@ snapshots: dependencies: '@types/unist': 2.0.3 + '@types/[email protected]': + dependencies: + '@types/unist': 2.0.3 + '@types/[email protected]': dependencies: '@types/node': 20.17.6 @@ -19802,6 +20182,8 @@ snapshots: '@types/through': 0.0.30 rxjs: 7.8.1 + '@types/[email protected]': {} + '@types/[email protected]': {} '@types/[email protected]': {} @@ -19871,6 +20253,10 @@ snapshots: dependencies: '@types/unist': 2.0.3 + '@types/[email protected]': + dependencies: + '@types/unist': 2.0.3 + '@types/[email protected]': {} '@types/[email protected]': {} @@ -19977,6 +20363,8 @@ snapshots: '@types/[email protected]': {} + '@types/[email protected]': {} + '@types/[email protected]': dependencies: '@types/node': 20.17.6 @@ -20001,6 +20389,8 @@ snapshots: '@types/[email protected]': {} + '@types/[email protected]': {} + '@types/[email protected]': {} '@types/[email protected]': @@ -20435,6 +20825,8 @@ snapshots: [email protected]: {} + [email protected]: {} + [email protected]: dependencies: event-target-shim: 5.0.1 @@ -22685,6 +23077,10 @@ snapshots: [email protected]: {} + [email protected]: + dependencies: + dequal: 2.0.3 + [email protected]: dependencies: asap: 2.0.6 @@ -23212,6 +23608,27 @@ snapshots: - eslint-import-resolver-webpack - supports-color + [email protected]([email protected]): + dependencies: + acorn: 8.14.0 + acorn-jsx: 5.3.2([email protected]) + eslint: 9.12.0 + espree: 9.6.1 + estree-util-visit: 2.0.0 + remark-mdx: 3.1.0 + remark-parse: 11.0.0 + remark-stringify: 11.0.0 + synckit: 0.9.2 + tslib: 2.8.1 + unified: 11.0.5 + unified-engine: 11.2.2 + unist-util-visit: 5.0.0 + uvu: 0.5.6 + vfile: 6.0.3 + transitivePeerDependencies: + - bluebird + - supports-color + [email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]([email protected])([email protected]))([email protected])([email protected]))([email protected]): dependencies: debug: 3.2.7 @@ -23361,6 +23778,28 @@ snapshots: safe-regex-test: 1.0.3 string.prototype.includes: 2.0.0 + [email protected]([email protected]): + dependencies: + eslint: 9.12.0 + mdast-util-from-markdown: 0.8.5 + transitivePeerDependencies: + - supports-color + + [email protected]([email protected]): + dependencies: + eslint: 9.12.0 + eslint-mdx: 3.1.5([email protected]) + eslint-plugin-markdown: 3.0.1([email protected]) + remark-mdx: 3.1.0 + remark-parse: 11.0.0 + remark-stringify: 11.0.0 + tslib: 2.8.1 + unified: 11.0.5 + vfile: 6.0.3 + transitivePeerDependencies: + - bluebird + - supports-color + [email protected]([email protected]): dependencies: eslint: 9.12.0 @@ -23662,6 +24101,8 @@ snapshots: [email protected]: {} + [email protected]: {} + [email protected]: dependencies: '@types/estree-jsx': 1.0.0 @@ -23673,6 +24114,11 @@ snapshots: '@types/estree-jsx': 1.0.0 '@types/unist': 2.0.3 + [email protected]: + dependencies: + '@types/estree-jsx': 1.0.0 + '@types/unist': 3.0.3 + [email protected]: {} [email protected]: {} @@ -24748,6 +25194,10 @@ snapshots: dependencies: lru-cache: 6.0.0 + [email protected]: + dependencies: + lru-cache: 10.4.3 + [email protected]: {} [email protected]: {} @@ -24934,6 +25384,8 @@ snapshots: [email protected]: {} + [email protected]: {} + [email protected]: dependencies: queue: 6.0.2 @@ -24974,6 +25426,8 @@ snapshots: pkg-dir: 4.2.0 resolve-cwd: 3.0.0 + [email protected]: {} + [email protected]: {} [email protected]: @@ -24999,6 +25453,8 @@ snapshots: [email protected]: {} + [email protected]: {} + [email protected]: dependencies: glob: 7.1.7 @@ -25426,6 +25882,8 @@ snapshots: [email protected]: {} + [email protected]: {} + [email protected]: {} [email protected]: @@ -26089,6 +26547,8 @@ snapshots: [email protected]: {} + [email protected]: {} + [email protected]: {} [email protected]: {} @@ -26291,6 +26751,8 @@ snapshots: [email protected]: {} + [email protected]: {} + [email protected]: dependencies: chalk: 5.3.0 @@ -26355,6 +26817,13 @@ snapshots: libnpmconfig: 1.2.1 resolve-from: 5.0.0 + [email protected]: + dependencies: + '@npmcli/config': 8.3.4 + import-meta-resolve: 4.1.0 + transitivePeerDependencies: + - bluebird + [email protected]: {} [email protected]: @@ -26625,6 +27094,16 @@ snapshots: '@types/unist': 2.0.3 unist-util-visit: 4.1.2 + [email protected]: + dependencies: + '@types/mdast': 3.0.10 + mdast-util-to-string: 2.0.0 + micromark: 2.11.4 + parse-entities: 2.0.0 + unist-util-stringify-position: 2.0.3 + transitivePeerDependencies: + - supports-color + [email protected]: dependencies: '@types/mdast': 3.0.10 @@ -26642,6 +27121,23 @@ snapshots: transitivePeerDependencies: - supports-color + [email protected]: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + decode-named-character-reference: 1.0.2 + devlop: 1.1.0 + mdast-util-to-string: 4.0.0 + micromark: 4.0.1 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-decode-string: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.1 + unist-util-stringify-position: 4.0.0 + transitivePeerDependencies: + - supports-color + [email protected]: dependencies: strip-indent: 3.0.0 @@ -26656,6 +27152,17 @@ snapshots: transitivePeerDependencies: - supports-color + [email protected]: + dependencies: + '@types/estree-jsx': 1.0.0 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.2 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + [email protected]: dependencies: mdast-util-to-markdown: 0.6.5 @@ -26681,6 +27188,23 @@ snapshots: transitivePeerDependencies: - supports-color + [email protected]: + dependencies: + '@types/estree-jsx': 1.0.0 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.2 + mdast-util-to-markdown: 2.1.2 + parse-entities: 4.0.0 + stringify-entities: 4.0.3 + unist-util-stringify-position: 4.0.0 + vfile-message: 4.0.2 + transitivePeerDependencies: + - supports-color + [email protected]: dependencies: mdast-util-mdx-expression: 0.1.1 @@ -26698,6 +27222,16 @@ snapshots: transitivePeerDependencies: - supports-color + [email protected]: + dependencies: + mdast-util-from-markdown: 2.0.2 + mdast-util-mdx-expression: 2.0.1 + mdast-util-mdx-jsx: 3.1.3 + mdast-util-mdxjs-esm: 2.0.1 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + [email protected]: {} [email protected]: @@ -26710,11 +27244,27 @@ snapshots: transitivePeerDependencies: - supports-color + [email protected]: + dependencies: + '@types/estree-jsx': 1.0.0 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.2 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + [email protected]: dependencies: '@types/mdast': 3.0.10 unist-util-is: 5.2.0 + [email protected]: + dependencies: + '@types/mdast': 4.0.4 + unist-util-is: 6.0.0 + [email protected]: dependencies: '@types/hast': 2.3.1 @@ -26746,6 +27296,18 @@ snapshots: unist-util-visit: 4.1.2 zwitch: 2.0.4 + [email protected]: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + longest-streak: 3.1.0 + mdast-util-phrasing: 4.1.0 + mdast-util-to-string: 4.0.0 + micromark-util-classify-character: 2.0.1 + micromark-util-decode-string: 2.0.1 + unist-util-visit: 5.0.0 + zwitch: 2.0.4 + [email protected]: dependencies: nlcst-to-string: 2.0.4 @@ -26759,6 +27321,10 @@ snapshots: dependencies: '@types/mdast': 3.0.10 + [email protected]: + dependencies: + '@types/mdast': 4.0.4 + [email protected]: {} [email protected]: {} @@ -26911,6 +27477,25 @@ snapshots: micromark-util-types: 1.0.2 uvu: 0.5.6 + [email protected]: + dependencies: + decode-named-character-reference: 1.0.2 + devlop: 1.1.0 + micromark-factory-destination: 2.0.1 + micromark-factory-label: 2.0.1 + micromark-factory-space: 2.0.1 + micromark-factory-title: 2.0.1 + micromark-factory-whitespace: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-chunked: 2.0.1 + micromark-util-classify-character: 2.0.1 + micromark-util-html-tag-name: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-subtokenize: 2.0.3 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.1 + [email protected]: dependencies: micromark: 2.11.4 @@ -26928,6 +27513,17 @@ snapshots: micromark-util-types: 1.0.2 uvu: 0.5.6 + [email protected]: + dependencies: + '@types/estree': 1.0.6 + devlop: 1.1.0 + micromark-factory-mdx-expression: 2.0.2 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-events-to-acorn: 2.0.2 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.1 + [email protected]: dependencies: estree-util-is-identifier-name: 1.1.0 @@ -26949,12 +27545,30 @@ snapshots: uvu: 0.5.6 vfile-message: 3.1.3 + [email protected]: + dependencies: + '@types/acorn': 4.0.6 + '@types/estree': 1.0.6 + devlop: 1.1.0 + estree-util-is-identifier-name: 3.0.0 + micromark-factory-mdx-expression: 2.0.2 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-events-to-acorn: 2.0.2 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.1 + vfile-message: 4.0.2 + [email protected]: {} [email protected]: dependencies: micromark-util-types: 1.0.2 + [email protected]: + dependencies: + micromark-util-types: 2.0.1 + [email protected]: dependencies: micromark: 2.11.4 @@ -26983,6 +27597,18 @@ snapshots: uvu: 0.5.6 vfile-message: 3.1.3 + [email protected]: + dependencies: + '@types/estree': 1.0.6 + devlop: 1.1.0 + micromark-core-commonmark: 2.0.2 + micromark-util-character: 2.1.1 + micromark-util-events-to-acorn: 2.0.2 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.1 + unist-util-position-from-estree: 2.0.0 + vfile-message: 4.0.2 + [email protected]: dependencies: acorn: 8.14.0 @@ -27006,12 +27632,29 @@ snapshots: micromark-util-combine-extensions: 1.0.0 micromark-util-types: 1.0.2 + [email protected]: + dependencies: + acorn: 8.14.0 + acorn-jsx: 5.3.2([email protected]) + micromark-extension-mdx-expression: 3.0.0 + micromark-extension-mdx-jsx: 3.0.1 + micromark-extension-mdx-md: 2.0.0 + micromark-extension-mdxjs-esm: 3.0.0 + micromark-util-combine-extensions: 2.0.1 + micromark-util-types: 2.0.1 + [email protected]: dependencies: micromark-util-character: 1.1.0 micromark-util-symbol: 1.0.1 micromark-util-types: 1.0.2 + [email protected]: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.1 + [email protected]: dependencies: micromark-util-character: 1.1.0 @@ -27019,6 +27662,13 @@ snapshots: micromark-util-types: 1.0.2 uvu: 0.5.6 + [email protected]: + dependencies: + devlop: 1.1.0 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.1 + [email protected]: dependencies: micromark-factory-space: 1.0.0 @@ -27030,11 +27680,28 @@ snapshots: uvu: 0.5.6 vfile-message: 3.1.3 + [email protected]: + dependencies: + '@types/estree': 1.0.6 + devlop: 1.1.0 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-events-to-acorn: 2.0.2 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.1 + unist-util-position-from-estree: 2.0.0 + vfile-message: 4.0.2 + [email protected]: dependencies: micromark-util-character: 1.1.0 micromark-util-types: 1.0.2 + [email protected]: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-types: 2.0.1 + [email protected]: dependencies: micromark-factory-space: 1.0.0 @@ -27043,6 +27710,13 @@ snapshots: micromark-util-types: 1.0.2 uvu: 0.5.6 + [email protected]: + dependencies: + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.1 + [email protected]: dependencies: micromark-factory-space: 1.0.0 @@ -27050,30 +27724,61 @@ snapshots: micromark-util-symbol: 1.0.1 micromark-util-types: 1.0.2 + [email protected]: + dependencies: + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.1 + [email protected]: dependencies: micromark-util-symbol: 1.0.1 micromark-util-types: 1.0.2 + [email protected]: + dependencies: + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.1 + [email protected]: dependencies: micromark-util-symbol: 1.0.1 + [email protected]: + dependencies: + micromark-util-symbol: 2.0.1 + [email protected]: dependencies: micromark-util-character: 1.1.0 micromark-util-symbol: 1.0.1 micromark-util-types: 1.0.2 + [email protected]: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.1 + [email protected]: dependencies: micromark-util-chunked: 1.0.0 micromark-util-types: 1.0.2 + [email protected]: + dependencies: + micromark-util-chunked: 2.0.1 + micromark-util-types: 2.0.1 + [email protected]: dependencies: micromark-util-symbol: 1.0.1 + [email protected]: + dependencies: + micromark-util-symbol: 2.0.1 + [email protected]: dependencies: decode-named-character-reference: 1.0.2 @@ -27081,8 +27786,17 @@ snapshots: micromark-util-decode-numeric-character-reference: 1.0.0 micromark-util-symbol: 1.0.1 + [email protected]: + dependencies: + decode-named-character-reference: 1.0.2 + micromark-util-character: 2.1.1 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-symbol: 2.0.1 + [email protected]: {} + [email protected]: {} + [email protected]: dependencies: '@types/acorn': 4.0.6 @@ -27093,22 +27807,49 @@ snapshots: vfile-location: 4.0.1 vfile-message: 3.1.3 + [email protected]: + dependencies: + '@types/acorn': 4.0.6 + '@types/estree': 1.0.6 + '@types/unist': 3.0.3 + devlop: 1.1.0 + estree-util-visit: 2.0.0 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.1 + vfile-message: 4.0.2 + [email protected]: {} + [email protected]: {} + [email protected]: dependencies: micromark-util-symbol: 1.0.1 + [email protected]: + dependencies: + micromark-util-symbol: 2.0.1 + [email protected]: dependencies: micromark-util-types: 1.0.2 + [email protected]: + dependencies: + micromark-util-types: 2.0.1 + [email protected]: dependencies: micromark-util-character: 1.1.0 micromark-util-encode: 1.0.1 micromark-util-symbol: 1.0.1 + [email protected]: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-encode: 2.0.1 + micromark-util-symbol: 2.0.1 + [email protected]: dependencies: micromark-util-chunked: 1.0.0 @@ -27116,10 +27857,21 @@ snapshots: micromark-util-types: 1.0.2 uvu: 0.5.6 + [email protected]: + dependencies: + devlop: 1.1.0 + micromark-util-chunked: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.1 + [email protected]: {} + [email protected]: {} + [email protected]: {} + [email protected]: {} + [email protected]: dependencies: debug: 4.1.1 @@ -27149,6 +27901,28 @@ snapshots: transitivePeerDependencies: - supports-color + [email protected]: + dependencies: + '@types/debug': 4.1.5 + debug: 4.1.1 + decode-named-character-reference: 1.0.2 + devlop: 1.1.0 + micromark-core-commonmark: 2.0.2 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-chunked: 2.0.1 + micromark-util-combine-extensions: 2.0.1 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-encode: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-sanitize-uri: 2.0.1 + micromark-util-subtokenize: 2.0.3 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.1 + transitivePeerDependencies: + - supports-color + [email protected]: dependencies: braces: 3.0.2 @@ -27505,6 +28279,10 @@ snapshots: dependencies: abbrev: 1.1.1 + [email protected]: + dependencies: + abbrev: 2.0.0 + [email protected]: {} [email protected]: @@ -27521,6 +28299,12 @@ snapshots: semver: 7.6.3 validate-npm-package-license: 3.0.4 + [email protected]: + dependencies: + hosted-git-info: 7.0.2 + semver: 7.6.3 + validate-npm-package-license: 3.0.4 + [email protected]: {} [email protected]: {} @@ -27537,6 +28321,10 @@ snapshots: dependencies: semver: 7.6.3 + [email protected]: + dependencies: + semver: 7.6.3 + [email protected]: dependencies: byline: 5.0.0 @@ -27550,6 +28338,15 @@ snapshots: [email protected]: {} + [email protected]: {} + + [email protected]: + dependencies: + hosted-git-info: 7.0.2 + proc-log: 4.2.0 + semver: 7.6.3 + validate-npm-package-name: 5.0.1 + [email protected]: dependencies: hosted-git-info: 3.0.8 @@ -27569,6 +28366,13 @@ snapshots: npm-package-arg: 8.1.0 semver: 7.6.3 + [email protected]: + dependencies: + npm-install-checks: 6.3.0 + npm-normalize-package-bin: 3.0.1 + npm-package-arg: 11.0.3 + semver: 7.6.3 + [email protected]: dependencies: '@npmcli/ci-detect': 1.3.0 @@ -28013,6 +28817,14 @@ snapshots: json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.1.6 + [email protected]: + dependencies: + '@babel/code-frame': 7.22.5 + error-ex: 1.3.2 + json-parse-even-better-errors: 3.0.2 + lines-and-columns: 2.0.4 + type-fest: 3.13.1 + [email protected]: dependencies: nlcst-to-string: 2.0.4 @@ -28941,6 +29753,8 @@ snapshots: dependencies: parse-ms: 2.1.0 + [email protected]: {} + [email protected]: {} [email protected]: {} @@ -29194,7 +30008,7 @@ snapshots: react: 19.0.0-rc-f90a6bcc-20240827 react-remove-scroll-bar: 2.3.6(@types/[email protected])([email protected]) react-style-singleton: 2.2.1(@types/[email protected])([email protected]) - tslib: 2.7.0 + tslib: 2.8.1 use-callback-ref: 1.3.2(@types/[email protected])([email protected]) use-sidecar: 1.1.2(@types/[email protected])([email protected]) optionalDependencies: @@ -29297,6 +30111,11 @@ snapshots: json-parse-even-better-errors: 2.3.1 npm-normalize-package-bin: 1.0.1 + [email protected]: + dependencies: + json-parse-even-better-errors: 3.0.2 + npm-normalize-package-bin: 3.0.1 + [email protected]: dependencies: glob: 7.1.7 @@ -29603,6 +30422,13 @@ snapshots: transitivePeerDependencies: - supports-color + [email protected]: + dependencies: + mdast-util-mdx: 3.0.0 + micromark-extension-mdxjs: 3.0.0 + transitivePeerDependencies: + - supports-color + [email protected]: dependencies: mdast-comment-marker: 1.1.2 @@ -29616,6 +30442,15 @@ snapshots: transitivePeerDependencies: - supports-color + [email protected]: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-from-markdown: 2.0.2 + micromark-util-types: 2.0.1 + unified: 11.0.5 + transitivePeerDependencies: + - supports-color + [email protected]: dependencies: ccount: 1.1.0 @@ -29646,6 +30481,12 @@ snapshots: dependencies: mdast-util-to-nlcst: 4.0.1 + [email protected]: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-to-markdown: 2.1.2 + unified: 11.0.5 + [email protected]: dependencies: parse-git-config: 1.1.1 @@ -30446,6 +31287,12 @@ snapshots: emoji-regex: 9.2.2 strip-ansi: 7.1.0 + [email protected]: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 10.3.0 + strip-ansi: 7.1.0 + [email protected]: dependencies: emoji-regex: 10.3.0 @@ -30683,6 +31530,8 @@ snapshots: dependencies: has-flag: 4.0.0 + [email protected]: {} + [email protected]: {} [email protected]: {} @@ -31036,8 +31885,6 @@ snapshots: [email protected]: {} - [email protected]: {} - [email protected]: {} [email protected]([email protected]): @@ -31115,6 +31962,8 @@ snapshots: [email protected]: {} + [email protected]: {} + [email protected]: {} [email protected]: @@ -31234,6 +32083,33 @@ snapshots: transitivePeerDependencies: - supports-color + [email protected]: + dependencies: + '@types/concat-stream': 2.0.3 + '@types/debug': 4.1.5 + '@types/is-empty': 1.2.3 + '@types/node': 20.17.6 + '@types/unist': 3.0.3 + concat-stream: 2.0.0 + debug: 4.1.1 + extend: 3.0.2 + glob: 10.4.5 + ignore: 6.0.2 + is-empty: 1.2.0 + is-plain-obj: 4.1.0 + load-plugin: 6.0.3 + parse-json: 7.1.1 + trough: 2.1.0 + unist-util-inspect: 8.1.0 + vfile: 6.0.3 + vfile-message: 4.0.2 + vfile-reporter: 8.1.1 + vfile-statistics: 3.0.0 + yaml: 2.3.4 + transitivePeerDependencies: + - bluebird + - supports-color + [email protected]: dependencies: concat-stream: 2.0.0 @@ -31271,6 +32147,16 @@ snapshots: trough: 2.1.0 vfile: 5.3.6 + [email protected]: + dependencies: + '@types/unist': 3.0.3 + bail: 2.0.2 + devlop: 1.1.0 + extend: 3.0.2 + is-plain-obj: 4.1.0 + trough: 2.1.0 + vfile: 6.0.3 + [email protected]: dependencies: '@types/unist': 2.0.3 @@ -31307,10 +32193,18 @@ snapshots: dependencies: is-empty: 1.2.0 + [email protected]: + dependencies: + '@types/unist': 3.0.3 + [email protected]: {} [email protected]: {} + [email protected]: + dependencies: + '@types/unist': 3.0.3 + [email protected]: dependencies: array-iterate: 1.1.4 @@ -31319,6 +32213,10 @@ snapshots: dependencies: '@types/unist': 2.0.3 + [email protected]: + dependencies: + '@types/unist': 3.0.3 + [email protected]: {} [email protected]: @@ -31346,6 +32244,10 @@ snapshots: dependencies: '@types/unist': 2.0.3 + [email protected]: + dependencies: + '@types/unist': 3.0.3 + [email protected]: {} [email protected]: @@ -31358,6 +32260,11 @@ snapshots: '@types/unist': 2.0.3 unist-util-is: 5.2.0 + [email protected]: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.0 + [email protected]: dependencies: '@types/unist': 2.0.3 @@ -31370,6 +32277,12 @@ snapshots: unist-util-is: 5.2.0 unist-util-visit-parents: 5.1.3 + [email protected]: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.0 + unist-util-visit-parents: 6.0.1 + [email protected]([email protected]): optionalDependencies: react: 19.0.0-rc-7283a213-20241206 @@ -31579,6 +32492,11 @@ snapshots: '@types/unist': 2.0.3 unist-util-stringify-position: 3.0.3 + [email protected]: + dependencies: + '@types/unist': 3.0.3 + unist-util-stringify-position: 4.0.0 + [email protected]: dependencies: repeat-string: 1.6.1 @@ -31588,10 +32506,31 @@ snapshots: vfile-sort: 2.2.2 vfile-statistics: 1.1.4 + [email protected]: + dependencies: + '@types/supports-color': 8.1.3 + string-width: 6.1.0 + supports-color: 9.4.0 + unist-util-stringify-position: 4.0.0 + vfile: 6.0.3 + vfile-message: 4.0.2 + vfile-sort: 4.0.0 + vfile-statistics: 3.0.0 + [email protected]: {} + [email protected]: + dependencies: + vfile: 6.0.3 + vfile-message: 4.0.2 + [email protected]: {} + [email protected]: + dependencies: + vfile: 6.0.3 + vfile-message: 4.0.2 + [email protected]: dependencies: '@types/unist': 2.0.3 @@ -31606,6 +32545,11 @@ snapshots: unist-util-stringify-position: 3.0.3 vfile-message: 3.1.3 + [email protected]: + dependencies: + '@types/unist': 3.0.3 + vfile-message: 4.0.2 + [email protected]: {} [email protected]: @@ -31620,6 +32564,8 @@ snapshots: transitivePeerDependencies: - supports-color + [email protected]: {} + [email protected]: dependencies: makeerror: 1.0.12 @@ -31840,6 +32786,10 @@ snapshots: dependencies: isexe: 2.0.0 + [email protected]: + dependencies: + isexe: 3.1.1 + [email protected]: dependencies: string-width: 4.2.3
tracing
https://github.com/tokio-rs/tracing
bcb7326e59c3efb91af1624df32ed21fca9edc90
Eliza Weisman
2020-04-08 03:37:05
chore: remove outdated example (#671)
This example is outdated and should have been removed when `tracing-fmt` was merged into `tracing-subscriber`. There is another example in the `examples` crate, [`fmt-custom-fields`][1], which demonstrates the same usage, but uses the current APIs. Therefore, we can just delete the old example. [1]: https://github.com/tokio-rs/tracing/blob/master/examples/examples/fmt-custom-field.rs
chore: remove outdated example (#671) This example is outdated and should have been removed when `tracing-fmt` was merged into `tracing-subscriber`. There is another example in the `examples` crate, [`fmt-custom-fields`][1], which demonstrates the same usage, but uses the current APIs. Therefore, we can just delete the old example. [1]: https://github.com/tokio-rs/tracing/blob/master/examples/examples/fmt-custom-field.rs Fixes: #444 Signed-off-by: Eliza Weisman <[email protected]>
diff --git a/tracing-fmt/examples/custom_visitor.rs b/tracing-fmt/examples/custom_visitor.rs deleted file mode 100644 index 2327adf56c..0000000000 --- a/tracing-fmt/examples/custom_visitor.rs +++ /dev/null @@ -1,70 +0,0 @@ -#![deny(rust_2018_idioms)] -use tracing::{debug, error, info, span, trace, warn, Level}; - -#[tracing::instrument] -fn shave(yak: usize) -> bool { - debug!( - message = "hello! I'm gonna shave a yak.", - excitement = "yay!" - ); - if yak == 3 { - warn!(target: "yak_events", "could not locate yak!"); - false - } else { - trace!(target: "yak_events", "yak shaved successfully"); - true - } -} - -fn shave_all(yaks: usize) -> usize { - let span = span!(Level::TRACE, "shaving_yaks", yaks_to_shave = yaks); - let _enter = span.enter(); - - info!("shaving yaks"); - - let mut num_shaved = 0; - for yak in 1..=yaks { - let shaved = shave(yak); - trace!(target: "yak_events", yak, shaved); - - if !shaved { - error!(message = "failed to shave yak!", yak); - } else { - num_shaved += 1; - } - - trace!(target: "yak_events", yaks_shaved = num_shaved); - } - - num_shaved -} - -fn main() { - use tracing_fmt::format; - use tracing_subscriber::prelude::*; - - let formatter = - // Construct a custom formatter for `Debug` fields - format::debug_fn(|writer, field, value| write!(writer, "{}: {:?}", field, value)) - // Use `tracing-subscriber`'s extension traits to add delimiters - // between fields, and ensure that fields named "message" are - // formatted using fmt::Display. - .display_messages() - .delimited(", "); - - let subscriber = tracing_fmt::FmtSubscriber::builder() - .fmt_fields(formatter) - .finish(); - - tracing::subscriber::with_default(subscriber, || { - let number_of_yaks = 3; - debug!("preparing to shave {} yaks", number_of_yaks); - - let number_shaved = shave_all(number_of_yaks); - - debug!( - message = "yak shaving completed.", - all_yaks_shaved = number_shaved == number_of_yaks, - ); - }); -}
angular
https://github.com/angular/angular
61e9bb5715da42b72edc5b2484934db9741dec00
Joe Martin (Crowdstaffing)
2021-09-15 04:21:30
docs: update link (#43451)
Update link per review. PR Close #43451
docs: update link (#43451) Update link per review. PR Close #43451
diff --git a/aio/content/guide/deprecations.md b/aio/content/guide/deprecations.md index 881786da02de0..645c4795f0793 100644 --- a/aio/content/guide/deprecations.md +++ b/aio/content/guide/deprecations.md @@ -170,7 +170,7 @@ For more information, see [/deep/, >>>, and ::ng-deep](guide/component-styles#de {@a template-tag} ### &lt;template&gt; tag -The `<template>` tag was deprecated in v4 to avoid colliding with the DOM's element of the same name (such as when using web components). Use `<ng-template>` instead. For more information, see the [Ahead-of-Time Compilation](guide/angular-compiler-options#enablelegacytemplate) guide. +The `<template>` tag was deprecated in v4 to avoid colliding with the DOM's element of the same name (such as when using web components). Use `<ng-template>` instead. For more information, see the [Ahead-of-Time Compilation](guide/aot-compiler) guide.
databend
https://github.com/databendlabs/databend
369a635a7111d7a9e2bf109a600964a313f0d8b3
zhya
2025-03-03 09:53:16
fix: explain update sql panic (#17474)
* fix explain update panic * add test * fix * fix * make lint * fix * fix * fix * fix * fix * fix * fix test * fix test * fix test * fix * fix * add test * fix * fix * fix test * fix test * fix * fix test
fix: explain update sql panic (#17474) * fix explain update panic * add test * fix * fix * make lint * fix * fix * fix * fix * fix * fix * fix test * fix test * fix test * fix * fix * add test * fix * fix * fix test * fix test * fix * fix test
diff --git a/src/query/service/src/interpreters/interpreter_explain.rs b/src/query/service/src/interpreters/interpreter_explain.rs index bed6f167d7dcd..247152ca244da 100644 --- a/src/query/service/src/interpreters/interpreter_explain.rs +++ b/src/query/service/src/interpreters/interpreter_explain.rs @@ -33,6 +33,7 @@ use databend_common_pipeline_core::processors::PlanProfile; use databend_common_pipeline_core::ExecutionInfo; use databend_common_sql::binder::ExplainConfig; use databend_common_sql::executor::format_partial_tree; +use databend_common_sql::executor::MutationBuildInfo; use databend_common_sql::optimizer::ColumnSet; use databend_common_sql::plans::Mutation; use databend_common_sql::BindContext; @@ -46,6 +47,7 @@ use serde_json; use super::InsertMultiTableInterpreter; use super::InterpreterFactory; use crate::interpreters::interpreter::on_execution_finished; +use crate::interpreters::interpreter_mutation::build_mutation_info; use crate::interpreters::interpreter_mutation::MutationInterpreter; use crate::interpreters::Interpreter; use crate::pipelines::executor::ExecutorSettings; @@ -146,7 +148,7 @@ impl Interpreter for ExplainInterpreter { schema.clone(), metadata.clone(), )?; - let plan = interpreter.build_physical_plan(&mutation, None).await?; + let plan = interpreter.build_physical_plan(&mutation, true).await?; self.explain_physical_plan(&plan, metadata, &None).await? } _ => self.explain_plan(&self.plan)?, @@ -181,16 +183,20 @@ impl Interpreter for ExplainInterpreter { s_expr, metadata, bind_context.column_set(), + None, *ignore_result, ) .await? } Plan::DataMutation { s_expr, .. } => { let plan: Mutation = s_expr.plan().clone().try_into()?; + let mutation_build_info = + build_mutation_info(self.ctx.clone(), &plan, true).await?; self.explain_analyze( s_expr.child(0)?, &plan.metadata, *plan.required_columns.clone(), + Some(mutation_build_info), true, ) .await? @@ -437,9 +443,13 @@ impl ExplainInterpreter { s_expr: &SExpr, metadata: &MetadataRef, required: ColumnSet, + mutation_build_info: Option<MutationBuildInfo>, ignore_result: bool, ) -> Result<Vec<DataBlock>> { let mut builder = PhysicalPlanBuilder::new(metadata.clone(), self.ctx.clone(), true); + if let Some(build_info) = mutation_build_info { + builder.set_mutation_build_info(build_info); + } let plan = builder.build(s_expr, required).await?; let build_res = build_query_pipeline(&self.ctx, &[], &plan, ignore_result).await?; @@ -537,7 +547,7 @@ impl ExplainInterpreter { schema, mutation.metadata.clone(), )?; - let plan = interpreter.build_physical_plan(&mutation, None).await?; + let plan = interpreter.build_physical_plan(&mutation, true).await?; let root_fragment = Fragmenter::try_create(self.ctx.clone())?.build_fragment(&plan)?; let mut fragments_actions = QueryFragmentsActions::create(self.ctx.clone()); diff --git a/src/query/service/src/interpreters/interpreter_mutation.rs b/src/query/service/src/interpreters/interpreter_mutation.rs index 16584fdead74a..85bd3e62c1e61 100644 --- a/src/query/service/src/interpreters/interpreter_mutation.rs +++ b/src/query/service/src/interpreters/interpreter_mutation.rs @@ -12,11 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +use std::collections::HashSet; use std::sync::Arc; use databend_common_catalog::lock::LockTableOption; +use databend_common_catalog::plan::PartStatistics; use databend_common_catalog::plan::Partitions; -use databend_common_catalog::plan::PartitionsShuffleKind; use databend_common_catalog::table::TableExt; use databend_common_exception::ErrorCode; use databend_common_exception::Result; @@ -27,7 +28,6 @@ use databend_common_expression::FromData; use databend_common_expression::SendableDataBlockStream; use databend_common_pipeline_core::processors::ProcessorPtr; use databend_common_pipeline_sinks::EmptySink; -use databend_common_pipeline_sources::EmptySource; use databend_common_sql::binder::MutationStrategy; use databend_common_sql::binder::MutationType; use databend_common_sql::executor::physical_plans::create_push_down_filters; @@ -39,9 +39,7 @@ use databend_common_sql::optimizer::SExpr; use databend_common_sql::planner::MetadataRef; use databend_common_sql::plans; use databend_common_sql::plans::Mutation; -use databend_common_storage::MutationStatus; use databend_common_storages_factory::Table; -use databend_common_storages_fuse::operations::TruncateMode; use databend_common_storages_fuse::FuseTable; use databend_common_storages_fuse::TableContext; use databend_storages_common_table_meta::meta::TableSnapshot; @@ -97,42 +95,8 @@ impl Interpreter for MutationInterpreter { let mutation: Mutation = self.s_expr.plan().clone().try_into()?; - let table = self - .ctx - .get_table( - &mutation.catalog_name, - &mutation.database_name, - &mutation.table_name, - ) - .await?; - // Check if the table supports mutation. - table.check_mutable()?; - let fuse_table = table.as_any().downcast_ref::<FuseTable>().ok_or_else(|| { - ErrorCode::Unimplemented(format!( - "table {}, engine type {}, does not support {}", - table.name(), - table.get_table_info().engine(), - mutation.mutation_type, - )) - })?; - - let table_snapshot = fuse_table.read_table_snapshot().await?; - if let Some(build_res) = self - .fast_mutation(&mutation, fuse_table, &table_snapshot) - .await? - { - return Ok(build_res); - } - - // Prepare MutationBuildInfo for PhysicalPlanBuilder to build Mutation physical plan. - let mutation_build_info = self - .build_mutation_info(&mutation, fuse_table, table_snapshot) - .await?; - // Build physical plan. - let physical_plan = self - .build_physical_plan(&mutation, Some(mutation_build_info)) - .await?; + let physical_plan = self.build_physical_plan(&mutation, false).await?; let query_plan = physical_plan .format(self.metadata.clone(), Default::default())? @@ -143,6 +107,11 @@ impl Interpreter for MutationInterpreter { // Build pipeline. let mut build_res = build_query_pipeline_without_render_result_set(&self.ctx, &physical_plan).await?; + if mutation.no_effect { + build_res + .main_pipeline + .add_sink(|input| Ok(ProcessorPtr::create(EmptySink::create(input))))?; + } // Execute hook. self.execute_hook(&mutation, &mut build_res).await; @@ -194,62 +163,16 @@ impl MutationInterpreter { }; } - pub async fn build_mutation_info( - &self, - mutation: &Mutation, - fuse_table: &FuseTable, - table_snapshot: Option<Arc<TableSnapshot>>, - ) -> Result<MutationBuildInfo> { - let table_info = fuse_table.get_table_info().clone(); - let update_stream_meta = dml_build_update_stream_req(self.ctx.clone()).await?; - let partitions = self - .mutation_source_partitions(mutation, fuse_table, table_snapshot.clone()) - .await?; - Ok(MutationBuildInfo { - table_info, - table_snapshot, - update_stream_meta, - partitions, - }) - } - pub async fn build_physical_plan( &self, mutation: &Mutation, - mutation_build_info: Option<MutationBuildInfo>, + dry_run: bool, ) -> Result<PhysicalPlan> { - let mutation_build_info = if let Some(mutation_build_info) = mutation_build_info { - mutation_build_info - } else { - let table = self - .ctx - .get_table( - &mutation.catalog_name, - &mutation.database_name, - &mutation.table_name, - ) - .await?; - - // Check if the table supports DataMutation. - table.check_mutable()?; - let fuse_table = table.as_any().downcast_ref::<FuseTable>().ok_or_else(|| { - ErrorCode::Unimplemented(format!( - "table {}, engine type {}, does not support {}", - table.name(), - table.get_table_info().engine(), - mutation.mutation_type, - )) - })?; - - // Prepare MutationBuildInfo for PhysicalPlanBuilder to build DataMutation physical plan. - let table_snapshot = fuse_table.read_table_snapshot().await?; - self.build_mutation_info(mutation, fuse_table, table_snapshot) - .await? - }; - + // Prepare MutationBuildInfo for PhysicalPlanBuilder to build DataMutation physical plan. + let mutation_build_info = build_mutation_info(self.ctx.clone(), mutation, dry_run).await?; // Build physical plan. let mut builder = - PhysicalPlanBuilder::new(mutation.metadata.clone(), self.ctx.clone(), false); + PhysicalPlanBuilder::new(mutation.metadata.clone(), self.ctx.clone(), dry_run); builder.set_mutation_build_info(mutation_build_info); builder .build(&self.s_expr, *mutation.required_columns.clone()) @@ -272,121 +195,95 @@ impl MutationInterpreter { } Ok(vec![DataBlock::new_from_columns(columns)]) } +} - async fn fast_mutation( - &self, - mutation: &Mutation, - fuse_table: &FuseTable, - snapshot: &Option<Arc<TableSnapshot>>, - ) -> Result<Option<PipelineBuildResult>> { - // Check if the filter is a constant. - let mut truncate_table = mutation.truncate_table; - if let Some(filter) = &mutation.direct_filter - && filter.used_columns().is_empty() - { - let filters = create_push_down_filters(filter)?; - let filter_result = fuse_table.try_eval_const( - self.ctx.clone(), - &fuse_table.schema(), - &filters.filter, - )?; - if mutation.mutation_type == MutationType::Delete && filter_result { - // The delete condition is always true, truncate the table. - truncate_table = true; - } else if !filter_result { - // The update/delete condition is always false, do nothing. - return self.no_effect_mutation(); - } - } - - if mutation.mutation_type == MutationType::Merge { - return Ok(None); - } - - // Check if table is empty. - let Some(snapshot) = snapshot else { - // No snapshot, no mutation. - return self.no_effect_mutation(); - }; - if snapshot.summary.row_count == 0 { - // Empty snapshot, no mutation. - return self.no_effect_mutation(); - } - - if mutation.mutation_type == MutationType::Delete { - if truncate_table { - let mut build_res = PipelineBuildResult::create(); - self.ctx.add_mutation_status(MutationStatus { - insert_rows: 0, - deleted_rows: snapshot.summary.row_count, - update_rows: 0, - }); - // deleting the whole table... just a truncate - fuse_table - .do_truncate( - self.ctx.clone(), - &mut build_res.main_pipeline, - TruncateMode::Delete, - ) - .await?; - Ok(Some(build_res)) - } else { - Ok(None) - } - } else { - Ok(None) - } - } +pub async fn build_mutation_info( + ctx: Arc<QueryContext>, + mutation: &Mutation, + dry_run: bool, +) -> Result<MutationBuildInfo> { + let table = ctx + .get_table( + &mutation.catalog_name, + &mutation.database_name, + &mutation.table_name, + ) + .await?; + // Check if the table supports mutation. + table.check_mutable()?; + let fuse_table = table.as_any().downcast_ref::<FuseTable>().ok_or_else(|| { + ErrorCode::Unimplemented(format!( + "table {}, engine type {}, does not support {}", + table.name(), + table.get_table_info().engine(), + mutation.mutation_type, + )) + })?; + + let table_snapshot = fuse_table.read_table_snapshot().await?; + let table_info = fuse_table.get_table_info().clone(); + let update_stream_meta = dml_build_update_stream_req(ctx.clone()).await?; + let (statistics, partitions) = + mutation_source_partitions(ctx, mutation, fuse_table, table_snapshot.clone(), dry_run) + .await?; + Ok(MutationBuildInfo { + table_info, + table_snapshot, + update_stream_meta, + partitions, + statistics, + }) +} - fn no_effect_mutation(&self) -> Result<Option<PipelineBuildResult>> { - let mut build_res = PipelineBuildResult::create(); - build_res.main_pipeline.add_source(EmptySource::create, 1)?; - build_res - .main_pipeline - .add_sink(|input| Ok(ProcessorPtr::create(EmptySink::create(input))))?; - Ok(Some(build_res)) +async fn mutation_source_partitions( + ctx: Arc<QueryContext>, + mutation: &Mutation, + fuse_table: &FuseTable, + table_snapshot: Option<Arc<TableSnapshot>>, + dry_run: bool, +) -> Result<(PartStatistics, Partitions)> { + if mutation.no_effect + || mutation.strategy != MutationStrategy::Direct + || mutation.truncate_table + { + return Ok(Default::default()); } - async fn mutation_source_partitions( - &self, - mutation: &Mutation, - fuse_table: &FuseTable, - table_snapshot: Option<Arc<TableSnapshot>>, - ) -> Result<Option<Partitions>> { - if mutation.strategy == MutationStrategy::Direct { - let Some(table_snapshot) = table_snapshot else { - return Ok(Some(Partitions::create(PartitionsShuffleKind::Mod, vec![]))); - }; - let (filters, filter_used_columns) = if let Some(filter) = &mutation.direct_filter { - ( - Some(create_push_down_filters(filter)?), - filter.used_columns().into_iter().collect(), - ) - } else { - (None, vec![]) - }; - let (is_lazy, is_delete) = if mutation.mutation_type == MutationType::Delete { - let cluster = self.ctx.get_cluster(); - let is_lazy = - !cluster.is_empty() && table_snapshot.segments.len() >= cluster.nodes.len(); - (is_lazy, true) - } else { - (false, false) - }; - Ok(Some( - fuse_table - .mutation_read_partitions( - self.ctx.clone(), - table_snapshot, - filter_used_columns, - filters, - is_lazy, - is_delete, - ) - .await?, - )) - } else { - Ok(None) - } - } + let Some(table_snapshot) = table_snapshot else { + return Ok(Default::default()); + }; + + let (filters, filter_used_columns) = if !mutation.direct_filter.is_empty() { + let filters = + create_push_down_filters(&ctx.get_function_context()?, &mutation.direct_filter)?; + let filter_used_columns = mutation + .direct_filter + .iter() + .flat_map(|expr| expr.used_columns()) + .collect::<HashSet<_>>() + .into_iter() + .collect(); + (Some(filters), filter_used_columns) + } else { + (None, vec![]) + }; + + let (is_lazy, is_delete) = if mutation.mutation_type == MutationType::Delete { + let cluster = ctx.get_cluster(); + let is_lazy = + !dry_run && !cluster.is_empty() && table_snapshot.segments.len() >= cluster.nodes.len(); + (is_lazy, true) + } else { + (false, false) + }; + fuse_table + .mutation_read_partitions( + ctx, + table_snapshot, + filter_used_columns, + filters, + is_lazy, + is_delete, + ) + .await } diff --git a/src/query/service/src/interpreters/interpreter_replace.rs b/src/query/service/src/interpreters/interpreter_replace.rs index f83e0ec4aafb4..a70e85bc3bd39 100644 --- a/src/query/service/src/interpreters/interpreter_replace.rs +++ b/src/query/service/src/interpreters/interpreter_replace.rs @@ -27,6 +27,7 @@ use databend_common_meta_app::schema::TableInfo; use databend_common_meta_app::schema::UpdateStreamMetaReq; use databend_common_sql::executor::cast_expr_to_non_null_boolean; use databend_common_sql::executor::physical_plans::CommitSink; +use databend_common_sql::executor::physical_plans::CommitType; use databend_common_sql::executor::physical_plans::Exchange; use databend_common_sql::executor::physical_plans::FragmentKind; use databend_common_sql::executor::physical_plans::MutationKind; @@ -356,9 +357,11 @@ impl ReplaceInterpreter { input: root, snapshot: base_snapshot, table_info: table_info.clone(), - mutation_kind: MutationKind::Replace, + commit_type: CommitType::Mutation { + kind: MutationKind::Replace, + merge_meta: false, + }, update_stream_meta: update_stream_meta.clone(), - merge_meta: false, deduplicated_label: unsafe { self.ctx.get_settings().get_deduplicate_label()? }, plan_id: u32::MAX, recluster_info: None, diff --git a/src/query/service/src/interpreters/interpreter_table_drop.rs b/src/query/service/src/interpreters/interpreter_table_drop.rs index 0282b5ea5141a..c3d34c7fefd89 100644 --- a/src/query/service/src/interpreters/interpreter_table_drop.rs +++ b/src/query/service/src/interpreters/interpreter_table_drop.rs @@ -21,7 +21,7 @@ use databend_common_management::RoleApi; use databend_common_meta_app::principal::OwnershipObject; use databend_common_meta_app::schema::DropTableByIdReq; use databend_common_sql::plans::DropTablePlan; -use databend_common_storages_fuse::operations::TruncateMode; +use databend_common_sql::plans::TruncateMode; use databend_common_storages_fuse::FuseTable; use databend_common_storages_stream::stream_table::STREAM_ENGINE; use databend_common_storages_view::view_table::VIEW_ENGINE; diff --git a/src/query/service/src/pipelines/builders/builder_commit.rs b/src/query/service/src/pipelines/builders/builder_commit.rs index e4becfd76f551..5d7f16d84701c 100644 --- a/src/query/service/src/pipelines/builders/builder_commit.rs +++ b/src/query/service/src/pipelines/builders/builder_commit.rs @@ -12,14 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +use databend_common_catalog::table_context::TableContext; use databend_common_exception::Result; +use databend_common_pipeline_core::ExecutionInfo; use databend_common_pipeline_transforms::processors::TransformPipelineHelper; use databend_common_sql::executor::physical_plans::CommitSink as PhysicalCommitSink; +use databend_common_sql::executor::physical_plans::CommitType; use databend_common_sql::executor::physical_plans::MutationKind; +use databend_common_sql::plans::TruncateMode; use databend_common_storages_fuse::operations::CommitSink; use databend_common_storages_fuse::operations::MutationGenerator; use databend_common_storages_fuse::operations::TableMutationAggregator; use databend_common_storages_fuse::operations::TransformMergeCommitMeta; +use databend_common_storages_fuse::operations::TruncateGenerator; use databend_common_storages_fuse::FuseTable; use databend_storages_common_table_meta::readers::snapshot_reader::TableSnapshotAccessor; @@ -30,51 +35,91 @@ impl PipelineBuilder { self.build_pipeline(&plan.input)?; let table = self.ctx.build_table_by_table_info(&plan.table_info, None)?; let table = FuseTable::try_from_table(table.as_ref())?; - let cluster_key_id = table.cluster_key_id(); self.main_pipeline.try_resize(1)?; - if plan.merge_meta { - self.main_pipeline - .add_accumulating_transformer(|| TransformMergeCommitMeta::create(cluster_key_id)); - } else { - self.main_pipeline.add_async_accumulating_transformer(|| { - let base_segments = if matches!( - plan.mutation_kind, - MutationKind::Compact | MutationKind::Insert | MutationKind::Recluster - ) { - vec![] - } else { - plan.snapshot.segments().to_vec() + match &plan.commit_type { + CommitType::Truncate { mode } => { + let prev_snapshot_id = match mode { + TruncateMode::Delete => None, + _ => plan.snapshot.as_ref().map(|snapshot| snapshot.snapshot_id), }; + let snapshot_gen = TruncateGenerator::new(mode.clone()); + if matches!(mode, TruncateMode::Delete) { + let mutation_status = self.ctx.get_mutation_status(); + let deleted_rows = plan + .snapshot + .as_ref() + .map_or(0, |snapshot| snapshot.summary.row_count); + self.main_pipeline + .set_on_finished(move |info: &ExecutionInfo| match &info.res { + Ok(_) => { + mutation_status.write().deleted_rows = deleted_rows; + Ok(()) + } + Err(error_code) => Err(error_code.clone()), + }); + } + self.main_pipeline.add_sink(|input| { + CommitSink::try_create( + table, + self.ctx.clone(), + None, + plan.update_stream_meta.clone(), + snapshot_gen.clone(), + input, + None, + prev_snapshot_id, + plan.deduplicated_label.clone(), + ) + }) + } + CommitType::Mutation { kind, merge_meta } => { + if *merge_meta { + let cluster_key_id = table.cluster_key_id(); + self.main_pipeline.add_accumulating_transformer(|| { + TransformMergeCommitMeta::create(cluster_key_id) + }); + } else { + self.main_pipeline.add_async_accumulating_transformer(|| { + let base_segments = if matches!( + kind, + MutationKind::Compact | MutationKind::Insert | MutationKind::Recluster + ) { + vec![] + } else { + plan.snapshot.segments().to_vec() + }; - // extract re-cluster related mutations from physical plan - let recluster_info = plan.recluster_info.clone().unwrap_or_default(); + // extract re-cluster related mutations from physical plan + let recluster_info = plan.recluster_info.clone().unwrap_or_default(); - TableMutationAggregator::create( - table, - self.ctx.clone(), - base_segments, - recluster_info.merged_blocks, - recluster_info.removed_segment_indexes, - recluster_info.removed_statistics, - plan.mutation_kind, - ) - }); - } + TableMutationAggregator::create( + table, + self.ctx.clone(), + base_segments, + recluster_info.merged_blocks, + recluster_info.removed_segment_indexes, + recluster_info.removed_statistics, + *kind, + ) + }); + } - let snapshot_gen = MutationGenerator::new(plan.snapshot.clone(), plan.mutation_kind); - self.main_pipeline.add_sink(|input| { - CommitSink::try_create( - table, - self.ctx.clone(), - None, - plan.update_stream_meta.clone(), - snapshot_gen.clone(), - input, - None, - None, - plan.deduplicated_label.clone(), - ) - }) + let snapshot_gen = MutationGenerator::new(plan.snapshot.clone(), *kind); + self.main_pipeline.add_sink(|input| { + CommitSink::try_create( + table, + self.ctx.clone(), + None, + plan.update_stream_meta.clone(), + snapshot_gen.clone(), + input, + None, + None, + plan.deduplicated_label.clone(), + ) + }) + } + } } } diff --git a/src/query/service/src/pipelines/builders/builder_mutation_source.rs b/src/query/service/src/pipelines/builders/builder_mutation_source.rs index ee06e7362b7d7..9ba3d330cf7d1 100644 --- a/src/query/service/src/pipelines/builders/builder_mutation_source.rs +++ b/src/query/service/src/pipelines/builders/builder_mutation_source.rs @@ -18,10 +18,14 @@ use databend_common_catalog::plan::Projection; use databend_common_catalog::table::Table; use databend_common_catalog::table_context::TableContext; use databend_common_exception::Result; +use databend_common_expression::DataBlock; +use databend_common_pipeline_sources::OneBlockSource; use databend_common_pipeline_transforms::processors::TransformPipelineHelper; use databend_common_sql::binder::MutationType; use databend_common_sql::executor::physical_plans::MutationSource; use databend_common_sql::StreamContext; +use databend_common_storages_fuse::operations::CommitMeta; +use databend_common_storages_fuse::operations::ConflictResolveContext; use databend_common_storages_fuse::operations::MutationAction; use databend_common_storages_fuse::operations::MutationBlockPruningContext; use databend_common_storages_fuse::FuseLazyPartInfo; @@ -39,6 +43,24 @@ impl PipelineBuilder { let table = FuseTable::try_from_table(table.as_ref())?.clone(); let is_delete = mutation_source.input_type == MutationType::Delete; + if mutation_source.truncate_table { + // There is no filter and the mutation type is delete, + // we can truncate the table directly. + debug_assert!(mutation_source.partitions.is_empty() && is_delete); + return self.main_pipeline.add_source( + |output| { + let meta = CommitMeta { + conflict_resolve_context: ConflictResolveContext::None, + new_segment_locs: vec![], + table_id: table.get_id(), + }; + let block = DataBlock::empty_with_meta(Box::new(meta)); + OneBlockSource::create(output, block) + }, + 1, + ); + } + let read_partition_columns: Vec<usize> = mutation_source .read_partition_columns .clone() @@ -70,14 +92,13 @@ impl PipelineBuilder { }; Runtime::with_worker_threads(2, Some("do_mutation_block_pruning".to_string()))? .block_on(async move { - let (partitions, _) = table_clone + let (_, partitions) = table_clone .do_mutation_block_pruning( ctx_clone, filters_clone, projection, prune_ctx, true, - true, ) .await?; ctx.set_partitions(partitions)?; diff --git a/src/query/service/tests/it/storages/fuse/operations/mutation/block_compact_mutator.rs b/src/query/service/tests/it/storages/fuse/operations/mutation/block_compact_mutator.rs index 4af069452d491..842b8d26f530c 100644 --- a/src/query/service/tests/it/storages/fuse/operations/mutation/block_compact_mutator.rs +++ b/src/query/service/tests/it/storages/fuse/operations/mutation/block_compact_mutator.rs @@ -23,6 +23,7 @@ use databend_common_catalog::table::Table; use databend_common_exception::Result; use databend_common_expression::BlockThresholds; use databend_common_sql::executor::physical_plans::CommitSink; +use databend_common_sql::executor::physical_plans::CommitType; use databend_common_sql::executor::physical_plans::CompactSource; use databend_common_sql::executor::physical_plans::MutationKind; use databend_common_sql::executor::PhysicalPlan; @@ -133,9 +134,11 @@ async fn do_compact(ctx: Arc<QueryContext>, table: Arc<dyn Table>) -> Result<boo input: Box::new(root), table_info, snapshot: Some(snapshot), - mutation_kind: MutationKind::Compact, + commit_type: CommitType::Mutation { + kind: MutationKind::Compact, + merge_meta, + }, update_stream_meta: vec![], - merge_meta, deduplicated_label: None, plan_id: u32::MAX, recluster_info: None, diff --git a/src/query/sql/src/executor/format.rs b/src/query/sql/src/executor/format.rs index b5b8ac415bd54..162205bf81a4d 100644 --- a/src/query/sql/src/executor/format.rs +++ b/src/query/sql/src/executor/format.rs @@ -26,6 +26,7 @@ use databend_common_pipeline_core::processors::PlanProfile; use itertools::Itertools; use super::physical_plans::AddStreamColumn; +use crate::binder::MutationType; use crate::executor::explain::PlanStatsInfo; use crate::executor::physical_plans::AggregateExpand; use crate::executor::physical_plans::AggregateFinal; @@ -300,6 +301,21 @@ pub fn format_partial_tree( children, )) } + PhysicalPlan::MutationSource(plan) => { + let metadata = metadata.read().clone(); + let table = metadata.table(plan.table_index).clone(); + let table_name = format!("{}.{}.{}", table.catalog(), table.database(), table.name()); + let mut children = vec![FormatTreeNode::new(format!("table: {table_name}"))]; + if let Some(filters) = &plan.filters { + let filter = filters.filter.as_expr(&BUILTIN_FUNCTIONS).sql_display(); + children.push(FormatTreeNode::new(format!("filters: [{filter}]"))); + } + append_output_rows_info(&mut children, profs, plan.plan_id); + Ok(FormatTreeNode::with_children( + "MutationSource".to_string(), + children, + )) + } other => { let children = other .children() @@ -514,13 +530,45 @@ fn append_output_rows_info( } fn format_mutation_source( - _plan: &MutationSource, - _metadata: &Metadata, - _profs: &HashMap<u32, PlanProfile>, + plan: &MutationSource, + metadata: &Metadata, + profs: &HashMap<u32, PlanProfile>, ) -> Result<FormatTreeNode<String>> { + let table = metadata.table(plan.table_index); + let table_name = format!("{}.{}.{}", table.catalog(), table.database(), table.name()); + let filters = plan + .filters + .as_ref() + .map(|filters| filters.filter.as_expr(&BUILTIN_FUNCTIONS).sql_display()) + .unwrap_or_default(); + let mut children = vec![ + FormatTreeNode::new(format!("table: {table_name}")), + FormatTreeNode::new(format!( + "output columns: [{}]", + format_output_columns(plan.output_schema()?, metadata, false) + )), + FormatTreeNode::new(format!("filters: [{filters}]")), + ]; + + let payload = match plan.input_type { + MutationType::Update => "Update", + MutationType::Delete => { + if plan.truncate_table { + "DeleteAll" + } else { + "Delete" + } + } + MutationType::Merge => "Merge", + }; + + // Part stats. + children.extend(part_stats_info_to_format_tree(&plan.statistics)); + append_profile_info(&mut children, profs, plan.plan_id); + Ok(FormatTreeNode::with_children( - format!("Mutation Source"), - vec![], + format!("MutationSource({})", payload), + children, )) } diff --git a/src/query/sql/src/executor/physical_plan_builder.rs b/src/query/sql/src/executor/physical_plan_builder.rs index c020fdef52664..c1100731b13ca 100644 --- a/src/query/sql/src/executor/physical_plan_builder.rs +++ b/src/query/sql/src/executor/physical_plan_builder.rs @@ -14,6 +14,7 @@ use std::sync::Arc; +use databend_common_catalog::plan::PartStatistics; use databend_common_catalog::plan::Partitions; use databend_common_catalog::table_context::TableContext; use databend_common_exception::Result; @@ -147,5 +148,6 @@ pub struct MutationBuildInfo { pub table_info: TableInfo, pub table_snapshot: Option<Arc<TableSnapshot>>, pub update_stream_meta: Vec<UpdateStreamMetaReq>, - pub partitions: Option<Partitions>, + pub partitions: Partitions, + pub statistics: PartStatistics, } diff --git a/src/query/sql/src/executor/physical_plans/mod.rs b/src/query/sql/src/executor/physical_plans/mod.rs index 0caee74d6bec5..5f3a01b27fdae 100644 --- a/src/query/sql/src/executor/physical_plans/mod.rs +++ b/src/query/sql/src/executor/physical_plans/mod.rs @@ -66,7 +66,7 @@ pub use physical_async_func::AsyncFunction; pub use physical_async_func::AsyncFunctionDesc; pub use physical_cache_scan::CacheScan; pub use physical_column_mutation::ColumnMutation; -pub use physical_commit_sink::CommitSink; +pub use physical_commit_sink::*; pub use physical_compact_source::CompactSource; pub use physical_constant_table_scan::ConstantTableScan; pub use physical_copy_into_location::CopyIntoLocation; diff --git a/src/query/sql/src/executor/physical_plans/physical_commit_sink.rs b/src/query/sql/src/executor/physical_plans/physical_commit_sink.rs index 572a4944b1d1e..93fe924ab5c57 100644 --- a/src/query/sql/src/executor/physical_plans/physical_commit_sink.rs +++ b/src/query/sql/src/executor/physical_plans/physical_commit_sink.rs @@ -21,6 +21,7 @@ use databend_storages_common_table_meta::meta::TableSnapshot; use crate::executor::physical_plans::common::MutationKind; use crate::executor::PhysicalPlan; +use crate::plans::TruncateMode; // serde is required by `PhysicalPlan` /// The commit sink is used to commit the data to the table. @@ -30,11 +31,21 @@ pub struct CommitSink { pub input: Box<PhysicalPlan>, pub snapshot: Option<Arc<TableSnapshot>>, pub table_info: TableInfo, - pub mutation_kind: MutationKind, + pub commit_type: CommitType, pub update_stream_meta: Vec<UpdateStreamMetaReq>, - pub merge_meta: bool, pub deduplicated_label: Option<String>, // Used for recluster. pub recluster_info: Option<ReclusterInfoSideCar>, } + +#[derive(serde::Serialize, serde::Deserialize, Clone, Debug)] +pub enum CommitType { + Truncate { + mode: TruncateMode, + }, + Mutation { + kind: MutationKind, + merge_meta: bool, + }, +} diff --git a/src/query/sql/src/executor/physical_plans/physical_compact_source.rs b/src/query/sql/src/executor/physical_plans/physical_compact_source.rs index 333db80871547..8b9db7af1be79 100644 --- a/src/query/sql/src/executor/physical_plans/physical_compact_source.rs +++ b/src/query/sql/src/executor/physical_plans/physical_compact_source.rs @@ -23,6 +23,7 @@ use databend_common_expression::ColumnId; use databend_common_meta_app::schema::TableInfo; use crate::executor::physical_plans::CommitSink; +use crate::executor::physical_plans::CommitType; use crate::executor::physical_plans::Exchange; use crate::executor::physical_plans::FragmentKind; use crate::executor::physical_plans::MutationKind; @@ -89,9 +90,11 @@ impl PhysicalPlanBuilder { input: Box::new(root), table_info, snapshot: Some(snapshot), - mutation_kind: MutationKind::Compact, + commit_type: CommitType::Mutation { + kind: MutationKind::Compact, + merge_meta, + }, update_stream_meta: vec![], - merge_meta, deduplicated_label: None, plan_id: u32::MAX, recluster_info: None, diff --git a/src/query/sql/src/executor/physical_plans/physical_mutation.rs b/src/query/sql/src/executor/physical_plans/physical_mutation.rs index d928bb43fe724..4ddf9549aeb5c 100644 --- a/src/query/sql/src/executor/physical_plans/physical_mutation.rs +++ b/src/query/sql/src/executor/physical_plans/physical_mutation.rs @@ -44,6 +44,7 @@ use databend_storages_common_table_meta::readers::snapshot_reader::TableSnapshot use itertools::Itertools; use super::ColumnMutation; +use super::CommitType; use crate::binder::wrap_cast; use crate::binder::MutationStrategy; use crate::binder::MutationType; @@ -63,6 +64,7 @@ use crate::parse_computed_expr; use crate::plans::BoundColumnRef; use crate::plans::ConstantExpr; use crate::plans::FunctionCall; +use crate::plans::TruncateMode; use crate::BindContext; use crate::ColumnBindingBuilder; use crate::ColumnEntry; @@ -117,11 +119,15 @@ impl PhysicalPlanBuilder { row_id_index, row_id_shuffle, can_try_update_column_only, + no_effect, + truncate_table, .. } = mutation; let mut plan = self.build(s_expr.child(0)?, required).await?; - let mutation_input_schema = plan.output_schema()?; + if *no_effect { + return Ok(plan); + } let table = self .ctx @@ -129,7 +135,28 @@ impl PhysicalPlanBuilder { .await?; let table_info = table.get_table_info(); let table_name = table_name.clone(); + let mutation_build_info = self.mutation_build_info.clone().unwrap(); + let mutation_input_schema = plan.output_schema()?; + + if *truncate_table { + // Do truncate. + plan = PhysicalPlan::CommitSink(Box::new(CommitSink { + input: Box::new(plan), + snapshot: mutation_build_info.table_snapshot, + table_info: table_info.clone(), + // let's use update first, we will do some optimizations and select exact strategy + commit_type: CommitType::Truncate { + mode: TruncateMode::Delete, + }, + update_stream_meta: vec![], + deduplicated_label: unsafe { self.ctx.get_settings().get_deduplicate_label()? }, + plan_id: u32::MAX, + recluster_info: None, + })); + plan.adjust_plan_id(&mut 0); + return Ok(plan); + } if *strategy == MutationStrategy::Direct { // MutationStrategy::Direct: If the mutation filter is a simple expression, @@ -208,9 +235,11 @@ impl PhysicalPlanBuilder { snapshot: mutation_build_info.table_snapshot, table_info: table_info.clone(), // let's use update first, we will do some optimizations and select exact strategy - mutation_kind, + commit_type: CommitType::Mutation { + kind: mutation_kind, + merge_meta: false, + }, update_stream_meta: vec![], - merge_meta: false, deduplicated_label: unsafe { self.ctx.get_settings().get_deduplicate_label()? }, plan_id: u32::MAX, recluster_info: None, @@ -434,20 +463,17 @@ impl PhysicalPlanBuilder { MutationType::Delete => MutationKind::Delete, }; - let update_stream_meta = match mutation_type { - MutationType::Merge => mutation_build_info.update_stream_meta, - MutationType::Update | MutationType::Delete => vec![], - }; - // build mutation_aggregate let mut physical_plan = PhysicalPlan::CommitSink(Box::new(CommitSink { input: Box::new(commit_input), snapshot: mutation_build_info.table_snapshot, table_info: table_info.clone(), // let's use update first, we will do some optimizations and select exact strategy - mutation_kind, - update_stream_meta, - merge_meta: false, + commit_type: CommitType::Mutation { + kind: mutation_kind, + merge_meta: false, + }, + update_stream_meta: mutation_build_info.update_stream_meta, deduplicated_label: unsafe { self.ctx.get_settings().get_deduplicate_label()? }, plan_id: u32::MAX, recluster_info: None, diff --git a/src/query/sql/src/executor/physical_plans/physical_mutation_source.rs b/src/query/sql/src/executor/physical_plans/physical_mutation_source.rs index 6299ac112c8bc..b04c294220ab5 100644 --- a/src/query/sql/src/executor/physical_plans/physical_mutation_source.rs +++ b/src/query/sql/src/executor/physical_plans/physical_mutation_source.rs @@ -12,38 +12,42 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::sync::Arc; - use databend_common_catalog::plan::Filters; +use databend_common_catalog::plan::PartStatistics; use databend_common_catalog::plan::Partitions; use databend_common_exception::Result; use databend_common_expression::type_check::check_function; use databend_common_expression::types::DataType; +use databend_common_expression::ConstantFolder; use databend_common_expression::DataField; use databend_common_expression::DataSchemaRef; use databend_common_expression::DataSchemaRefExt; +use databend_common_expression::FunctionContext; use databend_common_functions::BUILTIN_FUNCTIONS; use databend_common_meta_app::schema::TableInfo; -use databend_storages_common_table_meta::meta::TableSnapshot; use crate::binder::MutationType; use crate::executor::cast_expr_to_non_null_boolean; use crate::executor::PhysicalPlan; use crate::executor::PhysicalPlanBuilder; use crate::ColumnSet; +use crate::IndexType; use crate::ScalarExpr; #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct MutationSource { // A unique id of operator in a `PhysicalPlan` tree, only used for display. pub plan_id: u32, - pub partitions: Partitions, + pub table_index: IndexType, pub table_info: TableInfo, pub filters: Option<Filters>, pub output_schema: DataSchemaRef, pub input_type: MutationType, pub read_partition_columns: ColumnSet, - pub snapshot: Arc<TableSnapshot>, + pub truncate_table: bool, + + pub partitions: Partitions, + pub statistics: PartStatistics, } impl MutationSource { @@ -57,8 +61,11 @@ impl PhysicalPlanBuilder { &mut self, mutation_source: &crate::plans::MutationSource, ) -> Result<PhysicalPlan> { - let filters = if let Some(filter) = &mutation_source.filter { - Some(create_push_down_filters(filter)?) + let filters = if !mutation_source.predicates.is_empty() { + Some(create_push_down_filters( + &self.ctx.get_function_context()?, + &mutation_source.predicates, + )?) } else { None }; @@ -90,29 +97,46 @@ impl PhysicalPlanBuilder { DataType::Boolean, )); } - let output_schema = DataSchemaRefExt::create(fields); + + let truncate_table = + mutation_source.mutation_type == MutationType::Delete && filters.is_none(); Ok(PhysicalPlan::MutationSource(MutationSource { plan_id: 0, - partitions: mutation_info.partitions.clone().unwrap(), + table_index: mutation_source.table_index, output_schema, table_info: mutation_info.table_info.clone(), filters, input_type: mutation_source.mutation_type.clone(), read_partition_columns: mutation_source.read_partition_columns.clone(), - snapshot: mutation_info.table_snapshot.clone().unwrap(), + truncate_table, + partitions: mutation_info.partitions.clone(), + statistics: mutation_info.statistics.clone(), })) } } /// create push down filters -pub fn create_push_down_filters(scalar: &ScalarExpr) -> Result<Filters> { - let filter = cast_expr_to_non_null_boolean( - scalar - .as_expr()? - .project_column_ref(|col| col.column_name.clone()), - )?; +pub fn create_push_down_filters( + func_ctx: &FunctionContext, + predicates: &[ScalarExpr], +) -> Result<Filters> { + let predicates = predicates + .iter() + .map(|p| { + Ok(p.as_expr()? + .project_column_ref(|col| col.column_name.clone())) + }) + .collect::<Result<Vec<_>>>()?; + let expr = predicates + .into_iter() + .try_reduce(|lhs, rhs| { + check_function(None, "and_filters", &[], &[lhs, rhs], &BUILTIN_FUNCTIONS) + })? + .unwrap(); + let expr = cast_expr_to_non_null_boolean(expr)?; + let (filter, _) = ConstantFolder::fold(&expr, func_ctx, &BUILTIN_FUNCTIONS); let remote_filter = filter.as_remote_expr(); // prepare the inverse filter expression diff --git a/src/query/sql/src/executor/physical_plans/physical_recluster.rs b/src/query/sql/src/executor/physical_plans/physical_recluster.rs index a82d2882d2a03..170d6b70a205e 100644 --- a/src/query/sql/src/executor/physical_plans/physical_recluster.rs +++ b/src/query/sql/src/executor/physical_plans/physical_recluster.rs @@ -23,6 +23,7 @@ use databend_common_meta_app::schema::TableInfo; use databend_enterprise_hilbert_clustering::get_hilbert_clustering_handler; use crate::executor::physical_plans::CommitSink; +use crate::executor::physical_plans::CommitType; use crate::executor::physical_plans::CompactSource; use crate::executor::physical_plans::Exchange; use crate::executor::physical_plans::FragmentKind; @@ -68,6 +69,10 @@ impl PhysicalPlanBuilder { }); let table_info = tbl.get_table_info().clone(); let is_hilbert = !s_expr.children.is_empty(); + let commit_type = CommitType::Mutation { + kind: MutationKind::Recluster, + merge_meta: false, + }; let mut plan = if is_hilbert { let handler = get_hilbert_clustering_handler(); let Some((recluster_info, snapshot)) = handler @@ -89,9 +94,8 @@ impl PhysicalPlanBuilder { input: Box::new(plan), table_info, snapshot: Some(snapshot), - mutation_kind: MutationKind::Recluster, + commit_type, update_stream_meta: vec![], - merge_meta: false, deduplicated_label: None, plan_id: u32::MAX, recluster_info: Some(recluster_info), @@ -138,9 +142,8 @@ impl PhysicalPlanBuilder { input: Box::new(root), table_info, snapshot: Some(snapshot), - mutation_kind: MutationKind::Recluster, + commit_type, update_stream_meta: vec![], - merge_meta: false, deduplicated_label: None, plan_id: u32::MAX, recluster_info: Some(ReclusterInfoSideCar { @@ -174,9 +177,11 @@ impl PhysicalPlanBuilder { input: Box::new(root), table_info, snapshot: Some(snapshot), - mutation_kind: MutationKind::Compact, + commit_type: CommitType::Mutation { + kind: MutationKind::Compact, + merge_meta, + }, update_stream_meta: vec![], - merge_meta, deduplicated_label: None, plan_id: u32::MAX, recluster_info: None, diff --git a/src/query/sql/src/planner/binder/bind_mutation/bind.rs b/src/query/sql/src/planner/binder/bind_mutation/bind.rs index 53608e4a80fbb..9eece311e8a38 100644 --- a/src/query/sql/src/planner/binder/bind_mutation/bind.rs +++ b/src/query/sql/src/planner/binder/bind_mutation/bind.rs @@ -191,9 +191,6 @@ impl Binder { target_table_row_id_index, mut required_columns, all_source_columns, - truncate_table, - predicate_column_index, - direct_filter, } = bind_result; let target_table_name = if let Some(table_name_alias) = &table_name_alias { @@ -306,9 +303,10 @@ impl Binder { row_id_index: target_table_row_id_index, can_try_update_column_only: self.can_try_update_column_only(&matched_clauses), lock_guard, - truncate_table, - predicate_column_index, - direct_filter, + no_effect: false, + predicate_column_index: None, + direct_filter: vec![], + truncate_table: false, }; if mutation_strategy == MutationStrategy::NotMatchedOnly && !insert_only(&mutation) { diff --git a/src/query/sql/src/planner/binder/bind_mutation/mutation_expression.rs b/src/query/sql/src/planner/binder/bind_mutation/mutation_expression.rs index f9cfc3f60950e..63bd8cbdd62e1 100644 --- a/src/query/sql/src/planner/binder/bind_mutation/mutation_expression.rs +++ b/src/query/sql/src/planner/binder/bind_mutation/mutation_expression.rs @@ -25,10 +25,10 @@ use databend_common_catalog::plan::InternalColumnType; use databend_common_catalog::table::Table; use databend_common_exception::ErrorCode; use databend_common_exception::Result; -use databend_common_expression::types::DataType; use databend_common_expression::TableSchema; use databend_common_expression::ROW_ID_COL_NAME; +use crate::binder::split_conjunctions; use crate::binder::util::TableIdentifier; use crate::binder::Binder; use crate::binder::Finder; @@ -180,9 +180,6 @@ impl MutationExpression { all_source_columns, target_table_index, target_table_row_id_index, - truncate_table: false, - predicate_column_index: None, - direct_filter: None, }) } MutationExpression::Update { @@ -225,7 +222,7 @@ impl MutationExpression { .ok_or_else(|| ErrorCode::Internal("Can't get target table index"))?; // If the filter is a simple expression, change the mutation strategy to MutationStrategy::Direct. - let (mut mutation_strategy, filter) = + let (mut mutation_strategy, predicates) = binder.process_filter(&mut bind_context, filter)?; if from_s_expr.is_some() { @@ -234,31 +231,6 @@ impl MutationExpression { // Build bind result according to mutation strategy. if mutation_strategy == MutationStrategy::Direct { - let mut truncate_table = false; - let mut predicate_column_index = None; - let mut read_partition_columns = HashSet::new(); - - if let Some(filter) = &filter { - read_partition_columns.extend(filter.used_columns()); - if mutation_type == MutationType::Update { - let column_index = binder.metadata.write().add_derived_column( - "_predicate".to_string(), - DataType::Boolean, - None, - ); - required_columns.insert(column_index); - predicate_column_index = Some(column_index); - } - } else if mutation_type == MutationType::Delete { - // There is no filter and the mutation type is delete, - // we can truncate the table directly. - truncate_table = true; - } - - for column_index in bind_context.column_set().iter() { - required_columns.insert(*column_index); - } - let table_schema = target_table .schema_with_stream() .remove_virtual_computed_fields(); @@ -267,15 +239,25 @@ impl MutationExpression { columns: bind_context.column_set(), table_index: target_table_index, mutation_type: mutation_type.clone(), - filter: filter.clone(), - predicate_column_index, - read_partition_columns, - update_stream_columns, + predicates: vec![], + predicate_column_index: None, + read_partition_columns: HashSet::new(), }; s_expr = SExpr::create_leaf(Arc::new(RelOperator::MutationSource(mutation_source))); + if !predicates.is_empty() { + s_expr = SExpr::create_unary( + Arc::new(Filter { predicates }.into()), + Arc::new(s_expr), + ); + } + + for column_index in bind_context.column_set().iter() { + required_columns.insert(*column_index); + } + Ok(MutationExpressionBindResult { input: s_expr, mutation_type, @@ -285,9 +267,6 @@ impl MutationExpression { all_source_columns: None, target_table_index, target_table_row_id_index: DUMMY_COLUMN_INDEX, - truncate_table, - predicate_column_index, - direct_filter: filter, }) } else { let is_lazy_table = mutation_type != MutationType::Delete; @@ -306,8 +285,6 @@ impl MutationExpression { // Add target table row_id column to required columns. required_columns.insert(target_table_row_id_index); - let predicates = Binder::flatten_and_scalar_expr(filter.as_ref().unwrap()); - if let Some(from_s_expr) = from_s_expr { let join_plan = Join { equi_conditions: vec![], @@ -345,9 +322,6 @@ impl MutationExpression { all_source_columns: None, target_table_index, target_table_row_id_index, - truncate_table: false, - predicate_column_index: None, - direct_filter: None, }) } } @@ -492,25 +466,11 @@ impl Binder { Ok(row_id_index) } - // Recursively flatten the AND expressions. - pub fn flatten_and_scalar_expr(scalar: &ScalarExpr) -> Vec<ScalarExpr> { - if let ScalarExpr::FunctionCall(func) = scalar - && func.func_name == "and" - { - func.arguments - .iter() - .flat_map(Self::flatten_and_scalar_expr) - .collect() - } else { - vec![scalar.clone()] - } - } - pub(in crate::planner::binder) fn process_filter( &self, bind_context: &mut BindContext, filter: &Option<Expr>, - ) -> Result<(MutationStrategy, Option<ScalarExpr>)> { + ) -> Result<(MutationStrategy, Vec<ScalarExpr>)> { if let Some(expr) = filter { let mut scalar_binder = ScalarBinder::new( bind_context, @@ -527,13 +487,15 @@ impl Binder { ) .set_span(scalar.span())); } - if !self.has_subquery(&scalar)? { - Ok((MutationStrategy::Direct, Some(scalar))) + let strategy = if !self.has_subquery(&scalar)? { + MutationStrategy::Direct } else { - Ok((MutationStrategy::MatchedOnly, Some(scalar))) - } + MutationStrategy::MatchedOnly + }; + let predicates = split_conjunctions(&scalar); + Ok((strategy, predicates)) } else { - Ok((MutationStrategy::Direct, None)) + Ok((MutationStrategy::Direct, vec![])) } } @@ -586,11 +548,6 @@ pub struct MutationExpressionBindResult { pub target_table_row_id_index: usize, pub required_columns: ColumnSet, pub all_source_columns: Option<HashMap<usize, ScalarExpr>>, - - // MutationStrategy::Direct related variables. - pub truncate_table: bool, - pub predicate_column_index: Option<usize>, - pub direct_filter: Option<ScalarExpr>, } pub fn target_probe(s_expr: &SExpr, target_table_index: usize) -> Result<bool> { diff --git a/src/query/sql/src/planner/optimizer/optimizer.rs b/src/query/sql/src/planner/optimizer/optimizer.rs index 4b9514ca29070..1278968c59090 100644 --- a/src/query/sql/src/planner/optimizer/optimizer.rs +++ b/src/query/sql/src/planner/optimizer/optimizer.rs @@ -533,6 +533,8 @@ async fn get_optimized_memo(opt_ctx: &mut OptimizerContext, mut s_expr: SExpr) - async fn optimize_mutation(mut opt_ctx: OptimizerContext, s_expr: SExpr) -> Result<Plan> { // Optimize the input plan. let mut input_s_expr = optimize_query(&mut opt_ctx, s_expr.child(0)?.clone()).await?; + input_s_expr = + RecursiveOptimizer::new(&[RuleID::MergeFilterIntoMutation], &opt_ctx).run(&input_s_expr)?; // For distributed query optimization, we need to remove the Exchange operator at the top of the plan. if let &RelOperator::Exchange(_) = input_s_expr.plan() { @@ -556,11 +558,7 @@ async fn optimize_mutation(mut opt_ctx: OptimizerContext, s_expr: SExpr) -> Resu if !mutation.matched_evaluators.is_empty() { match inner_rel_op { RelOp::ConstantTableScan => { - mutation.matched_evaluators = vec![MatchedEvaluator { - condition: None, - update: None, - }]; - mutation.can_try_update_column_only = false; + mutation.no_effect = true; } RelOp::Join => { let right_child = input_s_expr.child(1)?; @@ -609,7 +607,19 @@ async fn optimize_mutation(mut opt_ctx: OptimizerContext, s_expr: SExpr) -> Resu input_s_expr } } - MutationType::Update | MutationType::Delete => input_s_expr, + MutationType::Update | MutationType::Delete => { + if let RelOperator::MutationSource(rel) = input_s_expr.plan() { + if rel.mutation_type == MutationType::Delete && rel.predicates.is_empty() { + mutation.truncate_table = true; + } + mutation.direct_filter = rel.predicates.clone(); + if let Some(index) = rel.predicate_column_index { + mutation.required_columns.insert(index); + mutation.predicate_column_index = Some(index); + } + } + input_s_expr + } }; Ok(Plan::DataMutation { diff --git a/src/query/sql/src/planner/optimizer/rule/factory.rs b/src/query/sql/src/planner/optimizer/rule/factory.rs index bee836dc79dae..6623638a9214b 100644 --- a/src/query/sql/src/planner/optimizer/rule/factory.rs +++ b/src/query/sql/src/planner/optimizer/rule/factory.rs @@ -52,6 +52,7 @@ use super::transform::RuleEagerAggregation; use super::transform::RuleLeftExchangeJoin; use super::RuleID; use super::RulePtr; +use crate::optimizer::rule::rewrite::RuleMergeFilterIntoMutation; use crate::optimizer::OptimizerContext; pub struct RuleFactory; @@ -107,6 +108,9 @@ impl RuleFactory { RuleID::TryApplyAggIndex => Ok(Box::new(RuleTryApplyAggIndex::new(ctx.metadata))), RuleID::EliminateSort => Ok(Box::new(RuleEliminateSort::new())), RuleID::SemiToInnerJoin => Ok(Box::new(RuleSemiToInnerJoin::new())), + RuleID::MergeFilterIntoMutation => { + Ok(Box::new(RuleMergeFilterIntoMutation::new(ctx.metadata))) + } } } } diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/mod.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/mod.rs index c564477e2f32f..261be986deafe 100644 --- a/src/query/sql/src/planner/optimizer/rule/rewrite/mod.rs +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/mod.rs @@ -23,6 +23,7 @@ mod rule_filter_nulls; mod rule_fold_count_aggregate; mod rule_merge_eval_scalar; mod rule_merge_filter; +mod rule_merge_filter_into_mutation; mod rule_normalize_scalar; mod rule_push_down_filter_aggregate; mod rule_push_down_filter_eval_scalar; @@ -57,6 +58,7 @@ pub use rule_filter_nulls::RuleFilterNulls; pub use rule_fold_count_aggregate::RuleFoldCountAggregate; pub use rule_merge_eval_scalar::RuleMergeEvalScalar; pub use rule_merge_filter::RuleMergeFilter; +pub use rule_merge_filter_into_mutation::RuleMergeFilterIntoMutation; pub use rule_normalize_scalar::RuleNormalizeScalarFilter; pub use rule_push_down_filter_aggregate::RulePushDownFilterAggregate; pub use rule_push_down_filter_eval_scalar::RulePushDownFilterEvalScalar; diff --git a/src/query/sql/src/planner/optimizer/rule/rewrite/rule_merge_filter_into_mutation.rs b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_merge_filter_into_mutation.rs new file mode 100644 index 0000000000000..f5f7f03d5e36d --- /dev/null +++ b/src/query/sql/src/planner/optimizer/rule/rewrite/rule_merge_filter_into_mutation.rs @@ -0,0 +1,87 @@ +// Copyright 2021 Datafuse Labs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use std::sync::Arc; + +use databend_common_exception::Result; +use databend_common_expression::types::DataType; + +use crate::binder::MutationType; +use crate::optimizer::extract::Matcher; +use crate::optimizer::rule::Rule; +use crate::optimizer::rule::TransformResult; +use crate::optimizer::RuleID; +use crate::optimizer::SExpr; +use crate::plans::Filter; +use crate::plans::MutationSource; +use crate::plans::RelOp; +use crate::plans::RelOperator; +use crate::MetadataRef; + +pub struct RuleMergeFilterIntoMutation { + id: RuleID, + matchers: Vec<Matcher>, + metadata: MetadataRef, +} + +impl RuleMergeFilterIntoMutation { + pub fn new(metadata: MetadataRef) -> Self { + Self { + id: RuleID::MergeFilterIntoMutation, + // Filter + // \ + // MutationSource + matchers: vec![Matcher::MatchOp { + op_type: RelOp::Filter, + children: vec![Matcher::MatchOp { + op_type: RelOp::MutationSource, + children: vec![], + }], + }], + metadata, + } + } +} + +impl Rule for RuleMergeFilterIntoMutation { + fn id(&self) -> RuleID { + self.id + } + + fn apply(&self, s_expr: &SExpr, state: &mut TransformResult) -> Result<()> { + let filter: Filter = s_expr.plan().clone().try_into()?; + let mut mutation: MutationSource = s_expr.child(0)?.plan().clone().try_into()?; + mutation + .read_partition_columns + .extend(filter.predicates.iter().flat_map(|v| v.used_columns())); + mutation.predicates = filter.predicates; + + if mutation.mutation_type == MutationType::Update { + let column_index = self.metadata.write().add_derived_column( + "_predicate".to_string(), + DataType::Boolean, + None, + ); + mutation.predicate_column_index = Some(column_index); + } + + let new_expr = SExpr::create_leaf(Arc::new(RelOperator::MutationSource(mutation))); + state.add_result(new_expr); + Ok(()) + } + + fn matchers(&self) -> &[Matcher] { + &self.matchers + } +} diff --git a/src/query/sql/src/planner/optimizer/rule/rule.rs b/src/query/sql/src/planner/optimizer/rule/rule.rs index 7ea8ec9ea5914..5f0cd2f4e5dc8 100644 --- a/src/query/sql/src/planner/optimizer/rule/rule.rs +++ b/src/query/sql/src/planner/optimizer/rule/rule.rs @@ -118,6 +118,9 @@ pub enum RuleID { CommuteJoinBaseTable, LeftExchangeJoin, EagerAggregation, + + // Mutation rules + MergeFilterIntoMutation, } impl Display for RuleID { @@ -160,6 +163,8 @@ impl Display for RuleID { RuleID::TryApplyAggIndex => write!(f, "TryApplyAggIndex"), RuleID::SemiToInnerJoin => write!(f, "SemiToInnerJoin"), RuleID::EliminateUnion => write!(f, "EliminateUnion"), + + RuleID::MergeFilterIntoMutation => write!(f, "MergeFilterIntoMutation"), } } } diff --git a/src/query/sql/src/planner/optimizer/s_expr.rs b/src/query/sql/src/planner/optimizer/s_expr.rs index e92a305fda669..9127a16bac347 100644 --- a/src/query/sql/src/planner/optimizer/s_expr.rs +++ b/src/query/sql/src/planner/optimizer/s_expr.rs @@ -328,8 +328,8 @@ impl SExpr { } } RelOperator::MutationSource(mutation_source) => { - if let Some(filter) = &mutation_source.filter { - get_udf_names(filter)?.iter().for_each(|udf| { + for predicate in &mutation_source.predicates { + get_udf_names(predicate)?.iter().for_each(|udf| { udfs.insert(*udf); }); } @@ -484,13 +484,7 @@ fn find_subquery(rel_op: &RelOperator) -> bool { .items .iter() .any(|expr| find_subquery_in_expr(&expr.scalar)), - RelOperator::MutationSource(op) => { - if let Some(filter) = &op.filter { - find_subquery_in_expr(filter) - } else { - false - } - } + RelOperator::MutationSource(_) => false, } } diff --git a/src/query/sql/src/planner/plans/ddl/table.rs b/src/query/sql/src/planner/plans/ddl/table.rs index e26ec53c65b44..2b473198ed1c8 100644 --- a/src/query/sql/src/planner/plans/ddl/table.rs +++ b/src/query/sql/src/planner/plans/ddl/table.rs @@ -407,6 +407,16 @@ impl TruncateTablePlan { } } +#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] +pub enum TruncateMode { + // Truncate and keep the historical data. + Normal, + // Delete the data, used for delete operation. + Delete, + // Truncate and purge the historical data. + Purge, +} + /// Undrop. #[derive(Clone, Debug)] pub struct UndropTablePlan { diff --git a/src/query/sql/src/planner/plans/mutation.rs b/src/query/sql/src/planner/plans/mutation.rs index 86417918c6edc..abffcecc692dd 100644 --- a/src/query/sql/src/planner/plans/mutation.rs +++ b/src/query/sql/src/planner/plans/mutation.rs @@ -78,16 +78,18 @@ pub struct Mutation { // we don't support complex expressions. pub can_try_update_column_only: bool, pub lock_guard: Option<Arc<LockGuard>>, + // When the filter is always false, do nothing. + pub no_effect: bool, // MutationStrategy::Direct related variables. pub predicate_column_index: Option<usize>, + pub direct_filter: Vec<ScalarExpr>, pub truncate_table: bool, - pub direct_filter: Option<ScalarExpr>, } impl std::fmt::Debug for Mutation { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - f.debug_struct("Merge Into") + f.debug_struct("Mutation") .field("catalog", &self.catalog_name) .field("database", &self.database_name) .field("table", &self.table_name) diff --git a/src/query/sql/src/planner/plans/mutation_source.rs b/src/query/sql/src/planner/plans/mutation_source.rs index e6046970f3e85..c6626ff2f88f2 100644 --- a/src/query/sql/src/planner/plans/mutation_source.rs +++ b/src/query/sql/src/planner/plans/mutation_source.rs @@ -40,10 +40,9 @@ pub struct MutationSource { pub columns: ColumnSet, pub table_index: IndexType, pub mutation_type: MutationType, - pub filter: Option<ScalarExpr>, + pub predicates: Vec<ScalarExpr>, pub predicate_column_index: Option<usize>, pub read_partition_columns: ColumnSet, - pub update_stream_columns: bool, } impl PartialEq for MutationSource { diff --git a/src/query/storages/fuse/src/fuse_table.rs b/src/query/storages/fuse/src/fuse_table.rs index dba9638097e69..e92e7ae9a4747 100644 --- a/src/query/storages/fuse/src/fuse_table.rs +++ b/src/query/storages/fuse/src/fuse_table.rs @@ -65,6 +65,7 @@ use databend_common_meta_app::schema::UpsertTableCopiedFileReq; use databend_common_pipeline_core::Pipeline; use databend_common_sql::binder::STREAM_COLUMN_FACTORY; use databend_common_sql::parse_cluster_keys; +use databend_common_sql::plans::TruncateMode; use databend_common_sql::BloomIndexColumns; use databend_common_storage::init_operator; use databend_common_storage::DataOperator; @@ -108,7 +109,6 @@ use crate::io::WriteSettings; use crate::operations::load_last_snapshot_hint; use crate::operations::ChangesDesc; use crate::operations::SnapshotHint; -use crate::operations::TruncateMode; use crate::statistics::reduce_block_statistics; use crate::statistics::Trim; use crate::FuseStorageFormat; diff --git a/src/query/storages/fuse/src/operations/common/generators/mod.rs b/src/query/storages/fuse/src/operations/common/generators/mod.rs index 4d03082225219..623a7bdf158d4 100644 --- a/src/query/storages/fuse/src/operations/common/generators/mod.rs +++ b/src/query/storages/fuse/src/operations/common/generators/mod.rs @@ -25,4 +25,3 @@ pub use conflict_resolve_context::SnapshotMerged; pub use mutation_generator::MutationGenerator; pub use snapshot_generator::SnapshotGenerator; pub use truncate_generator::TruncateGenerator; -pub use truncate_generator::TruncateMode; diff --git a/src/query/storages/fuse/src/operations/common/generators/truncate_generator.rs b/src/query/storages/fuse/src/operations/common/generators/truncate_generator.rs index f3448299fc4fb..859b0200bf03b 100644 --- a/src/query/storages/fuse/src/operations/common/generators/truncate_generator.rs +++ b/src/query/storages/fuse/src/operations/common/generators/truncate_generator.rs @@ -17,21 +17,12 @@ use std::sync::Arc; use databend_common_exception::Result; use databend_common_expression::TableSchema; +use databend_common_sql::plans::TruncateMode; use databend_storages_common_table_meta::meta::TableSnapshot; use uuid::Uuid; use crate::operations::common::SnapshotGenerator; -#[derive(Clone)] -pub enum TruncateMode { - // Truncate and keep the historical data. - Normal, - // Delete the data, used for delete operation. - Delete, - // Truncate and purge the historical data. - Purge, -} - #[derive(Clone)] pub struct TruncateGenerator { mode: TruncateMode, diff --git a/src/query/storages/fuse/src/operations/common/processors/sink_commit.rs b/src/query/storages/fuse/src/operations/common/processors/sink_commit.rs index dd35f5f4590a2..e140c0c897c6d 100644 --- a/src/query/storages/fuse/src/operations/common/processors/sink_commit.rs +++ b/src/query/storages/fuse/src/operations/common/processors/sink_commit.rs @@ -34,6 +34,7 @@ use databend_common_pipeline_core::processors::Event; use databend_common_pipeline_core::processors::InputPort; use databend_common_pipeline_core::processors::Processor; use databend_common_pipeline_core::processors::ProcessorPtr; +use databend_common_sql::plans::TruncateMode; use databend_storages_common_table_meta::meta::Location; use databend_storages_common_table_meta::meta::SnapshotId; use databend_storages_common_table_meta::meta::TableSnapshot; @@ -50,7 +51,6 @@ use crate::operations::AppendGenerator; use crate::operations::CommitMeta; use crate::operations::SnapshotGenerator; use crate::operations::TruncateGenerator; -use crate::operations::TruncateMode; use crate::FuseTable; enum State { diff --git a/src/query/storages/fuse/src/operations/mutation_source.rs b/src/query/storages/fuse/src/operations/mutation_source.rs index bd2ee76b0b192..5bcb505d430e4 100644 --- a/src/query/storages/fuse/src/operations/mutation_source.rs +++ b/src/query/storages/fuse/src/operations/mutation_source.rs @@ -16,6 +16,7 @@ use std::sync::Arc; use databend_common_catalog::plan::Filters; use databend_common_catalog::plan::PartInfoPtr; +use databend_common_catalog::plan::PartStatistics; use databend_common_catalog::plan::Partitions; use databend_common_catalog::plan::PartitionsShuffleKind; use databend_common_catalog::plan::Projection; @@ -24,18 +25,8 @@ use databend_common_catalog::plan::PushDownInfo; use databend_common_catalog::table::Table; use databend_common_catalog::table_context::TableContext; use databend_common_exception::Result; -use databend_common_expression::types::BooleanType; -use databend_common_expression::types::DataType; -use databend_common_expression::BlockEntry; -use databend_common_expression::Column; -use databend_common_expression::DataBlock; -use databend_common_expression::DataField; -use databend_common_expression::DataSchema; -use databend_common_expression::Evaluator; use databend_common_expression::FieldIndex; use databend_common_expression::RemoteExpr; -use databend_common_expression::TableSchema; -use databend_common_expression::Value; use databend_common_functions::BUILTIN_FUNCTIONS; use databend_common_metrics::storage::*; use databend_common_pipeline_core::Pipeline; @@ -55,43 +46,7 @@ use crate::FuseLazyPartInfo; use crate::FuseTable; use crate::SegmentLocation; -pub struct MutationTaskInfo { - pub total_tasks: usize, - pub num_whole_block_mutation: usize, -} - impl FuseTable { - pub fn try_eval_const( - &self, - ctx: Arc<dyn TableContext>, - schema: &TableSchema, - filter: &RemoteExpr<String>, - ) -> Result<bool> { - let dummy_field = DataField::new("dummy", DataType::Null); - let _dummy_schema = Arc::new(DataSchema::new(vec![dummy_field])); - let dummy_value = Value::Column(Column::Null { len: 1 }); - let dummy_block = DataBlock::new(vec![BlockEntry::new(DataType::Null, dummy_value)], 1); - - let filter = filter - .as_expr(&BUILTIN_FUNCTIONS) - .project_column_ref(|name| schema.index_of(name).unwrap()); - - assert_eq!(filter.data_type(), &DataType::Boolean); - - let func_ctx = ctx.get_function_context()?; - let evaluator = Evaluator::new(&dummy_block, &func_ctx, &BUILTIN_FUNCTIONS); - let predicates = evaluator - .run(&filter) - .map_err(|e| e.add_message("eval try eval const failed:"))? - .try_downcast::<BooleanType>() - .unwrap(); - - Ok(match &predicates { - Value::Scalar(v) => *v, - Value::Column(bitmap) => bitmap.null_count() == 0, - }) - } - #[async_backtrace::framed] pub fn add_mutation_source( &self, @@ -181,31 +136,32 @@ impl FuseTable { filters: Option<Filters>, is_lazy: bool, is_delete: bool, - ) -> Result<Partitions> { - let partitions = if is_lazy { + ) -> Result<(PartStatistics, Partitions)> { + if is_lazy { + let segment_len = snapshot.segments.len(); let mut segments = Vec::with_capacity(snapshot.segments.len()); for (idx, segment_location) in snapshot.segments.iter().enumerate() { segments.push(FuseLazyPartInfo::create(idx, segment_location.clone())); } - Partitions::create(PartitionsShuffleKind::Mod, segments) + Ok(( + PartStatistics::new_estimated( + None, + snapshot.summary.row_count as usize, + snapshot.summary.compressed_byte_size as usize, + segment_len, + segment_len, + ), + Partitions::create(PartitionsShuffleKind::Mod, segments), + )) } else { let projection = Projection::Columns(col_indices.clone()); let prune_ctx = MutationBlockPruningContext { segment_locations: create_segment_location_vector(snapshot.segments.clone(), None), block_count: Some(snapshot.summary.block_count as usize), }; - let (partitions, info) = self - .do_mutation_block_pruning(ctx, filters, projection, prune_ctx, true, is_delete) - .await?; - if is_delete { - log::info!( - "delete pruning done, number of whole block deletion detected in pruning phase: {}", - info.num_whole_block_mutation - ); - } - partitions - }; - Ok(partitions) + self.do_mutation_block_pruning(ctx, filters, projection, prune_ctx, is_delete) + .await + } } #[async_backtrace::framed] @@ -216,9 +172,8 @@ impl FuseTable { filters: Option<Filters>, projection: Projection, prune_ctx: MutationBlockPruningContext, - with_origin: bool, is_delete: bool, - ) -> Result<(Partitions, MutationTaskInfo)> { + ) -> Result<(PartStatistics, Partitions)> { let MutationBlockPruningContext { segment_locations, block_count, @@ -243,7 +198,7 @@ impl FuseTable { // now the `block_metas` refers to the blocks that need to be deleted completely or partially. // // let's try pruning the blocks further to get the blocks that need to be deleted completely, so that - // later during mutation, we need not to load the data of these blocks: + // later during mutation, we need not load the data of these blocks: // // 1. invert the filter expression // 2. apply the inverse filter expression to the block metas, utilizing range index @@ -287,7 +242,7 @@ impl FuseTable { .map(|(block_meta_index, block_meta)| (Some(block_meta_index), block_meta)) .collect::<Vec<_>>(); - let (_, inner_parts) = self.read_partitions_with_metas( + let (statistics, inner_parts) = self.read_partitions_with_metas( ctx.clone(), self.schema_with_stream(), None, @@ -302,11 +257,7 @@ impl FuseTable { .into_iter() .zip(inner_parts.partitions.into_iter()) .map(|((index, block_meta), inner_part)| { - let cluster_stats = if with_origin { - block_meta.cluster_stats.clone() - } else { - None - }; + let cluster_stats = block_meta.cluster_stats.clone(); let key = (index.segment_idx, index.block_idx); let whole_block_mutation = whole_block_deletions.contains(&key); let part_info_ptr: PartInfoPtr = @@ -340,10 +291,13 @@ impl FuseTable { } metrics_inc_deletion_block_range_pruned_whole_block_nums(num_whole_block_mutation as u64); metrics_inc_deletion_segment_range_purned_whole_segment_nums(segment_num as u64); - Ok((parts, MutationTaskInfo { - total_tasks: part_num, - num_whole_block_mutation, - })) + if is_delete { + log::info!( + "delete pruning done, number of whole block deletion detected in pruning phase: {}", + num_whole_block_mutation + ); + } + Ok((statistics, parts)) } } diff --git a/src/query/storages/fuse/src/operations/truncate.rs b/src/query/storages/fuse/src/operations/truncate.rs index 6da256d0f7309..14d3215f6855c 100644 --- a/src/query/storages/fuse/src/operations/truncate.rs +++ b/src/query/storages/fuse/src/operations/truncate.rs @@ -20,13 +20,13 @@ use databend_common_exception::Result; use databend_common_expression::DataBlock; use databend_common_pipeline_core::Pipeline; use databend_common_pipeline_sources::OneBlockSource; +use databend_common_sql::plans::TruncateMode; use databend_storages_common_table_meta::meta::TableSnapshot; use crate::operations::common::CommitMeta; use crate::operations::common::CommitSink; use crate::operations::common::ConflictResolveContext; use crate::operations::common::TruncateGenerator; -use crate::operations::common::TruncateMode; use crate::FuseTable; impl FuseTable { diff --git a/tests/sqllogictests/suites/mode/cluster/memo/aggregate_property.test b/tests/sqllogictests/suites/mode/cluster/memo/aggregate_property.test index 205b7ebb4bf0c..4b40e88b7cf64 100644 --- a/tests/sqllogictests/suites/mode/cluster/memo/aggregate_property.test +++ b/tests/sqllogictests/suites/mode/cluster/memo/aggregate_property.test @@ -26,7 +26,7 @@ where t_10.a = t_1000.a and t_100.a = t_1000.a ---- Memo ├── root group: #8 -├── estimated memory: 12.09 KiB +├── estimated memory: 9.84 KiB ├── Group #0 │ ├── Best properties │ │ ├── { dist: Any }: expr: #0, cost: 1000.000, children: [] @@ -89,7 +89,7 @@ group by t_10.a, t_100.a ---- Memo ├── root group: #8 -├── estimated memory: 30.23 KiB +├── estimated memory: 24.61 KiB ├── Group #0 │ ├── Best properties │ │ ├── { dist: Any }: expr: #0, cost: 1000.000, children: [] diff --git a/tests/sqllogictests/suites/mode/cluster/memo/join_property.test b/tests/sqllogictests/suites/mode/cluster/memo/join_property.test index 4814bf5f62abe..797e08163c9f5 100644 --- a/tests/sqllogictests/suites/mode/cluster/memo/join_property.test +++ b/tests/sqllogictests/suites/mode/cluster/memo/join_property.test @@ -25,7 +25,7 @@ select * from t_10, t_100, t_1000 where t_10.a = t_1000.a and t_100.a = t_1000.a ---- Memo ├── root group: #5 -├── estimated memory: 9.41 KiB +├── estimated memory: 7.66 KiB ├── Group #0 │ ├── Best properties │ │ ├── { dist: Any }: expr: #0, cost: 1000.000, children: [] @@ -73,7 +73,7 @@ select * from t_1000 left join t_10 on t_1000.a = t_10.a left join t_100 on t_10 ---- Memo ├── root group: #5 -├── estimated memory: 8.73 KiB +├── estimated memory: 7.11 KiB ├── Group #0 │ ├── Best properties │ │ ├── { dist: Any }: expr: #0, cost: 1000.000, children: [] @@ -119,7 +119,7 @@ select * from t_1000 right join t_10 on t_1000.a = t_10.a right join t_100 on t_ ---- Memo ├── root group: #5 -├── estimated memory: 7.39 KiB +├── estimated memory: 6.02 KiB ├── Group #0 │ ├── Best properties │ │ ├── { dist: Any }: expr: #0, cost: 1000.000, children: [] @@ -161,7 +161,7 @@ select * from t_1000 full join t_10 on t_1000.a = t_10.a full join t_100 on t_10 ---- Memo ├── root group: #5 -├── estimated memory: 7.39 KiB +├── estimated memory: 6.02 KiB ├── Group #0 │ ├── Best properties │ │ ├── { dist: Any }: expr: #0, cost: 1000.000, children: [] @@ -203,7 +203,7 @@ select * from t_10, t_100, t_1000 ---- Memo ├── root group: #5 -├── estimated memory: 6.05 KiB +├── estimated memory: 4.92 KiB ├── Group #0 │ ├── Best properties │ │ └── { dist: Any }: expr: #0, cost: 10.000, children: [] diff --git a/tests/sqllogictests/suites/mode/cluster/memo/mix_property.test b/tests/sqllogictests/suites/mode/cluster/memo/mix_property.test index 5643c11726769..910ceabeadc13 100644 --- a/tests/sqllogictests/suites/mode/cluster/memo/mix_property.test +++ b/tests/sqllogictests/suites/mode/cluster/memo/mix_property.test @@ -29,7 +29,7 @@ limit 10 ---- Memo ├── root group: #10 -├── estimated memory: 31.58 KiB +├── estimated memory: 25.70 KiB ├── Group #0 │ ├── Best properties │ │ ├── { dist: Any }: expr: #0, cost: 1000.000, children: [] diff --git a/tests/sqllogictests/suites/mode/cluster/merge_into_non_equal_distributed.test b/tests/sqllogictests/suites/mode/cluster/merge_into_non_equal_distributed.test index 5a767a64877b7..79abb10cbf086 100644 --- a/tests/sqllogictests/suites/mode/cluster/merge_into_non_equal_distributed.test +++ b/tests/sqllogictests/suites/mode/cluster/merge_into_non_equal_distributed.test @@ -96,17 +96,7 @@ CommitSink query T explain merge into t1 using (select * from t2) as t on 1 <> 1 when matched then update * ---- -CommitSink -└── Exchange - ├── output columns: [] - ├── exchange type: Merge - └── DataMutation - ├── target table: [catalog: default] [database: default] [table: t1] - ├── matched delete: [condition: None] - └── Exchange - ├── output columns: [t2.a (#0), t1._row_id (#2)] - ├── exchange type: Hash(bit_and(bit_shift_right(t1._row_id (#2), 31), 2047)) - └── EmptyResultScan +EmptyResultScan ## check there is add row_number. query T diff --git a/tests/sqllogictests/suites/mode/cluster/update.test b/tests/sqllogictests/suites/mode/cluster/update.test index 108148d4ea06e..6f18dd622c073 100644 --- a/tests/sqllogictests/suites/mode/cluster/update.test +++ b/tests/sqllogictests/suites/mode/cluster/update.test @@ -30,7 +30,14 @@ Fragment 0: ExchangeSink ├── output columns: [] ├── destination fragment: [1] - └── Mutation Source + └── MutationSource(Update) + ├── table: default.db1.t1 + ├── output columns: [a (#0), b (#1), _predicate (#2)] + ├── filters: [is_true(t1.b (#1) > '2022-12-31')] + ├── read rows: 1 + ├── read size: < 1 KiB + ├── partitions total: 2 + └── partitions scanned: 1 (empty) (empty) Fragment 1: @@ -50,16 +57,5 @@ query T explain fragments UPDATE t1 SET a = 3 WHERE false ---- Fragment 0: - DataExchange: Merge - ExchangeSink - ├── output columns: [] - ├── destination fragment: [1] - └── Mutation Source -(empty) -(empty) -Fragment 1: - CommitSink - └── ExchangeSource - ├── output columns: [] - └── source fragment: [0] + EmptyResultScan (empty) diff --git a/tests/sqllogictests/suites/mode/standalone/explain/delete.test b/tests/sqllogictests/suites/mode/standalone/explain/delete.test index 64bb6d9b7f8a0..bd0be5b91b7c3 100644 --- a/tests/sqllogictests/suites/mode/standalone/explain/delete.test +++ b/tests/sqllogictests/suites/mode/standalone/explain/delete.test @@ -20,8 +20,14 @@ query T explain delete from t1 ---- CommitSink -└── Mutation Source - +└── MutationSource(DeleteAll) + ├── table: default.default.t1 + ├── output columns: [a (#0), b (#1)] + ├── filters: [] + ├── read rows: 0 + ├── read size: 0 + ├── partitions total: 0 + └── partitions scanned: 0 query T explain delete from t1 where a in (select a from t2); @@ -64,7 +70,14 @@ query T explain delete from t1 where a > 2; ---- CommitSink -└── Mutation Source +└── MutationSource(Delete) + ├── table: default.default.t1 + ├── output columns: [a (#0), b (#1)] + ├── filters: [is_true(t1.a (#0) > 2)] + ├── read rows: 4 + ├── read size: < 1 KiB + ├── partitions total: 1 + └── partitions scanned: 1 query T explain delete from t1 where a in (select a from t2) and b > 2; diff --git a/tests/sqllogictests/suites/mode/standalone/explain/merge_into.test b/tests/sqllogictests/suites/mode/standalone/explain/merge_into.test index 31d53008c4c9b..cda3b7f653ce8 100644 --- a/tests/sqllogictests/suites/mode/standalone/explain/merge_into.test +++ b/tests/sqllogictests/suites/mode/standalone/explain/merge_into.test @@ -56,11 +56,7 @@ CommitSink query T explain merge into salaries2 using employees2 on 1 != 1 when matched AND employees2.department = 'HR' THEN UPDATE SET salaries2.salary = salaries2.salary + 1000.00 WHEN MATCHED THEN UPDATE SET salaries2.salary = salaries2.salary + 500.00 ---- -CommitSink -└── DataMutation - ├── target table: [catalog: default] [database: default] [table: salaries2] - ├── matched delete: [condition: None] - └── EmptyResultScan +EmptyResultScan query T explain MERGE INTO salaries2 USING (SELECT * FROM employees2) as employees2 ON salaries2.employee_id = employees2.employee_id WHEN MATCHED AND employees2.department = 'HR' THEN UPDATE SET salaries2.salary = salaries2.salary + 1000.00 WHEN MATCHED THEN UPDATE SET salaries2.salary = salaries2.salary + 500.00 WHEN NOT MATCHED THEN INSERT (employee_id, salary) VALUES (employees2.employee_id, 55000.00); @@ -140,9 +136,10 @@ CommitSink ├── table: default.default.salaries2 ├── output columns: [employee_id (#3), _row_id (#5)] ├── read rows: 6 - ├── read size: 1.19 KiB + ├── read size: < 1 KiB ├── partitions total: 2 ├── partitions scanned: 2 + ├── pruning stats: [segments: <range pruning: 2 to 2>, blocks: <range pruning: 2 to 2>] ├── push downs: [filters: [], limit: NONE] └── estimated rows: 6.00 @@ -180,9 +177,10 @@ CommitSink ├── table: default.default.salaries2 ├── output columns: [employee_id (#3), _row_id (#5)] ├── read rows: 6 - ├── read size: 1.19 KiB + ├── read size: < 1 KiB ├── partitions total: 2 ├── partitions scanned: 2 + ├── pruning stats: [segments: <range pruning: 2 to 2>, blocks: <range pruning: 2 to 2>] ├── push downs: [filters: [], limit: NONE] └── estimated rows: 6.00 diff --git a/tests/sqllogictests/suites/mode/standalone/explain/update.test b/tests/sqllogictests/suites/mode/standalone/explain/update.test index dce46aa427451..5ef2637e78244 100644 --- a/tests/sqllogictests/suites/mode/standalone/explain/update.test +++ b/tests/sqllogictests/suites/mode/standalone/explain/update.test @@ -60,7 +60,30 @@ query T explain update t1 set a = a + 1 where a > 2; ---- CommitSink -└── Mutation Source +└── MutationSource(Update) + ├── table: default.default.t1 + ├── output columns: [a (#0), b (#1), _predicate (#2)] + ├── filters: [is_true(t1.a (#0) > 2)] + ├── read rows: 4 + ├── read size: < 1 KiB + ├── partitions total: 1 + └── partitions scanned: 1 + +query T +explain analyze partial update t1 set a = a + 1 where a > 2; +---- +MutationSource +├── table: default.default.t1 +├── filters: [is_true(t1.a (#0) > 2)] +└── output rows: 4 + +query II +select * from t1 order by a; +---- +1 2 +2 3 +3 4 +8 9 query T explain update t1 set a = a + 1 where a in (select a from t2) and b > 2; @@ -102,6 +125,35 @@ CommitSink ├── push downs: [filters: [is_true(t1.b (#1) > 2)], limit: NONE] └── estimated rows: 4.00 +query T +explain analyze partial update t1 set a = a + 1 where a in (select a from t2) and b > 2; +---- +HashJoin: LEFT SEMI +├── estimated rows: 2.00 +├── output rows: 2 +├── TableScan +│ ├── table: default.default.t2 +│ ├── estimated rows: 2.00 +│ └── output rows: 2 +└── Filter + ├── filters: [is_true(t1.b (#1) > 2)] + ├── estimated rows: 3.00 + ├── output rows: 3 + └── TableScan + ├── table: default.default.t1 + ├── estimated rows: 4.00 + └── output rows: 4 + +query II +select * from t1 order by a; +---- +1 2 +2 3 +3 4 +8 9 + + + statement ok CREATE OR REPLACE TABLE t1 ( id INT,
angular
https://github.com/angular/angular
cb6d73a84ef060a013d022b7696c68d343f62103
Andrew Scott
2023-01-06 04:20:53
fix(router): page refresh should not destroy history state (#48540)
The router's `initialNavigation` causes an imperative navigation using the `navigateByUrl` method. This, however, results in the history state being removed on a page refresh. This change calls `scheduleNavigation` directly from `initialNavigation` to ensure the history state is correctly retained. PR Close #48540
fix(router): page refresh should not destroy history state (#48540) The router's `initialNavigation` causes an imperative navigation using the `navigateByUrl` method. This, however, results in the history state being removed on a page refresh. This change calls `scheduleNavigation` directly from `initialNavigation` to ensure the history state is correctly retained. PR Close #48540
diff --git a/packages/router/src/events.ts b/packages/router/src/events.ts index 3aa5c5966fe03..4f4062073b9e2 100644 --- a/packages/router/src/events.ts +++ b/packages/router/src/events.ts @@ -19,6 +19,7 @@ import {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state'; * @publicApi */ export type NavigationTrigger = 'imperative'|'popstate'|'hashchange'; +export const IMPERATIVE_NAVIGATION = 'imperative'; /** * Identifies the type of a router event. diff --git a/packages/router/src/navigation_transition.ts b/packages/router/src/navigation_transition.ts index b7fddf057777f..162105034ac1b 100644 --- a/packages/router/src/navigation_transition.ts +++ b/packages/router/src/navigation_transition.ts @@ -11,7 +11,7 @@ import {BehaviorSubject, combineLatest, EMPTY, Observable, of, Subject} from 'rx import {catchError, defaultIfEmpty, filter, finalize, map, switchMap, take, tap} from 'rxjs/operators'; import {createRouterState} from './create_router_state'; -import {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationCancellationCode, NavigationEnd, NavigationError, NavigationSkipped, NavigationSkippedCode, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events'; +import {Event, GuardsCheckEnd, GuardsCheckStart, IMPERATIVE_NAVIGATION, NavigationCancel, NavigationCancellationCode, NavigationEnd, NavigationError, NavigationSkipped, NavigationSkippedCode, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events'; import {NavigationBehaviorOptions, QueryParamsHandling, Route, Routes} from './models'; import {isNavigationCancelingError, isRedirectingNavigationCancelingError, redirectingNavigationError} from './navigation_canceling_error'; import {activateRoutes} from './operators/activate_routes'; @@ -335,7 +335,7 @@ export class NavigationTransitions { resolve: null, reject: null, promise: Promise.resolve(true), - source: 'imperative', + source: IMPERATIVE_NAVIGATION, restoredState: null, currentSnapshot: router.routerState.snapshot, targetSnapshot: null, @@ -726,11 +726,12 @@ export class NavigationTransitions { isBrowserTriggeredNavigation(overallTransitionState.source) }; - router.scheduleNavigation(mergedTree, 'imperative', null, extras, { - resolve: overallTransitionState.resolve, - reject: overallTransitionState.reject, - promise: overallTransitionState.promise - }); + router.scheduleNavigation( + mergedTree, IMPERATIVE_NAVIGATION, null, extras, { + resolve: overallTransitionState.resolve, + reject: overallTransitionState.reject, + promise: overallTransitionState.promise + }); } /* All other errors should reset to the router's internal URL reference @@ -764,6 +765,6 @@ export class NavigationTransitions { } } -export function isBrowserTriggeredNavigation(source: 'imperative'|'popstate'|'hashchange') { - return source !== 'imperative'; +export function isBrowserTriggeredNavigation(source: NavigationTrigger) { + return source !== IMPERATIVE_NAVIGATION; } diff --git a/packages/router/src/router.ts b/packages/router/src/router.ts index 368ffdd4b3168..ed2c1f6530ac8 100644 --- a/packages/router/src/router.ts +++ b/packages/router/src/router.ts @@ -12,7 +12,7 @@ import {Observable, of, SubscriptionLike} from 'rxjs'; import {CreateUrlTreeStrategy} from './create_url_tree_strategy'; import {RuntimeErrorCode} from './errors'; -import {Event, NavigationTrigger} from './events'; +import {Event, IMPERATIVE_NAVIGATION, NavigationTrigger} from './events'; import {NavigationBehaviorOptions, OnSameUrlNavigation, Routes} from './models'; import {Navigation, NavigationExtras, NavigationTransition, NavigationTransitions, RestoredState, UrlCreationOptions} from './navigation_transition'; import {TitleStrategy} from './page_title_strategy'; @@ -354,7 +354,8 @@ export class Router { initialNavigation(): void { this.setUpLocationChangeListener(); if (!this.navigationTransitions.hasRequestedNavigation) { - this.navigateByUrl(this.location.path(true), {replaceUrl: true}); + const state = this.location.getState() as RestoredState; + this.navigateToSyncWithBrowser(this.location.path(true), IMPERATIVE_NAVIGATION, state); } } @@ -374,37 +375,49 @@ export class Router { // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS // hybrid apps. setTimeout(() => { - const extras: NavigationExtras = {replaceUrl: true}; - - // TODO: restoredState should always include the entire state, regardless - // of navigationId. This requires a breaking change to update the type on - // NavigationStart’s restoredState, which currently requires navigationId - // to always be present. The Router used to only restore history state if - // a navigationId was present. - - // The stored navigationId is used by the RouterScroller to retrieve the scroll - // position for the page. - const restoredState = event.state?.navigationId ? event.state : null; - - // Separate to NavigationStart.restoredState, we must also restore the state to - // history.state and generate a new navigationId, since it will be overwritten - if (event.state) { - const stateCopy = {...event.state} as Partial<RestoredState>; - delete stateCopy.navigationId; - delete stateCopy.ɵrouterPageId; - if (Object.keys(stateCopy).length !== 0) { - extras.state = stateCopy; - } - } - - const urlTree = this.parseUrl(event['url']!); - this.scheduleNavigation(urlTree, source, restoredState, extras); + this.navigateToSyncWithBrowser(event['url']!, source, event.state); }, 0); } }); } } + /** + * Schedules a router navigation to synchronize Router state with the browser state. + * + * This is done as a response to a popstate event and the initial navigation. These + * two scenarios represent times when the browser URL/state has been updated and + * the Router needs to respond to ensure its internal state matches. + */ + private navigateToSyncWithBrowser( + url: string, source: NavigationTrigger, state: RestoredState|undefined) { + const extras: NavigationExtras = {replaceUrl: true}; + + // TODO: restoredState should always include the entire state, regardless + // of navigationId. This requires a breaking change to update the type on + // NavigationStart’s restoredState, which currently requires navigationId + // to always be present. The Router used to only restore history state if + // a navigationId was present. + + // The stored navigationId is used by the RouterScroller to retrieve the scroll + // position for the page. + const restoredState = state?.navigationId ? state : null; + + // Separate to NavigationStart.restoredState, we must also restore the state to + // history.state and generate a new navigationId, since it will be overwritten + if (state) { + const stateCopy = {...state} as Partial<RestoredState>; + delete stateCopy.navigationId; + delete stateCopy.ɵrouterPageId; + if (Object.keys(stateCopy).length !== 0) { + extras.state = stateCopy; + } + } + + const urlTree = this.parseUrl(url); + this.scheduleNavigation(urlTree, source, restoredState, extras); + } + /** The current URL. */ get url(): string { return this.serializeUrl(this.currentUrlTree); @@ -562,7 +575,7 @@ export class Router { const urlTree = isUrlTree(url) ? url : this.parseUrl(url); const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree); - return this.scheduleNavigation(mergedTree, 'imperative', null, extras); + return this.scheduleNavigation(mergedTree, IMPERATIVE_NAVIGATION, null, extras); } /** @@ -687,10 +700,6 @@ export class Router { let targetPageId: number; if (this.canceledNavigationResolution === 'computed') { - const isInitialPage = this.currentPageId === 0; - if (isInitialPage) { - restoredState = this.location.getState() as RestoredState | null; - } // If the `ɵrouterPageId` exist in the state then `targetpageId` should have the value of // `ɵrouterPageId`. This is the case for something like a page refresh where we assign the // target id to the previously set value for that page.
git-branchless
https://github.com/arxanas/git-branchless
16aab34ecca9105427ecce390633660dcb442d95
dependabot[bot]
2025-01-21 02:10:35
build: bump indexmap from 2.7.0 to 2.7.1
Bumps [indexmap](https://github.com/indexmap-rs/indexmap) from 2.7.0 to 2.7.1. - [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md) - [Commits](https://github.com/indexmap-rs/indexmap/compare/2.7.0...2.7.1) ---
build: bump indexmap from 2.7.0 to 2.7.1 Bumps [indexmap](https://github.com/indexmap-rs/indexmap) from 2.7.0 to 2.7.1. - [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md) - [Commits](https://github.com/indexmap-rs/indexmap/compare/2.7.0...2.7.1) --- updated-dependencies: - dependency-name: indexmap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
diff --git a/Cargo.lock b/Cargo.lock index 016f7811e..c309dc665 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1729,7 +1729,7 @@ dependencies = [ "git-branchless-opts", "git-branchless-revset", "git-branchless-test", - "indexmap 2.7.0", + "indexmap 2.7.1", "insta", "itertools 0.14.0", "lazy_static", @@ -1758,7 +1758,7 @@ dependencies = [ "git-branchless-lib", "git-branchless-opts", "git-branchless-revset", - "indexmap 2.7.0", + "indexmap 2.7.1", "insta", "itertools 0.14.0", "lazy_static", @@ -1969,9 +1969,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", "hashbrown 0.15.0", @@ -2580,7 +2580,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.7.0", + "indexmap 2.7.1", ] [[package]] @@ -3088,7 +3088,7 @@ checksum = "088c5d71572124929ea7549a8ce98e1a6fd33d0a38367b09027b382e67c033db" name = "scm-bisect" version = "0.3.0" dependencies = [ - "indexmap 2.7.0", + "indexmap 2.7.1", "insta", "itertools 0.14.0", "maplit", diff --git a/Cargo.toml b/Cargo.toml index 9f3118b0f..01e6df9c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,7 +71,7 @@ git-branchless-test = { version = "0.10.0", path = "git-branchless-test" } git-branchless-undo = { version = "0.10.0", path = "git-branchless-undo" } git2 = { version = "0.20.0", default-features = false } glob = "0.3.2" -indexmap = "2.7.0" +indexmap = "2.7.1" indicatif = { version = "0.17.9", features = ["improved_unicode"] } itertools = "0.14.0" lalrpop = "0.19.12"
angular
https://github.com/angular/angular
631da1dbb0ea7d429fc2662b1fe5a98f80d31669
Joey Perrott
2023-12-05 11:17:10
build: set up markdown pipeline for the tools section (#53290)
Set up the markdown pipeline to include the required source files. PR Close #53290
build: set up markdown pipeline for the tools section (#53290) Set up the markdown pipeline to include the required source files. PR Close #53290
diff --git a/adev/src/content/examples/angular-linker-plugin/BUILD.bazel b/adev/src/content/examples/angular-linker-plugin/BUILD.bazel new file mode 100644 index 00000000000000..af49d1ebbf8f2a --- /dev/null +++ b/adev/src/content/examples/angular-linker-plugin/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["*"])) diff --git a/adev/src/content/examples/cli-builder/BUILD.bazel b/adev/src/content/examples/cli-builder/BUILD.bazel new file mode 100644 index 00000000000000..ccc23edb4edae3 --- /dev/null +++ b/adev/src/content/examples/cli-builder/BUILD.bazel @@ -0,0 +1 @@ +exports_files(glob(["**/*"])) diff --git a/adev/src/content/tools/BUILD.bazel b/adev/src/content/tools/BUILD.bazel new file mode 100644 index 00000000000000..a90c7ba790c843 --- /dev/null +++ b/adev/src/content/tools/BUILD.bazel @@ -0,0 +1,8 @@ +load("@npm//@angular/build-tooling/bazel/markdown_to_html:markdown_to_html.bzl", "markdown_to_html") + +markdown_to_html( + name = "tools", + srcs = glob([ + "*.md", + ]), +) diff --git a/adev/src/content/tools/cli/BUILD.bazel b/adev/src/content/tools/cli/BUILD.bazel new file mode 100644 index 00000000000000..4aadd826cc8f8d --- /dev/null +++ b/adev/src/content/tools/cli/BUILD.bazel @@ -0,0 +1,21 @@ +load("@npm//@angular/build-tooling/bazel/markdown_to_html:markdown_to_html.bzl", "markdown_to_html") + +markdown_to_html( + name = "cli", + srcs = glob([ + "*.md", + ]), + data = [ + "//adev/src/content/examples/cli-builder:src/my-builder.spec.ts", + "//adev/src/content/examples/cli-builder:src/my-builder.ts", + "//adev/src/content/examples/schematics-for-libraries:projects/my-lib/package.json", + "//adev/src/content/examples/schematics-for-libraries:projects/my-lib/schematics/collection.1.json", + "//adev/src/content/examples/schematics-for-libraries:projects/my-lib/schematics/collection.json", + "//adev/src/content/examples/schematics-for-libraries:projects/my-lib/schematics/my-service/index.1.ts", + "//adev/src/content/examples/schematics-for-libraries:projects/my-lib/schematics/my-service/index.ts", + "//adev/src/content/examples/schematics-for-libraries:projects/my-lib/schematics/my-service/schema.json", + "//adev/src/content/examples/schematics-for-libraries:projects/my-lib/schematics/my-service/schema.ts", + "//adev/src/content/examples/schematics-for-libraries:projects/my-lib/schematics/ng-add/index.ts", + "//adev/src/content/examples/schematics-for-libraries:projects/my-lib/tsconfig.schematics.json", + ], +) diff --git a/adev/src/content/tools/cli/cli-builder.md b/adev/src/content/tools/cli/cli-builder.md index 3f3171ee1b007a..ffd6d678f6d9fa 100644 --- a/adev/src/content/tools/cli/cli-builder.md +++ b/adev/src/content/tools/cli/cli-builder.md @@ -53,13 +53,13 @@ Builders can be published to `npm`, see [Publishing your Library](tools/librarie As an example, create a builder that copies a file to a new location. To create a builder, use the `createBuilder()` CLI Builder function, and return a `Promise<BuilderOutput>` object. -<docs-code header="src/my-builder.ts (builder skeleton)" path="cli-builder/src/my-builder.ts" visibleRegion="builder-skeleton"/> +<docs-code header="src/my-builder.ts (builder skeleton)" path="adev/src/content/examples/cli-builder/src/my-builder.ts" visibleRegion="builder-skeleton"/> Now let's add some logic to it. The following code retrieves the source and destination file paths from user options and copies the file from the source to the destination \(using the [Promise version of the built-in NodeJS `copyFile()` function](https://nodejs.org/api/fs.html#fs_fspromises_copyfile_src_dest_mode)\). If the copy operation fails, it returns an error with a message about the underlying problem. -<docs-code header="src/my-builder.ts (builder)" path="cli-builder/src/my-builder.ts" visibleRegion="builder"/> +<docs-code header="src/my-builder.ts (builder)" path="adev/src/content/examples/cli-builder/src/my-builder.ts" visibleRegion="builder"/> ### Handling output @@ -70,7 +70,7 @@ This also lets the builder itself be executed in a separate process, even if the You can retrieve a `Logger` instance from the context. -<docs-code header="src/my-builder.ts (handling output)" path="cli-builder/src/my-builder.ts" visibleRegion="handling-output"/> +<docs-code header="src/my-builder.ts (handling output)" path="adev/src/content/examples/cli-builder/src/my-builder.ts" visibleRegion="handling-output"/> ### Progress and status reporting @@ -87,7 +87,7 @@ HELPFUL: There's no guarantee that a long string will be shown entirely; it coul Pass an empty string to remove the status. -<docs-code header="src/my-builder.ts (progress reporting)" path="cli-builder/src/my-builder.ts" visibleRegion="progress-reporting"/> +<docs-code header="src/my-builder.ts (progress reporting)" path="adev/src/content/examples/cli-builder/src/my-builder.ts" visibleRegion="progress-reporting"/> ## Builder input @@ -164,7 +164,7 @@ The first part of this is the package name and the second part is the builder na These values are accessed on `options.source` and `options.destination`. -<docs-code header="src/my-builder.ts (report status)" path="cli-builder/src/my-builder.ts" visibleRegion="report-status"/> +<docs-code header="src/my-builder.ts (report status)" path="adev/src/content/examples/cli-builder/src/my-builder.ts" visibleRegion="report-status"/> ### Target configuration @@ -368,7 +368,7 @@ In the builder source directory, create a new test file `my-builder.spec.ts`. Th Here's an example of a test that runs the copy file builder. The test uses the builder to copy the `package.json` file and validates that the copied file's contents are the same as the source. -<docs-code header="src/my-builder.spec.ts" path="cli-builder/src/my-builder.spec.ts"/> +<docs-code header="src/my-builder.spec.ts" path="adev/src/content/examples/cli-builder/src/my-builder.spec.ts"/> HELPFUL: When running this test in your repo, you need the [`ts-node`](https://github.com/TypeStrong/ts-node) package. You can avoid this by renaming `my-builder.spec.ts` to `my-builder.spec.js`. diff --git a/adev/src/content/tools/cli/schematics-for-libraries.md b/adev/src/content/tools/cli/schematics-for-libraries.md index 2c1bd2502190ee..b32e39227eb620 100644 --- a/adev/src/content/tools/cli/schematics-for-libraries.md +++ b/adev/src/content/tools/cli/schematics-for-libraries.md @@ -16,7 +16,7 @@ The following steps show you how to add initial support without modifying any pr 1. At the root level of the `schematics` folder, create a `collection.json` file. 1. Edit the `collection.json` file to define the initial schema for your collection. - <docs-code header="projects/my-lib/schematics/collection.json (Schematics Collection)" path="schematics-for-libraries/projects/my-lib/schematics/collection.1.json"/> + <docs-code header="projects/my-lib/schematics/collection.json (Schematics Collection)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/collection.1.json"/> * The `$schema` path is relative to the Angular Devkit collection schema. * The `schematics` object describes the named schematics that are part of this collection. @@ -26,7 +26,7 @@ The following steps show you how to add initial support without modifying any pr 1. In your library project's `package.json` file, add a "schematics" entry with the path to your schema file. The Angular CLI uses this entry to find named schematics in your collection when it runs commands. - <docs-code header="projects/my-lib/package.json (Schematics Collection Reference)" path="schematics-for-libraries/projects/my-lib/package.json" visibleRegion="collection"/> + <docs-code header="projects/my-lib/package.json (Schematics Collection Reference)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/package.json" visibleRegion="collection"/> The initial schema that you have created tells the CLI where to find the schematic that supports the `ng add` command. Now you are ready to create that schematic. @@ -40,7 +40,7 @@ The following steps define this type of schematic. 1. Create the main file, `index.ts`. 1. Open `index.ts` and add the source code for your schematic factory function. - <docs-code header="projects/my-lib/schematics/ng-add/index.ts (ng-add Rule Factory)" path="schematics-for-libraries/projects/my-lib/schematics/ng-add/index.ts"/> + <docs-code header="projects/my-lib/schematics/ng-add/index.ts (ng-add Rule Factory)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/ng-add/index.ts"/> The Angular CLI will install the latest version of the library automatically, and this example is taking it a step further by adding the `MyLibModule` to the root of the application. The `addRootImport` function accepts a callback that needs to return a code block. You can write any code inside of the string tagged with the `code` function and any external symbol have to be wrapped with the `external` function to ensure that the appropriate import statements are generated. @@ -48,7 +48,7 @@ The Angular CLI will install the latest version of the library automatically, an Use the `save` option of `ng-add` to configure if the library should be added to the `dependencies`, the `devDependencies`, or not saved at all in the project's `package.json` configuration file. -<docs-code header="projects/my-lib/package.json (ng-add Reference)" path="schematics-for-libraries/projects/my-lib/package.json" visibleRegion="ng-add"/> +<docs-code header="projects/my-lib/package.json (ng-add Reference)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/package.json" visibleRegion="ng-add"/> Possible values are: @@ -72,7 +72,7 @@ To tell the library how to build the schematics, add a `tsconfig.schematics.json 1. Edit the `tsconfig.schematics.json` file to add the following content. - <docs-code header="projects/my-lib/tsconfig.schematics.json (TypeScript Config)" path="schematics-for-libraries/projects/my-lib/tsconfig.schematics.json"/> + <docs-code header="projects/my-lib/tsconfig.schematics.json (TypeScript Config)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/tsconfig.schematics.json"/> | Options | Details | |:--- |:--- | @@ -81,7 +81,7 @@ To tell the library how to build the schematics, add a `tsconfig.schematics.json 1. To make sure your schematics source files get compiled into the library bundle, add the following scripts to the `package.json` file in your library project's root folder \(`projects/my-lib`\). - <docs-code header="projects/my-lib/package.json (Build Scripts)" path="schematics-for-libraries/projects/my-lib/package.json"/> + <docs-code header="projects/my-lib/package.json (Build Scripts)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/package.json"/> * The `build` script compiles your schematic using the custom `tsconfig.schematics.json` file * The `postbuild` script copies the schematic files after the `build` script completes @@ -109,12 +109,12 @@ When you add a schematic to the collection, you have to point to it in the colle 1. Edit the `schematics/collection.json` file to point to the new schematic subfolder, and include a pointer to a schema file that specifies inputs for the new schematic. - <docs-code header="projects/my-lib/schematics/collection.json (Schematics Collection)" path="schematics-for-libraries/projects/my-lib/schematics/collection.json"/> + <docs-code header="projects/my-lib/schematics/collection.json (Schematics Collection)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/collection.json"/> 1. Go to the `<lib-root>/schematics/my-service` folder. 1. Create a `schema.json` file and define the available options for the schematic. - <docs-code header="projects/my-lib/schematics/my-service/schema.json (Schematic JSON Schema)" path="schematics-for-libraries/projects/my-lib/schematics/my-service/schema.json"/> + <docs-code header="projects/my-lib/schematics/my-service/schema.json (Schematic JSON Schema)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/schema.json"/> * *id*: A unique ID for the schema in the collection. * *title*: A human-readable description of the schema. @@ -128,7 +128,7 @@ When you add a schematic to the collection, you have to point to it in the colle 1. Create a `schema.ts` file and define an interface that stores the values of the options defined in the `schema.json` file. - <docs-code header="projects/my-lib/schematics/my-service/schema.ts (Schematic Interface)" path="schematics-for-libraries/projects/my-lib/schematics/my-service/schema.ts"/> + <docs-code header="projects/my-lib/schematics/my-service/schema.ts (Schematic Interface)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/schema.ts"/> | Options | Details | |:--- |:--- | @@ -178,15 +178,15 @@ For details of these data structures and syntax, see the [Schematics README](htt 1. First, import the schematics definitions you will need. The Schematics framework offers many utility functions to create and use rules when running a schematic. - <docs-code header="projects/my-lib/schematics/my-service/index.ts (Imports)" path="schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts" visibleRegion="schematics-imports"/> + <docs-code header="projects/my-lib/schematics/my-service/index.ts (Imports)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts" visibleRegion="schematics-imports"/> 1. Import the defined schema interface that provides the type information for your schematic's options. - <docs-code header="projects/my-lib/schematics/my-service/index.ts (Schema Import)" path="schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts" visibleRegion="schema-imports"/> + <docs-code header="projects/my-lib/schematics/my-service/index.ts (Schema Import)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts" visibleRegion="schema-imports"/> 1. To build up the generation schematic, start with an empty rule factory. - <docs-code header="projects/my-lib/schematics/my-service/index.ts (Initial Rule)" path="schematics-for-libraries/projects/my-lib/schematics/my-service/index.1.ts" visibleRegion="factory"/> + <docs-code header="projects/my-lib/schematics/my-service/index.ts (Initial Rule)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.1.ts" visibleRegion="factory"/> This rule factory returns the tree without modification. The options are the option values passed through from the `ng generate` command. @@ -208,13 +208,13 @@ The `Tree` methods give you access to the complete file tree in your workspace, To use `workspaces.readWorkspace` you need to create a `workspaces.WorkspaceHost` from the `Tree`. Add the following code to your factory function. - <docs-code header="projects/my-lib/schematics/my-service/index.ts (Schema Import)" path="schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts" visibleRegion="workspace"/> + <docs-code header="projects/my-lib/schematics/my-service/index.ts (Schema Import)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts" visibleRegion="workspace"/> Be sure to check that the context exists and throw the appropriate error. 1. Now that you have the project name, use it to retrieve the project-specific configuration information. - <docs-code header="projects/my-lib/schematics/my-service/index.ts (Project)" path="schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts" visibleRegion="project-info"/> + <docs-code header="projects/my-lib/schematics/my-service/index.ts (Project)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts" visibleRegion="project-info"/> The `workspace.projects` object contains all the project-specific configuration information. @@ -223,7 +223,7 @@ The `Tree` methods give you access to the complete file tree in your workspace, The `path` option in the schematic's schema is substituted by default with the current working directory. If the `path` is not defined, use the `sourceRoot` from the project configuration along with the `projectType`. - <docs-code header="projects/my-lib/schematics/my-service/index.ts (Project Info)" path="schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts" visibleRegion="path"/> + <docs-code header="projects/my-lib/schematics/my-service/index.ts (Project Info)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts" visibleRegion="path"/> ### Define the rule @@ -232,7 +232,7 @@ Use the templating to generate any custom files required for your schematic. 1. Add the following code to your factory function. - <docs-code header="projects/my-lib/schematics/my-service/index.ts (Template transform)" path="schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts" visibleRegion="template"/> + <docs-code header="projects/my-lib/schematics/my-service/index.ts (Template transform)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts" visibleRegion="template"/> | Methods | Details | |:--- |:--- | @@ -245,14 +245,14 @@ Use the templating to generate any custom files required for your schematic. 1. Finally, the rule factory must return a rule. - <docs-code header="projects/my-lib/schematics/my-service/index.ts (Chain Rule)" path="schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts" visibleRegion="chain"/> + <docs-code header="projects/my-lib/schematics/my-service/index.ts (Chain Rule)" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts" visibleRegion="chain"/> The `chain()` method lets you combine multiple rules into a single rule, so that you can perform multiple operations in a single schematic. Here you are only merging the template rules with any code executed by the schematic. See a complete example of the following schematic rule function. -<docs-code header="projects/my-lib/schematics/my-service/index.ts" path="schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts"/> +<docs-code header="projects/my-lib/schematics/my-service/index.ts" path="adev/src/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts"/> For more information about rules and utility methods, see [Provided Rules](https://github.com/angular/angular-cli/tree/main/packages/angular_devkit/schematics#provided-rules). diff --git a/adev/src/content/tools/libraries/BUILD.bazel b/adev/src/content/tools/libraries/BUILD.bazel new file mode 100644 index 00000000000000..8dcc11d08cb5f3 --- /dev/null +++ b/adev/src/content/tools/libraries/BUILD.bazel @@ -0,0 +1,11 @@ +load("@npm//@angular/build-tooling/bazel/markdown_to_html:markdown_to_html.bzl", "markdown_to_html") + +markdown_to_html( + name = "libraries", + srcs = glob([ + "*.md", + ]), + data = [ + "//adev/src/content/examples/angular-linker-plugin:webpack.config.mjs", + ], +) diff --git a/adev/src/content/tools/libraries/creating-libraries.md b/adev/src/content/tools/libraries/creating-libraries.md index 15c234046f7ef1..e9598f8947e0a6 100644 --- a/adev/src/content/tools/libraries/creating-libraries.md +++ b/adev/src/content/tools/libraries/creating-libraries.md @@ -287,6 +287,6 @@ The Angular linker Babel plugin supports build caching, meaning that libraries o Example of integrating the plugin into a custom [Webpack](https://webpack.js.org) build by registering the linker as a [Babel](https://babeljs.io) plugin using [babel-loader](https://webpack.js.org/loaders/babel-loader/#options). -<docs-code header="webpack.config.mjs" path="angular-linker-plugin/webpack.config.mjs" visibleRegion="webpack-config"/> +<docs-code header="webpack.config.mjs" path="adev/src/content/examples/angular-linker-plugin/webpack.config.mjs" visibleRegion="webpack-config"/> HELPFUL: The Angular CLI integrates the linker plugin automatically, so if consumers of your library are using the CLI, they can install Ivy-native libraries from npm without any additional configuration.
dragonfly
https://github.com/dragonflydb/dragonfly
f20512e8b116e3958d04a8576279d23978af1ee2
Kostas Kyrimis
2024-05-01 23:52:44
chore(acl): add vlog and check on deluser flow (#2995)
* add vlog before and after we evict connections on deluser flow * replace dcheck with check
chore(acl): add vlog and check on deluser flow (#2995) * add vlog before and after we evict connections on deluser flow * replace dcheck with check
diff --git a/src/server/acl/acl_family.cc b/src/server/acl/acl_family.cc index 3c4b5fe03bb5..0228d5c58f00 100644 --- a/src/server/acl/acl_family.cc +++ b/src/server/acl/acl_family.cc @@ -126,7 +126,7 @@ void AclFamily::SetUser(CmdArgList args, ConnectionContext* cntx) { void AclFamily::EvictOpenConnectionsOnAllProactors( const absl::flat_hash_set<std::string_view>& users) { auto close_cb = [&users]([[maybe_unused]] size_t id, util::Connection* conn) { - DCHECK(conn); + CHECK(conn); auto connection = static_cast<facade::Connection*>(conn); auto ctx = static_cast<ConnectionContext*>(connection->cntx()); if (ctx && users.contains(ctx->authed_username)) { @@ -142,7 +142,7 @@ void AclFamily::EvictOpenConnectionsOnAllProactors( void AclFamily::EvictOpenConnectionsOnAllProactorsWithRegistry( const UserRegistry::RegistryType& registry) { auto close_cb = [&registry]([[maybe_unused]] size_t id, util::Connection* conn) { - DCHECK(conn); + CHECK(conn); auto connection = static_cast<facade::Connection*>(conn); auto ctx = static_cast<ConnectionContext*>(connection->cntx()); if (ctx && ctx->authed_username != "default" && registry.contains(ctx->authed_username)) { @@ -173,8 +173,9 @@ void AclFamily::DelUser(CmdArgList args, ConnectionContext* cntx) { cntx->SendLong(0); return; } - + VLOG(1) << "Evicting open acl connections"; EvictOpenConnectionsOnAllProactors(users); + VLOG(1) << "Done evicting open acl connections"; cntx->SendLong(users.size()); }
aliyundrive-webdav
https://github.com/messense/aliyundrive-webdav
798ff72c75e34532ba6889c6b9b8fdaaa5a12c3a
dependabot[bot]
2023-08-01 22:03:35
build(deps): bump anyhow from 1.0.71 to 1.0.72
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.71 to 1.0.72. - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.71...1.0.72) ---
build(deps): bump anyhow from 1.0.71 to 1.0.72 Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.71 to 1.0.72. - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.71...1.0.72) --- updated-dependencies: - dependency-name: anyhow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
diff --git a/Cargo.lock b/Cargo.lock index d7f0ee923f..f875d03ae2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,9 +130,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" [[package]] name = "async-compression" diff --git a/Cargo.toml b/Cargo.toml index 54a0e020ce..2b24bbd801 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1.0.71" +anyhow = "1.0.72" bytes = "1.4.0" clap = { version = "4.2.5", features = ["derive", "env", "wrap_help"] } dashmap = "5.3.2"
zulip
https://github.com/zulip/zulip
687d0cbf9e83c73236e6b83386ad647eef99637a
Tim Abbott
2016-12-31 06:46:29
docs: Add support for including markdown files in others.
This uses a third-party dependency, python-markdown-include. The example use for settings is intended primarily as a demonstration.
docs: Add support for including markdown files in others. This uses a third-party dependency, python-markdown-include. The example use for settings is intended primarily as a demonstration.
diff --git a/requirements/common.txt b/requirements/common.txt index 87e08a450a6ff..1261e4c812894 100644 --- a/requirements/common.txt +++ b/requirements/common.txt @@ -73,6 +73,9 @@ jwt==0.3.2 # Needed for USING_MANDRILL option for outgoing email mandrill==1.0.57 +# Needed for including other markdown files for user docs +markdown-include==0.5.1 + # Needed for mock objects in decorators mock==2.0.0 diff --git a/templates/zerver/help/change-your-language.md b/templates/zerver/help/change-your-language.md index bd0395660ab1c..7fccaa5129d59 100644 --- a/templates/zerver/help/change-your-language.md +++ b/templates/zerver/help/change-your-language.md @@ -4,8 +4,7 @@ Zulip is written primarily in English, but it includes feature support for a var ## Summary: -- Click the gear icon (![Gear Icon](/static/images/help/cog.png)) in the upper right-hand corner of Zulip and select **Settings**. - ![Settings Dropdown Menu](/static/images/help/settings-dropdown-menu.png)<br><br> +- {!settings.md!} - Scroll down to the **Display Settings**. diff --git a/templates/zerver/help/include/settings.md b/templates/zerver/help/include/settings.md new file mode 100644 index 0000000000000..b82686fdbc74e --- /dev/null +++ b/templates/zerver/help/include/settings.md @@ -0,0 +1,3 @@ +Click the gear icon (![Gear Icon](/static/images/help/cog.png)) in the +upper right-hand corner of Zulip and select **Settings**. +![Settings Dropdown Menu](/static/images/help/settings-dropdown-menu.png)<br><br> diff --git a/version.py b/version.py index a639e7265622a..f14d50ef7e2eb 100644 --- a/version.py +++ b/version.py @@ -1,2 +1,2 @@ ZULIP_VERSION = "1.4.1+git" -PROVISION_VERSION = '3.1' +PROVISION_VERSION = '3.2' diff --git a/zerver/templatetags/app_filters.py b/zerver/templatetags/app_filters.py index 10eb1d516f10f..fc83d8e82a656 100644 --- a/zerver/templatetags/app_filters.py +++ b/zerver/templatetags/app_filters.py @@ -10,7 +10,7 @@ import markdown.extensions.admonition import markdown.extensions.codehilite import markdown.extensions.toc - +import markdown_include.include register = Library() @@ -72,6 +72,7 @@ def render_markdown_path(markdown_file_path): guess_lang=False ), zerver.lib.bugdown.fenced_code.makeExtension(), + markdown_include.include.makeExtension(base_path='templates/zerver/help/include/'), ] md_engine = markdown.Markdown(extensions=md_extensions) md_engine.reset()
react-native-vision-camera
https://github.com/mrousavy/react-native-vision-camera
0a74a84f3dd52c3aeae06002c9c4dcb8f620c1af
Marc Rousavy
2024-06-13 17:24:35
feat: Upgrade to react-native 0.74 (#2985)
* feat: New Example app * Update Podfile.lock * fix TS * fix: Fix TS error * Update .gitignore * Opt in for old API * fix Kotlin inits * fix: Update Gems * Remove activesupport gem * Ruby 2.7.0 * Remove vendor * Remove lib * Ruby 2.7.2 * iOS CI: Remove Pod cache
feat: Upgrade to react-native 0.74 (#2985) * feat: New Example app * Update Podfile.lock * fix TS * fix: Fix TS error * Update .gitignore * Opt in for old API * fix Kotlin inits * fix: Update Gems * Remove activesupport gem * Ruby 2.7.0 * Remove vendor * Remove lib * Ruby 2.7.2 * iOS CI: Remove Pod cache
diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index 127fa916c8..fd4a23e965 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -47,17 +47,10 @@ jobs: - name: Setup Ruby (bundle) uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6.10 + ruby-version: 2.7.2 bundler-cache: true working-directory: package/example/ios - - name: Restore Pods cache - uses: actions/cache@v4 - with: - path: package/example/ios/Pods - key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} - restore-keys: | - ${{ runner.os }}-pods- - name: Install Pods run: bundle exec pod install - name: Install xcpretty @@ -106,17 +99,10 @@ jobs: - name: Setup Ruby (bundle) uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6.10 + ruby-version: 2.7.2 bundler-cache: true working-directory: package/example/ios - - name: Restore Pods cache - uses: actions/cache@v4 - with: - path: package/example/ios/Pods - key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} - restore-keys: | - ${{ runner.os }}-pods- - name: Install Pods run: bundle exec pod install - name: Install xcpretty diff --git a/package/.gitignore b/package/.gitignore index a8255676ce..a225286e04 100644 --- a/package/.gitignore +++ b/package/.gitignore @@ -2,12 +2,6 @@ # .DS_Store -# XDE -.expo/ - -# VSCode -jsconfig.json - # Xcode # build/ @@ -26,44 +20,62 @@ DerivedData *.hmap *.ipa *.xcuserstate -project.xcworkspace +**/.xcode.env.local -# Android/IJ +# Android/IntelliJ # +build/ .idea .gradle local.properties -android.iml +*.iml *.hprof - -# Cocoapods -# -example/ios/Pods +.cxx/ +*.keystore +!debug.keystore # node.js # node_modules/ npm-debug.log -yarn-debug.log yarn-error.log -# BUCK -buck-out/ -\.buckd/ -android/app/libs -android/keystores/debug.keystore +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/ -# Expo -.expo/* +**/fastlane/report.xml +**/fastlane/Preview.html +**/fastlane/screenshots +**/fastlane/test_output -# generated by bob -lib/ +# Bundle artifact +*.jsbundle -# we only use yarn -package-lock.json +# Ruby / CocoaPods +**/Pods/ +/vendor/bundle/ -# External native build folder generated in Android Studio 2.2 and later -.externalNativeBuild -.cxx/ +# Temporary files created by Metro to check the health of the file watcher +.metro-health-check* + +# testing +/coverage + +# Yarn +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions + +# TypeScript output +/lib +/example/lib -example/ios/vendor +# Gems +**/vendor/ diff --git a/package/android/gradle/wrapper/gradle-wrapper.properties b/package/android/gradle/wrapper/gradle-wrapper.properties index 8fad3f5a98..2ea3535dc0 100644 --- a/package/android/gradle/wrapper/gradle-wrapper.properties +++ b/package/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/package/android/gradlew b/package/android/gradlew index 1b6c787337..1aa94a4269 100755 --- a/package/android/gradlew +++ b/package/android/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,11 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +131,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ @@ -205,6 +214,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/package/android/gradlew.bat b/package/android/gradlew.bat index 107acd32c4..25da30dbde 100644 --- a/package/android/gradlew.bat +++ b/package/android/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +41,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/package/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt b/package/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt index d697befefc..8de418b0b3 100644 --- a/package/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt +++ b/package/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt @@ -7,12 +7,14 @@ import com.facebook.jni.HybridData import com.facebook.proguard.annotations.DoNotStrip import com.facebook.react.bridge.ReactApplicationContext import com.facebook.react.bridge.UiThreadUtil +import com.facebook.react.common.annotations.FrameworkAPI import com.facebook.react.turbomodule.core.CallInvokerHolderImpl import com.facebook.react.uimanager.UIManagerHelper import com.mrousavy.camera.core.ViewNotFoundError import com.mrousavy.camera.react.CameraView import java.lang.ref.WeakReference +@OptIn(FrameworkAPI::class) @Suppress("KotlinJniMissingFunction") // we use fbjni. class VisionCameraProxy(private val reactContext: ReactApplicationContext) { companion object { diff --git a/package/example/android/app/build.gradle b/package/example/android/app/build.gradle index bc8529839a..9ebfeb9a9c 100644 --- a/package/example/android/app/build.gradle +++ b/package/example/android/app/build.gradle @@ -1,4 +1,5 @@ apply plugin: "com.android.application" +apply plugin: "org.jetbrains.kotlin.android" apply plugin: "com.facebook.react" apply plugin: "kotlin-android" @@ -97,7 +98,8 @@ def reactNativeArchitectures() { android { ndkVersion rootProject.ext.ndkVersion - compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion + compileSdk rootProject.ext.compileSdkVersion namespace "com.mrousavy.camera.example" dexOptions { diff --git a/package/example/android/app/src/debug/AndroidManifest.xml b/package/example/android/app/src/debug/AndroidManifest.xml index 0c4927bccd..c1d62cb0f6 100644 --- a/package/example/android/app/src/debug/AndroidManifest.xml +++ b/package/example/android/app/src/debug/AndroidManifest.xml @@ -2,9 +2,5 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> - <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> - - <application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning"> - <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" /> - </application> + <application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" /> </manifest> diff --git a/package/example/android/app/src/main/java/com/mrousavy/camera/example/MainActivity.java b/package/example/android/app/src/main/java/com/mrousavy/camera/example/MainActivity.java deleted file mode 100644 index 29243f5e44..0000000000 --- a/package/example/android/app/src/main/java/com/mrousavy/camera/example/MainActivity.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.mrousavy.camera.example; - -import com.facebook.react.ReactActivity; -import com.facebook.react.ReactActivityDelegate; -import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; -import com.facebook.react.defaults.DefaultReactActivityDelegate; -import android.os.Bundle; - -public class MainActivity extends ReactActivity { - - /** - * Returns the name of the main component registered from JavaScript. This is used to schedule - * rendering of the component. - */ - @Override - protected String getMainComponentName() { - return "VisionCameraExample"; - } - - /** - * Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link - * DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React - * (aka React 18) with two boolean flags. - */ - @Override - protected ReactActivityDelegate createReactActivityDelegate() { - return new DefaultReactActivityDelegate( - this, - getMainComponentName(), - // If you opted-in for the New Architecture, we enable the Fabric Renderer. - DefaultNewArchitectureEntryPoint.getFabricEnabled() - ); - } - - @Override - protected void onCreate(Bundle savedInstanceState) { - // RN Screens workaround - super.onCreate(null); - } -} diff --git a/package/example/android/app/src/main/java/com/mrousavy/camera/example/MainActivity.kt b/package/example/android/app/src/main/java/com/mrousavy/camera/example/MainActivity.kt new file mode 100644 index 0000000000..cbe550b244 --- /dev/null +++ b/package/example/android/app/src/main/java/com/mrousavy/camera/example/MainActivity.kt @@ -0,0 +1,22 @@ +package com.mrousavy.camera.example + +import com.facebook.react.ReactActivity +import com.facebook.react.ReactActivityDelegate +import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled +import com.facebook.react.defaults.DefaultReactActivityDelegate + +class MainActivity : ReactActivity() { + + /** + * Returns the name of the main component registered from JavaScript. This is used to schedule + * rendering of the component. + */ + override fun getMainComponentName(): String = "VisionCameraExample" + + /** + * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] + * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] + */ + override fun createReactActivityDelegate(): ReactActivityDelegate = + DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) +} diff --git a/package/example/android/app/src/main/java/com/mrousavy/camera/example/MainApplication.java b/package/example/android/app/src/main/java/com/mrousavy/camera/example/MainApplication.java deleted file mode 100644 index 5e0d5b67b8..0000000000 --- a/package/example/android/app/src/main/java/com/mrousavy/camera/example/MainApplication.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.mrousavy.camera.example; - -import android.app.Application; - -import com.facebook.react.PackageList; -import com.facebook.react.ReactApplication; -import com.facebook.react.ReactNativeHost; -import com.facebook.react.ReactPackage; -import com.facebook.soloader.SoLoader; -import java.util.List; -import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; -import com.facebook.react.defaults.DefaultReactNativeHost; - -import com.mrousavy.camera.react.CameraPackage; -import com.mrousavy.camera.frameprocessors.FrameProcessorPluginRegistry; - -public class MainApplication extends Application implements ReactApplication { - // Register the Frame Processor Plugins for our app - static { - FrameProcessorPluginRegistry.addFrameProcessorPlugin("example_plugin", ExampleFrameProcessorPlugin::new); - FrameProcessorPluginRegistry.addFrameProcessorPlugin("example_kotlin_swift_plugin", ExampleKotlinFrameProcessorPlugin::new); - } - - private final ReactNativeHost mReactNativeHost = - new DefaultReactNativeHost(this) { - @Override - public boolean getUseDeveloperSupport() { - return BuildConfig.DEBUG; - } - - @Override - protected List<ReactPackage> getPackages() { - List<ReactPackage> packages = new PackageList(this).getPackages(); - // Packages that cannot be autolinked yet can be added manually here, for VisionCameraExample: - packages.add(new CameraPackage()); - return packages; - } - - @Override - protected String getJSMainModuleName() { - return "index"; - } - - @Override - protected boolean isNewArchEnabled() { - return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; - } - - @Override - protected Boolean isHermesEnabled() { - return BuildConfig.IS_HERMES_ENABLED; - } - }; - - @Override - public ReactNativeHost getReactNativeHost() { - return mReactNativeHost; - } - - @Override - public void onCreate() { - super.onCreate(); - SoLoader.init(this, /* native exopackage */ false); - if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { - // If you opted-in for the New Architecture, we load the native entry point for this app. - DefaultNewArchitectureEntryPoint.load(); - } - } -} diff --git a/package/example/android/app/src/main/java/com/mrousavy/camera/example/MainApplication.kt b/package/example/android/app/src/main/java/com/mrousavy/camera/example/MainApplication.kt new file mode 100644 index 0000000000..12650b3771 --- /dev/null +++ b/package/example/android/app/src/main/java/com/mrousavy/camera/example/MainApplication.kt @@ -0,0 +1,52 @@ +package com.mrousavy.camera.example + +import android.app.Application +import com.facebook.react.PackageList +import com.facebook.react.ReactApplication +import com.facebook.react.ReactHost +import com.facebook.react.ReactNativeHost +import com.facebook.react.ReactPackage +import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load +import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost +import com.facebook.react.defaults.DefaultReactNativeHost +import com.facebook.soloader.SoLoader + +import com.mrousavy.camera.react.CameraPackage +import com.mrousavy.camera.frameprocessors.FrameProcessorPluginRegistry + +class MainApplication : Application(), ReactApplication { + companion object { + init { + FrameProcessorPluginRegistry.addFrameProcessorPlugin("example") { proxy, args -> ExampleFrameProcessorPlugin(proxy, args) } + FrameProcessorPluginRegistry.addFrameProcessorPlugin("example_kotlin_swift_plugin") { proxy, args -> ExampleKotlinFrameProcessorPlugin(proxy, args) } + } + } + + override val reactNativeHost: ReactNativeHost = + object : DefaultReactNativeHost(this) { + override fun getPackages(): List<ReactPackage> = + PackageList(this).packages.apply { + // Packages that cannot be autolinked yet can be added manually here, for example: + add(CameraPackage()) + } + + override fun getJSMainModuleName(): String = "index" + + override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG + + override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED + override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED + } + + override val reactHost: ReactHost + get() = getDefaultReactHost(applicationContext, reactNativeHost) + + override fun onCreate() { + super.onCreate() + SoLoader.init(this, false) + if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { + // If you opted-in for the New Architecture, we load the native entry point for this app. + load() + } + } +} diff --git a/package/example/android/build.gradle b/package/example/android/build.gradle index 63908d8984..f536a79201 100644 --- a/package/example/android/build.gradle +++ b/package/example/android/build.gradle @@ -1,20 +1,21 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - buildscript { ext { buildToolsVersion = "34.0.0" - minSdkVersion = 26 + minSdkVersion = 23 compileSdkVersion = 34 targetSdkVersion = 34 - ndkVersion = "23.1.7779620" + ndkVersion = "26.1.10909125" + kotlinVersion = "1.9.22" } repositories { google() mavenCentral() } dependencies { - classpath('com.android.tools.build:gradle:7.4.1') + classpath("com.android.tools.build:gradle") classpath("com.facebook.react:react-native-gradle-plugin") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.22") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") } } + +apply plugin: "com.facebook.react.rootproject" diff --git a/package/example/android/gradle/wrapper/gradle-wrapper.properties b/package/example/android/gradle/wrapper/gradle-wrapper.properties index 8fad3f5a98..2ea3535dc0 100644 --- a/package/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/package/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/package/example/android/gradlew b/package/example/android/gradlew index 1b6c787337..1aa94a4269 100755 --- a/package/example/android/gradlew +++ b/package/example/android/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,11 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +131,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ @@ -205,6 +214,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/package/example/android/gradlew.bat b/package/example/android/gradlew.bat index 107acd32c4..25da30dbde 100644 --- a/package/example/android/gradlew.bat +++ b/package/example/android/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +41,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/package/example/babel.config.js b/package/example/babel.config.js index d5feb89851..321de8035e 100644 --- a/package/example/babel.config.js +++ b/package/example/babel.config.js @@ -3,7 +3,7 @@ const path = require('path') const pak = require('../package.json') module.exports = { - presets: ['module:metro-react-native-babel-preset'], + presets: ['module:@react-native/babel-preset'], plugins: [ [ 'react-native-reanimated/plugin', diff --git a/package/example/ios/Gemfile b/package/example/ios/Gemfile index ee72848283..29165bd3ad 100644 --- a/package/example/ios/Gemfile +++ b/package/example/ios/Gemfile @@ -1,7 +1,10 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby '>= 2.6.10' +ruby '>= 2.7.0' -gem 'cocoapods', '>= 1.11.3' +# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper +# bound in the template on Cocoapods with next React Native release. +gem 'cocoapods', '>= 1.13', '< 1.15' +gem 'activesupport', '>= 6.1.7.5', '< 7.1.0' gem 'cocoapods-check', '>= 1.1.0' diff --git a/package/example/ios/Gemfile.lock b/package/example/ios/Gemfile.lock index f84c4c27f0..34027690a7 100644 --- a/package/example/ios/Gemfile.lock +++ b/package/example/ios/Gemfile.lock @@ -1,30 +1,32 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.6) + CFPropertyList (3.0.7) + base64 + nkf rexml - activesupport (6.1.7.2) + activesupport (7.0.8.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - zeitwerk (~> 2.3) - addressable (2.8.1) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) + base64 (0.2.0) claide (1.1.0) - cocoapods (1.11.3) + cocoapods (1.14.3) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.11.3) + cocoapods-core (= 1.14.3) cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 1.4.0, < 2.0) + cocoapods-downloader (>= 2.1, < 3.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.4.0, < 2.0) + cocoapods-trunk (>= 1.6.0, < 2.0) cocoapods-try (>= 1.1.0, < 2.0) colored2 (~> 3.1) escape (~> 0.0.4) @@ -32,12 +34,12 @@ GEM gh_inspector (~> 1.0) molinillo (~> 0.8.0) nap (~> 1.0) - ruby-macho (>= 1.0, < 3.0) - xcodeproj (>= 1.21.0, < 2.0) + ruby-macho (>= 2.3.0, < 3.0) + xcodeproj (>= 1.23.0, < 2.0) cocoapods-check (1.1.0) cocoapods (~> 1.0) - cocoapods-core (1.11.3) - activesupport (>= 5.0, < 7) + cocoapods-core (1.14.3) + activesupport (>= 5.0, < 8) addressable (~> 2.8) algoliasearch (~> 1.0) concurrent-ruby (~> 1.1) @@ -47,7 +49,7 @@ GEM public_suffix (~> 4.0) typhoeus (~> 1.0) cocoapods-deintegrate (1.0.5) - cocoapods-downloader (1.6.3) + cocoapods-downloader (2.1) cocoapods-plugins (1.0.0) nap cocoapods-search (1.0.1) @@ -56,49 +58,53 @@ GEM netrc (~> 0.11) cocoapods-try (1.2.0) colored2 (3.1.2) - concurrent-ruby (1.2.0) + concurrent-ruby (1.3.3) escape (0.0.4) ethon (0.16.0) ffi (>= 1.15.0) - ffi (1.15.5) + ffi (1.17.0) + ffi (1.17.0-x86_64-darwin) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) httpclient (2.8.3) - i18n (1.12.0) + i18n (1.14.5) concurrent-ruby (~> 1.0) - json (2.6.3) - minitest (5.17.0) + json (2.7.2) + minitest (5.23.1) molinillo (0.8.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) + nkf (0.2.0) public_suffix (4.0.7) - rexml (3.2.5) + rexml (3.2.9) + strscan ruby-macho (2.5.1) - typhoeus (1.4.0) + strscan (3.1.0) + typhoeus (1.4.1) ethon (>= 0.9.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - xcodeproj (1.22.0) + xcodeproj (1.24.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) rexml (~> 3.2.4) - zeitwerk (2.6.7) PLATFORMS ruby x86_64-darwin-19 DEPENDENCIES - cocoapods (>= 1.11.3) + activesupport (>= 6.1.7.5, < 7.1.0) + cocoapods (>= 1.13, < 1.15) cocoapods-check (>= 1.1.0) RUBY VERSION - ruby 2.6.10p210 + ruby 2.7.6p219 BUNDLED WITH 2.3.22 diff --git a/package/example/ios/Podfile b/package/example/ios/Podfile index e4cb12da67..33e767dbc2 100644 --- a/package/example/ios/Podfile +++ b/package/example/ios/Podfile @@ -9,8 +9,6 @@ require Pod::Executable.execute_command('node', ['-p', platform :ios, 14.5 prepare_react_native_project! -flipper_config = FlipperConfiguration.disabled - linkage = ENV['USE_FRAMEWORKS'] if linkage != nil Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green @@ -20,19 +18,8 @@ end target 'VisionCameraExample' do config = use_native_modules! - # Flags change depending on the env values. - flags = get_default_flags() - use_react_native!( :path => config[:reactNativePath], - # Hermes is now enabled by default. Disable by setting this flag to false. - :hermes_enabled => flags[:hermes_enabled], - :fabric_enabled => flags[:fabric_enabled], - # Enables Flipper. - # - # Note that if you have use_frameworks! enabled, Flipper will not work and - # you should disable the next line. - :flipper_configuration => flipper_config, # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) @@ -45,9 +32,9 @@ target 'VisionCameraExample' do react_native_post_install( installer, config[:reactNativePath], - :mac_catalyst_enabled => false + :mac_catalyst_enabled => false, + # :ccache_enabled => true ) - __apply_Xcode_12_5_M1_post_install_workaround(installer) # Sets or removes the VISION_CAMERA_ENABLE_FRAME_PROCESSORS flag to enable or disable # our Swift Example plugin. diff --git a/package/example/ios/Podfile.lock b/package/example/ios/Podfile.lock index 410cae7481..55237a0f19 100644 --- a/package/example/ios/Podfile.lock +++ b/package/example/ios/Podfile.lock @@ -1,496 +1,1421 @@ PODS: - - boost (1.76.0) + - boost (1.83.0) - DoubleConversion (1.1.6) - - FBLazyVector (0.72.7) - - FBReactNativeSpec (0.72.7): - - RCT-Folly (= 2021.07.22.00) - - RCTRequired (= 0.72.7) - - RCTTypeSafety (= 0.72.7) - - React-Core (= 0.72.7) - - React-jsi (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - fmt (6.2.1) + - FBLazyVector (0.74.2) + - fmt (9.1.0) - glog (0.3.5) - - hermes-engine (0.72.7): - - hermes-engine/Pre-built (= 0.72.7) - - hermes-engine/Pre-built (0.72.7) - - libevent (2.1.12) - - MMKV (1.3.4): - - MMKVCore (~> 1.3.4) - - MMKVCore (1.3.4) - - RCT-Folly (2021.07.22.00): + - hermes-engine (0.74.2): + - hermes-engine/Pre-built (= 0.74.2) + - hermes-engine/Pre-built (0.74.2) + - MMKV (1.3.5): + - MMKVCore (~> 1.3.5) + - MMKVCore (1.3.5) + - RCT-Folly (2024.01.01.00): - boost - DoubleConversion - - fmt (~> 6.2.1) + - fmt (= 9.1.0) - glog - - RCT-Folly/Default (= 2021.07.22.00) - - RCT-Folly/Default (2021.07.22.00): + - RCT-Folly/Default (= 2024.01.01.00) + - RCT-Folly/Default (2024.01.01.00): - boost - DoubleConversion - - fmt (~> 6.2.1) + - fmt (= 9.1.0) - glog - - RCT-Folly/Futures (2021.07.22.00): + - RCT-Folly/Fabric (2024.01.01.00): - boost - DoubleConversion - - fmt (~> 6.2.1) - - glog - - libevent - - RCTRequired (0.72.7) - - RCTTypeSafety (0.72.7): - - FBLazyVector (= 0.72.7) - - RCTRequired (= 0.72.7) - - React-Core (= 0.72.7) - - React (0.72.7): - - React-Core (= 0.72.7) - - React-Core/DevSupport (= 0.72.7) - - React-Core/RCTWebSocket (= 0.72.7) - - React-RCTActionSheet (= 0.72.7) - - React-RCTAnimation (= 0.72.7) - - React-RCTBlob (= 0.72.7) - - React-RCTImage (= 0.72.7) - - React-RCTLinking (= 0.72.7) - - React-RCTNetwork (= 0.72.7) - - React-RCTSettings (= 0.72.7) - - React-RCTText (= 0.72.7) - - React-RCTVibration (= 0.72.7) - - React-callinvoker (0.72.7) - - React-Codegen (0.72.7): - - DoubleConversion - - FBReactNativeSpec + - fmt (= 9.1.0) + - glog + - RCTDeprecation (0.74.2) + - RCTRequired (0.74.2) + - RCTTypeSafety (0.74.2): + - FBLazyVector (= 0.74.2) + - RCTRequired (= 0.74.2) + - React-Core (= 0.74.2) + - React (0.74.2): + - React-Core (= 0.74.2) + - React-Core/DevSupport (= 0.74.2) + - React-Core/RCTWebSocket (= 0.74.2) + - React-RCTActionSheet (= 0.74.2) + - React-RCTAnimation (= 0.74.2) + - React-RCTBlob (= 0.74.2) + - React-RCTImage (= 0.74.2) + - React-RCTLinking (= 0.74.2) + - React-RCTNetwork (= 0.74.2) + - React-RCTSettings (= 0.74.2) + - React-RCTText (= 0.74.2) + - React-RCTVibration (= 0.74.2) + - React-callinvoker (0.74.2) + - React-Codegen (0.74.2): + - DoubleConversion - glog - hermes-engine - RCT-Folly - RCTRequired - RCTTypeSafety - React-Core + - React-debug + - React-Fabric + - React-FabricImage + - React-featureflags + - React-graphics - React-jsi - React-jsiexecutor - React-NativeModulesApple - - React-rncore + - React-rendererdebug + - React-utils - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (0.72.7): + - React-Core (0.74.2): - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.72.7) + - RCT-Folly (= 2024.01.01.00) + - RCTDeprecation + - React-Core/Default (= 0.74.2) - React-cxxreact + - React-featureflags - React-hermes - React-jsi - React-jsiexecutor + - React-jsinspector - React-perflogger - - React-runtimeexecutor + - React-runtimescheduler - React-utils - - SocketRocket (= 0.6.1) + - SocketRocket (= 0.7.0) - Yoga - - React-Core/CoreModulesHeaders (0.72.7): + - React-Core/CoreModulesHeaders (0.74.2): - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) + - RCT-Folly (= 2024.01.01.00) + - RCTDeprecation - React-Core/Default - React-cxxreact + - React-featureflags - React-hermes - React-jsi - React-jsiexecutor + - React-jsinspector - React-perflogger - - React-runtimeexecutor + - React-runtimescheduler - React-utils - - SocketRocket (= 0.6.1) + - SocketRocket (= 0.7.0) - Yoga - - React-Core/Default (0.72.7): + - React-Core/Default (0.74.2): - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) + - RCT-Folly (= 2024.01.01.00) + - RCTDeprecation - React-cxxreact + - React-featureflags - React-hermes - React-jsi - React-jsiexecutor + - React-jsinspector - React-perflogger - - React-runtimeexecutor + - React-runtimescheduler - React-utils - - SocketRocket (= 0.6.1) + - SocketRocket (= 0.7.0) - Yoga - - React-Core/DevSupport (0.72.7): + - React-Core/DevSupport (0.74.2): - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.72.7) - - React-Core/RCTWebSocket (= 0.72.7) + - RCT-Folly (= 2024.01.01.00) + - RCTDeprecation + - React-Core/Default (= 0.74.2) + - React-Core/RCTWebSocket (= 0.74.2) - React-cxxreact + - React-featureflags - React-hermes - React-jsi - React-jsiexecutor - - React-jsinspector (= 0.72.7) + - React-jsinspector - React-perflogger - - React-runtimeexecutor + - React-runtimescheduler - React-utils - - SocketRocket (= 0.6.1) + - SocketRocket (= 0.7.0) - Yoga - - React-Core/RCTActionSheetHeaders (0.72.7): + - React-Core/RCTActionSheetHeaders (0.74.2): - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) + - RCT-Folly (= 2024.01.01.00) + - RCTDeprecation - React-Core/Default - React-cxxreact + - React-featureflags - React-hermes - React-jsi - React-jsiexecutor + - React-jsinspector - React-perflogger - - React-runtimeexecutor + - React-runtimescheduler - React-utils - - SocketRocket (= 0.6.1) + - SocketRocket (= 0.7.0) - Yoga - - React-Core/RCTAnimationHeaders (0.72.7): + - React-Core/RCTAnimationHeaders (0.74.2): - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) + - RCT-Folly (= 2024.01.01.00) + - RCTDeprecation - React-Core/Default - React-cxxreact + - React-featureflags - React-hermes - React-jsi - React-jsiexecutor + - React-jsinspector - React-perflogger - - React-runtimeexecutor + - React-runtimescheduler - React-utils - - SocketRocket (= 0.6.1) + - SocketRocket (= 0.7.0) - Yoga - - React-Core/RCTBlobHeaders (0.72.7): + - React-Core/RCTBlobHeaders (0.74.2): - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) + - RCT-Folly (= 2024.01.01.00) + - RCTDeprecation - React-Core/Default - React-cxxreact + - React-featureflags - React-hermes - React-jsi - React-jsiexecutor + - React-jsinspector - React-perflogger - - React-runtimeexecutor + - React-runtimescheduler - React-utils - - SocketRocket (= 0.6.1) + - SocketRocket (= 0.7.0) - Yoga - - React-Core/RCTImageHeaders (0.72.7): + - React-Core/RCTImageHeaders (0.74.2): - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) + - RCT-Folly (= 2024.01.01.00) + - RCTDeprecation - React-Core/Default - React-cxxreact + - React-featureflags - React-hermes - React-jsi - React-jsiexecutor + - React-jsinspector - React-perflogger - - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - SocketRocket (= 0.7.0) + - Yoga + - React-Core/RCTLinkingHeaders (0.74.2): + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTDeprecation + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-perflogger + - React-runtimescheduler + - React-utils + - SocketRocket (= 0.7.0) + - Yoga + - React-Core/RCTNetworkHeaders (0.74.2): + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTDeprecation + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-perflogger + - React-runtimescheduler + - React-utils + - SocketRocket (= 0.7.0) + - Yoga + - React-Core/RCTSettingsHeaders (0.74.2): + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTDeprecation + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-perflogger + - React-runtimescheduler + - React-utils + - SocketRocket (= 0.7.0) + - Yoga + - React-Core/RCTTextHeaders (0.74.2): + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTDeprecation + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-perflogger + - React-runtimescheduler + - React-utils + - SocketRocket (= 0.7.0) + - Yoga + - React-Core/RCTVibrationHeaders (0.74.2): + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTDeprecation + - React-Core/Default + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-perflogger + - React-runtimescheduler + - React-utils + - SocketRocket (= 0.7.0) + - Yoga + - React-Core/RCTWebSocket (0.74.2): + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTDeprecation + - React-Core/Default (= 0.74.2) + - React-cxxreact + - React-featureflags + - React-hermes + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-perflogger + - React-runtimescheduler + - React-utils + - SocketRocket (= 0.7.0) + - Yoga + - React-CoreModules (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - RCT-Folly (= 2024.01.01.00) + - RCTTypeSafety (= 0.74.2) + - React-Codegen + - React-Core/CoreModulesHeaders (= 0.74.2) + - React-jsi (= 0.74.2) + - React-jsinspector + - React-NativeModulesApple + - React-RCTBlob + - React-RCTImage (= 0.74.2) + - ReactCommon + - SocketRocket (= 0.7.0) + - React-cxxreact (0.74.2): + - boost (= 1.83.0) + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - React-callinvoker (= 0.74.2) + - React-debug (= 0.74.2) + - React-jsi (= 0.74.2) + - React-jsinspector + - React-logger (= 0.74.2) + - React-perflogger (= 0.74.2) + - React-runtimeexecutor (= 0.74.2) + - React-debug (0.74.2) + - React-Fabric (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-Fabric/animations (= 0.74.2) + - React-Fabric/attributedstring (= 0.74.2) + - React-Fabric/componentregistry (= 0.74.2) + - React-Fabric/componentregistrynative (= 0.74.2) + - React-Fabric/components (= 0.74.2) + - React-Fabric/core (= 0.74.2) + - React-Fabric/imagemanager (= 0.74.2) + - React-Fabric/leakchecker (= 0.74.2) + - React-Fabric/mounting (= 0.74.2) + - React-Fabric/scheduler (= 0.74.2) + - React-Fabric/telemetry (= 0.74.2) + - React-Fabric/templateprocessor (= 0.74.2) + - React-Fabric/textlayoutmanager (= 0.74.2) + - React-Fabric/uimanager (= 0.74.2) + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/animations (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/attributedstring (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/componentregistry (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/componentregistrynative (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/components (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-Fabric/components/inputaccessory (= 0.74.2) + - React-Fabric/components/legacyviewmanagerinterop (= 0.74.2) + - React-Fabric/components/modal (= 0.74.2) + - React-Fabric/components/rncore (= 0.74.2) + - React-Fabric/components/root (= 0.74.2) + - React-Fabric/components/safeareaview (= 0.74.2) + - React-Fabric/components/scrollview (= 0.74.2) + - React-Fabric/components/text (= 0.74.2) + - React-Fabric/components/textinput (= 0.74.2) + - React-Fabric/components/unimplementedview (= 0.74.2) + - React-Fabric/components/view (= 0.74.2) + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/components/inputaccessory (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/components/legacyviewmanagerinterop (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/components/modal (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/components/rncore (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/components/root (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler - React-utils - - SocketRocket (= 0.6.1) + - ReactCommon/turbomodule/core + - React-Fabric/components/safeareaview (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/components/scrollview (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/components/text (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/components/textinput (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/components/unimplementedview (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/components/view (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core - Yoga - - React-Core/RCTLinkingHeaders (0.72.7): + - React-Fabric/core (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/imagemanager (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/leakchecker (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/mounting (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/scheduler (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-cxxreact + - React-debug + - React-graphics + - React-jsi + - React-jsiexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler + - React-utils + - ReactCommon/turbomodule/core + - React-Fabric/telemetry (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core - React-cxxreact - - React-hermes + - React-debug + - React-graphics - React-jsi - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTNetworkHeaders (0.72.7): + - ReactCommon/turbomodule/core + - React-Fabric/templateprocessor (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core - React-cxxreact - - React-hermes + - React-debug + - React-graphics - React-jsi - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTSettingsHeaders (0.72.7): + - ReactCommon/turbomodule/core + - React-Fabric/textlayoutmanager (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core - React-cxxreact - - React-hermes + - React-debug + - React-Fabric/uimanager + - React-graphics - React-jsi - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTTextHeaders (0.72.7): + - ReactCommon/turbomodule/core + - React-Fabric/uimanager (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core - React-cxxreact - - React-hermes + - React-debug + - React-graphics - React-jsi - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor + - React-logger + - React-rendererdebug + - React-runtimescheduler - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTVibrationHeaders (0.72.7): + - ReactCommon/turbomodule/core + - React-FabricImage (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default - - React-cxxreact - - React-hermes + - RCT-Folly/Fabric (= 2024.01.01.00) + - RCTRequired (= 0.74.2) + - RCTTypeSafety (= 0.74.2) + - React-Fabric + - React-graphics + - React-ImageManager - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimeexecutor + - React-jsiexecutor (= 0.74.2) + - React-logger + - React-rendererdebug - React-utils - - SocketRocket (= 0.6.1) + - ReactCommon - Yoga - - React-Core/RCTWebSocket (0.72.7): + - React-featureflags (0.74.2) + - React-graphics (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - RCT-Folly/Fabric (= 2024.01.01.00) + - React-Core/Default (= 0.74.2) + - React-utils + - React-hermes (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.72.7) - - React-cxxreact - - React-hermes + - RCT-Folly (= 2024.01.01.00) + - React-cxxreact (= 0.74.2) - React-jsi - - React-jsiexecutor - - React-perflogger + - React-jsiexecutor (= 0.74.2) + - React-jsinspector + - React-perflogger (= 0.74.2) - React-runtimeexecutor + - React-ImageManager (0.74.2): + - glog + - RCT-Folly/Fabric + - React-Core/Default + - React-debug + - React-Fabric + - React-graphics + - React-rendererdebug - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-CoreModules (0.72.7): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.72.7) - - React-Codegen (= 0.72.7) - - React-Core/CoreModulesHeaders (= 0.72.7) - - React-jsi (= 0.72.7) - - React-RCTBlob - - React-RCTImage (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - SocketRocket (= 0.6.1) - - React-cxxreact (0.72.7): - - boost (= 1.76.0) + - React-jserrorhandler (0.74.2): + - RCT-Folly/Fabric (= 2024.01.01.00) + - React-debug + - React-jsi + - React-Mapbuffer + - React-jsi (0.74.2): + - boost (= 1.83.0) - DoubleConversion + - fmt (= 9.1.0) - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.72.7) - - React-debug (= 0.72.7) - - React-jsi (= 0.72.7) - - React-jsinspector (= 0.72.7) - - React-logger (= 0.72.7) - - React-perflogger (= 0.72.7) - - React-runtimeexecutor (= 0.72.7) - - React-debug (0.72.7) - - React-hermes (0.72.7): + - RCT-Folly (= 2024.01.01.00) + - React-jsiexecutor (0.74.2): - DoubleConversion + - fmt (= 9.1.0) - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - RCT-Folly/Futures (= 2021.07.22.00) - - React-cxxreact (= 0.72.7) - - React-jsi - - React-jsiexecutor (= 0.72.7) - - React-jsinspector (= 0.72.7) - - React-perflogger (= 0.72.7) - - React-jsi (0.72.7): - - boost (= 1.76.0) + - RCT-Folly (= 2024.01.01.00) + - React-cxxreact (= 0.74.2) + - React-jsi (= 0.74.2) + - React-jsinspector + - React-perflogger (= 0.74.2) + - React-jsinspector (0.74.2): - DoubleConversion - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-jsiexecutor (0.72.7): + - RCT-Folly (= 2024.01.01.00) + - React-featureflags + - React-jsi + - React-runtimeexecutor (= 0.74.2) + - React-jsitracing (0.74.2): + - React-jsi + - React-logger (0.74.2): + - glog + - React-Mapbuffer (0.74.2): + - glog + - React-debug + - react-native-blur (4.4.0): - DoubleConversion - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-cxxreact (= 0.72.7) - - React-jsi (= 0.72.7) - - React-perflogger (= 0.72.7) - - React-jsinspector (0.72.7) - - React-logger (0.72.7): - - glog - - react-native-blur (4.3.2): + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen - React-Core - - react-native-cameraroll (5.10.0): + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga + - react-native-cameraroll (7.8.1): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen - React-Core - - react-native-mmkv (2.11.0): - - MMKV (>= 1.2.13) + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga + - react-native-mmkv (2.12.2): + - DoubleConversion + - glog + - hermes-engine + - MMKV (>= 1.3.3) + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen - React-Core - - react-native-safe-area-context (4.8.2): + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga + - react-native-safe-area-context (4.10.4): - React-Core - - react-native-skia (1.2.3): - - RCT-Folly (= 2021.07.22.00) + - react-native-skia (1.3.4): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety - React - React-callinvoker + - React-Codegen - React-Core - - react-native-video (5.2.1): + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga + - react-native-video (6.2.0): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen - React-Core - - react-native-video/Video (= 5.2.1) - - react-native-video/Video (5.2.1): + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - react-native-video/Video (= 6.2.0) + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga + - react-native-video/Video (6.2.0): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - react-native-worklets-core (1.3.3): - React - React-callinvoker - React-Core - - React-NativeModulesApple (0.72.7): + - React-nativeconfig (0.74.2) + - React-NativeModulesApple (0.74.2): + - glog - hermes-engine - React-callinvoker - React-Core - React-cxxreact - React-jsi + - React-jsinspector - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (0.72.7) - - React-RCTActionSheet (0.72.7): - - React-Core/RCTActionSheetHeaders (= 0.72.7) - - React-RCTAnimation (0.72.7): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.72.7) - - React-Codegen (= 0.72.7) - - React-Core/RCTAnimationHeaders (= 0.72.7) - - React-jsi (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - React-RCTAppDelegate (0.72.7): - - RCT-Folly + - React-perflogger (0.74.2) + - React-RCTActionSheet (0.74.2): + - React-Core/RCTActionSheetHeaders (= 0.74.2) + - React-RCTAnimation (0.74.2): + - RCT-Folly (= 2024.01.01.00) + - RCTTypeSafety + - React-Codegen + - React-Core/RCTAnimationHeaders + - React-jsi + - React-NativeModulesApple + - ReactCommon + - React-RCTAppDelegate (0.74.2): + - RCT-Folly (= 2024.01.01.00) - RCTRequired - RCTTypeSafety + - React-Codegen - React-Core - React-CoreModules + - React-debug + - React-Fabric + - React-featureflags + - React-graphics - React-hermes + - React-nativeconfig - React-NativeModulesApple + - React-RCTFabric - React-RCTImage - React-RCTNetwork + - React-rendererdebug + - React-RuntimeApple + - React-RuntimeCore + - React-RuntimeHermes - React-runtimescheduler - - ReactCommon/turbomodule/core - - React-RCTBlob (0.72.7): - - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.72.7) - - React-Core/RCTBlobHeaders (= 0.72.7) - - React-Core/RCTWebSocket (= 0.72.7) - - React-jsi (= 0.72.7) - - React-RCTNetwork (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - React-RCTImage (0.72.7): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.72.7) - - React-Codegen (= 0.72.7) - - React-Core/RCTImageHeaders (= 0.72.7) - - React-jsi (= 0.72.7) - - React-RCTNetwork (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - React-RCTLinking (0.72.7): - - React-Codegen (= 0.72.7) - - React-Core/RCTLinkingHeaders (= 0.72.7) - - React-jsi (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - React-RCTNetwork (0.72.7): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.72.7) - - React-Codegen (= 0.72.7) - - React-Core/RCTNetworkHeaders (= 0.72.7) - - React-jsi (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - React-RCTSettings (0.72.7): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.72.7) - - React-Codegen (= 0.72.7) - - React-Core/RCTSettingsHeaders (= 0.72.7) - - React-jsi (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - React-RCTText (0.72.7): - - React-Core/RCTTextHeaders (= 0.72.7) - - React-RCTVibration (0.72.7): - - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.72.7) - - React-Core/RCTVibrationHeaders (= 0.72.7) - - React-jsi (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - React-rncore (0.72.7) - - React-runtimeexecutor (0.72.7): - - React-jsi (= 0.72.7) - - React-runtimescheduler (0.72.7): - - glog - - hermes-engine - - RCT-Folly (= 2021.07.22.00) + - React-utils + - ReactCommon + - React-RCTBlob (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - React-Codegen + - React-Core/RCTBlobHeaders + - React-Core/RCTWebSocket + - React-jsi + - React-jsinspector + - React-NativeModulesApple + - React-RCTNetwork + - ReactCommon + - React-RCTFabric (0.74.2): + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - React-Core + - React-debug + - React-Fabric + - React-FabricImage + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-jsinspector + - React-nativeconfig + - React-RCTImage + - React-RCTText + - React-rendererdebug + - React-runtimescheduler + - React-utils + - Yoga + - React-RCTImage (0.74.2): + - RCT-Folly (= 2024.01.01.00) + - RCTTypeSafety + - React-Codegen + - React-Core/RCTImageHeaders + - React-jsi + - React-NativeModulesApple + - React-RCTNetwork + - ReactCommon + - React-RCTLinking (0.74.2): + - React-Codegen + - React-Core/RCTLinkingHeaders (= 0.74.2) + - React-jsi (= 0.74.2) + - React-NativeModulesApple + - ReactCommon + - ReactCommon/turbomodule/core (= 0.74.2) + - React-RCTNetwork (0.74.2): + - RCT-Folly (= 2024.01.01.00) + - RCTTypeSafety + - React-Codegen + - React-Core/RCTNetworkHeaders + - React-jsi + - React-NativeModulesApple + - ReactCommon + - React-RCTSettings (0.74.2): + - RCT-Folly (= 2024.01.01.00) + - RCTTypeSafety + - React-Codegen + - React-Core/RCTSettingsHeaders + - React-jsi + - React-NativeModulesApple + - ReactCommon + - React-RCTText (0.74.2): + - React-Core/RCTTextHeaders (= 0.74.2) + - Yoga + - React-RCTVibration (0.74.2): + - RCT-Folly (= 2024.01.01.00) + - React-Codegen + - React-Core/RCTVibrationHeaders + - React-jsi + - React-NativeModulesApple + - ReactCommon + - React-rendererdebug (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - RCT-Folly (= 2024.01.01.00) + - React-debug + - React-rncore (0.74.2) + - React-RuntimeApple (0.74.2): + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - React-callinvoker + - React-Core/Default + - React-CoreModules + - React-cxxreact + - React-jserrorhandler + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-Mapbuffer + - React-NativeModulesApple + - React-RCTFabric + - React-RuntimeCore + - React-runtimeexecutor + - React-RuntimeHermes + - React-utils + - React-RuntimeCore (0.74.2): + - glog + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - React-cxxreact + - React-featureflags + - React-jserrorhandler + - React-jsi + - React-jsiexecutor + - React-jsinspector + - React-runtimeexecutor + - React-runtimescheduler + - React-utils + - React-runtimeexecutor (0.74.2): + - React-jsi (= 0.74.2) + - React-RuntimeHermes (0.74.2): + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - React-featureflags + - React-hermes + - React-jsi + - React-jsinspector + - React-jsitracing + - React-nativeconfig + - React-RuntimeCore + - React-utils + - React-runtimescheduler (0.74.2): + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) - React-callinvoker + - React-cxxreact - React-debug + - React-featureflags - React-jsi + - React-rendererdebug - React-runtimeexecutor - - React-utils (0.72.7): + - React-utils + - React-utils (0.74.2): - glog - - RCT-Folly (= 2021.07.22.00) + - hermes-engine + - RCT-Folly (= 2024.01.01.00) - React-debug - - ReactCommon/turbomodule/bridging (0.72.7): + - React-jsi (= 0.74.2) + - ReactCommon (0.74.2): + - ReactCommon/turbomodule (= 0.74.2) + - ReactCommon/turbomodule (0.74.2): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - React-callinvoker (= 0.74.2) + - React-cxxreact (= 0.74.2) + - React-jsi (= 0.74.2) + - React-logger (= 0.74.2) + - React-perflogger (= 0.74.2) + - ReactCommon/turbomodule/bridging (= 0.74.2) + - ReactCommon/turbomodule/core (= 0.74.2) + - ReactCommon/turbomodule/bridging (0.74.2): - DoubleConversion + - fmt (= 9.1.0) - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.72.7) - - React-cxxreact (= 0.72.7) - - React-jsi (= 0.72.7) - - React-logger (= 0.72.7) - - React-perflogger (= 0.72.7) - - ReactCommon/turbomodule/core (0.72.7): + - RCT-Folly (= 2024.01.01.00) + - React-callinvoker (= 0.74.2) + - React-cxxreact (= 0.74.2) + - React-jsi (= 0.74.2) + - React-logger (= 0.74.2) + - React-perflogger (= 0.74.2) + - ReactCommon/turbomodule/core (0.74.2): - DoubleConversion + - fmt (= 9.1.0) - glog - hermes-engine - - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.72.7) - - React-cxxreact (= 0.72.7) - - React-jsi (= 0.72.7) - - React-logger (= 0.72.7) - - React-perflogger (= 0.72.7) - - RNGestureHandler (2.14.0): - - RCT-Folly (= 2021.07.22.00) + - RCT-Folly (= 2024.01.01.00) + - React-callinvoker (= 0.74.2) + - React-cxxreact (= 0.74.2) + - React-debug (= 0.74.2) + - React-jsi (= 0.74.2) + - React-logger (= 0.74.2) + - React-perflogger (= 0.74.2) + - React-utils (= 0.74.2) + - RNGestureHandler (2.16.2): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen - React-Core - - RNReanimated (3.8.1): - - RCT-Folly (= 2021.07.22.00) + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga + - RNReanimated (3.12.0): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNScreens (3.29.0): - - RCT-Folly (= 2021.07.22.00) + - Yoga + - RNScreens (3.31.1): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-RCTImage + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - RNStaticSafeAreaInsets (2.2.0): - React-Core - - RNVectorIcons (10.0.2): - - RCT-Folly (= 2021.07.22.00) + - RNVectorIcons (10.1.0): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen - React-Core - - SocketRocket (0.6.1) - - VisionCamera (4.2.0): - - VisionCamera/Core (= 4.2.0) - - VisionCamera/FrameProcessors (= 4.2.0) - - VisionCamera/React (= 4.2.0) - - VisionCamera/Core (4.2.0) - - VisionCamera/FrameProcessors (4.2.0): + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga + - SocketRocket (0.7.0) + - VisionCamera (4.3.1): + - VisionCamera/Core (= 4.3.1) + - VisionCamera/FrameProcessors (= 4.3.1) + - VisionCamera/React (= 4.3.1) + - VisionCamera/Core (4.3.1) + - VisionCamera/FrameProcessors (4.3.1): - React - React-callinvoker - react-native-worklets-core - - VisionCamera/React (4.2.0): + - VisionCamera/React (4.3.1): - React-Core - VisionCamera/FrameProcessors - - Yoga (1.14.0) + - Yoga (0.0.0) DEPENDENCIES: - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) + - fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - - libevent (~> 2.1.12) - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) + - RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) + - RCTDeprecation (from `../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation`) + - RCTRequired (from `../node_modules/react-native/Libraries/Required`) - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) - React (from `../node_modules/react-native/`) - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) @@ -500,11 +1425,19 @@ DEPENDENCIES: - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) - React-debug (from `../node_modules/react-native/ReactCommon/react/debug`) + - React-Fabric (from `../node_modules/react-native/ReactCommon`) + - React-FabricImage (from `../node_modules/react-native/ReactCommon`) + - React-featureflags (from `../node_modules/react-native/ReactCommon/react/featureflags`) + - React-graphics (from `../node_modules/react-native/ReactCommon/react/renderer/graphics`) - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) + - React-ImageManager (from `../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios`) + - React-jserrorhandler (from `../node_modules/react-native/ReactCommon/jserrorhandler`) - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) - - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) + - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector-modern`) + - React-jsitracing (from `../node_modules/react-native/ReactCommon/hermes/executor/`) - React-logger (from `../node_modules/react-native/ReactCommon/logger`) + - React-Mapbuffer (from `../node_modules/react-native/ReactCommon`) - "react-native-blur (from `../node_modules/@react-native-community/blur`)" - "react-native-cameraroll (from `../node_modules/@react-native-camera-roll/camera-roll`)" - react-native-mmkv (from `../node_modules/react-native-mmkv`) @@ -512,20 +1445,26 @@ DEPENDENCIES: - "react-native-skia (from `../node_modules/@shopify/react-native-skia`)" - react-native-video (from `../node_modules/react-native-video`) - react-native-worklets-core (from `../node_modules/react-native-worklets-core`) + - React-nativeconfig (from `../node_modules/react-native/ReactCommon`) - React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`) - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) + - React-RCTFabric (from `../node_modules/react-native/React`) - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) - React-RCTText (from `../node_modules/react-native/Libraries/Text`) - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) + - React-rendererdebug (from `../node_modules/react-native/ReactCommon/react/renderer/debug`) - React-rncore (from `../node_modules/react-native/ReactCommon`) + - React-RuntimeApple (from `../node_modules/react-native/ReactCommon/react/runtime/platform/ios`) + - React-RuntimeCore (from `../node_modules/react-native/ReactCommon/react/runtime`) - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) + - React-RuntimeHermes (from `../node_modules/react-native/ReactCommon/react/runtime`) - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) @@ -539,8 +1478,6 @@ DEPENDENCIES: SPEC REPOS: trunk: - - fmt - - libevent - MMKV - MMKVCore - SocketRocket @@ -552,17 +1489,19 @@ EXTERNAL SOURCES: :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" FBLazyVector: :path: "../node_modules/react-native/Libraries/FBLazyVector" - FBReactNativeSpec: - :path: "../node_modules/react-native/React/FBReactNativeSpec" + fmt: + :podspec: "../node_modules/react-native/third-party-podspecs/fmt.podspec" glog: :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" hermes-engine: :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" - :tag: hermes-2023-08-07-RNv0.72.4-813b2def12bc9df02654b3e3653ae4a68d0572e0 + :tag: hermes-2024-06-03-RNv0.74.2-bb1e74fe1e95c2b5a2f4f9311152da052badc2bc RCT-Folly: :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" + RCTDeprecation: + :path: "../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation" RCTRequired: - :path: "../node_modules/react-native/Libraries/RCTRequired" + :path: "../node_modules/react-native/Libraries/Required" RCTTypeSafety: :path: "../node_modules/react-native/Libraries/TypeSafety" React: @@ -579,16 +1518,32 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/cxxreact" React-debug: :path: "../node_modules/react-native/ReactCommon/react/debug" + React-Fabric: + :path: "../node_modules/react-native/ReactCommon" + React-FabricImage: + :path: "../node_modules/react-native/ReactCommon" + React-featureflags: + :path: "../node_modules/react-native/ReactCommon/react/featureflags" + React-graphics: + :path: "../node_modules/react-native/ReactCommon/react/renderer/graphics" React-hermes: :path: "../node_modules/react-native/ReactCommon/hermes" + React-ImageManager: + :path: "../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios" + React-jserrorhandler: + :path: "../node_modules/react-native/ReactCommon/jserrorhandler" React-jsi: :path: "../node_modules/react-native/ReactCommon/jsi" React-jsiexecutor: :path: "../node_modules/react-native/ReactCommon/jsiexecutor" React-jsinspector: - :path: "../node_modules/react-native/ReactCommon/jsinspector" + :path: "../node_modules/react-native/ReactCommon/jsinspector-modern" + React-jsitracing: + :path: "../node_modules/react-native/ReactCommon/hermes/executor/" React-logger: :path: "../node_modules/react-native/ReactCommon/logger" + React-Mapbuffer: + :path: "../node_modules/react-native/ReactCommon" react-native-blur: :path: "../node_modules/@react-native-community/blur" react-native-cameraroll: @@ -603,6 +1558,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-video" react-native-worklets-core: :path: "../node_modules/react-native-worklets-core" + React-nativeconfig: + :path: "../node_modules/react-native/ReactCommon" React-NativeModulesApple: :path: "../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios" React-perflogger: @@ -615,6 +1572,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/Libraries/AppDelegate" React-RCTBlob: :path: "../node_modules/react-native/Libraries/Blob" + React-RCTFabric: + :path: "../node_modules/react-native/React" React-RCTImage: :path: "../node_modules/react-native/Libraries/Image" React-RCTLinking: @@ -627,10 +1586,18 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/Libraries/Text" React-RCTVibration: :path: "../node_modules/react-native/Libraries/Vibration" + React-rendererdebug: + :path: "../node_modules/react-native/ReactCommon/react/renderer/debug" React-rncore: :path: "../node_modules/react-native/ReactCommon" + React-RuntimeApple: + :path: "../node_modules/react-native/ReactCommon/react/runtime/platform/ios" + React-RuntimeCore: + :path: "../node_modules/react-native/ReactCommon/react/runtime" React-runtimeexecutor: :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" + React-RuntimeHermes: + :path: "../node_modules/react-native/ReactCommon/react/runtime" React-runtimescheduler: :path: "../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler" React-utils: @@ -653,64 +1620,77 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - boost: 57d2868c099736d80fcd648bf211b4431e51a558 - DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 - FBLazyVector: 5fbbff1d7734827299274638deb8ba3024f6c597 - FBReactNativeSpec: 638095fe8a01506634d77b260ef8a322019ac671 - fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b - hermes-engine: 9180d43df05c1ed658a87cc733dc3044cf90c00a - libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 - MMKV: ed58ad794b3f88c24d604a5b74f3fba17fcbaf74 - MMKVCore: a67a1cede26175c413176f404a7cedec43f96a0b - RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 - RCTRequired: 83bca1c184feb4d2e51c72c8369b83d641443f95 - RCTTypeSafety: 13c4a87a16d7db6cd66006ce9759f073402ef85b - React: e67aa9f99957c7611c392b5e49355d877d6525e2 - React-callinvoker: 2790c09d964c2e5404b5410cde91b152e3746b7b - React-Codegen: e6e05e105ca7cdb990f4d609985a2a689d8d0653 - React-Core: 9283f1e7d0d5e3d33ad298547547b1b43912534c - React-CoreModules: 6312c9b2fec4329d9ae6a2b8c350032d1664c51b - React-cxxreact: 7da72565656c8ac7f97c9a031d0b199bbdec0640 - React-debug: 4accb2b9dc09b575206d2c42f4082990a52ae436 - React-hermes: 1299a94f255f59a72d5baa54a2ca2e1eee104947 - React-jsi: 2208de64c3a41714ac04e86975386fc49116ea13 - React-jsiexecutor: c49502e5d02112247ee4526bc3ccfc891ae3eb9b - React-jsinspector: 8baadae51f01d867c3921213a25ab78ab4fbcd91 - React-logger: 8edc785c47c8686c7962199a307015e2ce9a0e4f - react-native-blur: cfdad7b3c01d725ab62a8a729f42ea463998afa2 - react-native-cameraroll: 4701ae7c3dbcd3f5e9e150ca17f250a276154b35 - react-native-mmkv: e97c0c79403fb94577e5d902ab1ebd42b0715b43 - react-native-safe-area-context: 0ee144a6170530ccc37a0fd9388e28d06f516a89 - react-native-skia: d368ae81d61c0253df36106ea76324b5a5519ddc - react-native-video: c26780b224543c62d5e1b2a7244a5cd1b50e8253 + boost: d3f49c53809116a5d38da093a8aa78bf551aed09 + DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 + FBLazyVector: 4bc164e5b5e6cfc288d2b5ff28643ea15fa1a589 + fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120 + glog: fdfdfe5479092de0c4bdbebedd9056951f092c4f + hermes-engine: 01d3e052018c2a13937aca1860fbedbccd4a41b7 + MMKV: 506311d0494023c2f7e0b62cc1f31b7370fa3cfb + MMKVCore: 9e2e5fd529b64a9fe15f1a7afb3d73b2e27b4db9 + RCT-Folly: 02617c592a293bd6d418e0a88ff4ee1f88329b47 + RCTDeprecation: b03c35057846b685b3ccadc9bfe43e349989cdb2 + RCTRequired: 194626909cfa8d39ca6663138c417bc6c431648c + RCTTypeSafety: 552aff5b8e8341660594db00e53ac889682bc120 + React: a57fe42044fe6ed3e828f8867ce070a6c5872754 + React-callinvoker: 6bedefb354a8848b534752417954caa3a5cf34f9 + React-Codegen: 0952549a095f8f8cb2fb5def1733b6b232769b1c + React-Core: 289ee3dfc1639bb9058c1e77427bb48169c26d7a + React-CoreModules: eda5ce541a1f552158317abd90a5a0f6a4f8d6f7 + React-cxxreact: 56bd17ccc6d4248116f7f95884ddb8c528379fb6 + React-debug: 164b8e302404d92d4bec39778a5e03bcb1b6eb08 + React-Fabric: 05620c36074e3ab397dd8f9db0deb6d3c38b4efa + React-FabricImage: 2a8a7f5729f5c44e32e6f58f7225ee1017ed0704 + React-featureflags: d97a6393993052e951e16a3b81206e22110be8d2 + React-graphics: ef07d701f4eb72ae6fca6ed0a7260a04f2a58dec + React-hermes: 6ccc301ababfa17a9aad25a7e33faf325fd024b4 + React-ImageManager: 00404bfe122626bc6493621f2a31ce802115a9b3 + React-jserrorhandler: 5e2632590a84363855b2083e6b3d501e93bc3f04 + React-jsi: 828703c235f4eea1647897ee8030efdc6e8e9f14 + React-jsiexecutor: 713d7bbef0a410cee5b3b78f73ed1fc16e177ba7 + React-jsinspector: e1fa5325a47f34645195c63e3312ddb6a2efef5d + React-jsitracing: 0fa7f78d8fdda794667cb2e6f19c874c1cf31d7e + React-logger: 29fa3e048f5f67fe396bc08af7606426d9bd7b5d + React-Mapbuffer: bf56147c9775491e53122a94c423ac201417e326 + react-native-blur: a2acf22fd7bd13621df5e0b1c130b81adea7009c + react-native-cameraroll: a9138c165c9975da773d26945591d313992c799b + react-native-mmkv: 8c9a677e64a1ac89b0c6cf240feea528318b3074 + react-native-safe-area-context: 399a5859f6acbdf67f671c69b53113f535f3b5b0 + react-native-skia: bf3ece668414fcc336abae6397e1efc8afe9cdfa + react-native-video: 8cd68fa00f56087184154c0e976d3756adaad144 react-native-worklets-core: f51430dd07bf5343d4918d28a4bb00fe8f98b982 - React-NativeModulesApple: b6868ee904013a7923128892ee4a032498a1024a - React-perflogger: 31ea61077185eb1428baf60c0db6e2886f141a5a - React-RCTActionSheet: 392090a3abc8992eb269ef0eaa561750588fc39d - React-RCTAnimation: 4b3cc6a29474bc0d78c4f04b52ab59bf760e8a9b - React-RCTAppDelegate: 89b015b29885109addcabecdf3b2e833905437c7 - React-RCTBlob: 3e23dcbe6638897b5605e46d0d62955d78e8d27b - React-RCTImage: 8a5d339d614a90a183fc1b8b6a7eb44e2e703943 - React-RCTLinking: b37dfbf646d77c326f9eae094b1fcd575b1c24c7 - React-RCTNetwork: 8bed9b2461c7d8a7d14e63df9b16181c448beebc - React-RCTSettings: 506a5f09a455123a8873801b70aa7b4010b76b01 - React-RCTText: 3c71ecaad8ee010b79632ea2590f86c02f5cce17 - React-RCTVibration: d1b78ca38f61ea4b3e9ebb2ddbd0b5662631d99b - React-rncore: bfc2f6568b6fecbae6f2f774e95c60c3c9e95bf2 - React-runtimeexecutor: 47b0a2d5bbb416db65ef881a6f7bdcfefa0001ab - React-runtimescheduler: 7649c3b46c8dee1853691ecf60146a16ae59253c - React-utils: 56838edeaaf651220d1e53cd0b8934fb8ce68415 - ReactCommon: 5f704096ccf7733b390f59043b6fa9cc180ee4f6 - RNGestureHandler: 32a01c29ecc9bb0b5bf7bc0a33547f61b4dc2741 - RNReanimated: f4798af7dede23d41039f0bc372710ead86e90c7 - RNScreens: 3c5b9f4a9dcde752466854b6109b79c0e205dad3 + React-nativeconfig: 9f223cd321823afdecf59ed00861ab2d69ee0fc1 + React-NativeModulesApple: ff7efaff7098639db5631236cfd91d60abff04c0 + React-perflogger: 32ed45d9cee02cf6639acae34251590dccd30994 + React-RCTActionSheet: 19f967ddaea258182b56ef11437133b056ba2adf + React-RCTAnimation: d7f4137fc44a08bba465267ea7cb1dbdb7c4ec87 + React-RCTAppDelegate: 2b3f4d8009796af209a0d496e73276b743acee08 + React-RCTBlob: c6c3e1e0251700b7bea036b893913f22e2b9cb47 + React-RCTFabric: 93a3ea55169d19294f07092013c1c9ea7a015c9b + React-RCTImage: 40528ab74a4fef0f0e2ee797a074b26d120b6cc6 + React-RCTLinking: 385b5beb96749aae9ae1606746e883e1c9f8a6a7 + React-RCTNetwork: ffc9f05bd8fa5b3bce562199ba41235ad0af645c + React-RCTSettings: 21914178bb65cb2c20c655ae1fb401617ae74618 + React-RCTText: 7f8dba1a311e99f4de15bbace2350e805f33f024 + React-RCTVibration: e4ccf673579d0d94a96b3a0b64492db08f8324d5 + React-rendererdebug: ac70f40de137ce7bdbc55eaee60c467a215d9923 + React-rncore: edfff7a3f7f82ca1e0ba26978c6d84c7a8970dac + React-RuntimeApple: a0c98b75571aa5f44ddc7c6e9fd55803fa4db00f + React-RuntimeCore: 4b8db1fe2f3f4a3a5ecb22e1a419824e3e2cd7ef + React-runtimeexecutor: 5961acc7a77b69f964e1645a5d6069e124ce6b37 + React-RuntimeHermes: c5825bfae4815fdf4e9e639340c3a986a491884c + React-runtimescheduler: 56b642bf605ba5afa500d35790928fc1d51565ad + React-utils: 4476b7fcbbd95cfd002f3e778616155241d86e31 + ReactCommon: ecad995f26e0d1e24061f60f4e5d74782f003f12 + RNGestureHandler: 2282cfbcf86c360d29f44ace393203afd5c6cff7 + RNReanimated: 8978449b2a511388ea71faf1e66f669134e87658 + RNScreens: b32a9ff15bea7fcdbe5dff6477bc503f792b1208 RNStaticSafeAreaInsets: 055ddbf5e476321720457cdaeec0ff2ba40ec1b8 - RNVectorIcons: 23b6e11af4aaf104d169b1b0afa7e5cf96c676ce - SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - VisionCamera: 36e26146e9080bd78c101dd904723e424d0983a3 - Yoga: 4c3aa327e4a6a23eeacd71f61c81df1bcdf677d5 + RNVectorIcons: 2a2f79274248390b80684ea3c4400bd374a15c90 + SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d + VisionCamera: 3572090cd37be0ba02e1ce428ebde7820ab2932d + Yoga: 2f71ecf38d934aecb366e686278102a51679c308 -PODFILE CHECKSUM: 66976ac26c778d788a06e6c1bab624e6a1233cdd +PODFILE CHECKSUM: af6d5cce5a6537d546f6d721f0adb0ce2f7be57b -COCOAPODS: 1.11.3 +COCOAPODS: 1.14.3 diff --git a/package/example/ios/VisionCameraExample.xcodeproj/project.pbxproj b/package/example/ios/VisionCameraExample.xcodeproj/project.pbxproj index db949901d2..b6200ad59e 100644 --- a/package/example/ios/VisionCameraExample.xcodeproj/project.pbxproj +++ b/package/example/ios/VisionCameraExample.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 0455BF0780B3A9FFC8BF7C14 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 35C4F95514CA28FF9CB84E39 /* PrivacyInfo.xcprivacy */; }; 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; @@ -26,6 +27,7 @@ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = VisionCameraExample/Images.xcassets; sourceTree = "<group>"; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = VisionCameraExample/Info.plist; sourceTree = "<group>"; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = VisionCameraExample/main.m; sourceTree = "<group>"; }; + 35C4F95514CA28FF9CB84E39 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = VisionCameraExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; }; 3CDCFE89C25C89320B98945E /* libPods-VisionCameraExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VisionCameraExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = VisionCameraExample/LaunchScreen.storyboard; sourceTree = "<group>"; }; 839E2C622ACB2E330037BC2B /* ExampleSwiftFrameProcessor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleSwiftFrameProcessor.m; sourceTree = "<group>"; }; @@ -64,6 +66,7 @@ 13B07FB71A68108700A75B9A /* main.m */, B8F0E10725E0199F00586F16 /* File.swift */, B8F0E10625E0199F00586F16 /* VisionCameraExample-Bridging-Header.h */, + 35C4F95514CA28FF9CB84E39 /* PrivacyInfo.xcprivacy */, ); name = VisionCameraExample; sourceTree = "<group>"; @@ -208,6 +211,7 @@ files = ( 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + 0455BF0780B3A9FFC8BF7C14 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -254,7 +258,8 @@ "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/react-native-cameraroll/RNCameraRollPrivacyInfo.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( @@ -277,7 +282,8 @@ "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNCameraRollPrivacyInfo.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -403,6 +409,7 @@ baseConfigurationReference = C1D342AD8210E7627A632602 /* Pods-VisionCameraExample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = CJW62Q77E7; @@ -410,7 +417,7 @@ INFOPLIST_FILE = VisionCameraExample/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Vision Camera"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.photography"; - IPHONEOS_DEPLOYMENT_TARGET = 12.4; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", @@ -435,13 +442,14 @@ baseConfigurationReference = F64CB73AE44CAC94E069BF68 /* Pods-VisionCameraExample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = CJW62Q77E7; INFOPLIST_FILE = VisionCameraExample/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Vision Camera"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.photography"; - IPHONEOS_DEPLOYMENT_TARGET = 12.4; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", @@ -464,8 +472,9 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CC = ""; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -491,6 +500,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + CXX = ""; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; @@ -511,6 +521,8 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD = ""; + LDPLUSPLUS = ""; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "$(SDKROOT)/usr/lib/swift", @@ -521,14 +533,11 @@ ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "$(inherited)"; OTHER_CPLUSPLUSFLAGS = "$(inherited)"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-Wl", - "-ld_classic", - ); + OTHER_LDFLAGS = "$(inherited)"; OTHER_SWIFT_FLAGS = "$(inherited) -DVISION_CAMERA_ENABLE_FRAME_PROCESSORS"; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; + USE_HERMES = true; }; name = Debug; }; @@ -536,8 +545,9 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CC = ""; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -563,6 +573,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; + CXX = ""; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; @@ -579,6 +590,8 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD = ""; + LDPLUSPLUS = ""; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "$(SDKROOT)/usr/lib/swift", @@ -588,15 +601,12 @@ MTL_ENABLE_DEBUG_INFO = NO; OTHER_CFLAGS = "$(inherited)"; OTHER_CPLUSPLUSFLAGS = "$(inherited)"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-Wl", - "-ld_classic", - ); + OTHER_LDFLAGS = "$(inherited)"; OTHER_SWIFT_FLAGS = "$(inherited) -DVISION_CAMERA_ENABLE_FRAME_PROCESSORS"; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; + USE_HERMES = true; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/package/example/ios/VisionCameraExample/AppDelegate.mm b/package/example/ios/VisionCameraExample/AppDelegate.mm index 15009d5e00..e5125430b4 100644 --- a/package/example/ios/VisionCameraExample/AppDelegate.mm +++ b/package/example/ios/VisionCameraExample/AppDelegate.mm @@ -15,6 +15,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( } - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ + return [self bundleURL]; +} + +- (NSURL *)bundleURL { #if DEBUG return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; diff --git a/package/example/ios/VisionCameraExample/Info.plist b/package/example/ios/VisionCameraExample/Info.plist index a5f34ab350..d351831df5 100644 --- a/package/example/ios/VisionCameraExample/Info.plist +++ b/package/example/ios/VisionCameraExample/Info.plist @@ -26,14 +26,11 @@ <true/> <key>NSAppTransportSecurity</key> <dict> - <key>NSExceptionDomains</key> - <dict> - <key>localhost</key> - <dict> - <key>NSExceptionAllowsInsecureHTTPLoads</key> - <true/> - </dict> - </dict> + <!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! --> + <key>NSAllowsArbitraryLoads</key> + <false/> + <key>NSAllowsLocalNetworking</key> + <true/> </dict> <key>NSCameraUsageDescription</key> <string>VisionCamera needs access to your Camera for very obvious reasons.</string> @@ -52,7 +49,7 @@ <string>LaunchScreen.storyboard</string> <key>UIRequiredDeviceCapabilities</key> <array> - <string>armv7</string> + <string>arm64</string> </array> <key>UISupportedInterfaceOrientations</key> <array> diff --git a/package/example/ios/VisionCameraExample/PrivacyInfo.xcprivacy b/package/example/ios/VisionCameraExample/PrivacyInfo.xcprivacy new file mode 100644 index 0000000000..d634def7b1 --- /dev/null +++ b/package/example/ios/VisionCameraExample/PrivacyInfo.xcprivacy @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>NSPrivacyAccessedAPITypes</key> + <array> + <dict> + <key>NSPrivacyAccessedAPIType</key> + <string>NSPrivacyAccessedAPICategoryFileTimestamp</string> + <key>NSPrivacyAccessedAPITypeReasons</key> + <array> + <string>3B52.1</string> + <string>C617.1</string> + </array> + </dict> + <dict> + <key>NSPrivacyAccessedAPIType</key> + <string>NSPrivacyAccessedAPICategoryUserDefaults</string> + <key>NSPrivacyAccessedAPITypeReasons</key> + <array> + <string>CA92.1</string> + </array> + </dict> + <dict> + <key>NSPrivacyAccessedAPIType</key> + <string>NSPrivacyAccessedAPICategorySystemBootTime</string> + <key>NSPrivacyAccessedAPITypeReasons</key> + <array> + <string>35F9.1</string> + </array> + </dict> + </array> + <key>NSPrivacyCollectedDataTypes</key> + <array/> + <key>NSPrivacyTracking</key> + <false/> +</dict> +</plist> diff --git a/package/example/package.json b/package/example/package.json index e949df599a..0f812601d9 100644 --- a/package/example/package.json +++ b/package/example/package.json @@ -13,37 +13,37 @@ "typescript": "tsc --noEmit" }, "dependencies": { - "@react-native-camera-roll/camera-roll": "^5.7.2", - "@react-native-community/blur": "^4.3.2", - "@react-navigation/native": "^6.1.7", - "@react-navigation/native-stack": "^6.9.13", - "@shopify/react-native-skia": "^1.2.3", - "react": "^18.2.0", - "react-native": "^0.72.3", - "react-native-gesture-handler": "^2.12.1", - "react-native-mmkv": "^2.10.2", + "@react-native-camera-roll/camera-roll": "^7.8.1", + "@react-native-community/blur": "^4.4.0", + "@react-navigation/native": "^6.1.17", + "@react-navigation/native-stack": "^6.9.26", + "@shopify/react-native-skia": "^1.3.4", + "react": "^18.3.1", + "react-native": "^0.74.2", + "react-native-gesture-handler": "^2.16.2", + "react-native-mmkv": "^2.12.2", "react-native-pressable-opacity": "^1.0.10", - "react-native-reanimated": "^3.8.1", - "react-native-safe-area-context": "^4.8.2", - "react-native-screens": "^3.24.0", + "react-native-reanimated": "^3.12.0", + "react-native-safe-area-context": "^4.10.4", + "react-native-screens": "^3.31.1", "react-native-static-safe-area-insets": "^2.2.0", - "react-native-vector-icons": "^10.0.0", - "react-native-video": "^5.2.1", + "react-native-vector-icons": "^10.1.0", + "react-native-video": "^6.2.0", "react-native-worklets-core": "^1.3.3" }, "devDependencies": { - "@babel/core": "^7.22.10", - "@babel/preset-env": "^7.22.10", - "@babel/runtime": "^7.23.9", - "@react-native/eslint-config": "^0.72.2", - "@react-native/metro-config": "^0.72.9", - "@react-native/typescript-config": "^0.73.0", - "@types/react": "^18.2.48", + "@babel/core": "^7.24.7", + "@babel/preset-env": "^7.24.7", + "@babel/runtime": "^7.24.7", + "@react-native/eslint-config": "^0.74.84", + "@react-native/metro-config": "^0.74.84", + "@react-native/typescript-config": "^0.74.84", + "@types/react": "^18.3.3", "@types/react-native-vector-icons": "^6.4.13", - "@types/react-native-video": "^5.0.15", - "babel-plugin-module-resolver": "^5.0.0", + "@types/react-native-video": "^5.0.20", + "babel-plugin-module-resolver": "^5.0.2", "eslint": "^8.46.0", - "eslint-plugin-prettier": "^5.0.0", + "eslint-plugin-prettier": "^5.1.3", "metro-react-native-babel-preset": "^0.77.0", "prettier": "^3.2.4", "typescript": "^5.1.6" diff --git a/package/example/src/MediaPage.tsx b/package/example/src/MediaPage.tsx index 02a9b36013..77a2de9384 100644 --- a/package/example/src/MediaPage.tsx +++ b/package/example/src/MediaPage.tsx @@ -1,7 +1,7 @@ import React, { useCallback, useMemo, useState } from 'react' import type { ImageLoadEventData, NativeSyntheticEvent } from 'react-native' import { StyleSheet, View, ActivityIndicator, PermissionsAndroid, Platform, Image } from 'react-native' -import type { LoadError, OnLoadData } from 'react-native-video' +import type { OnVideoErrorData, OnLoadData } from 'react-native-video' import Video from 'react-native-video' import { SAFE_AREA_PADDING } from './Constants' import { useIsForeground } from './hooks/useIsForeground' @@ -54,7 +54,7 @@ export function MediaPage({ navigation, route }: Props): React.ReactElement { console.log('media has loaded.') setHasMediaLoaded(true) }, []) - const onMediaLoadError = useCallback((error: LoadError) => { + const onMediaLoadError = useCallback((error: OnVideoErrorData) => { console.log(`failed to load media: ${JSON.stringify(error)}`) }, []) diff --git a/package/example/src/views/CaptureButton.tsx b/package/example/src/views/CaptureButton.tsx index ecd041da45..2476d8bdcb 100644 --- a/package/example/src/views/CaptureButton.tsx +++ b/package/example/src/views/CaptureButton.tsx @@ -18,9 +18,6 @@ import Reanimated, { import type { Camera, PhotoFile, VideoFile } from 'react-native-vision-camera' import { CAPTURE_BUTTON_SIZE, SCREEN_HEIGHT, SCREEN_WIDTH } from './../Constants' -const PAN_GESTURE_HANDLER_FAIL_X = [-SCREEN_WIDTH, SCREEN_WIDTH] -const PAN_GESTURE_HANDLER_ACTIVE_Y = [-2, 2] - const START_RECORDING_DELAY = 200 const BORDER_WIDTH = CAPTURE_BUTTON_SIZE * 0.1 @@ -260,8 +257,8 @@ const _CaptureButton: React.FC<Props> = ({ <PanGestureHandler enabled={enabled} ref={panHandler} - failOffsetX={PAN_GESTURE_HANDLER_FAIL_X} - activeOffsetY={PAN_GESTURE_HANDLER_ACTIVE_Y} + failOffsetX={[-SCREEN_WIDTH, SCREEN_WIDTH]} + activeOffsetY={[-2, 2]} onGestureEvent={onPanGestureEvent} simultaneousHandlers={tapHandler}> <Reanimated.View style={styles.flex}> diff --git a/package/example/yarn.lock b/package/example/yarn.lock index 3632a62faf..60aa1e9c51 100644 --- a/package/example/yarn.lock +++ b/package/example/yarn.lock @@ -23,12 +23,25 @@ "@babel/highlight" "^7.23.4" chalk "^2.4.2" -"@babel/compat-data@^7.20.5", "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.23.3", "@babel/compat-data@^7.23.5": +"@babel/code-frame@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" + integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== + dependencies: + "@babel/highlight" "^7.24.7" + picocolors "^1.0.0" + +"@babel/compat-data@^7.20.5", "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.23.5": version "7.23.5" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.5.tgz#ffb878728bb6bdcb6f4510aa51b1be9afb8cfd98" integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== -"@babel/core@^7.13.16", "@babel/core@^7.20.0", "@babel/core@^7.22.10": +"@babel/compat-data@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.7.tgz#d23bbea508c3883ba8251fb4164982c36ea577ed" + integrity sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw== + +"@babel/core@^7.13.16", "@babel/core@^7.20.0": version "7.23.6" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.6.tgz#8be77cd77c55baadcc1eae1c33df90ab6d2151d4" integrity sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw== @@ -49,6 +62,27 @@ json5 "^2.2.3" semver "^6.3.1" +"@babel/core@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.7.tgz#b676450141e0b52a3d43bc91da86aa608f950ac4" + integrity sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.24.7" + "@babel/helper-compilation-targets" "^7.24.7" + "@babel/helper-module-transforms" "^7.24.7" + "@babel/helpers" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/template" "^7.24.7" + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/eslint-parser@^7.20.0": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.23.3.tgz#7bf0db1c53b54da0c8a12627373554a0828479ca" @@ -68,6 +102,16 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" +"@babel/generator@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.7.tgz#1654d01de20ad66b4b4d99c135471bc654c55e6d" + integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA== + dependencies: + "@babel/types" "^7.24.7" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" @@ -75,12 +119,20 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-builder-binary-assignment-operator-visitor@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz#5426b109cf3ad47b91120f8328d8ab1be8b0b956" - integrity sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw== +"@babel/helper-annotate-as-pure@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz#5373c7bc8366b12a033b4be1ac13a206c6656aab" + integrity sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg== dependencies: - "@babel/types" "^7.22.15" + "@babel/types" "^7.24.7" + +"@babel/helper-builder-binary-assignment-operator-visitor@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.24.7.tgz#37d66feb012024f2422b762b9b2a7cfe27c7fba3" + integrity sha512-xZeCVVdwb4MsDBkkyZ64tReWYrLRHlMN72vP7Bdm3OUOuyFZExhsHUUnuWnm2/XOlAJzR0LfPpB56WXZn0X/lA== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" "@babel/helper-compilation-targets@^7.20.7", "@babel/helper-compilation-targets@^7.22.15", "@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.23.6": version "7.23.6" @@ -93,7 +145,18 @@ lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.22.15", "@babel/helper-create-class-features-plugin@^7.23.6": +"@babel/helper-compilation-targets@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz#4eb6c4a80d6ffeac25ab8cd9a21b5dfa48d503a9" + integrity sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg== + dependencies: + "@babel/compat-data" "^7.24.7" + "@babel/helper-validator-option" "^7.24.7" + browserslist "^4.22.2" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.23.6": version "7.23.6" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.6.tgz#b04d915ce92ce363666f816a884cdcfc9be04953" integrity sha512-cBXU1vZni/CpGF29iTu4YRbOZt3Wat6zCoMDxRF1MayiEc4URxOj31tT65HUM0CRpMowA3HCJaAOVOUnMf96cw== @@ -108,6 +171,21 @@ "@babel/helper-split-export-declaration" "^7.22.6" semver "^6.3.1" +"@babel/helper-create-class-features-plugin@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.7.tgz#2eaed36b3a1c11c53bdf80d53838b293c52f5b3b" + integrity sha512-kTkaDl7c9vO80zeX1rJxnuRpEsD5tA81yh11X1gQo+PhSti3JS+7qeZo9U4RHobKRiFPKaGK3svUAeb8D0Q7eg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.7" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-function-name" "^7.24.7" + "@babel/helper-member-expression-to-functions" "^7.24.7" + "@babel/helper-optimise-call-expression" "^7.24.7" + "@babel/helper-replace-supers" "^7.24.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + semver "^6.3.1" + "@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.22.15", "@babel/helper-create-regexp-features-plugin@^7.22.5": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz#5ee90093914ea09639b01c711db0d6775e558be1" @@ -117,6 +195,15 @@ regexpu-core "^5.3.1" semver "^6.3.1" +"@babel/helper-create-regexp-features-plugin@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.24.7.tgz#be4f435a80dc2b053c76eeb4b7d16dd22cfc89da" + integrity sha512-03TCmXy2FtXJEZfbXDTSqq1fRJArk7lX9DOFC/47VthYcxyIOx+eXQmdo6DOQvrbpIix+KfXwvuXdFDZHxt+rA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.7" + regexpu-core "^5.3.1" + semver "^6.3.1" + "@babel/helper-define-polyfill-provider@^0.4.4": version "0.4.4" resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.4.tgz#64df615451cb30e94b59a9696022cffac9a10088" @@ -128,11 +215,29 @@ lodash.debounce "^4.0.8" resolve "^1.14.2" +"@babel/helper-define-polyfill-provider@^0.6.1", "@babel/helper-define-polyfill-provider@^0.6.2": + version "0.6.2" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz#18594f789c3594acb24cfdb4a7f7b7d2e8bd912d" + integrity sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ== + dependencies: + "@babel/helper-compilation-targets" "^7.22.6" + "@babel/helper-plugin-utils" "^7.22.5" + debug "^4.1.1" + lodash.debounce "^4.0.8" + resolve "^1.14.2" + "@babel/helper-environment-visitor@^7.18.9", "@babel/helper-environment-visitor@^7.22.20": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== +"@babel/helper-environment-visitor@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9" + integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-function-name@^7.22.5", "@babel/helper-function-name@^7.23.0": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" @@ -141,6 +246,14 @@ "@babel/template" "^7.22.15" "@babel/types" "^7.23.0" +"@babel/helper-function-name@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2" + integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA== + dependencies: + "@babel/template" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-hoist-variables@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" @@ -148,6 +261,13 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-hoist-variables@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee" + integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-member-expression-to-functions@^7.22.15", "@babel/helper-member-expression-to-functions@^7.23.0": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz#9263e88cc5e41d39ec18c9a3e0eced59a3e7d366" @@ -155,6 +275,14 @@ dependencies: "@babel/types" "^7.23.0" +"@babel/helper-member-expression-to-functions@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.7.tgz#67613d068615a70e4ed5101099affc7a41c5225f" + integrity sha512-LGeMaf5JN4hAT471eJdBs/GK1DoYIJ5GCtZN/EsL6KUiiDZOvO/eKE11AMZJa2zP4zk4qe9V2O/hxAmkRc8p6w== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-module-imports@^7.22.15": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" @@ -162,6 +290,14 @@ dependencies: "@babel/types" "^7.22.15" +"@babel/helper-module-imports@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b" + integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-module-transforms@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz#d7d12c3c5d30af5b3c0fcab2a6d5217773e2d0f1" @@ -173,6 +309,17 @@ "@babel/helper-split-export-declaration" "^7.22.6" "@babel/helper-validator-identifier" "^7.22.20" +"@babel/helper-module-transforms@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz#31b6c9a2930679498db65b685b1698bfd6c7daf8" + integrity sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ== + dependencies: + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-module-imports" "^7.24.7" + "@babel/helper-simple-access" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" + "@babel/helper-optimise-call-expression@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz#f21531a9ccbff644fdd156b4077c16ff0c3f609e" @@ -180,6 +327,13 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-optimise-call-expression@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz#8b0a0456c92f6b323d27cfd00d1d664e76692a0f" + integrity sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" @@ -190,6 +344,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz#945681931a52f15ce879fd5b86ce2dae6d3d7f2a" integrity sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w== +"@babel/helper-plugin-utils@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz#98c84fe6fe3d0d3ae7bfc3a5e166a46844feb2a0" + integrity sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg== + "@babel/helper-remap-async-to-generator@^7.18.9", "@babel/helper-remap-async-to-generator@^7.22.20": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz#7b68e1cb4fa964d2996fd063723fb48eca8498e0" @@ -199,6 +358,15 @@ "@babel/helper-environment-visitor" "^7.22.20" "@babel/helper-wrap-function" "^7.22.20" +"@babel/helper-remap-async-to-generator@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.24.7.tgz#b3f0f203628522713849d49403f1a414468be4c7" + integrity sha512-9pKLcTlZ92hNZMQfGCHImUpDOlAgkkpqalWEeftW5FBya75k8Li2ilerxkM/uBEj01iBZXcCIB/bwvDYgWyibA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.7" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-wrap-function" "^7.24.7" + "@babel/helper-replace-supers@^7.22.20": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz#e37d367123ca98fe455a9887734ed2e16eb7a793" @@ -208,6 +376,15 @@ "@babel/helper-member-expression-to-functions" "^7.22.15" "@babel/helper-optimise-call-expression" "^7.22.5" +"@babel/helper-replace-supers@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.24.7.tgz#f933b7eed81a1c0265740edc91491ce51250f765" + integrity sha512-qTAxxBM81VEyoAY0TtLrx1oAEJc09ZK67Q9ljQToqCnA+55eNwCORaxlKyu+rNfX86o8OXRUSNUnrtsAZXM9sg== + dependencies: + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-member-expression-to-functions" "^7.24.7" + "@babel/helper-optimise-call-expression" "^7.24.7" + "@babel/helper-simple-access@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" @@ -215,6 +392,14 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-simple-access@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz#bcade8da3aec8ed16b9c4953b74e506b51b5edb3" + integrity sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-skip-transparent-expression-wrappers@^7.20.0", "@babel/helper-skip-transparent-expression-wrappers@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz#007f15240b5751c537c40e77abb4e89eeaaa8847" @@ -222,6 +407,14 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-skip-transparent-expression-wrappers@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz#5f8fa83b69ed5c27adc56044f8be2b3ea96669d9" + integrity sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-split-export-declaration@^7.22.6": version "7.22.6" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" @@ -229,21 +422,43 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-split-export-declaration@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856" + integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-string-parser@^7.23.4": version "7.23.4" resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83" integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== +"@babel/helper-string-parser@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2" + integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg== + "@babel/helper-validator-identifier@^7.22.20": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== + "@babel/helper-validator-option@^7.22.15", "@babel/helper-validator-option@^7.23.5": version "7.23.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== +"@babel/helper-validator-option@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz#24c3bb77c7a425d1742eec8fb433b5a1b38e62f6" + integrity sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw== + "@babel/helper-wrap-function@^7.22.20": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz#15352b0b9bfb10fc9c76f79f6342c00e3411a569" @@ -253,6 +468,16 @@ "@babel/template" "^7.22.15" "@babel/types" "^7.22.19" +"@babel/helper-wrap-function@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.24.7.tgz#52d893af7e42edca7c6d2c6764549826336aae1f" + integrity sha512-N9JIYk3TD+1vq/wn77YnJOqMtfWhNewNE+DJV4puD2X7Ew9J4JvrzrFDfTfyv5EgEXVy9/Wt8QiOErzEmv5Ifw== + dependencies: + "@babel/helper-function-name" "^7.24.7" + "@babel/template" "^7.24.7" + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helpers@^7.23.6": version "7.23.6" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.6.tgz#d03af2ee5fb34691eec0cda90f5ecbb4d4da145a" @@ -262,6 +487,14 @@ "@babel/traverse" "^7.23.6" "@babel/types" "^7.23.6" +"@babel/helpers@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.7.tgz#aa2ccda29f62185acb5d42fb4a3a1b1082107416" + integrity sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg== + dependencies: + "@babel/template" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/highlight@^7.23.4": version "7.23.4" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b" @@ -271,34 +504,57 @@ chalk "^2.4.2" js-tokens "^4.0.0" +"@babel/highlight@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" + integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== + dependencies: + "@babel/helper-validator-identifier" "^7.24.7" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + "@babel/parser@^7.13.16", "@babel/parser@^7.20.0", "@babel/parser@^7.22.15", "@babel/parser@^7.23.6": version "7.23.6" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.6.tgz#ba1c9e512bda72a47e285ae42aff9d2a635a9e3b" integrity sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ== -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.23.3.tgz#5cd1c87ba9380d0afb78469292c954fee5d2411a" - integrity sha512-iRkKcCqb7iGnq9+3G6rZ+Ciz5VywC4XNRHe57lKM+jOeYAoR0lVqdeeDRfh0tQcTfw/+vBhHn926FmQhLtlFLQ== +"@babel/parser@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" + integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== + +"@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.7.tgz#fd059fd27b184ea2b4c7e646868a9a381bbc3055" + integrity sha512-TiT1ss81W80eQsN+722OaeQMY/G4yTb4G9JrqeiDADs3N8lbPMGldWi9x8tyqCW5NLx1Jh2AvkE6r6QvEltMMQ== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.23.3.tgz#f6652bb16b94f8f9c20c50941e16e9756898dc5d" - integrity sha512-WwlxbfMNdVEpQjZmK5mhm7oSwD3dS6eU+Iwsi4Knl9wAletWem7kaRsGOG+8UEbRyqxY4SS5zvtfXwX+jMxUwQ== +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.7.tgz#468096ca44bbcbe8fcc570574e12eb1950e18107" + integrity sha512-unaQgZ/iRu/By6tsjMZzpeBZjChYfLYry6HrEXPoz3KmfF0sVBQ1l8zKMQ4xRGLWVsjuvB8nQfjNP/DcfEOCsg== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" - "@babel/plugin-transform-optional-chaining" "^7.23.3" + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.3.tgz#20c60d4639d18f7da8602548512e9d3a4c8d7098" - integrity sha512-XaJak1qcityzrX0/IU5nKHb34VaibwP3saKqG6a/tppelgllOH13LUann4ZCIBcVOeE6H18K4Vx9QKkVww3z/w== +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.7.tgz#e4eabdd5109acc399b38d7999b2ef66fc2022f89" + integrity sha512-+izXIbke1T33mY4MSNnrqhPXDz01WYhEf3yF5NbnUtkiNnm+XBZJl3kNfoK6NKmYlz/D07+l2GWVK/QfDkNCuQ== dependencies: - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" + "@babel/plugin-transform-optional-chaining" "^7.24.7" + +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.7.tgz#71b21bb0286d5810e63a1538aa901c58e87375ec" + integrity sha512-utA4HuR6F4Vvcr+o4DnjL8fCOlgRFGbeeBEGNg3ZTrLFw6VWG5XmUrvcQ0FjIYMU2ST4XcR2Wsp7t9qOAPnxMg== + dependencies: + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-proposal-async-generator-functions@^7.0.0": version "7.20.7" @@ -310,7 +566,7 @@ "@babel/helper-remap-async-to-generator" "^7.18.9" "@babel/plugin-syntax-async-generators" "^7.8.4" -"@babel/plugin-proposal-class-properties@^7.0.0", "@babel/plugin-proposal-class-properties@^7.13.0", "@babel/plugin-proposal-class-properties@^7.18.0": +"@babel/plugin-proposal-class-properties@^7.13.0", "@babel/plugin-proposal-class-properties@^7.18.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== @@ -326,6 +582,14 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-export-default-from" "^7.23.3" +"@babel/plugin-proposal-logical-assignment-operators@^7.18.0": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz#dfbcaa8f7b4d37b51e8bfb46d94a5aea2bb89d83" + integrity sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug== + dependencies: + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8", "@babel/plugin-proposal-nullish-coalescing-operator@^7.18.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" @@ -342,7 +606,7 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-proposal-object-rest-spread@^7.0.0", "@babel/plugin-proposal-object-rest-spread@^7.20.0": +"@babel/plugin-proposal-object-rest-spread@^7.20.0": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a" integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg== @@ -382,7 +646,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-class-properties@^7.0.0", "@babel/plugin-syntax-class-properties@^7.12.13": +"@babel/plugin-syntax-class-properties@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== @@ -417,26 +681,26 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.12.1", "@babel/plugin-syntax-flow@^7.18.0", "@babel/plugin-syntax-flow@^7.23.3": +"@babel/plugin-syntax-flow@^7.12.1", "@babel/plugin-syntax-flow@^7.18.0", "@babel/plugin-syntax-flow@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.23.3.tgz#084564e0f3cc21ea6c70c44cff984a1c0509729a" integrity sha512-YZiAIpkJAwQXBJLIQbRFayR5c+gJ35Vcz3bg954k7cd73zqjvhacJuL9RbrzPz8qPmZdgqP6EUKwy0PCNhaaPA== dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-syntax-import-assertions@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.23.3.tgz#9c05a7f592982aff1a2768260ad84bcd3f0c77fc" - integrity sha512-lPgDSU+SJLK3xmFDTV2ZRQAiM7UuUjGidwBywFavObCiZc1BeAAcMtHJKUya92hPHO+at63JJPLygilZard8jw== +"@babel/plugin-syntax-import-assertions@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.7.tgz#2a0b406b5871a20a841240586b1300ce2088a778" + integrity sha512-Ec3NRUMoi8gskrkBe3fNmEQfxDvY8bgfQpz6jlk/41kX9eUjvpyqWU7PBP/pLAvMaSQjbMNKJmvX57jP+M6bPg== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-syntax-import-attributes@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.23.3.tgz#992aee922cf04512461d7dae3ff6951b90a2dc06" - integrity sha512-pawnE0P9g10xgoP7yKr6CK63K2FMsTE+FZidZO/1PwRdzmAPVs+HS1mAURUsgaoxammTJvULUdIkEK0gOcU2tA== +"@babel/plugin-syntax-import-attributes@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz#b4f9ea95a79e6912480c4b626739f86a076624ca" + integrity sha512-hbX+lKKeUMGihnK8nvKqmXBInriT3GVjzXKFriV3YC6APGxMbP8RZNFwy91+hocLXq90Mta+HshoB31802bb8A== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-import-meta@^7.10.4": version "7.10.4" @@ -452,7 +716,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.23.3": +"@babel/plugin-syntax-jsx@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz#8f2e4f8a9b5f9aa16067e142c1ac9cd9f810f473" integrity sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg== @@ -480,7 +744,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.8.3": +"@babel/plugin-syntax-object-rest-spread@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== @@ -530,7 +794,7 @@ "@babel/helper-create-regexp-features-plugin" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-arrow-functions@^7.0.0", "@babel/plugin-transform-arrow-functions@^7.23.3": +"@babel/plugin-transform-arrow-functions@^7.0.0": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.23.3.tgz#94c6dcfd731af90f27a79509f9ab7fb2120fc38b" integrity sha512-NzQcQrzaQPkaEwoTm4Mhyl8jI1huEL/WWIEvudjTCMJ9aBZNpsJbMASx7EQECtQQPS/DcnFpo0FIh3LvEO9cxQ== @@ -544,17 +808,24 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.0" -"@babel/plugin-transform-async-generator-functions@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.4.tgz#93ac8e3531f347fba519b4703f9ff2a75c6ae27a" - integrity sha512-efdkfPhHYTtn0G6n2ddrESE91fgXxjlqLsnUtPWnJs4a4mZIbUaK7ffqKIIUKXSHwcDvaCVX6GXkaJJFqtX7jw== +"@babel/plugin-transform-arrow-functions@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.7.tgz#4f6886c11e423bd69f3ce51dbf42424a5f275514" + integrity sha512-Dt9LQs6iEY++gXUwY03DNFat5C2NbO48jj+j/bSAz6b3HgPs39qcPiYt77fDObIcFwj3/C2ICX9YMwGflUoSHQ== dependencies: - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-remap-async-to-generator" "^7.22.20" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-async-generator-functions@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.7.tgz#7330a5c50e05181ca52351b8fd01642000c96cfd" + integrity sha512-o+iF77e3u7ZS4AoAuJvapz9Fm001PuD2V3Lp6OSE4FYQke+cSewYtnek+THqGRWyQloRCyvWL1OkyfNEl9vr/g== + dependencies: + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-remap-async-to-generator" "^7.24.7" "@babel/plugin-syntax-async-generators" "^7.8.4" -"@babel/plugin-transform-async-to-generator@^7.20.0", "@babel/plugin-transform-async-to-generator@^7.23.3": +"@babel/plugin-transform-async-to-generator@^7.20.0": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.23.3.tgz#d1f513c7a8a506d43f47df2bf25f9254b0b051fa" integrity sha512-A7LFsKi4U4fomjqXJlZg/u0ft/n8/7n7lpffUP/ZULx/DtV9SGlNKZolHH6PE8Xl1ngCc0M11OaeZptXVkfKSw== @@ -563,38 +834,54 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-remap-async-to-generator" "^7.22.20" -"@babel/plugin-transform-block-scoped-functions@^7.0.0", "@babel/plugin-transform-block-scoped-functions@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.23.3.tgz#fe1177d715fb569663095e04f3598525d98e8c77" - integrity sha512-vI+0sIaPIO6CNuM9Kk5VmXcMVRiOpDh7w2zZt9GXzmE/9KD70CUEVhvPR/etAeNK/FAEkhxQtXOzVF3EuRL41A== +"@babel/plugin-transform-async-to-generator@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.7.tgz#72a3af6c451d575842a7e9b5a02863414355bdcc" + integrity sha512-SQY01PcJfmQ+4Ash7NE+rpbLFbmqA2GPIgqzxfFTL4t1FKRq4zTms/7htKpoCUI9OcFYgzqfmCdH53s6/jn5fA== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-module-imports" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-remap-async-to-generator" "^7.24.7" + +"@babel/plugin-transform-block-scoped-functions@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.7.tgz#a4251d98ea0c0f399dafe1a35801eaba455bbf1f" + integrity sha512-yO7RAz6EsVQDaBH18IDJcMB1HnrUn2FJ/Jslc/WtPPWcjhpUJXU/rjbwmluzp7v/ZzWcEhTMXELnnsz8djWDwQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-block-scoping@^7.0.0", "@babel/plugin-transform-block-scoping@^7.23.4": +"@babel/plugin-transform-block-scoping@^7.0.0": version "7.23.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.4.tgz#b2d38589531c6c80fbe25e6b58e763622d2d3cf5" integrity sha512-0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw== dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-class-properties@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.23.3.tgz#35c377db11ca92a785a718b6aa4e3ed1eb65dc48" - integrity sha512-uM+AN8yCIjDPccsKGlw271xjJtGii+xQIF/uMPS8H15L12jZTsLfF4o5vNO7d/oUguOyfdikHGc/yi9ge4SGIg== +"@babel/plugin-transform-block-scoping@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.7.tgz#42063e4deb850c7bd7c55e626bf4e7ab48e6ce02" + integrity sha512-Nd5CvgMbWc+oWzBsuaMcbwjJWAcp5qzrbg69SZdHSP7AMY0AbWFqFO0WTFCA1jxhMCwodRwvRec8k0QUbZk7RQ== dependencies: - "@babel/helper-create-class-features-plugin" "^7.22.15" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-class-static-block@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.4.tgz#2a202c8787a8964dd11dfcedf994d36bfc844ab5" - integrity sha512-nsWu/1M+ggti1SOALj3hfx5FXzAY06fwPJsUZD4/A5e1bWi46VUIWtD+kOX6/IdhXGsXBWllLFDSnqSCdUNydQ== +"@babel/plugin-transform-class-properties@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.7.tgz#256879467b57b0b68c7ddfc5b76584f398cd6834" + integrity sha512-vKbfawVYayKcSeSR5YYzzyXvsDFWU2mD8U5TFeXtbCPLFUqe7GyCgvO6XDHzje862ODrOwy6WCPmKeWHbCFJ4w== dependencies: - "@babel/helper-create-class-features-plugin" "^7.22.15" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-create-class-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-class-static-block@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.7.tgz#c82027ebb7010bc33c116d4b5044fbbf8c05484d" + integrity sha512-HMXK3WbBPpZQufbMG4B46A90PkuuhN9vBCb5T8+VAHqvAqvcLi+2cKoukcpmUYkszLhScU3l1iudhrks3DggRQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-class-static-block" "^7.14.5" -"@babel/plugin-transform-classes@^7.0.0", "@babel/plugin-transform-classes@^7.23.5": +"@babel/plugin-transform-classes@^7.0.0": version "7.23.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.5.tgz#e7a75f815e0c534cc4c9a39c56636c84fc0d64f2" integrity sha512-jvOTR4nicqYC9yzOHIhXG5emiFEOpappSJAl73SDSEDcybD+Puuze8Tnpb9p9qEyYup24tq891gkaygIFvWDqg== @@ -609,7 +896,21 @@ "@babel/helper-split-export-declaration" "^7.22.6" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.0.0", "@babel/plugin-transform-computed-properties@^7.23.3": +"@babel/plugin-transform-classes@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.7.tgz#4ae6ef43a12492134138c1e45913f7c46c41b4bf" + integrity sha512-CFbbBigp8ln4FU6Bpy6g7sE8B/WmCmzvivzUC6xDAdWVsjYTXijpuuGJmYkAaoWAzcItGKT3IOAbxRItZ5HTjw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.7" + "@babel/helper-compilation-targets" "^7.24.7" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-function-name" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-replace-supers" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.0.0": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.23.3.tgz#652e69561fcc9d2b50ba4f7ac7f60dcf65e86474" integrity sha512-dTj83UVTLw/+nbiHqQSFdwO9CbTtwq1DsDqm3CUEtDrZNET5rT5E6bIdTlOftDTDLMYxvxHNEYO4B9SLl8SLZw== @@ -617,53 +918,68 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/template" "^7.22.15" -"@babel/plugin-transform-destructuring@^7.0.0", "@babel/plugin-transform-destructuring@^7.20.0", "@babel/plugin-transform-destructuring@^7.23.3": +"@babel/plugin-transform-computed-properties@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.7.tgz#4cab3214e80bc71fae3853238d13d097b004c707" + integrity sha512-25cS7v+707Gu6Ds2oY6tCkUwsJ9YIDbggd9+cu9jzzDgiNq7hR/8dkzxWfKWnTic26vsI3EsCXNd4iEB6e8esQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/template" "^7.24.7" + +"@babel/plugin-transform-destructuring@^7.20.0": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.3.tgz#8c9ee68228b12ae3dff986e56ed1ba4f3c446311" integrity sha512-n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw== dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-dotall-regex@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.23.3.tgz#3f7af6054882ede89c378d0cf889b854a993da50" - integrity sha512-vgnFYDHAKzFaTVp+mneDsIEbnJ2Np/9ng9iviHw3P/KVcgONxpNULEW/51Z/BaFojG2GI2GwwXck5uV1+1NOYQ== +"@babel/plugin-transform-destructuring@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.7.tgz#a097f25292defb6e6cc16d6333a4cfc1e3c72d9e" + integrity sha512-19eJO/8kdCQ9zISOf+SEUJM/bAUIsvY3YDnXZTupUCQ8LgrWnsG/gFB9dvXqdXnRXMAM8fvt7b0CBKQHNGy1mw== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.22.15" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-duplicate-keys@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.23.3.tgz#664706ca0a5dfe8d066537f99032fc1dc8b720ce" - integrity sha512-RrqQ+BQmU3Oyav3J+7/myfvRCq7Tbz+kKLLshUmMwNlDHExbGL7ARhajvoBJEvc+fCguPPu887N+3RRXBVKZUA== +"@babel/plugin-transform-dotall-regex@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.7.tgz#5f8bf8a680f2116a7207e16288a5f974ad47a7a0" + integrity sha512-ZOA3W+1RRTSWvyqcMJDLqbchh7U4NRGqwRfFSVbOLS/ePIP4vHB5e8T8eXcuqyN1QkgKyj5wuW0lcS85v4CrSw== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-create-regexp-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-dynamic-import@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.4.tgz#c7629e7254011ac3630d47d7f34ddd40ca535143" - integrity sha512-V6jIbLhdJK86MaLh4Jpghi8ho5fGzt3imHOBu/x0jlBaPYqDoWz4RDXjmMOfnh+JWNaQleEAByZLV0QzBT4YQQ== +"@babel/plugin-transform-duplicate-keys@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.7.tgz#dd20102897c9a2324e5adfffb67ff3610359a8ee" + integrity sha512-JdYfXyCRihAe46jUIliuL2/s0x0wObgwwiGxw/UbgJBr20gQBThrokO4nYKgWkD7uBaqM7+9x5TU7NkExZJyzw== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-dynamic-import@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.7.tgz#4d8b95e3bae2b037673091aa09cd33fecd6419f4" + integrity sha512-sc3X26PhZQDb3JhORmakcbvkeInvxz+A8oda99lj7J60QRuPZvNAk9wQlTBS1ZynelDrDmTU4pw1tyc5d5ZMUg== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-dynamic-import" "^7.8.3" -"@babel/plugin-transform-exponentiation-operator@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.23.3.tgz#ea0d978f6b9232ba4722f3dbecdd18f450babd18" - integrity sha512-5fhCsl1odX96u7ILKHBj4/Y8vipoqwsJMh4csSA8qFfxrZDEA4Ssku2DyNvMJSmZNOEBT750LfFPbtrnTP90BQ== +"@babel/plugin-transform-exponentiation-operator@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.7.tgz#b629ee22645f412024297d5245bce425c31f9b0d" + integrity sha512-Rqe/vSc9OYgDajNIK35u7ot+KeCoetqQYFXM4Epf7M7ez3lWlOjrDjrwMei6caCVhfdw+mIKD4cgdGNy5JQotQ== dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.22.15" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-export-namespace-from@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.4.tgz#084c7b25e9a5c8271e987a08cf85807b80283191" - integrity sha512-GzuSBcKkx62dGzZI1WVgTWvkkz84FZO5TC5T8dl/Tht/rAla6Dg/Mz9Yhypg+ezVACf/rgDuQt3kbWEv7LdUDQ== +"@babel/plugin-transform-export-namespace-from@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.7.tgz#176d52d8d8ed516aeae7013ee9556d540c53f197" + integrity sha512-v0K9uNYsPL3oXZ/7F9NNIbAj2jv1whUEtyA6aujhekLs56R++JDQuzRcP2/z4WX5Vg/c5lE9uWZA0/iUoFhLTA== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" -"@babel/plugin-transform-flow-strip-types@^7.0.0", "@babel/plugin-transform-flow-strip-types@^7.20.0", "@babel/plugin-transform-flow-strip-types@^7.23.3": +"@babel/plugin-transform-flow-strip-types@^7.20.0", "@babel/plugin-transform-flow-strip-types@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.23.3.tgz#cfa7ca159cc3306fab526fc67091556b51af26ff" integrity sha512-26/pQTf9nQSNVJCrLB1IkHUKyPxR+lMrH2QDPG89+Znu9rAMbtrybdbWeE9bb7gzjmE5iXHEY+e0HUwM6Co93Q== @@ -671,15 +987,15 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-flow" "^7.23.3" -"@babel/plugin-transform-for-of@^7.0.0", "@babel/plugin-transform-for-of@^7.23.6": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.6.tgz#81c37e24171b37b370ba6aaffa7ac86bcb46f94e" - integrity sha512-aYH4ytZ0qSuBbpfhuofbg/e96oQ7U2w1Aw/UQmKT+1l39uEhUPoFS3fHevDc1G0OvewyDudfMKY1OulczHzWIw== +"@babel/plugin-transform-for-of@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.7.tgz#f25b33f72df1d8be76399e1b8f3f9d366eb5bc70" + integrity sha512-wo9ogrDG1ITTTBsy46oGiN1dS9A7MROBTcYsfS8DtsImMkHk9JXJ3EWQM6X2SUw4x80uGPlwj0o00Uoc6nEE3g== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" -"@babel/plugin-transform-function-name@^7.0.0", "@babel/plugin-transform-function-name@^7.23.3": +"@babel/plugin-transform-function-name@^7.0.0": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.23.3.tgz#8f424fcd862bf84cb9a1a6b42bc2f47ed630f8dc" integrity sha512-I1QXp1LxIvt8yLaib49dRW5Okt7Q4oaxao6tFVKS/anCdEOMtYwWVKoiOA1p34GOWIZjUK0E+zCp7+l1pfQyiw== @@ -688,43 +1004,59 @@ "@babel/helper-function-name" "^7.23.0" "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-json-strings@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.4.tgz#a871d9b6bd171976efad2e43e694c961ffa3714d" - integrity sha512-81nTOqM1dMwZ/aRXQ59zVubN9wHGqk6UtqRK+/q+ciXmRy8fSolhGVvG09HHRGo4l6fr/c4ZhXUQH0uFW7PZbg== +"@babel/plugin-transform-function-name@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.7.tgz#6d8601fbffe665c894440ab4470bc721dd9131d6" + integrity sha512-U9FcnA821YoILngSmYkW6FjyQe2TyZD5pHt4EVIhmcTkrJw/3KqcrRSxuOo5tFZJi7TE19iDyI1u+weTI7bn2w== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-compilation-targets" "^7.24.7" + "@babel/helper-function-name" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-json-strings@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.7.tgz#f3e9c37c0a373fee86e36880d45b3664cedaf73a" + integrity sha512-2yFnBGDvRuxAaE/f0vfBKvtnvvqU8tGpMHqMNpTN2oWMKIR3NqFkjaAgGwawhqK/pIN2T3XdjGPdaG0vDhOBGw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-transform-literals@^7.0.0", "@babel/plugin-transform-literals@^7.23.3": +"@babel/plugin-transform-literals@^7.0.0": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.23.3.tgz#8214665f00506ead73de157eba233e7381f3beb4" integrity sha512-wZ0PIXRxnwZvl9AYpqNUxpZ5BiTGrYt7kueGQ+N5FiQ7RCOD4cm8iShd6S6ggfVIWaJf2EMk8eRzAh52RfP4rQ== dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-logical-assignment-operators@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.4.tgz#e599f82c51d55fac725f62ce55d3a0886279ecb5" - integrity sha512-Mc/ALf1rmZTP4JKKEhUwiORU+vcfarFVLfcFiolKUo6sewoxSEgl36ak5t+4WamRsNr6nzjZXQjM35WsU+9vbg== +"@babel/plugin-transform-literals@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.7.tgz#36b505c1e655151a9d7607799a9988fc5467d06c" + integrity sha512-vcwCbb4HDH+hWi8Pqenwnjy+UiklO4Kt1vfspcQYFhJdpthSnW8XvWGyDZWKNVrVbVViI/S7K9PDJZiUmP2fYQ== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-logical-assignment-operators@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.7.tgz#a58fb6eda16c9dc8f9ff1c7b1ba6deb7f4694cb0" + integrity sha512-4D2tpwlQ1odXmTEIFWy9ELJcZHqrStlzK/dAOWYyxX3zT0iXQB6banjgeOJQXzEc4S0E0a5A+hahxPaEFYftsw== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-transform-member-expression-literals@^7.0.0", "@babel/plugin-transform-member-expression-literals@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.23.3.tgz#e37b3f0502289f477ac0e776b05a833d853cabcc" - integrity sha512-sC3LdDBDi5x96LA+Ytekz2ZPk8i/Ck+DEuDbRAll5rknJ5XRTSaPKEYwomLcs1AA8wg9b3KjIQRsnApj+q51Ag== +"@babel/plugin-transform-member-expression-literals@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.7.tgz#3b4454fb0e302e18ba4945ba3246acb1248315df" + integrity sha512-T/hRC1uqrzXMKLQ6UCwMT85S3EvqaBXDGf0FaMf4446Qx9vKwlghvee0+uuZcDUCZU5RuNi4781UQ7R308zzBw== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-modules-amd@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.3.tgz#e19b55436a1416829df0a1afc495deedfae17f7d" - integrity sha512-vJYQGxeKM4t8hYCKVBlZX/gtIY2I7mRGFNcm85sgXGMTBcoV3QdVtdpbcWEbzbfUIUZKwvgFT82mRvaQIebZzw== +"@babel/plugin-transform-modules-amd@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.7.tgz#65090ed493c4a834976a3ca1cde776e6ccff32d7" + integrity sha512-9+pB1qxV3vs/8Hdmz/CulFB8w2tuu6EB94JZFsjdqxQokwGa9Unap7Bo2gGBGIvPmDIVvQrom7r5m/TCDMURhg== dependencies: - "@babel/helper-module-transforms" "^7.23.3" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-module-transforms" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-transform-modules-commonjs@^7.0.0", "@babel/plugin-transform-modules-commonjs@^7.13.8", "@babel/plugin-transform-modules-commonjs@^7.23.3": version "7.23.3" @@ -735,25 +1067,34 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-simple-access" "^7.22.5" -"@babel/plugin-transform-modules-systemjs@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.3.tgz#fa7e62248931cb15b9404f8052581c302dd9de81" - integrity sha512-ZxyKGTkF9xT9YJuKQRo19ewf3pXpopuYQd8cDXqNzc3mUNbOME0RKMoZxviQk74hwzfQsEe66dE92MaZbdHKNQ== +"@babel/plugin-transform-modules-commonjs@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.7.tgz#9fd5f7fdadee9085886b183f1ad13d1ab260f4ab" + integrity sha512-iFI8GDxtevHJ/Z22J5xQpVqFLlMNstcLXh994xifFwxxGslr2ZXXLWgtBeLctOD63UFDArdvN6Tg8RFw+aEmjQ== dependencies: - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-module-transforms" "^7.23.3" - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-validator-identifier" "^7.22.20" + "@babel/helper-module-transforms" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-simple-access" "^7.24.7" -"@babel/plugin-transform-modules-umd@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.23.3.tgz#5d4395fccd071dfefe6585a4411aa7d6b7d769e9" - integrity sha512-zHsy9iXX2nIsCBFPud3jKn1IRPWg3Ing1qOZgeKV39m1ZgIdpJqvlWVeiHBZC6ITRG0MfskhYe9cLgntfSFPIg== +"@babel/plugin-transform-modules-systemjs@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.7.tgz#f8012316c5098f6e8dee6ecd58e2bc6f003d0ce7" + integrity sha512-GYQE0tW7YoaN13qFh3O1NCY4MPkUiAH3fiF7UcV/I3ajmDKEdG3l+UOcbAm4zUE3gnvUU+Eni7XrVKo9eO9auw== dependencies: - "@babel/helper-module-transforms" "^7.23.3" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-hoist-variables" "^7.24.7" + "@babel/helper-module-transforms" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" -"@babel/plugin-transform-named-capturing-groups-regex@^7.0.0", "@babel/plugin-transform-named-capturing-groups-regex@^7.22.5": +"@babel/plugin-transform-modules-umd@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.7.tgz#edd9f43ec549099620df7df24e7ba13b5c76efc8" + integrity sha512-3aytQvqJ/h9z4g8AsKPLvD4Zqi2qT+L3j7XoFFu1XBlZWEl2/1kWnhmAbxpLgPrHSY0M6UA02jyTiwUVtiKR6A== + dependencies: + "@babel/helper-module-transforms" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-named-capturing-groups-regex@^7.0.0": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz#67fe18ee8ce02d57c855185e27e3dc959b2e991f" integrity sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ== @@ -761,12 +1102,20 @@ "@babel/helper-create-regexp-features-plugin" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-new-target@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.23.3.tgz#5491bb78ed6ac87e990957cea367eab781c4d980" - integrity sha512-YJ3xKqtJMAT5/TIZnpAR3I+K+WaDowYbN3xyxI8zxx/Gsypwf9B9h0VB+1Nh6ACAAPRS5NSRje0uVv5i79HYGQ== +"@babel/plugin-transform-named-capturing-groups-regex@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.24.7.tgz#9042e9b856bc6b3688c0c2e4060e9e10b1460923" + integrity sha512-/jr7h/EWeJtk1U/uz2jlsCioHkZk1JJZVcc8oQsJ1dUlaJD83f4/6Zeh2aHt9BIFokHIsSeDfhUmju0+1GPd6g== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-create-regexp-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-new-target@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.7.tgz#31ff54c4e0555cc549d5816e4ab39241dfb6ab00" + integrity sha512-RNKwfRIXg4Ls/8mMTza5oPF5RkOW8Wy/WgMAp1/F1yZ8mMbtwXW+HDoJiOsagWrAhI5f57Vncrmr9XeT4CVapA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-transform-nullish-coalescing-operator@^7.0.0-0": version "7.24.1" @@ -776,47 +1125,46 @@ "@babel/helper-plugin-utils" "^7.24.0" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" -"@babel/plugin-transform-nullish-coalescing-operator@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.4.tgz#45556aad123fc6e52189ea749e33ce090637346e" - integrity sha512-jHE9EVVqHKAQx+VePv5LLGHjmHSJR76vawFPTdlxR/LVJPfOEGxREQwQfjuZEOPTwG92X3LINSh3M40Rv4zpVA== +"@babel/plugin-transform-nullish-coalescing-operator@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.7.tgz#1de4534c590af9596f53d67f52a92f12db984120" + integrity sha512-Ts7xQVk1OEocqzm8rHMXHlxvsfZ0cEF2yomUqpKENHWMF4zKk175Y4q8H5knJes6PgYad50uuRmt3UJuhBw8pQ== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" -"@babel/plugin-transform-numeric-separator@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.4.tgz#03d08e3691e405804ecdd19dd278a40cca531f29" - integrity sha512-mps6auzgwjRrwKEZA05cOwuDc9FAzoyFS4ZsG/8F43bTLf/TgkJg7QXOrPO1JO599iA3qgK9MXdMGOEC8O1h6Q== +"@babel/plugin-transform-numeric-separator@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.7.tgz#bea62b538c80605d8a0fac9b40f48e97efa7de63" + integrity sha512-e6q1TiVUzvH9KRvicuxdBTUj4AdKSRwzIyFFnfnezpCfP2/7Qmbb8qbU2j7GODbl4JMkblitCQjKYUaX/qkkwA== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-transform-object-rest-spread@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz#2b9c2d26bf62710460bdc0d1730d4f1048361b83" - integrity sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g== +"@babel/plugin-transform-object-rest-spread@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.7.tgz#d13a2b93435aeb8a197e115221cab266ba6e55d6" + integrity sha512-4QrHAr0aXQCEFni2q4DqKLD31n2DL+RxcwnNjDFkSG0eNQ/xCavnRkfCUjsyqGC2OviNJvZOF/mQqZBw7i2C5Q== dependencies: - "@babel/compat-data" "^7.23.3" - "@babel/helper-compilation-targets" "^7.22.15" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-compilation-targets" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.23.3" + "@babel/plugin-transform-parameters" "^7.24.7" -"@babel/plugin-transform-object-super@^7.0.0", "@babel/plugin-transform-object-super@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.23.3.tgz#81fdb636dcb306dd2e4e8fd80db5b2362ed2ebcd" - integrity sha512-BwQ8q0x2JG+3lxCVFohg+KbQM7plfpBwThdW9A6TMtWwLsbDA01Ek2Zb/AgDN39BiZsExm4qrXxjk+P1/fzGrA== +"@babel/plugin-transform-object-super@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.7.tgz#66eeaff7830bba945dd8989b632a40c04ed625be" + integrity sha512-A/vVLwN6lBrMFmMDmPPz0jnE6ZGx7Jq7d6sT/Ev4H65RER6pZ+kczlf1DthF5N0qaPHBsI7UXiE8Zy66nmAovg== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-replace-supers" "^7.22.20" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-replace-supers" "^7.24.7" -"@babel/plugin-transform-optional-catch-binding@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.4.tgz#318066de6dacce7d92fa244ae475aa8d91778017" - integrity sha512-XIq8t0rJPHf6Wvmbn9nFxU6ao4c7WhghTR5WyV8SrJfUFzyxhCm4nhC+iAp3HFhbAKLfYpgzhJ6t4XCtVwqO5A== +"@babel/plugin-transform-optional-catch-binding@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.7.tgz#00eabd883d0dd6a60c1c557548785919b6e717b4" + integrity sha512-uLEndKqP5BfBbC/5jTwPxLh9kqPWWgzN/f8w6UwAIirAEqiIVJWWY312X72Eub09g5KF9+Zn7+hT7sDxmhRuKA== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-transform-optional-chaining@^7.0.0-0": @@ -828,46 +1176,53 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" "@babel/plugin-syntax-optional-chaining" "^7.8.3" -"@babel/plugin-transform-optional-chaining@^7.23.3", "@babel/plugin-transform-optional-chaining@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.4.tgz#6acf61203bdfc4de9d4e52e64490aeb3e52bd017" - integrity sha512-ZU8y5zWOfjM5vZ+asjgAPwDaBjJzgufjES89Rs4Lpq63O300R/kOz30WCLo6BxxX6QVEilwSlpClnG5cZaikTA== +"@babel/plugin-transform-optional-chaining@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.7.tgz#b8f6848a80cf2da98a8a204429bec04756c6d454" + integrity sha512-tK+0N9yd4j+x/4hxF3F0e0fu/VdcxU18y5SevtyM/PCFlQvXbR0Zmlo2eBrKtVipGNFzpq56o8WsIIKcJFUCRQ== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" "@babel/plugin-syntax-optional-chaining" "^7.8.3" -"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.20.7", "@babel/plugin-transform-parameters@^7.23.3": +"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.20.7": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.23.3.tgz#83ef5d1baf4b1072fa6e54b2b0999a7b2527e2af" integrity sha512-09lMt6UsUb3/34BbECKVbVwrT9bO6lILWln237z7sLaWnMsTi7Yc9fhX5DLpkJzAGfaReXI22wP41SZmnAA3Vw== dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-private-methods@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.23.3.tgz#b2d7a3c97e278bfe59137a978d53b2c2e038c0e4" - integrity sha512-UzqRcRtWsDMTLrRWFvUBDwmw06tCQH9Rl1uAjfh6ijMSmGYQ+fpdB+cnqRC8EMh5tuuxSv0/TejGL+7vyj+50g== +"@babel/plugin-transform-parameters@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.7.tgz#5881f0ae21018400e320fc7eb817e529d1254b68" + integrity sha512-yGWW5Rr+sQOhK0Ot8hjDJuxU3XLRQGflvT4lhlSY0DFvdb3TwKaY26CJzHtYllU0vT9j58hc37ndFPsqT1SrzA== dependencies: - "@babel/helper-create-class-features-plugin" "^7.22.15" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-private-property-in-object@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz#3ec711d05d6608fd173d9b8de39872d8dbf68bf5" - integrity sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A== +"@babel/plugin-transform-private-methods@^7.22.5", "@babel/plugin-transform-private-methods@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.7.tgz#e6318746b2ae70a59d023d5cc1344a2ba7a75f5e" + integrity sha512-COTCOkG2hn4JKGEKBADkA8WNb35TGkkRbI5iT845dB+NyqgO8Hn+ajPbSnIQznneJTa3d30scb6iz/DhH8GsJQ== dependencies: - "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-create-class-features-plugin" "^7.22.15" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-create-class-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-private-property-in-object@^7.22.11", "@babel/plugin-transform-private-property-in-object@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.7.tgz#4eec6bc701288c1fab5f72e6a4bbc9d67faca061" + integrity sha512-9z76mxwnwFxMyxZWEgdgECQglF2Q7cFLm0kMf8pGwt+GSJsY0cONKj/UuO4bOH0w/uAel3ekS4ra5CEAyJRmDA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.7" + "@babel/helper-create-class-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" -"@babel/plugin-transform-property-literals@^7.0.0", "@babel/plugin-transform-property-literals@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.23.3.tgz#54518f14ac4755d22b92162e4a852d308a560875" - integrity sha512-jR3Jn3y7cZp4oEWPFAlRsSWjxKe4PZILGBSd4nis1TsC5qeSpb+nrtihJuDhNI7QHiVbUaiXa0X2RZY3/TI6Nw== +"@babel/plugin-transform-property-literals@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.7.tgz#f0d2ed8380dfbed949c42d4d790266525d63bbdc" + integrity sha512-EMi4MLQSHfd2nrCqQEWxFdha2gBCqU4ZcCng4WBGZ5CJL4bBRW0ptdqqDdeirGZcpALazVVNJqRmsO8/+oNCBA== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-transform-react-display-name@^7.0.0": version "7.23.3" @@ -901,20 +1256,20 @@ "@babel/plugin-syntax-jsx" "^7.23.3" "@babel/types" "^7.23.4" -"@babel/plugin-transform-regenerator@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.23.3.tgz#141afd4a2057298602069fce7f2dc5173e6c561c" - integrity sha512-KP+75h0KghBMcVpuKisx3XTu9Ncut8Q8TuvGO4IhY+9D5DFEckQefOuIsB/gQ2tG71lCke4NMrtIPS8pOj18BQ== +"@babel/plugin-transform-regenerator@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.7.tgz#021562de4534d8b4b1851759fd7af4e05d2c47f8" + integrity sha512-lq3fvXPdimDrlg6LWBoqj+r/DEWgONuwjuOuQCSYgRroXDH/IdM1C0IZf59fL5cHLpjEH/O6opIRBbqv7ELnuA== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" regenerator-transform "^0.15.2" -"@babel/plugin-transform-reserved-words@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.23.3.tgz#4130dcee12bd3dd5705c587947eb715da12efac8" - integrity sha512-QnNTazY54YqgGxwIexMZva9gqbPa15t/x9VS+0fsEFWplwVpXYZivtgl43Z1vMpc1bdPP2PP8siFeVcnFvA3Cg== +"@babel/plugin-transform-reserved-words@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.7.tgz#80037fe4fbf031fc1125022178ff3938bb3743a4" + integrity sha512-0DUq0pHcPKbjFZCfTss/pGkYMfy3vFWydkUBd9r0GHpIyfs2eCDENvqadMycRS9wZCXR41wucAfJHJmwA0UmoQ== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-transform-runtime@^7.0.0": version "7.23.6" @@ -928,7 +1283,7 @@ babel-plugin-polyfill-regenerator "^0.5.3" semver "^6.3.1" -"@babel/plugin-transform-shorthand-properties@^7.0.0", "@babel/plugin-transform-shorthand-properties@^7.23.3": +"@babel/plugin-transform-shorthand-properties@^7.0.0": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.23.3.tgz#97d82a39b0e0c24f8a981568a8ed851745f59210" integrity sha512-ED2fgqZLmexWiN+YNFX26fx4gh5qHDhn1O2gvEhreLW2iI63Sqm4llRLCXALKrCnbN4Jy0VcMQZl/SAzqug/jg== @@ -942,7 +1297,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.0" -"@babel/plugin-transform-spread@^7.0.0", "@babel/plugin-transform-spread@^7.23.3": +"@babel/plugin-transform-shorthand-properties@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.7.tgz#85448c6b996e122fa9e289746140aaa99da64e73" + integrity sha512-KsDsevZMDsigzbA09+vacnLpmPH4aWjcZjXdyFKGzpplxhbeB4wYtury3vglQkg6KM/xEPKt73eCjPPf1PgXBA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-spread@^7.0.0": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.23.3.tgz#41d17aacb12bde55168403c6f2d6bdca563d362c" integrity sha512-VvfVYlrlBVu+77xVTOAoxQ6mZbnIq5FM0aGBSFEcIh03qHf+zNqA4DC/3XMUozTg7bZV3e3mZQ0i13VB6v5yUg== @@ -950,19 +1312,27 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" -"@babel/plugin-transform-sticky-regex@^7.0.0", "@babel/plugin-transform-sticky-regex@^7.23.3": +"@babel/plugin-transform-spread@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.7.tgz#e8a38c0fde7882e0fb8f160378f74bd885cc7bb3" + integrity sha512-x96oO0I09dgMDxJaANcRyD4ellXFLLiWhuwDxKZX5g2rWP1bTPkBSwCYv96VDXVT1bD9aPj8tppr5ITIh8hBng== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" + +"@babel/plugin-transform-sticky-regex@^7.0.0": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.23.3.tgz#dec45588ab4a723cb579c609b294a3d1bd22ff04" integrity sha512-HZOyN9g+rtvnOU3Yh7kSxXrKbzgrm5X4GncPY1QOquu7epga5MxKHVpYu2hvQnry/H+JjckSYRb93iNfsioAGg== dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-template-literals@^7.0.0", "@babel/plugin-transform-template-literals@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.23.3.tgz#5f0f028eb14e50b5d0f76be57f90045757539d07" - integrity sha512-Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg== +"@babel/plugin-transform-sticky-regex@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.7.tgz#96ae80d7a7e5251f657b5cf18f1ea6bf926f5feb" + integrity sha512-kHPSIJc9v24zEml5geKg9Mjx5ULpfncj0wRpYtxbvKyTtHCYDkVE3aHQ03FrpEo4gEe2vrJJS1Y9CJTaThA52g== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-transform-template-literals@^7.0.0-0": version "7.24.1" @@ -971,12 +1341,19 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.0" -"@babel/plugin-transform-typeof-symbol@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.23.3.tgz#9dfab97acc87495c0c449014eb9c547d8966bca4" - integrity sha512-4t15ViVnaFdrPC74be1gXBSMzXk3B4Us9lP7uLRQHTFpV5Dvt33pn+2MyyNxmN3VTTm3oTrZVMUmuw3oBnQ2oQ== +"@babel/plugin-transform-template-literals@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.7.tgz#a05debb4a9072ae8f985bcf77f3f215434c8f8c8" + integrity sha512-AfDTQmClklHCOLxtGoP7HkeMw56k1/bTQjwsfhL6pppo/M4TOBSq+jjBUBLmV/4oeFg4GWMavIl44ZeCtmmZTw== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-typeof-symbol@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.7.tgz#f074be466580d47d6e6b27473a840c9f9ca08fb0" + integrity sha512-VtR8hDy7YLB7+Pet9IarXjg/zgCMSF+1mNS/EQEiEaUPoFXCVsHG64SIxcaaI2zJgRiv+YmgaQESUfWAdbjzgg== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-transform-typescript@^7.23.3", "@babel/plugin-transform-typescript@^7.5.0": version "7.23.6" @@ -988,22 +1365,22 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-typescript" "^7.23.3" -"@babel/plugin-transform-unicode-escapes@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.23.3.tgz#1f66d16cab01fab98d784867d24f70c1ca65b925" - integrity sha512-OMCUx/bU6ChE3r4+ZdylEqAjaQgHAgipgW8nsCfu5pGqDcFytVd91AwRvUJSBZDz0exPGgnjoqhgRYLRjFZc9Q== +"@babel/plugin-transform-unicode-escapes@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.7.tgz#2023a82ced1fb4971630a2e079764502c4148e0e" + integrity sha512-U3ap1gm5+4edc2Q/P+9VrBNhGkfnf+8ZqppY71Bo/pzZmXhhLdqgaUl6cuB07O1+AQJtCLfaOmswiNbSQ9ivhw== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-unicode-property-regex@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.23.3.tgz#19e234129e5ffa7205010feec0d94c251083d7ad" - integrity sha512-KcLIm+pDZkWZQAFJ9pdfmh89EwVfmNovFBcXko8szpBeF8z68kWIPeKlmSOkT9BXJxs2C0uk+5LxoxIv62MROA== +"@babel/plugin-transform-unicode-property-regex@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.7.tgz#9073a4cd13b86ea71c3264659590ac086605bbcd" + integrity sha512-uH2O4OV5M9FZYQrwc7NdVmMxQJOCCzFeYudlZSzUAHRFeOujQefa92E74TQDVskNHCzOXoigEuoyzHDhaEaK5w== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.22.15" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-create-regexp-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-unicode-regex@^7.0.0", "@babel/plugin-transform-unicode-regex@^7.23.3": +"@babel/plugin-transform-unicode-regex@^7.0.0": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.23.3.tgz#26897708d8f42654ca4ce1b73e96140fbad879dc" integrity sha512-wMHpNA4x2cIA32b/ci3AfwNgheiva2W0WUKWTK7vBHBhDKfPsc5cFGNWm69WBqpwd86u1qwZ9PWevKqm1A3yAw== @@ -1011,34 +1388,43 @@ "@babel/helper-create-regexp-features-plugin" "^7.22.15" "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-unicode-sets-regex@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.23.3.tgz#4fb6f0a719c2c5859d11f6b55a050cc987f3799e" - integrity sha512-W7lliA/v9bNR83Qc3q1ip9CQMZ09CcHDbHfbLRDNuAhn1Mvkr1ZNF7hPmztMQvtTGVLJ9m8IZqWsTkXOml8dbw== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.22.15" - "@babel/helper-plugin-utils" "^7.22.5" - -"@babel/preset-env@^7.22.10": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.23.6.tgz#ad0ea799d5a3c07db5b9a172819bbd444092187a" - integrity sha512-2XPn/BqKkZCpzYhUUNZ1ssXw7DcXfKQEjv/uXZUXgaebCMYmkEsfZ2yY+vv+xtXv50WmL5SGhyB6/xsWxIvvOQ== - dependencies: - "@babel/compat-data" "^7.23.5" - "@babel/helper-compilation-targets" "^7.23.6" - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-validator-option" "^7.23.5" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.23.3" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.23.3" - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.23.3" +"@babel/plugin-transform-unicode-regex@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.7.tgz#dfc3d4a51127108099b19817c0963be6a2adf19f" + integrity sha512-hlQ96MBZSAXUq7ltkjtu3FJCCSMx/j629ns3hA3pXnBXjanNP0LHi+JpPeA81zaWgVK1VGH95Xuy7u0RyQ8kMg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-transform-unicode-sets-regex@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.7.tgz#d40705d67523803a576e29c63cef6e516b858ed9" + integrity sha512-2G8aAvF4wy1w/AGZkemprdGMRg5o6zPNhbHVImRz3lss55TYCBd6xStN19rt8XJHq20sqV0JbyWjOWwQRwV/wg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/preset-env@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.24.7.tgz#ff067b4e30ba4a72f225f12f123173e77b987f37" + integrity sha512-1YZNsc+y6cTvWlDHidMBsQZrZfEFjRIo/BZCT906PMdzOyXtSLTgqGdrpcuTDCXyd11Am5uQULtDIcCfnTc8fQ== + dependencies: + "@babel/compat-data" "^7.24.7" + "@babel/helper-compilation-targets" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-validator-option" "^7.24.7" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key" "^7.24.7" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.24.7" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.24.7" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.24.7" "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-class-properties" "^7.12.13" "@babel/plugin-syntax-class-static-block" "^7.14.5" "@babel/plugin-syntax-dynamic-import" "^7.8.3" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-import-assertions" "^7.23.3" - "@babel/plugin-syntax-import-attributes" "^7.23.3" + "@babel/plugin-syntax-import-assertions" "^7.24.7" + "@babel/plugin-syntax-import-attributes" "^7.24.7" "@babel/plugin-syntax-import-meta" "^7.10.4" "@babel/plugin-syntax-json-strings" "^7.8.3" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" @@ -1050,58 +1436,58 @@ "@babel/plugin-syntax-private-property-in-object" "^7.14.5" "@babel/plugin-syntax-top-level-await" "^7.14.5" "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" - "@babel/plugin-transform-arrow-functions" "^7.23.3" - "@babel/plugin-transform-async-generator-functions" "^7.23.4" - "@babel/plugin-transform-async-to-generator" "^7.23.3" - "@babel/plugin-transform-block-scoped-functions" "^7.23.3" - "@babel/plugin-transform-block-scoping" "^7.23.4" - "@babel/plugin-transform-class-properties" "^7.23.3" - "@babel/plugin-transform-class-static-block" "^7.23.4" - "@babel/plugin-transform-classes" "^7.23.5" - "@babel/plugin-transform-computed-properties" "^7.23.3" - "@babel/plugin-transform-destructuring" "^7.23.3" - "@babel/plugin-transform-dotall-regex" "^7.23.3" - "@babel/plugin-transform-duplicate-keys" "^7.23.3" - "@babel/plugin-transform-dynamic-import" "^7.23.4" - "@babel/plugin-transform-exponentiation-operator" "^7.23.3" - "@babel/plugin-transform-export-namespace-from" "^7.23.4" - "@babel/plugin-transform-for-of" "^7.23.6" - "@babel/plugin-transform-function-name" "^7.23.3" - "@babel/plugin-transform-json-strings" "^7.23.4" - "@babel/plugin-transform-literals" "^7.23.3" - "@babel/plugin-transform-logical-assignment-operators" "^7.23.4" - "@babel/plugin-transform-member-expression-literals" "^7.23.3" - "@babel/plugin-transform-modules-amd" "^7.23.3" - "@babel/plugin-transform-modules-commonjs" "^7.23.3" - "@babel/plugin-transform-modules-systemjs" "^7.23.3" - "@babel/plugin-transform-modules-umd" "^7.23.3" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.22.5" - "@babel/plugin-transform-new-target" "^7.23.3" - "@babel/plugin-transform-nullish-coalescing-operator" "^7.23.4" - "@babel/plugin-transform-numeric-separator" "^7.23.4" - "@babel/plugin-transform-object-rest-spread" "^7.23.4" - "@babel/plugin-transform-object-super" "^7.23.3" - "@babel/plugin-transform-optional-catch-binding" "^7.23.4" - "@babel/plugin-transform-optional-chaining" "^7.23.4" - "@babel/plugin-transform-parameters" "^7.23.3" - "@babel/plugin-transform-private-methods" "^7.23.3" - "@babel/plugin-transform-private-property-in-object" "^7.23.4" - "@babel/plugin-transform-property-literals" "^7.23.3" - "@babel/plugin-transform-regenerator" "^7.23.3" - "@babel/plugin-transform-reserved-words" "^7.23.3" - "@babel/plugin-transform-shorthand-properties" "^7.23.3" - "@babel/plugin-transform-spread" "^7.23.3" - "@babel/plugin-transform-sticky-regex" "^7.23.3" - "@babel/plugin-transform-template-literals" "^7.23.3" - "@babel/plugin-transform-typeof-symbol" "^7.23.3" - "@babel/plugin-transform-unicode-escapes" "^7.23.3" - "@babel/plugin-transform-unicode-property-regex" "^7.23.3" - "@babel/plugin-transform-unicode-regex" "^7.23.3" - "@babel/plugin-transform-unicode-sets-regex" "^7.23.3" + "@babel/plugin-transform-arrow-functions" "^7.24.7" + "@babel/plugin-transform-async-generator-functions" "^7.24.7" + "@babel/plugin-transform-async-to-generator" "^7.24.7" + "@babel/plugin-transform-block-scoped-functions" "^7.24.7" + "@babel/plugin-transform-block-scoping" "^7.24.7" + "@babel/plugin-transform-class-properties" "^7.24.7" + "@babel/plugin-transform-class-static-block" "^7.24.7" + "@babel/plugin-transform-classes" "^7.24.7" + "@babel/plugin-transform-computed-properties" "^7.24.7" + "@babel/plugin-transform-destructuring" "^7.24.7" + "@babel/plugin-transform-dotall-regex" "^7.24.7" + "@babel/plugin-transform-duplicate-keys" "^7.24.7" + "@babel/plugin-transform-dynamic-import" "^7.24.7" + "@babel/plugin-transform-exponentiation-operator" "^7.24.7" + "@babel/plugin-transform-export-namespace-from" "^7.24.7" + "@babel/plugin-transform-for-of" "^7.24.7" + "@babel/plugin-transform-function-name" "^7.24.7" + "@babel/plugin-transform-json-strings" "^7.24.7" + "@babel/plugin-transform-literals" "^7.24.7" + "@babel/plugin-transform-logical-assignment-operators" "^7.24.7" + "@babel/plugin-transform-member-expression-literals" "^7.24.7" + "@babel/plugin-transform-modules-amd" "^7.24.7" + "@babel/plugin-transform-modules-commonjs" "^7.24.7" + "@babel/plugin-transform-modules-systemjs" "^7.24.7" + "@babel/plugin-transform-modules-umd" "^7.24.7" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.24.7" + "@babel/plugin-transform-new-target" "^7.24.7" + "@babel/plugin-transform-nullish-coalescing-operator" "^7.24.7" + "@babel/plugin-transform-numeric-separator" "^7.24.7" + "@babel/plugin-transform-object-rest-spread" "^7.24.7" + "@babel/plugin-transform-object-super" "^7.24.7" + "@babel/plugin-transform-optional-catch-binding" "^7.24.7" + "@babel/plugin-transform-optional-chaining" "^7.24.7" + "@babel/plugin-transform-parameters" "^7.24.7" + "@babel/plugin-transform-private-methods" "^7.24.7" + "@babel/plugin-transform-private-property-in-object" "^7.24.7" + "@babel/plugin-transform-property-literals" "^7.24.7" + "@babel/plugin-transform-regenerator" "^7.24.7" + "@babel/plugin-transform-reserved-words" "^7.24.7" + "@babel/plugin-transform-shorthand-properties" "^7.24.7" + "@babel/plugin-transform-spread" "^7.24.7" + "@babel/plugin-transform-sticky-regex" "^7.24.7" + "@babel/plugin-transform-template-literals" "^7.24.7" + "@babel/plugin-transform-typeof-symbol" "^7.24.7" + "@babel/plugin-transform-unicode-escapes" "^7.24.7" + "@babel/plugin-transform-unicode-property-regex" "^7.24.7" + "@babel/plugin-transform-unicode-regex" "^7.24.7" + "@babel/plugin-transform-unicode-sets-regex" "^7.24.7" "@babel/preset-modules" "0.1.6-no-external-plugins" - babel-plugin-polyfill-corejs2 "^0.4.6" - babel-plugin-polyfill-corejs3 "^0.8.5" - babel-plugin-polyfill-regenerator "^0.5.3" + babel-plugin-polyfill-corejs2 "^0.4.10" + babel-plugin-polyfill-corejs3 "^0.10.4" + babel-plugin-polyfill-regenerator "^0.6.1" core-js-compat "^3.31.0" semver "^6.3.1" @@ -1150,13 +1536,20 @@ resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== -"@babel/runtime@^7.0.0", "@babel/runtime@^7.23.9", "@babel/runtime@^7.8.4": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.8.4": version "7.23.9" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.9.tgz#47791a15e4603bb5f905bc0753801cf21d6345f7" integrity sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw== dependencies: regenerator-runtime "^0.14.0" +"@babel/runtime@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12" + integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/template@^7.0.0", "@babel/template@^7.22.15": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" @@ -1166,6 +1559,15 @@ "@babel/parser" "^7.22.15" "@babel/types" "^7.22.15" +"@babel/template@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.7.tgz#02efcee317d0609d2c07117cb70ef8fb17ab7315" + integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/traverse@^7.20.0", "@babel/traverse@^7.23.6": version "7.23.6" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.6.tgz#b53526a2367a0dd6edc423637f3d2d0f2521abc5" @@ -1182,6 +1584,22 @@ debug "^4.3.1" globals "^11.1.0" +"@babel/traverse@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.7.tgz#de2b900163fa741721ba382163fe46a936c40cf5" + integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.24.7" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-function-name" "^7.24.7" + "@babel/helper-hoist-variables" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/types" "^7.24.7" + debug "^4.3.1" + globals "^11.1.0" + "@babel/types@^7.20.0", "@babel/types@^7.22.15", "@babel/types@^7.22.19", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.4", "@babel/types@^7.23.6", "@babel/types@^7.4.4": version "7.23.6" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.6.tgz#be33fdb151e1f5a56877d704492c240fc71c7ccd" @@ -1191,6 +1609,15 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" +"@babel/types@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2" + integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q== + dependencies: + "@babel/helper-string-parser" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" + to-fast-properties "^2.0.0" + "@egjs/hammerjs@^2.0.17": version "2.0.17" resolved "https://registry.yarnpkg.com/@egjs/hammerjs/-/hammerjs-2.0.17.tgz#5dc02af75a6a06e4c2db0202cae38c9263895124" @@ -1198,14 +1625,19 @@ dependencies: "@types/hammerjs" "^2.0.36" -"@eslint-community/eslint-utils@^4.2.0": +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.10.0": + version "4.10.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.1.tgz#361461e5cb3845d874e61731c11cfedd664d83a0" + integrity sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA== + +"@eslint-community/regexpp@^4.6.1": version "4.10.0" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== @@ -1261,7 +1693,12 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044" integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== -"@jest/create-cache-key-function@^29.2.1": +"@isaacs/ttlcache@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz#21fb23db34e9b6220c6ba023a0118a2dd3461ea2" + integrity sha512-RQgQ4uQ+pLbqXfOmieB91ejmLwvSgv9nLx6sT6sD83s7umBypgg+OIBOBbEUiJXrfpnp9j0mRhYYdzp9uqq3lA== + +"@jest/create-cache-key-function@^29.6.3": version "29.7.0" resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-29.7.0.tgz#793be38148fab78e65f40ae30c36785f4ad859f0" integrity sha512-4QqS3LY5PBmTRHj9sAg1HLoPzqAI0uOX6wI/TRqHIcOxlFidy6YEmCQJk6FSZjNLGCeubDMfmkWL+qaLKhSGQA== @@ -1308,17 +1745,6 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@jest/types@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.5.1.tgz#3c79ec4a8ba61c170bf937bcf9e98a9df175ec80" - integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - "@jest/types@^29.6.3": version "29.6.3" resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" @@ -1340,6 +1766,15 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + "@jridgewell/resolve-uri@^3.1.0": version "3.1.1" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" @@ -1350,6 +1785,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + "@jridgewell/source-map@^0.3.3": version "0.3.5" resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.5.tgz#a3bb4d5c6825aab0d281268f47f6ad5853431e91" @@ -1371,6 +1811,14 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@nicolo-ribaudo/[email protected]": version "5.1.1-v1" resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz#dbf733a965ca47b1973177dc0bb6c889edcfb129" @@ -1399,154 +1847,137 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@pkgr/utils@^2.4.2": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.4.2.tgz#9e638bbe9a6a6f165580dc943f138fd3309a2cbc" - integrity sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw== - 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" +"@pkgr/core@^0.1.0": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" + integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== -"@react-native-camera-roll/camera-roll@^5.7.2": - version "5.10.0" - resolved "https://registry.yarnpkg.com/@react-native-camera-roll/camera-roll/-/camera-roll-5.10.0.tgz#98cf5489be6805ac926b1c4d29ac956cf4df45dc" - integrity sha512-NZb/zU4S+k1Hx2Y3BdNufrfn8whNsiRjHNxeiGMak8OwDDJikqP5Ej7HXFv8sJSfTGfi1ddH0wdd541MHV/Nbw== +"@react-native-camera-roll/camera-roll@^7.8.1": + version "7.8.1" + resolved "https://registry.yarnpkg.com/@react-native-camera-roll/camera-roll/-/camera-roll-7.8.1.tgz#3b37d498672f692d04daf8e56fa094cefdeadc30" + integrity sha512-voVmDlzBS1MVADFk/Vb9GzWzhpoF4ESSjU9qwDNxf/ZA9tirAzX/M0TKcz2V+iFHeRR68cHtZ9tHUhQVG7kJcA== -"@react-native-community/blur@^4.3.2": - version "4.3.2" - resolved "https://registry.yarnpkg.com/@react-native-community/blur/-/blur-4.3.2.tgz#185a2c7dd03ba168cc95069bc4742e9505fd6c6c" - integrity sha512-0ID+pyZKdC4RdgC7HePxUQ6JmsbNrgz03u+6SgqYpmBoK/rE+7JffqIw7IEsfoKitLEcRNLGekIBsfwCqiEkew== +"@react-native-community/blur@^4.4.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@react-native-community/blur/-/blur-4.4.0.tgz#b2440dab17d94e480fbc4470e03155573b5b7375" + integrity sha512-P+xdT2LIq1ewOsF3zx7C0nu4dj7nxl2NVTsMXEzRDjM3bWMdrrEbTRA7uwPV5ngn7/BXIommBPlT/JW4SAedrw== -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-11.3.10.tgz#70d14dd998ce8ad532266b36a0e5cafe22d300ac" - integrity sha512-g6QjW+DSqoWRHzmIQW3AH22k1AnynWuOdy2YPwYEGgPddTeXZtJphIpEVwDOiC0L4mZv2VmiX33/cGNUwO0cIA== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-13.6.8.tgz#95ce964047f005152ac100394b6dcd5d2cc2a474" + integrity sha512-B1uxlm1N4BQuWFvBL3yRl3LVvydjswsdbTi7tMrHMtSxfRio1p9HjcmDzlzKco09Y+8qBGgakm3jcMZGLbhXQQ== dependencies: - "@react-native-community/cli-tools" "11.3.10" + "@react-native-community/cli-tools" "13.6.8" chalk "^4.1.2" execa "^5.0.0" - prompts "^2.4.0" + fast-glob "^3.3.2" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-11.3.10.tgz#753510a80a98b136fec852e1ea5fa655c13dbd17" - integrity sha512-YYu14nm1JYLS6mDRBz78+zDdSFudLBFpPkhkOoj4LuBhNForQBIqFFHzQbd9/gcguJxfW3vlYSnudfaUI7oGLg== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-13.6.8.tgz#6829ea7cdc237776c300be06f84c222bf17cf4c5" + integrity sha512-RabCkIsWdP4Ex/sf1uSP9qxc30utm+0uIJAjrZkNQynm7T4Lyqn/kT3LKm4yM6M0Qk61YxGguiaXF4601vAduw== dependencies: - "@react-native-community/cli-tools" "11.3.10" + "@react-native-community/cli-tools" "13.6.8" chalk "^4.1.2" cosmiconfig "^5.1.0" deepmerge "^4.3.0" - glob "^7.1.3" + fast-glob "^3.3.2" joi "^17.2.1" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-11.3.10.tgz#b16ebf770ba3cc76bf46580f101d00dacf919824" - integrity sha512-kyitGV3RsjlXIioq9lsuawha2GUBPCTAyXV6EBlm3qlyF3dMniB3twEvz+fIOid/e1ZeucH3Tzy5G3qcP8yWoA== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-13.6.8.tgz#d52fccd4b3e0860d96d75ff5b0ebb128bdc93dfd" + integrity sha512-2cS+MX/Su6sVSjqpDftFOXbK7EuPg98xzsPkdPhkQnkZwvXqodK9CAMuDMbx3lBHHtrPrpMbBCpFmPN8iVOnlA== dependencies: serve-static "^1.13.1" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-11.3.10.tgz#161b8fd1b485cd52f7a19b2025696070b9d2b6a1" - integrity sha512-DpMsfCWKZ15L9nFK/SyDvpl5v6MjV+arMHMC1i8kR+DOmf2xWmp/pgMywKk0/u50yGB9GwxBHt3i/S/IMK5Ylg== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-13.6.8.tgz#05f696d94e975e4dcf7f9a1fde32fb43e4bb8a5f" + integrity sha512-/3Vdy9J3hyiu0y3nd/CU3kBqPlTRxnLXg7V6jrA1jbTOlZAMyV9imEkrqEaGK0SMOyMhh9Pipf98Ozhk0Nl4QA== dependencies: - "@react-native-community/cli-config" "11.3.10" - "@react-native-community/cli-platform-android" "11.3.10" - "@react-native-community/cli-platform-ios" "11.3.10" - "@react-native-community/cli-tools" "11.3.10" + "@react-native-community/cli-config" "13.6.8" + "@react-native-community/cli-platform-android" "13.6.8" + "@react-native-community/cli-platform-apple" "13.6.8" + "@react-native-community/cli-platform-ios" "13.6.8" + "@react-native-community/cli-tools" "13.6.8" chalk "^4.1.2" command-exists "^1.2.8" - envinfo "^7.7.2" + deepmerge "^4.3.0" + envinfo "^7.10.0" execa "^5.0.0" hermes-profile-transformer "^0.0.6" - ip "^1.1.5" node-stream-zip "^1.9.1" ora "^5.4.1" - prompts "^2.4.0" semver "^7.5.2" strip-ansi "^5.2.0" - sudo-prompt "^9.0.0" wcwidth "^1.0.1" yaml "^2.2.1" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-11.3.10.tgz#f3d4f069ca472b1d8b4e8132cf9c44097a58ca19" - integrity sha512-vqINuzAlcHS9ImNwJtT43N7kfBQ7ro9A8O1Gpc5TQ0A8V36yGG8eoCHeauayklVVgMZpZL6f6mcoLLr9IOgBZQ== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-13.6.8.tgz#85f10f663bc79f299146e749c48c06ebc4da9e29" + integrity sha512-lZi/OBFuZUj5cLK94oEgtrtmxGoqeYVRcnHXl/R5c4put9PDl+qH2bEMlGZkFiw57ae3UZKr3TMk+1s4jh3FYQ== dependencies: - "@react-native-community/cli-platform-android" "11.3.10" - "@react-native-community/cli-tools" "11.3.10" + "@react-native-community/cli-platform-android" "13.6.8" + "@react-native-community/cli-tools" "13.6.8" chalk "^4.1.2" hermes-profile-transformer "^0.0.6" - ip "^1.1.5" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-11.3.10.tgz#756dd73ad78bf2f20c678683dfc48cb764b1b590" - integrity sha512-RGu9KuDIXnrcNkacSHj5ETTQtp/D/835L6veE2jMigO21p//gnKAjw3AVLCysGr8YXYfThF8OSOALrwNc94puQ== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-13.6.8.tgz#a3672512a9b844f93d6050537c59dd58e1b12f17" + integrity sha512-vWrqeLRRTwp2kO33nbrAgbYn8HR2c2CpIfyVJY9Ckk7HGUSwDyxdcSu7YBvt2ShdfLZH0HctWFNXsgGrfg6BDw== dependencies: - "@react-native-community/cli-tools" "11.3.10" + "@react-native-community/cli-tools" "13.6.8" chalk "^4.1.2" execa "^5.0.0" - glob "^7.1.3" + fast-glob "^3.3.2" + fast-xml-parser "^4.2.4" logkitty "^0.7.1" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-11.3.10.tgz#f8a9bca1181802f12ed15714d5a496e60096cbed" - integrity sha512-JjduMrBM567/j4Hvjsff77dGSLMA0+p9rr0nShlgnKPcc+0J4TDy0hgWpUceM7OG00AdDjpetAPupz0kkAh4cQ== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-apple/-/cli-platform-apple-13.6.8.tgz#4d46a2d6678a7b3264768f97393f082ed9afb264" + integrity sha512-1JPohnlXPqU44zns3ALEzIbH2cKRw6JtEDJERgLuEUbs2r2NeJgqDbKyZ7fTTO8o+pegDnn6+Rr7qGVVOuUzzg== dependencies: - "@react-native-community/cli-tools" "11.3.10" + "@react-native-community/cli-tools" "13.6.8" chalk "^4.1.2" execa "^5.0.0" + fast-glob "^3.3.2" fast-xml-parser "^4.0.12" - glob "^7.1.3" ora "^5.4.1" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-11.3.10.tgz#6ed67dda2518d3dabae20f3b38f66a0a9bd8e962" - integrity sha512-ZYAc5Hc+QVqJgj1XFbpKnIPbSJ9xKcBnfQrRhR+jFyt2DWx85u4bbzY1GSVc/USs0UbSUXv4dqPbnmOJz52EYQ== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-13.6.8.tgz#2de1bd8529825781108c1cbba4f5b25cb062581c" + integrity sha512-/IIcIRM8qaoD7iZqsvtf6Qq1AwtChWYfB9sTn3mTiolZ5Zd5bXH37g+6liPfAICRkj2Ptq3iXmjrDVUQAxrOXw== dependencies: - "@react-native-community/cli-server-api" "11.3.10" - "@react-native-community/cli-tools" "11.3.10" - chalk "^4.1.2" - execa "^5.0.0" - metro "0.76.8" - metro-config "0.76.8" - metro-core "0.76.8" - metro-react-native-babel-transformer "0.76.8" - metro-resolver "0.76.8" - metro-runtime "0.76.8" - readline "^1.3.0" + "@react-native-community/cli-platform-apple" "13.6.8" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-11.3.10.tgz#2c4940d921711f2c78f0b61f126e8dbbbef6277c" - integrity sha512-WEwHWIpqx3gA6Da+lrmq8+z78E1XbxxjBlvHAXevhjJj42N4SO417eZiiUVrFzEFVVJSUee9n9aRa0kUR+0/2w== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-13.6.8.tgz#fc654a2990a5f0b6f0b67ef04b25f699bee63f63" + integrity sha512-Lx664oWTzpVfbKUTy+3GIX7e+Mt5Zn+zdkM4ehllNdik/lbB3tM9Nrg8PSvOfI+tTXs2w55+nIydLfH+0FqJVg== dependencies: - "@react-native-community/cli-debugger-ui" "11.3.10" - "@react-native-community/cli-tools" "11.3.10" + "@react-native-community/cli-debugger-ui" "13.6.8" + "@react-native-community/cli-tools" "13.6.8" compression "^1.7.1" connect "^3.6.5" errorhandler "^1.5.1" nocache "^3.0.1" pretty-format "^26.6.2" serve-static "^1.13.1" - ws "^7.5.1" + ws "^6.2.2" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-11.3.10.tgz#d7bbe3fd8b338004f996f03f53a5373d9caab91c" - integrity sha512-4kCuCwVcGagSrNg9vxMNVhynwpByuC/J5UnKGEet3HuqmoDhQW15m18fJXiehA8J+u9WBvHduefy9nZxO0C06Q== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-13.6.8.tgz#65a9f49ce66f0e639d855e745c8dfa7ae7b6c142" + integrity sha512-1MYlae9EkbjC7DBYOGMH5xF9yDoeNYUKgEdDjL6WAUBoF2gtwiZPM6igLKi/+dhb5sCtC7fiLrLi0Oevdf+RmQ== dependencies: appdirsjs "^1.2.4" chalk "^4.1.2" + execa "^5.0.0" find-up "^5.0.0" mime "^2.4.1" node-fetch "^2.6.0" @@ -1554,150 +1985,257 @@ ora "^5.4.1" semver "^7.5.2" shell-quote "^1.7.3" + sudo-prompt "^9.0.0" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-11.3.10.tgz#cb02186cd247108bcea5ff93c4c97bb3c8dd8f22" - integrity sha512-0FHK/JE7bTn0x1y8Lk5m3RISDHIBQqWLltO2Mf7YQ6cAeKs8iNOJOeKaHJEY+ohjsOyCziw+XSC4cY57dQrwNA== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-13.6.8.tgz#1c357d3290a48232e3e639d48e43e31e422ce436" + integrity sha512-C4mVByy0i+/NPuPhdMLBR7ubEVkjVS1VwoQu/BoG1crJFNE+167QXAzH01eFbXndsjZaMWmD4Gerx7TYc6lHfA== dependencies: joi "^17.2.1" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-11.3.10.tgz#ea88d20982cfc9ed7a5170d04aeedd2abf092348" - integrity sha512-bIx0t5s9ewH1PlcEcuQUD+UnVrCjPGAfjhVR5Gew565X60nE+GTIHRn70nMv9G4he/amBF+Z+vf5t8SNZEWMwg== - dependencies: - "@react-native-community/cli-clean" "11.3.10" - "@react-native-community/cli-config" "11.3.10" - "@react-native-community/cli-debugger-ui" "11.3.10" - "@react-native-community/cli-doctor" "11.3.10" - "@react-native-community/cli-hermes" "11.3.10" - "@react-native-community/cli-plugin-metro" "11.3.10" - "@react-native-community/cli-server-api" "11.3.10" - "@react-native-community/cli-tools" "11.3.10" - "@react-native-community/cli-types" "11.3.10" +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-13.6.8.tgz#d52c22620242e161bddcd2e0b6dbacd8743ca09b" + integrity sha512-0lRdgLNaXixWY4BfFRl1J6Ao9Lapo2z+++iE7TD4GAbuxOWJSyFi+KUA8XNfSDyML4jFO02MZgyBPxAWdaminQ== + dependencies: + "@react-native-community/cli-clean" "13.6.8" + "@react-native-community/cli-config" "13.6.8" + "@react-native-community/cli-debugger-ui" "13.6.8" + "@react-native-community/cli-doctor" "13.6.8" + "@react-native-community/cli-hermes" "13.6.8" + "@react-native-community/cli-server-api" "13.6.8" + "@react-native-community/cli-tools" "13.6.8" + "@react-native-community/cli-types" "13.6.8" chalk "^4.1.2" commander "^9.4.1" + deepmerge "^4.3.0" execa "^5.0.0" find-up "^4.1.0" fs-extra "^8.1.0" graceful-fs "^4.1.3" - prompts "^2.4.0" + prompts "^2.4.2" semver "^7.5.2" -"@react-native/assets-registry@^0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.72.0.tgz#c82a76a1d86ec0c3907be76f7faf97a32bbed05d" - integrity sha512-Im93xRJuHHxb1wniGhBMsxLwcfzdYreSZVQGDoMJgkd6+Iky61LInGEHnQCTN0fKNYF1Dvcofb4uMmE1RQHXHQ== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.74.84.tgz#aa472f82c1b7d8a30098c8ba22fad7b3dbb5be5f" + integrity sha512-dzUhwyaX04QosWZ8zyaaNB/WYZIdeDN1lcpfQbqiOhZJShRH+FLTDVONE/dqlMQrP+EO7lDqF0RrlIt9lnOCQQ== + +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.74.84.tgz#a3a72c188d875601704a421e395f6909fdec40f3" + integrity sha512-UR4uiii5szIJA84mSC6GJOfYKDq7/ThyetOQT62+BBcyGeHVtHlNLNRzgaMeLqIQaT8Fq4pccMI+7QqLOMXzdw== + dependencies: + "@react-native/codegen" "0.74.84" -"@react-native/codegen@^0.72.7": - version "0.72.7" - resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.72.7.tgz#b6832ce631ac63143024ea094a6b5480a780e589" - integrity sha512-O7xNcGeXGbY+VoqBGNlZ3O05gxfATlwE1Q1qQf5E38dK+tXn5BY4u0jaQ9DPjfE8pBba8g/BYI1N44lynidMtg== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.74.84.tgz#703ebfc810d82c9f51f033352abd5f9fa70d492b" + integrity sha512-WUfu6Y4aGuVdocQZvx33BJiQWFH6kRCHYbZfBn2psgFrSRLgQWEQrDCxqPFObNAVSayM0rNhp2FvI5K/Eyeqlg== + dependencies: + "@babel/core" "^7.20.0" + "@babel/plugin-proposal-async-generator-functions" "^7.0.0" + "@babel/plugin-proposal-class-properties" "^7.18.0" + "@babel/plugin-proposal-export-default-from" "^7.0.0" + "@babel/plugin-proposal-logical-assignment-operators" "^7.18.0" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.0" + "@babel/plugin-proposal-numeric-separator" "^7.0.0" + "@babel/plugin-proposal-object-rest-spread" "^7.20.0" + "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" + "@babel/plugin-proposal-optional-chaining" "^7.20.0" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + "@babel/plugin-syntax-export-default-from" "^7.0.0" + "@babel/plugin-syntax-flow" "^7.18.0" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.0.0" + "@babel/plugin-syntax-optional-chaining" "^7.0.0" + "@babel/plugin-transform-arrow-functions" "^7.0.0" + "@babel/plugin-transform-async-to-generator" "^7.20.0" + "@babel/plugin-transform-block-scoping" "^7.0.0" + "@babel/plugin-transform-classes" "^7.0.0" + "@babel/plugin-transform-computed-properties" "^7.0.0" + "@babel/plugin-transform-destructuring" "^7.20.0" + "@babel/plugin-transform-flow-strip-types" "^7.20.0" + "@babel/plugin-transform-function-name" "^7.0.0" + "@babel/plugin-transform-literals" "^7.0.0" + "@babel/plugin-transform-modules-commonjs" "^7.0.0" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.0.0" + "@babel/plugin-transform-parameters" "^7.0.0" + "@babel/plugin-transform-private-methods" "^7.22.5" + "@babel/plugin-transform-private-property-in-object" "^7.22.11" + "@babel/plugin-transform-react-display-name" "^7.0.0" + "@babel/plugin-transform-react-jsx" "^7.0.0" + "@babel/plugin-transform-react-jsx-self" "^7.0.0" + "@babel/plugin-transform-react-jsx-source" "^7.0.0" + "@babel/plugin-transform-runtime" "^7.0.0" + "@babel/plugin-transform-shorthand-properties" "^7.0.0" + "@babel/plugin-transform-spread" "^7.0.0" + "@babel/plugin-transform-sticky-regex" "^7.0.0" + "@babel/plugin-transform-typescript" "^7.5.0" + "@babel/plugin-transform-unicode-regex" "^7.0.0" + "@babel/template" "^7.0.0" + "@react-native/babel-plugin-codegen" "0.74.84" + babel-plugin-transform-flow-enums "^0.0.2" + react-refresh "^0.14.0" + +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.74.84.tgz#d3425a510b7da558ef5088d9b0aa5e0b1c05c783" + integrity sha512-0hXlnu9i0o8v+gXKQi+x6T471L85kCDwW4WrJiYAeOheWrQdNNW6rC3g8+LL7HXAf7QcHGU/8/d57iYfdVK2BQ== dependencies: "@babel/parser" "^7.20.0" - flow-parser "^0.206.0" + glob "^7.1.1" + hermes-parser "0.19.1" + invariant "^2.2.4" jscodeshift "^0.14.0" + mkdirp "^0.5.1" nullthrows "^1.1.1" -"@react-native/eslint-config@^0.72.2": - version "0.72.2" - resolved "https://registry.yarnpkg.com/@react-native/eslint-config/-/eslint-config-0.72.2.tgz#31da4cec65ad2805d4db9fdda138452821d72133" - integrity sha512-rAYuQQXzi63W7+9Pu/+23od/b/lTSzHjMFibum3sKgdG2LIyvhoMEWQ5+Chu7TqebqYy1b9SDn/KEMHvpWFtNg== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.74.84.tgz#223a0defe8118dc57c8ac852ddd13517ea10c4e2" + integrity sha512-GBKE+1sUh86fS2XXV46gMCNHMc1KetshMbYJ0AhDhldpaILZHqRBX50mdVsiYVvkzp4QjM0nmYqefuJ9NVwicQ== + dependencies: + "@react-native-community/cli-server-api" "13.6.8" + "@react-native-community/cli-tools" "13.6.8" + "@react-native/dev-middleware" "0.74.84" + "@react-native/metro-babel-transformer" "0.74.84" + chalk "^4.0.0" + execa "^5.1.1" + metro "^0.80.3" + metro-config "^0.80.3" + metro-core "^0.80.3" + node-fetch "^2.2.0" + querystring "^0.2.1" + readline "^1.3.0" + +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.74.84.tgz#0bde122a988916b6a50f05a7c3ab1c5db029b149" + integrity sha512-YUEA03UNFbiYzHpYxlcS2D9+3eNT5YLGkl5yRg3nOSN6KbCc/OttGnNZme+tuSOJwjMN/vcvtDKYkTqjJw8U0A== + +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.74.84.tgz#19ccfece791742f83f4c0a22a8c14593a45562a2" + integrity sha512-veYw/WmyrAOQHUiIeULzn2duJQnXDPiKq2jZ/lcmDo6jsLirpp+Q73lx09TYgy/oVoPRuV0nfmU3x9B6EV/7qQ== + dependencies: + "@isaacs/ttlcache" "^1.4.1" + "@react-native/debugger-frontend" "0.74.84" + "@rnx-kit/chromium-edge-launcher" "^1.0.0" + chrome-launcher "^0.15.2" + connect "^3.6.5" + debug "^2.2.0" + node-fetch "^2.2.0" + nullthrows "^1.1.1" + open "^7.0.3" + selfsigned "^2.4.1" + serve-static "^1.13.1" + temp-dir "^2.0.0" + ws "^6.2.2" + +"@react-native/eslint-config@^0.74.84": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/eslint-config/-/eslint-config-0.74.84.tgz#b39cc52811752afd7d6b9ffcf20c1b0f0f4cc1fd" + integrity sha512-QpMeMzg6QPN54K0LFasuqX52nyRF0dPIoh7ErXW7OoDatOMfxjB5CK7jVc1MqhKnUe5mz50BdQ44SOpzYr3xvw== dependencies: "@babel/core" "^7.20.0" "@babel/eslint-parser" "^7.20.0" - "@react-native/eslint-plugin" "^0.72.0" - "@typescript-eslint/eslint-plugin" "^5.30.5" - "@typescript-eslint/parser" "^5.30.5" + "@react-native/eslint-plugin" "0.74.84" + "@typescript-eslint/eslint-plugin" "^7.1.1" + "@typescript-eslint/parser" "^7.1.1" eslint-config-prettier "^8.5.0" eslint-plugin-eslint-comments "^3.2.0" eslint-plugin-ft-flow "^2.0.1" - eslint-plugin-jest "^26.5.3" + eslint-plugin-jest "^27.9.0" eslint-plugin-prettier "^4.2.1" eslint-plugin-react "^7.30.1" eslint-plugin-react-hooks "^4.6.0" eslint-plugin-react-native "^4.0.0" -"@react-native/eslint-plugin@^0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@react-native/eslint-plugin/-/eslint-plugin-0.72.0.tgz#7ec4c6a73dfde4bd6b4a4d3c462cfdc2637bf91d" - integrity sha512-xWQthnyKd+H22TBqeJUTFebsyWAAwzUb7EQCT8F/WMZsS1sv5UG+2cM/cU9/2HEbVZgxHYuLIi915WznjKPvlg== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/eslint-plugin/-/eslint-plugin-0.74.84.tgz#f0e9618551c9340caca7624001f8ce32794715c9" + integrity sha512-pDzo4Qm1uPZQne2sv0QK89ePxP/i+ZHjrBW3rkTVStLvsDVdyFahMmt6bzJTdYL2cGgK2oyNmfXtvO57INOu3Q== -"@react-native/gradle-plugin@^0.72.11": - version "0.72.11" - resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.72.11.tgz#c063ef12778706611de7a1e42b74b14d9405fb9f" - integrity sha512-P9iRnxiR2w7EHcZ0mJ+fmbPzMby77ZzV6y9sJI3lVLJzF7TLSdbwcQyD3lwMsiL+q5lKUHoZJS4sYmih+P2HXw== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.74.84.tgz#6ff25fad5f78c276afde96ffc42e04e92d6d92b1" + integrity sha512-wYWC5WWXqzCCe4PDogz9pNc4xH5ZamahW5XGSbrrYJ5V3walZ+7z43V6iEBJkZbLjj9YBcSttkXYGr1Xh4veAg== -"@react-native/js-polyfills@^0.72.1": - version "0.72.1" - resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.72.1.tgz#905343ef0c51256f128256330fccbdb35b922291" - integrity sha512-cRPZh2rBswFnGt5X5EUEPs0r+pAsXxYsifv/fgy9ZLQokuT52bPH+9xjDR+7TafRua5CttGW83wP4TntRcWNDA== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.74.84.tgz#edf0e8463616a2683269bbfe3957590f7ebd910c" + integrity sha512-+PgxuUjBw9JVlz6m4ECsIJMLbDopnr4rpLmsG32hQaJrg0wMuvHtsgAY/J/aVCSG2GNUXexfjrnhc+O9yGOZXQ== -"@react-native/metro-config@^0.72.9": - version "0.72.11" - resolved "https://registry.yarnpkg.com/@react-native/metro-config/-/metro-config-0.72.11.tgz#c775a22fbb138cedd4513ca46c06bfd6a9dad316" - integrity sha512-661EyQnDdVelyc0qP/ew7kKkGAh6N6KlkuPLC2SQ8sxaXskVU6fSuNlpLW4bUTBUDFKG8gEOU2hp6rzk4wQnGQ== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.74.84.tgz#6c2c1632bdf557f176c9d489fbb676522ffb222a" + integrity sha512-YtVGq7jkgyUECv5yt4BOFbOXyW4ddUn8+dnwGGpJKdfhXYL5o5++AxNdE+2x+SZdkj3JUVekGKPwRabFECABaw== dependencies: - "@react-native/js-polyfills" "^0.72.1" - metro-config "0.76.8" - metro-react-native-babel-transformer "0.76.8" - metro-runtime "0.76.8" + "@babel/core" "^7.20.0" + "@react-native/babel-preset" "0.74.84" + hermes-parser "0.19.1" + nullthrows "^1.1.1" -"@react-native/normalize-color@*": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@react-native/normalize-color/-/normalize-color-2.1.0.tgz#939b87a9849e81687d3640c5efa2a486ac266f91" - integrity sha512-Z1jQI2NpdFJCVgpY+8Dq/Bt3d+YUi1928Q+/CZm/oh66fzM0RUl54vvuXlPJKybH4pdCZey1eDTPaLHkMPNgWA== +"@react-native/metro-config@^0.74.84": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/metro-config/-/metro-config-0.74.84.tgz#b2c1b45f62af9b8140a9a02798fa4fb2a3db7c0c" + integrity sha512-/8pvN4P5ldIN/4f+4+Wkd5FH8F5I7dx1xyPDmHNHqu5bLS+N3347NU8t97029LuZikv59fGj4B6nkvlc4GRHfg== + dependencies: + "@react-native/js-polyfills" "0.74.84" + "@react-native/metro-babel-transformer" "0.74.84" + metro-config "^0.80.3" + metro-runtime "^0.80.3" -"@react-native/normalize-colors@<0.73.0", "@react-native/normalize-colors@^0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.72.0.tgz#14294b7ed3c1d92176d2a00df48456e8d7d62212" - integrity sha512-285lfdqSXaqKuBbbtP9qL2tDrfxdOFtIMvkKadtleRQkdOxx+uzGvFr82KHmc/sSiMtfXGp7JnFYWVh4sFl7Yw== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.74.84.tgz#4764d59775c17a6ed193509cb01ae2f42dd5c045" + integrity sha512-Y5W6x8cC5RuakUcTVUFNAIhUZ/tYpuqHZlRBoAuakrTwVuoNHXfQki8lj1KsYU7rW6e3VWgdEx33AfOQpdNp6A== -"@react-native/typescript-config@^0.73.0": - version "0.73.1" - resolved "https://registry.yarnpkg.com/@react-native/typescript-config/-/typescript-config-0.73.1.tgz#c97a42f5cd264069bfe86b737c531ed2f042ae6d" - integrity sha512-7Wrmdp972ZO7xvDid+xRGtvX6xz47cpGj7Y7VKlUhSVFFqbOGfB5WCpY1vMr6R/fjl+Og2fRw+TETN2+JnJi0w== +"@react-native/typescript-config@^0.74.84": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/typescript-config/-/typescript-config-0.74.84.tgz#aff6132ced5679c99b33b4e3a6747338b99e5e09" + integrity sha512-yMAyxl0wzRKT6JkQV0WCryiBQ1hj97u/JiT4LjXbwpPSErgiTRq+SKwhKH5vhSw9P0O8JCLIG6rS5rkbjranDg== -"@react-native/virtualized-lists@^0.72.4", "@react-native/virtualized-lists@^0.72.8": - version "0.72.8" - resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.72.8.tgz#a2c6a91ea0f1d40eb5a122fb063daedb92ed1dc3" - integrity sha512-J3Q4Bkuo99k7mu+jPS9gSUSgq+lLRSI/+ahXNwV92XgJ/8UgOTxu2LPwhJnBk/sQKxq7E8WkZBnBiozukQMqrw== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.74.84.tgz#cf32fffc93072942532c9c81bd7e4c01a2949626" + integrity sha512-XcV+qdqt2WihaY4iRm/M1FdSy+18lecU9mRXNmy9YK8g9Th/8XbNtmmKI0qWBx3KxyuXMH/zd0ps05YTrX16kw== dependencies: invariant "^2.2.4" nullthrows "^1.1.1" -"@react-navigation/core@^6.4.10": - version "6.4.10" - resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-6.4.10.tgz#0c52621968b35e3a75e189e823d3b9e3bad77aff" - integrity sha512-oYhqxETRHNHKsipm/BtGL0LI43Hs2VSFoWMbBdHK9OqgQPjTVUitslgLcPpo4zApCcmBWoOLX2qPxhsBda644A== +"@react-navigation/core@^6.4.16": + version "6.4.16" + resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-6.4.16.tgz#f9369a134805174536b9aa0f0f483b930511caf9" + integrity sha512-UDTJBsHxnzgFETR3ZxhctP+RWr4SkyeZpbhpkQoIGOuwSCkt1SE0qjU48/u6r6w6XlX8OqVudn1Ab0QFXTHxuQ== dependencies: "@react-navigation/routers" "^6.1.9" escape-string-regexp "^4.0.0" nanoid "^3.1.23" query-string "^7.1.3" react-is "^16.13.0" - use-latest-callback "^0.1.7" + use-latest-callback "^0.1.9" -"@react-navigation/elements@^1.3.21": - version "1.3.21" - resolved "https://registry.yarnpkg.com/@react-navigation/elements/-/elements-1.3.21.tgz#debac6becc6b6692da09ec30e705e476a780dfe1" - integrity sha512-eyS2C6McNR8ihUoYfc166O1D8VYVh9KIl0UQPI8/ZJVsStlfSTgeEEh+WXge6+7SFPnZ4ewzEJdSAHH+jzcEfg== +"@react-navigation/elements@^1.3.30": + version "1.3.30" + resolved "https://registry.yarnpkg.com/@react-navigation/elements/-/elements-1.3.30.tgz#a81371f599af1070b12014f05d6c09b1a611fd9a" + integrity sha512-plhc8UvCZs0UkV+sI+3bisIyn78wz9O/BiWZXpounu72k/R/Sj5PuZYFJ1fi6psvriUveMCGh4LeZckAZu2qiQ== -"@react-navigation/native-stack@^6.9.13": - version "6.9.17" - resolved "https://registry.yarnpkg.com/@react-navigation/native-stack/-/native-stack-6.9.17.tgz#4fc370b14be07296423ae8c00940fb002c6001b5" - integrity sha512-X8p8aS7JptQq7uZZNFEvfEcPf6tlK4PyVwYDdryRbG98B4bh2wFQYMThxvqa+FGEN7USEuHdv2mF0GhFKfX0ew== +"@react-navigation/native-stack@^6.9.26": + version "6.9.26" + resolved "https://registry.yarnpkg.com/@react-navigation/native-stack/-/native-stack-6.9.26.tgz#90facf7783c9927f094bc9f01c613af75b6c241e" + integrity sha512-++dueQ+FDj2XkZ902DVrK79ub1vp19nSdAZWxKRgd6+Bc0Niiesua6rMCqymYOVaYh+dagwkA9r00bpt/U5WLw== dependencies: - "@react-navigation/elements" "^1.3.21" + "@react-navigation/elements" "^1.3.30" warn-once "^0.1.0" -"@react-navigation/native@^6.1.7": - version "6.1.9" - resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-6.1.9.tgz#8ef87095cd9c2ed094308c726157c7f6fc28796e" - integrity sha512-AMuJDpwXE7UlfyhIXaUCCynXmv69Kb8NzKgKJO7v0k0L+u6xUTbt6xvshmJ79vsvaFyaEH9Jg5FMzek5/S5qNw== +"@react-navigation/native@^6.1.17": + version "6.1.17" + resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-6.1.17.tgz#439f15a99809d26ea4682d2a3766081cf2ca31cf" + integrity sha512-mer3OvfwWOHoUSMJyLa4vnBH3zpFmCwuzrBPlw7feXklurr/ZDiLjLxUScOot6jLRMz/67GyilEYMmP99LL0RQ== dependencies: - "@react-navigation/core" "^6.4.10" + "@react-navigation/core" "^6.4.16" escape-string-regexp "^4.0.0" fast-deep-equal "^3.1.3" nanoid "^3.1.23" @@ -1709,10 +2247,22 @@ dependencies: nanoid "^3.1.23" -"@shopify/react-native-skia@^1.2.3": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@shopify/react-native-skia/-/react-native-skia-1.2.3.tgz#d87efd01c362b69f62375ce950c30e453586d6f9" - integrity sha512-gyUD/HGsMyZ+YAoWxVh24HYN5juwC/dZWINL/0sKP7Ttee/0igCRxWPneH1BbVH28dhyf+tvksQNUwpMM3VWbg== +"@rnx-kit/chromium-edge-launcher@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@rnx-kit/chromium-edge-launcher/-/chromium-edge-launcher-1.0.0.tgz#c0df8ea00a902c7a417cd9655aab06de398b939c" + integrity sha512-lzD84av1ZQhYUS+jsGqJiCMaJO2dn9u+RTT9n9q6D3SaKVwWqv+7AoRKqBu19bkwyE+iFRl1ymr40QS90jVFYg== + dependencies: + "@types/node" "^18.0.0" + escape-string-regexp "^4.0.0" + is-wsl "^2.2.0" + lighthouse-logger "^1.0.0" + mkdirp "^1.0.4" + rimraf "^3.0.2" + +"@shopify/react-native-skia@^1.3.4": + version "1.3.4" + resolved "https://registry.yarnpkg.com/@shopify/react-native-skia/-/react-native-skia-1.3.4.tgz#c14dfc3f8a7e77907d77a72cb225fb019c9c43ac" + integrity sha512-SskehEpndqsQyurCbGOni57pGt7ssxAc+Tu8NXiWJR3VZ7qE6JH2xOICKml6mwCAeGErab4dc7hP4VEVX+OInA== dependencies: canvaskit-wasm "0.39.1" react-reconciler "0.27.0" @@ -1782,6 +2332,13 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== +"@types/node-forge@^1.3.0": + version "1.3.11" + resolved "https://registry.yarnpkg.com/@types/node-forge/-/node-forge-1.3.11.tgz#0972ea538ddb0f4d9c2fa0ec5db5724773a604da" + integrity sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ== + dependencies: + "@types/node" "*" + "@types/node@*": version "20.10.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.4.tgz#b246fd84d55d5b1b71bf51f964bd514409347198" @@ -1789,6 +2346,13 @@ dependencies: undici-types "~5.26.4" +"@types/node@^18.0.0": + version "18.19.34" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.34.tgz#c3fae2bbbdb94b4a52fe2d229d0dccce02ef3d27" + integrity sha512-eXF4pfBNV5DAMKGbI02NnDtWrQ40hAN558/2vvS4gMpMIxaf6JmD7YjnZbq0Q9TDSSkKBamime8ewRoomHdt4g== + dependencies: + undici-types "~5.26.4" + "@types/prop-types@*": version "15.7.11" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.11.tgz#2596fb352ee96a1379c657734d4b913a613ad563" @@ -1802,21 +2366,13 @@ "@types/react" "*" "@types/react-native" "^0.70" -"@types/react-native-video@^5.0.15": - version "5.0.18" - resolved "https://registry.yarnpkg.com/@types/react-native-video/-/react-native-video-5.0.18.tgz#d0cec469e0cdc165e99ad04d500b90726a382253" - integrity sha512-z+8hNy7Q3UPU66w7vf9tWhk8s8pfj7eYodOpx4h0j36jfoWXtv7AFFmlT9SZk9u4wqyxDBbIjBOw8Ljj4YuRVA== - dependencies: - "@types/react" "*" - "@types/react-native" "*" - -"@types/react-native@*": - version "0.72.8" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.72.8.tgz#eb6238fab289f5f132f7ccf138bdfe6f21ed93e1" - integrity sha512-St6xA7+EoHN5mEYfdWnfYt0e8u6k2FR0P9s2arYgakQGFgU1f9FlPrIEcj0X24pLCF5c5i3WVuLCUdiCYHmOoA== +"@types/react-native-video@^5.0.20": + version "5.0.20" + resolved "https://registry.yarnpkg.com/@types/react-native-video/-/react-native-video-5.0.20.tgz#32b8409aed4a0e91f15ab110b2efef8a58e2fc1c" + integrity sha512-CdD4T43uEKzTNJ/RylTDViNuGuyOPWQUEuA1Y9GY8T+HiE9cwYw1zQNqk8a7zz9GHamlPfJQ+bYoEE9OWjZ/6g== dependencies: - "@react-native/virtualized-lists" "^0.72.4" "@types/react" "*" + react-native "*" "@types/react-native@^0.70": version "0.70.19" @@ -1825,7 +2381,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^18.2.48": +"@types/react@*": version "18.2.48" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.48.tgz#11df5664642d0bd879c1f58bc1d37205b064e8f1" integrity sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w== @@ -1834,6 +2390,14 @@ "@types/scheduler" "*" csstype "^3.0.2" +"@types/react@^18.3.3": + version "18.3.3" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.3.tgz#9679020895318b0915d7a3ab004d92d33375c45f" + integrity sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw== + dependencies: + "@types/prop-types" "*" + csstype "^3.0.2" + "@types/scheduler@*": version "0.16.8" resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.8.tgz#ce5ace04cfeabe7ef87c0091e50752e36707deff" @@ -1861,13 +2425,6 @@ dependencies: "@types/yargs-parser" "*" -"@types/yargs@^16.0.0": - version "16.0.9" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.9.tgz#ba506215e45f7707e6cbcaf386981155b7ab956e" - integrity sha512-tHhzvkFXZQeTECenFoRljLBYPZJ7jAVxqqtEI0qTLOmuultnFp4I9yKE17vTuhf7BkhCu7I4XuemPgikDVuYqA== - dependencies: - "@types/yargs-parser" "*" - "@types/yargs@^17.0.8": version "17.0.32" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.32.tgz#030774723a2f7faafebf645f4e5a48371dca6229" @@ -1875,30 +2432,30 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^5.30.5": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" - integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== +"@typescript-eslint/eslint-plugin@^7.1.1": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.13.0.tgz#3cdeb5d44d051b21a9567535dd90702b2a42c6ff" + integrity sha512-FX1X6AF0w8MdVFLSdqwqN/me2hyhuQg4ykN6ZpVhh1ij/80pTvDKclX1sZB9iqex8SjQfVhwMKs3JtnnMLzG9w== dependencies: - "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/type-utils" "5.62.0" - "@typescript-eslint/utils" "5.62.0" - debug "^4.3.4" + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "7.13.0" + "@typescript-eslint/type-utils" "7.13.0" + "@typescript-eslint/utils" "7.13.0" + "@typescript-eslint/visitor-keys" "7.13.0" graphemer "^1.4.0" - ignore "^5.2.0" - natural-compare-lite "^1.4.0" - semver "^7.3.7" - tsutils "^3.21.0" + ignore "^5.3.1" + natural-compare "^1.4.0" + ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^5.30.5": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" - integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== +"@typescript-eslint/parser@^7.1.1": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.13.0.tgz#9489098d68d57ad392f507495f2b82ce8b8f0a6b" + integrity sha512-EjMfl69KOS9awXXe83iRN7oIEXy9yYdqWfqdrFAYAAr6syP8eLEFI7ZE4939antx2mNgPRW/o1ybm2SFYkbTVA== dependencies: - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/scope-manager" "7.13.0" + "@typescript-eslint/types" "7.13.0" + "@typescript-eslint/typescript-estree" "7.13.0" + "@typescript-eslint/visitor-keys" "7.13.0" debug "^4.3.4" "@typescript-eslint/[email protected]": @@ -1909,21 +2466,34 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/[email protected]": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" - integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== +"@typescript-eslint/[email protected]": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.13.0.tgz#6927d6451537ce648c6af67a2327378d4cc18462" + integrity sha512-ZrMCe1R6a01T94ilV13egvcnvVJ1pxShkE0+NDjDzH4nvG1wXpwsVI5bZCvE7AEDH1mXEx5tJSVR68bLgG7Dng== dependencies: - "@typescript-eslint/typescript-estree" "5.62.0" - "@typescript-eslint/utils" "5.62.0" + "@typescript-eslint/types" "7.13.0" + "@typescript-eslint/visitor-keys" "7.13.0" + +"@typescript-eslint/[email protected]": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.13.0.tgz#4587282b5227a23753ea8b233805ecafc3924c76" + integrity sha512-xMEtMzxq9eRkZy48XuxlBFzpVMDurUAfDu5Rz16GouAtXm0TaAoTFzqWUFPPuQYXI/CDaH/Bgx/fk/84t/Bc9A== + dependencies: + "@typescript-eslint/typescript-estree" "7.13.0" + "@typescript-eslint/utils" "7.13.0" debug "^4.3.4" - tsutils "^3.21.0" + ts-api-utils "^1.3.0" "@typescript-eslint/[email protected]": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== +"@typescript-eslint/[email protected]": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.13.0.tgz#0cca95edf1f1fdb0cfe1bb875e121b49617477c5" + integrity sha512-QWuwm9wcGMAuTsxP+qz6LBBd3Uq8I5Nv8xb0mk54jmNoCyDspnMvVsOxI6IsMmway5d1S9Su2+sCKv1st2l6eA== + "@typescript-eslint/[email protected]": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" @@ -1937,7 +2507,31 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/[email protected]", "@typescript-eslint/utils@^5.10.0": +"@typescript-eslint/[email protected]": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.13.0.tgz#4cc24fc155088ebf3b3adbad62c7e60f72c6de1c" + integrity sha512-cAvBvUoobaoIcoqox1YatXOnSl3gx92rCZoMRPzMNisDiM12siGilSM4+dJAekuuHTibI2hVC2fYK79iSFvWjw== + dependencies: + "@typescript-eslint/types" "7.13.0" + "@typescript-eslint/visitor-keys" "7.13.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" + +"@typescript-eslint/[email protected]": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.13.0.tgz#f84e7e8aeceae945a9a3f40d077fd95915308004" + integrity sha512-jceD8RgdKORVnB4Y6BqasfIkFhl4pajB1wVxrF4akxD2QPM8GNYjgGwEzYS+437ewlqqrg7Dw+6dhdpjMpeBFQ== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "7.13.0" + "@typescript-eslint/types" "7.13.0" + "@typescript-eslint/typescript-estree" "7.13.0" + +"@typescript-eslint/utils@^5.10.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== @@ -1959,6 +2553,14 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/[email protected]": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.13.0.tgz#2eb7ce8eb38c2b0d4a494d1fe1908e7071a1a353" + integrity sha512-nxn+dozQx+MK61nn/JP+M4eCkHDSxSLDpgE3WcQo0+fkjEolnaB5jswvIKC4K56By8MMgIho7f1PVxERHEo8rw== + dependencies: + "@typescript-eslint/types" "7.13.0" + eslint-visitor-keys "^3.4.3" + "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" @@ -2162,11 +2764,6 @@ async-limiter@~1.0.0: resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== -async@^3.2.2: - version "3.2.5" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" - integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== - asynciterator.prototype@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz#8c5df0514936cdd133604dfcc9d3fb93f09b2b62" @@ -2184,16 +2781,25 @@ babel-core@^7.0.0-bridge.0: resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg== -babel-plugin-module-resolver@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz#2b7fc176bd55da25f516abf96015617b4f70fc73" - integrity sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q== +babel-plugin-module-resolver@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.2.tgz#cdeac5d4aaa3b08dd1ac23ddbf516660ed2d293e" + integrity sha512-9KtaCazHee2xc0ibfqsDeamwDps6FZNo5S0Q81dUqEuFzVwPhcT4J5jOqIVvgCA3Q/wO9hKYxN/Ds3tIsp5ygg== dependencies: - find-babel-config "^2.0.0" - glob "^8.0.3" + find-babel-config "^2.1.1" + glob "^9.3.3" pkg-up "^3.1.0" reselect "^4.1.7" - resolve "^1.22.1" + resolve "^1.22.8" + +babel-plugin-polyfill-corejs2@^0.4.10: + version "0.4.11" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz#30320dfe3ffe1a336c15afdcdafd6fd615b25e33" + integrity sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q== + dependencies: + "@babel/compat-data" "^7.22.6" + "@babel/helper-define-polyfill-provider" "^0.6.2" + semver "^6.3.1" babel-plugin-polyfill-corejs2@^0.4.6: version "0.4.7" @@ -2204,6 +2810,14 @@ babel-plugin-polyfill-corejs2@^0.4.6: "@babel/helper-define-polyfill-provider" "^0.4.4" semver "^6.3.1" +babel-plugin-polyfill-corejs3@^0.10.4: + version "0.10.4" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.4.tgz#789ac82405ad664c20476d0233b485281deb9c77" + integrity sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.6.1" + core-js-compat "^3.36.1" + babel-plugin-polyfill-corejs3@^0.8.5: version "0.8.7" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.7.tgz#941855aa7fdaac06ed24c730a93450d2b2b76d04" @@ -2219,10 +2833,12 @@ babel-plugin-polyfill-regenerator@^0.5.3: dependencies: "@babel/helper-define-polyfill-provider" "^0.4.4" -babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: - version "7.0.0-beta.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz#aa213c1435e2bffeb6fca842287ef534ad05d5cf" - integrity sha512-Xj9XuRuz3nTSbaTXWv3itLOcxyF4oPD8douBBmj7U9BBC6nEBYfyOJYQMf/8PJAFotC62UY5dFfIGEPr7WswzQ== +babel-plugin-polyfill-regenerator@^0.6.1: + version "0.6.2" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz#addc47e240edd1da1058ebda03021f382bba785e" + integrity sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.6.2" babel-plugin-transform-flow-enums@^0.0.2: version "0.0.2" @@ -2231,54 +2847,16 @@ babel-plugin-transform-flow-enums@^0.0.2: dependencies: "@babel/plugin-syntax-flow" "^7.12.1" -babel-preset-fbjs@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-3.4.0.tgz#38a14e5a7a3b285a3f3a86552d650dca5cf6111c" - integrity sha512-9ywCsCvo1ojrw0b+XYk7aFvTH6D9064t0RIL1rtMf3nsa02Xw41MS7sZw216Im35xj/UY0PDBQsa1brUDDF1Ow== - dependencies: - "@babel/plugin-proposal-class-properties" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/plugin-syntax-class-properties" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-block-scoped-functions" "^7.0.0" - "@babel/plugin-transform-block-scoping" "^7.0.0" - "@babel/plugin-transform-classes" "^7.0.0" - "@babel/plugin-transform-computed-properties" "^7.0.0" - "@babel/plugin-transform-destructuring" "^7.0.0" - "@babel/plugin-transform-flow-strip-types" "^7.0.0" - "@babel/plugin-transform-for-of" "^7.0.0" - "@babel/plugin-transform-function-name" "^7.0.0" - "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-member-expression-literals" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/plugin-transform-object-super" "^7.0.0" - "@babel/plugin-transform-parameters" "^7.0.0" - "@babel/plugin-transform-property-literals" "^7.0.0" - "@babel/plugin-transform-react-display-name" "^7.0.0" - "@babel/plugin-transform-react-jsx" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-template-literals" "^7.0.0" - babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-js@^1.1.2, base64-js@^1.3.1: +base64-js@^1.3.1, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -big-integer@^1.6.44: - version "1.6.52" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.52.tgz#60a887f3047614a8e1bffe5d7173490a97dc8c85" - integrity sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg== - bl@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" @@ -2288,13 +2866,6 @@ bl@^4.1.0: inherits "^2.0.4" readable-stream "^3.4.0" -bplist-parser@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e" - integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw== - dependencies: - big-integer "^1.6.44" - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -2327,6 +2898,16 @@ browserslist@^4.22.2: node-releases "^2.0.14" update-browserslist-db "^1.0.13" +browserslist@^4.23.0: + version "4.23.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.1.tgz#ce4af0534b3d37db5c1a4ca98b9080f985041e96" + integrity sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw== + dependencies: + caniuse-lite "^1.0.30001629" + electron-to-chromium "^1.4.796" + node-releases "^2.0.14" + update-browserslist-db "^1.0.16" + [email protected]: version "2.1.1" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" @@ -2347,13 +2928,6 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" -bundle-name@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a" - integrity sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw== - dependencies: - run-applescript "^5.0.0" - [email protected]: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -2407,6 +2981,11 @@ caniuse-lite@^1.0.30001565: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001568.tgz#53fa9297273c9a977a560663f48cbea1767518b7" integrity sha512-vSUkH84HontZJ88MiNrOau1EBrCqEQYgkC5gIySiDlpsm8sGVrhU7Kx4V6h0tnqaHzIHZv08HlJIwPbL4XL9+A== +caniuse-lite@^1.0.30001629: + version "1.0.30001633" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001633.tgz#45a4ade9fb9ec80a06537a6271ac1e0afadcb324" + integrity sha512-6sT0yf/z5jqf8tISAgpJDrmwOpLsrpnyCdD/lOZKvKkkJK4Dn0X5i7KF7THEZhOq+30bmhwBlNEaqPUiHiKtZg== + [email protected]: version "0.39.1" resolved "https://registry.yarnpkg.com/canvaskit-wasm/-/canvaskit-wasm-0.39.1.tgz#c3c8f3962cbabbedf246f7bcf90e859013c7eae9" @@ -2431,6 +3010,16 @@ chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" +chrome-launcher@^0.15.2: + version "0.15.2" + resolved "https://registry.yarnpkg.com/chrome-launcher/-/chrome-launcher-0.15.2.tgz#4e6404e32200095fdce7f6a1e1004f9bd36fa5da" + integrity sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ== + dependencies: + "@types/node" "*" + escape-string-regexp "^4.0.0" + is-wsl "^2.2.0" + lighthouse-logger "^1.0.0" + ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" @@ -2538,11 +3127,6 @@ commander@^9.4.1: resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== -commander@~2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" - integrity sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA== - commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -2595,6 +3179,13 @@ core-js-compat@^3.31.0, core-js-compat@^3.33.1: dependencies: browserslist "^4.22.2" +core-js-compat@^3.36.1: + version "3.37.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.37.1.tgz#c844310c7852f4bdf49b8d339730b97e17ff09ee" + integrity sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg== + dependencies: + browserslist "^4.23.0" + core-util-is@~1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" @@ -2629,7 +3220,7 @@ dayjs@^1.8.15: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.10.tgz#68acea85317a6e164457d6d6947564029a6a16a0" integrity sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ== [email protected], debug@^2.2.0: [email protected], debug@^2.2.0, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -2663,24 +3254,6 @@ deepmerge@^4.3.0: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== -default-browser-id@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c" - integrity sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA== - dependencies: - bplist-parser "^0.2.0" - untildify "^4.0.0" - -default-browser@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-4.0.0.tgz#53c9894f8810bf86696de117a6ce9085a3cbc7da" - integrity sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA== - dependencies: - bundle-name "^3.0.0" - default-browser-id "^3.0.0" - execa "^7.1.1" - titleize "^3.0.0" - defaults@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" @@ -2697,11 +3270,6 @@ define-data-property@^1.0.1, define-data-property@^1.1.1: gopd "^1.0.1" has-property-descriptors "^1.0.0" -define-lazy-prop@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f" - integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg== - define-properties@^1.1.3, 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" @@ -2721,24 +3289,6 @@ [email protected]: resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== -deprecated-react-native-prop-types@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-2.3.0.tgz#c10c6ee75ff2b6de94bb127f142b814e6e08d9ab" - integrity sha512-pWD0voFtNYxrVqvBMYf5gq3NA2GCpfodS1yNynTPc93AYA/KEMGeWDqqeUB6R2Z9ZofVhks2aeJXiuQqKNpesA== - dependencies: - "@react-native/normalize-color" "*" - invariant "*" - prop-types "*" - -deprecated-react-native-prop-types@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-4.2.3.tgz#0ef845c1a80ef1636bd09060e4cdf70f9727e5ad" - integrity sha512-2rLTiMKidIFFYpIVM69UnQKngLqQfL6I11Ch8wGSBftS18FUXda+o2we2950X+1dmbgps28niI3qwyH4eX3Z1g== - dependencies: - "@react-native/normalize-colors" "<0.73.0" - invariant "^2.2.4" - prop-types "^15.8.1" - [email protected]: version "1.2.0" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" @@ -2775,10 +3325,10 @@ electron-to-chromium@^1.4.601: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.610.tgz#e17b22203f4aa2e1ed77759c720546d95a51186f" integrity sha512-mqi2oL1mfeHYtOdCxbPQYV/PL7YrQlxbvFEZ0Ee8GbDdShimqt2/S6z2RWqysuvlwdOrQdqvE0KZrBTipAeJzg== -eme-encryption-scheme-polyfill@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/eme-encryption-scheme-polyfill/-/eme-encryption-scheme-polyfill-2.1.1.tgz#91c823ed584e8ec5a9f03a6a676def8f80c57a4c" - integrity sha512-njD17wcUrbqCj0ArpLu5zWXtaiupHb/2fIUQGdInf83GlI+Q6mmqaPGLdrke4savKAu15J/z1Tg/ivDgl14g0g== +electron-to-chromium@^1.4.796: + version "1.4.802" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.802.tgz#49b397eadc95a49b1ac33eebee146b8e5a93773f" + integrity sha512-TnTMUATbgNdPXVSHsxvNVSG0uEd6cSZsANjm8c9HbvflZVVn1yTRcmVXYT1Ma95/ssB/Dcd30AHweH2TE+dNpA== emoji-regex@^8.0.0: version "8.0.0" @@ -2790,10 +3340,10 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== -envinfo@^7.7.2: - version "7.11.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.11.0.tgz#c3793f44284a55ff8c82faf1ffd91bc6478ea01f" - integrity sha512-G9/6xF1FPbIw0TtalAMaVPpiq2aDEuKLXM314jPVAO9r2fo2a4BLqMNkmRS7O/xPPZ+COAhGIz3ETvHEV3eUcg== +envinfo@^7.10.0: + version "7.13.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.13.0.tgz#81fbb81e5da35d74e814941aeab7c325a606fb31" + integrity sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q== error-ex@^1.3.1: version "1.3.2" @@ -2912,6 +3462,11 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escalade@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -2953,10 +3508,10 @@ eslint-plugin-ft-flow@^2.0.1: lodash "^4.17.21" string-natural-compare "^3.0.1" -eslint-plugin-jest@^26.5.3: - version "26.9.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.9.0.tgz#7931c31000b1c19e57dbfb71bbf71b817d1bf949" - integrity sha512-TWJxWGp1J628gxh2KhaH1H1paEdgE2J61BBF1I59c6xWeL5+D1BzMxGDN/nXAfX+aSkR5u80K+XhskK6Gwq9ng== +eslint-plugin-jest@^27.9.0: + version "27.9.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz#7c98a33605e1d8b8442ace092b60e9919730000b" + integrity sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug== dependencies: "@typescript-eslint/utils" "^5.10.0" @@ -2967,13 +3522,13 @@ eslint-plugin-prettier@^4.2.1: dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-prettier@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz#a3b399f04378f79f066379f544e42d6b73f11515" - integrity sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg== +eslint-plugin-prettier@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz#17cfade9e732cef32b5f5be53bd4e07afd8e67e1" + integrity sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw== dependencies: prettier-linter-helpers "^1.0.0" - synckit "^0.8.5" + synckit "^0.8.6" eslint-plugin-react-hooks@^4.6.0: version "4.6.0" @@ -3137,7 +3692,7 @@ event-target-shim@^5.0.0, event-target-shim@^5.0.1: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -execa@^5.0.0: +execa@^5.0.0, execa@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== @@ -3152,21 +3707,6 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -execa@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-7.2.0.tgz#657e75ba984f42a70f38928cedc87d6f2d4fe4e9" - integrity sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.1" - human-signals "^4.3.0" - is-stream "^3.0.0" - merge-stream "^2.0.0" - npm-run-path "^5.1.0" - onetime "^6.0.0" - signal-exit "^3.0.7" - strip-final-newline "^3.0.0" - fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -3177,7 +3717,7 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== -fast-glob@^3.2.9, fast-glob@^3.3.0: +fast-glob@^3.2.9, fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -3205,6 +3745,13 @@ fast-xml-parser@^4.0.12: dependencies: strnum "^1.0.5" +fast-xml-parser@^4.2.4: + version "4.4.0" + resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.4.0.tgz#341cc98de71e9ba9e651a67f41f1752d1441a501" + integrity sha512-kLY3jFlwIYwBNDojclKsNAC12sfD6NwW74QB2CoNGPvtVxjliYehVunB3HYyNi+n4Tt1dAcgwYvmKF/Z18flqg== + dependencies: + strnum "^1.0.5" + fastq@^1.6.0: version "1.15.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" @@ -3251,12 +3798,12 @@ [email protected]: statuses "~1.5.0" unpipe "~1.0.0" -find-babel-config@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/find-babel-config/-/find-babel-config-2.0.0.tgz#a8216f825415a839d0f23f4d18338a1cc966f701" - integrity sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw== +find-babel-config@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/find-babel-config/-/find-babel-config-2.1.1.tgz#93703fc8e068db5e4c57592900c5715dd04b7e5b" + integrity sha512-5Ji+EAysHGe1OipH7GN4qDjok5Z1uw5KAwDCbicU/4wyTZY7CqOCzcWbG7J5ad9mazq67k89fXlbc1MuIfl9uA== dependencies: - json5 "^2.1.1" + json5 "^2.2.3" path-exists "^4.0.0" find-cache-dir@^2.0.0: @@ -3305,21 +3852,16 @@ flatted@^3.2.9: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== -flow-enums-runtime@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/flow-enums-runtime/-/flow-enums-runtime-0.0.5.tgz#95884bfcc82edaf27eef7e1dd09732331cfbafbc" - integrity sha512-PSZF9ZuaZD03sT9YaIs0FrGJ7lSUw7rHZIex+73UYVXg46eL/wxN5PaVcPJFudE2cJu5f0fezitV5aBkLHPUOQ== +flow-enums-runtime@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/flow-enums-runtime/-/flow-enums-runtime-0.0.6.tgz#5bb0cd1b0a3e471330f4d109039b7eba5cb3e787" + integrity sha512-3PYnM29RFXwvAN6Pc/scUfkI7RwhQ/xqyLUyPNlXUp9S40zI8nup9tUSrTLSVnWGBN38FNiGWbwZOB6uR4OGdw== flow-parser@0.*: version "0.223.3" resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.223.3.tgz#9e331f635b3d4b5e0875bfc4f5dd79bf9c42c795" integrity sha512-9KxxDKSB22ovMpSULbOL/QAQGPN6M0YMS3PubQvB0jVc4W7QP6VhasIVic7MzKcJSh0BAVs4J6SZjoH0lDDNlg== -flow-parser@^0.206.0: - version "0.206.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.206.0.tgz#f4f794f8026535278393308e01ea72f31000bfef" - integrity sha512-HVzoK3r6Vsg+lKvlIZzaWNBVai+FXTX1wdYhz/wVlH13tb/gOdLXmlTqy6odmTBhT5UoWUbq0k8263Qhr9d88w== - for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -3391,7 +3933,7 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" -get-stream@^6.0.0, get-stream@^6.0.1: +get-stream@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== @@ -3418,7 +3960,7 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob@^7.1.3: +glob@^7.1.1, glob@^7.1.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -3430,16 +3972,15 @@ glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.3: - version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== +glob@^9.3.3: + version "9.3.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-9.3.5.tgz#ca2ed8ca452781a3009685607fdf025a899dfe21" + integrity sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q== dependencies: fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" + minimatch "^8.0.2" + minipass "^4.2.4" + path-scurry "^1.6.1" globals@^11.1.0: version "11.12.0" @@ -3535,17 +4076,29 @@ hasown@^2.0.0: dependencies: function-bind "^1.1.2" [email protected]: - version "0.12.0" - resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.12.0.tgz#8a289f9aee854854422345e6995a48613bac2ca8" - integrity sha512-+e8xR6SCen0wyAKrMT3UD0ZCCLymKhRgjEB5sS28rKiFir/fXgLoeRilRUssFCILmGHb+OvHDUlhxs0+IEyvQw== [email protected]: + version "0.19.1" + resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.19.1.tgz#d5924f5fac2bf0532547ae9f506d6db8f3c96392" + integrity sha512-daLGV3Q2MKk8w4evNMKwS8zBE/rcpA800nu1Q5kM08IKijoSnPe9Uo1iIxzPKRkn95IxxsgBMPeYHt3VG4ej2g== [email protected]: - version "0.12.0" - resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.12.0.tgz#114dc26697cfb41a6302c215b859b74224383773" - integrity sha512-d4PHnwq6SnDLhYl3LHNHvOg7nQ6rcI7QVil418REYksv0Mh3cEkHDcuhGxNQ3vgnLSLl4QSvDrFCwQNYdpWlzw== [email protected]: + version "0.20.1" + resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.20.1.tgz#0b9a544cf883a779a8e1444b915fa365bef7f72d" + integrity sha512-SQpZK4BzR48kuOg0v4pb3EAGNclzIlqMj3Opu/mu7bbAoFw6oig6cEt/RAi0zTFW/iW6Iz9X9ggGuZTAZ/yZHg== + [email protected]: + version "0.19.1" + resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.19.1.tgz#1044348097165b7c93dc198a80b04ed5130d6b1a" + integrity sha512-Vp+bXzxYJWrpEuJ/vXxUsLnt0+y4q9zyi4zUlkLqD8FKv4LjIfOvP69R/9Lty3dCyKh0E2BU7Eypqr63/rKT/A== + dependencies: + hermes-estree "0.19.1" + [email protected]: + version "0.20.1" + resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.20.1.tgz#ad10597b99f718b91e283f81cbe636c50c3cff92" + integrity sha512-BL5P83cwCogI8D7rrDCgsFY0tdYUtmFP9XaXtl2IQjC+2Xo+4okjfXintlTxcIwl4qeGddEl28Z11kbVIw0aNA== dependencies: - hermes-estree "0.12.0" + hermes-estree "0.20.1" hermes-profile-transformer@^0.0.6: version "0.0.6" @@ -3577,11 +4130,6 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -human-signals@^4.3.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" - integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== - ieee754@^1.1.13: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" @@ -3592,6 +4140,11 @@ ignore@^5.0.5, ignore@^5.2.0: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg== +ignore@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" + integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + image-size@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/image-size/-/image-size-1.0.2.tgz#d778b6d0ab75b2737c1556dd631652eb963bc486" @@ -3642,18 +4195,13 @@ internal-slot@^1.0.5: hasown "^2.0.0" side-channel "^1.0.4" -invariant@*, invariant@^2.2.4: +invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== dependencies: loose-envify "^1.0.0" -ip@^1.1.5: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48" - integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg== - is-array-buffer@^3.0.1, 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" @@ -3719,11 +4267,6 @@ is-docker@^2.0.0: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== -is-docker@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" - integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== - is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -3760,13 +4303,6 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: dependencies: is-extglob "^2.1.1" -is-inside-container@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" - integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== - dependencies: - is-docker "^3.0.0" - is-interactive@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" @@ -3831,11 +4367,6 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== -is-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" - integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== - is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -3887,7 +4418,7 @@ is-wsl@^1.1.0: resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" integrity sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw== -is-wsl@^2.2.0: +is-wsl@^2.1.1, is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -3925,7 +4456,7 @@ iterator.prototype@^1.1.2: reflect.getprototypeof "^1.0.4" set-function-name "^2.0.1" -jest-environment-node@^29.2.1: +jest-environment-node@^29.6.3: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== @@ -3966,23 +4497,6 @@ jest-mock@^29.7.0: "@types/node" "*" jest-util "^29.7.0" -jest-regex-util@^27.0.6: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.5.1.tgz#4da143f7e9fd1e542d4aa69617b38e4a78365b95" - integrity sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg== - -jest-util@^27.2.0: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.5.1.tgz#3ba9771e8e31a0b85da48fe0b0891fb86c01c2f9" - integrity sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw== - dependencies: - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - jest-util@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" @@ -3995,7 +4509,7 @@ jest-util@^29.7.0: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-validate@^29.2.1: +jest-validate@^29.6.3: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== @@ -4007,12 +4521,13 @@ jest-validate@^29.2.1: leven "^3.1.0" pretty-format "^29.7.0" -jest-worker@^27.2.0: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== +jest-worker@^29.6.3: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" + integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== dependencies: "@types/node" "*" + jest-util "^29.7.0" merge-stream "^2.0.0" supports-color "^8.0.0" @@ -4112,7 +4627,7 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== -json5@^2.1.1, json5@^2.2.3: +json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -4134,11 +4649,6 @@ jsonfile@^4.0.0: object.assign "^4.1.4" object.values "^1.1.6" -keymirror@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/keymirror/-/keymirror-0.1.1.tgz#918889ea13f8d0a42e7c557250eee713adc95c35" - integrity sha512-vIkZAFWoDijgQT/Nvl2AHCMmnegN2ehgTPYuyy2hWQkQSntI0S7ESYqdLkoSe1HyEBFHHkCgSIvVdSEiWwKvCg== - keyv@^4.5.3: version "4.5.4" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" @@ -4169,6 +4679,14 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +lighthouse-logger@^1.0.0: + version "1.4.2" + resolved "https://registry.yarnpkg.com/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz#aef90f9e97cd81db367c7634292ee22079280aaa" + integrity sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g== + dependencies: + debug "^2.6.9" + marky "^1.2.2" + locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -4235,6 +4753,11 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" +lru-cache@^10.2.0: + version "10.2.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.2.tgz#48206bc114c1252940c41b25b41af5b545aca878" + integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -4264,6 +4787,11 @@ [email protected]: dependencies: tmpl "1.0.5" +marky@^1.2.2: + version "1.2.5" + resolved "https://registry.yarnpkg.com/marky/-/marky-1.2.5.tgz#55796b688cbd72390d2d399eaaf1832c9413e3c0" + integrity sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q== + memoize-one@^5.0.0: version "5.2.1" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" @@ -4279,62 +4807,60 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.76.8.tgz#5efd1027353b36b73706164ef09c290dceac096a" - integrity sha512-Hh6PW34Ug/nShlBGxkwQJSgPGAzSJ9FwQXhUImkzdsDgVu6zj5bx258J8cJVSandjNoQ8nbaHK6CaHlnbZKbyA== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.80.9.tgz#7051ba377b7d2140abd23f4846bbbb1e81fea99b" + integrity sha512-d76BSm64KZam1nifRZlNJmtwIgAeZhZG3fi3K+EmPOlrR8rDtBxQHDSN3fSGeNB9CirdTyabTMQCkCup6BXFSQ== dependencies: "@babel/core" "^7.20.0" - hermes-parser "0.12.0" + hermes-parser "0.20.1" nullthrows "^1.1.1" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-cache-key/-/metro-cache-key-0.76.8.tgz#8a0a5e991c06f56fcc584acadacb313c312bdc16" - integrity sha512-buKQ5xentPig9G6T37Ww/R/bC+/V1MA5xU/D8zjnhlelsrPG6w6LtHUS61ID3zZcMZqYaELWk5UIadIdDsaaLw== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-cache-key/-/metro-cache-key-0.80.9.tgz#a04cbb0a7828509bb10dde9789ef761c0c60bc3d" + integrity sha512-hRcYGhEiWIdM87hU0fBlcGr+tHDEAT+7LYNCW89p5JhErFt/QaAkVx4fb5bW3YtXGv5BTV7AspWPERoIb99CXg== [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.76.8.tgz#296c1c189db2053b89735a8f33dbe82575f53661" - integrity sha512-QBJSJIVNH7Hc/Yo6br/U/qQDUpiUdRgZ2ZBJmvAbmAKp2XDzsapnMwK/3BGj8JNWJF7OLrqrYHsRsukSbUBpvQ== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.80.9.tgz#b914318a90dbcd51b4c27836184519c441ba5123" + integrity sha512-ujEdSI43QwI+Dj2xuNax8LMo8UgKuXJEdxJkzGPU6iIx42nYa1byQ+aADv/iPh5sh5a//h5FopraW5voXSgm2w== dependencies: - metro-core "0.76.8" + metro-core "0.80.9" rimraf "^3.0.2" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.76.8.tgz#20bd5397fcc6096f98d2a813a7cecb38b8af062d" - integrity sha512-SL1lfKB0qGHALcAk2zBqVgQZpazDYvYFGwCK1ikz0S6Y/CM2i2/HwuZN31kpX6z3mqjv/6KvlzaKoTb1otuSAA== [email protected], metro-config@^0.80.3: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.80.9.tgz#4eb6948b0ddc7c38d9d4ba8ddf22a67ca1c2bc06" + integrity sha512-28wW7CqS3eJrunRGnsibWldqgwRP9ywBEf7kg+uzUHkSFJNKPM1K3UNSngHmH0EZjomizqQA2Zi6/y6VdZMolg== dependencies: connect "^3.6.5" cosmiconfig "^5.0.5" - jest-validate "^29.2.1" - metro "0.76.8" - metro-cache "0.76.8" - metro-core "0.76.8" - metro-runtime "0.76.8" + jest-validate "^29.6.3" + metro "0.80.9" + metro-cache "0.80.9" + metro-core "0.80.9" + metro-runtime "0.80.9" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.76.8.tgz#917c8157c63406cb223522835abb8e7c6291dcad" - integrity sha512-sl2QLFI3d1b1XUUGxwzw/KbaXXU/bvFYrSKz6Sg19AdYGWFyzsgZ1VISRIDf+HWm4R/TJXluhWMEkEtZuqi3qA== [email protected], metro-core@^0.80.3: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.80.9.tgz#3af21d0b09d71ec9c0840f028bffb36bc3619727" + integrity sha512-tbltWQn+XTdULkGdzHIxlxk4SdnKxttvQQV3wpqqFbHDteR4gwCyTR2RyYJvxgU7HELfHtrVbqgqAdlPByUSbg== dependencies: lodash.throttle "^4.1.1" - metro-resolver "0.76.8" + metro-resolver "0.80.9" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-file-map/-/metro-file-map-0.76.8.tgz#a1db1185b6c316904ba6b53d628e5d1323991d79" - integrity sha512-A/xP1YNEVwO1SUV9/YYo6/Y1MmzhL4ZnVgcJC3VmHp/BYVOXVStzgVbWv2wILe56IIMkfXU+jpXrGKKYhFyHVw== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-file-map/-/metro-file-map-0.80.9.tgz#ed8783f6e35dfc005794344c2a9fcd6e914885aa" + integrity sha512-sBUjVtQMHagItJH/wGU9sn3k2u0nrCl0CdR4SFMO1tksXLKbkigyQx4cbpcyPVOAmGTVuy3jyvBlELaGCAhplQ== dependencies: anymatch "^3.0.3" debug "^2.2.0" fb-watchman "^2.0.0" graceful-fs "^4.2.4" invariant "^2.2.4" - jest-regex-util "^27.0.6" - jest-util "^27.2.0" - jest-worker "^27.2.0" + jest-worker "^29.6.3" micromatch "^4.0.4" node-abort-controller "^3.1.1" nullthrows "^1.1.1" @@ -4342,76 +4868,13 @@ [email protected]: optionalDependencies: fsevents "^2.3.2" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-inspector-proxy/-/metro-inspector-proxy-0.76.8.tgz#6b8678a7461b0b42f913a7881cc9319b4d3cddff" - integrity sha512-Us5o5UEd4Smgn1+TfHX4LvVPoWVo9VsVMn4Ldbk0g5CQx3Gu0ygc/ei2AKPGTwsOZmKxJeACj7yMH2kgxQP/iw== - dependencies: - connect "^3.6.5" - debug "^2.2.0" - node-fetch "^2.2.0" - ws "^7.5.1" - yargs "^17.6.2" - [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-minify-terser/-/metro-minify-terser-0.76.8.tgz#915ab4d1419257fc6a0b9fa15827b83fe69814bf" - integrity sha512-Orbvg18qXHCrSj1KbaeSDVYRy/gkro2PC7Fy2tDSH1c9RB4aH8tuMOIXnKJE+1SXxBtjWmQ5Yirwkth2DyyEZA== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-minify-terser/-/metro-minify-terser-0.80.9.tgz#2b7798cba2bd4bd69cc5ce05a45bf66291542f83" + integrity sha512-FEeCeFbkvvPuhjixZ1FYrXtO0araTpV6UbcnGgDUpH7s7eR5FG/PiJz3TsuuPP/HwCK19cZtQydcA2QrCw446A== dependencies: terser "^5.15.0" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-minify-uglify/-/metro-minify-uglify-0.76.8.tgz#74745045ea2dd29f8783db483b2fce58385ba695" - integrity sha512-6l8/bEvtVaTSuhG1FqS0+Mc8lZ3Bl4RI8SeRIifVLC21eeSDp4CEBUWSGjpFyUDfi6R5dXzYaFnSgMNyfxADiQ== - dependencies: - uglify-es "^3.1.9" - [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.76.8.tgz#7476efae14363cbdfeeec403b4f01d7348e6c048" - integrity sha512-Ptza08GgqzxEdK8apYsjTx2S8WDUlS2ilBlu9DR1CUcHmg4g3kOkFylZroogVAUKtpYQNYwAvdsjmrSdDNtiAg== - dependencies: - "@babel/core" "^7.20.0" - "@babel/plugin-proposal-async-generator-functions" "^7.0.0" - "@babel/plugin-proposal-class-properties" "^7.18.0" - "@babel/plugin-proposal-export-default-from" "^7.0.0" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.0" - "@babel/plugin-proposal-numeric-separator" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.20.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" - "@babel/plugin-proposal-optional-chaining" "^7.20.0" - "@babel/plugin-syntax-dynamic-import" "^7.8.0" - "@babel/plugin-syntax-export-default-from" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.18.0" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.0.0" - "@babel/plugin-syntax-optional-chaining" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-async-to-generator" "^7.20.0" - "@babel/plugin-transform-block-scoping" "^7.0.0" - "@babel/plugin-transform-classes" "^7.0.0" - "@babel/plugin-transform-computed-properties" "^7.0.0" - "@babel/plugin-transform-destructuring" "^7.20.0" - "@babel/plugin-transform-flow-strip-types" "^7.20.0" - "@babel/plugin-transform-function-name" "^7.0.0" - "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.0.0" - "@babel/plugin-transform-parameters" "^7.0.0" - "@babel/plugin-transform-react-display-name" "^7.0.0" - "@babel/plugin-transform-react-jsx" "^7.0.0" - "@babel/plugin-transform-react-jsx-self" "^7.0.0" - "@babel/plugin-transform-react-jsx-source" "^7.0.0" - "@babel/plugin-transform-runtime" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-sticky-regex" "^7.0.0" - "@babel/plugin-transform-typescript" "^7.5.0" - "@babel/plugin-transform-unicode-regex" "^7.0.0" - "@babel/template" "^7.0.0" - babel-plugin-transform-flow-enums "^0.0.2" - react-refresh "^0.4.0" - metro-react-native-babel-preset@^0.77.0: version "0.77.0" resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.77.0.tgz#47457eca8e36b77156afbe790247a70dbb40faaa" @@ -4457,60 +4920,48 @@ metro-react-native-babel-preset@^0.77.0: babel-plugin-transform-flow-enums "^0.0.2" react-refresh "^0.4.0" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.76.8.tgz#c3a98e1f4cd5faf1e21eba8e004b94a90c4db69b" - integrity sha512-3h+LfS1WG1PAzhq8QF0kfXjxuXetbY/lgz8vYMQhgrMMp17WM1DNJD0gjx8tOGYbpbBC1qesJ45KMS4o5TA73A== - dependencies: - "@babel/core" "^7.20.0" - babel-preset-fbjs "^3.4.0" - hermes-parser "0.12.0" - metro-react-native-babel-preset "0.76.8" - nullthrows "^1.1.1" - [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.76.8.tgz#0862755b9b84e26853978322464fb37c6fdad76d" - integrity sha512-KccOqc10vrzS7ZhG2NSnL2dh3uVydarB7nOhjreQ7C4zyWuiW9XpLC4h47KtGQv3Rnv/NDLJYeDqaJ4/+140HQ== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.80.9.tgz#bae9120a0553e0cb59da6429e83a7e97465cc1a8" + integrity sha512-wAPIjkN59BQN6gocVsAvvpZ1+LQkkqUaswlT++cJafE/e54GoVkMNCmrR4BsgQHr9DknZ5Um/nKueeN7kaEz9w== [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.76.8.tgz#74b2d301a2be5f3bbde91b8f1312106f8ffe50c3" - integrity sha512-XKahvB+iuYJSCr3QqCpROli4B4zASAYpkK+j3a0CJmokxCDNbgyI4Fp88uIL6rNaZfN0Mv35S0b99SdFXIfHjg== [email protected], metro-runtime@^0.80.3: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.80.9.tgz#665312bd4e4d38fea921b3153d6ab47846eb4f08" + integrity sha512-8PTVIgrVcyU+X/rVCy/9yxNlvXsBCk5JwwkbAm/Dm+Abo6NBGtNjWF0M1Xo/NWCb4phamNWcD7cHdR91HhbJvg== dependencies: "@babel/runtime" "^7.0.0" - react-refresh "^0.4.0" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.76.8.tgz#f085800152a6ba0b41ca26833874d31ec36c5a53" - integrity sha512-Hh0ncPsHPVf6wXQSqJqB3K9Zbudht4aUtNpNXYXSxH+pteWqGAXnjtPsRAnCsCWl38wL0jYF0rJDdMajUI3BDw== [email protected], metro-source-map@^0.80.3: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.80.9.tgz#df8f673137548f37ab9f9dcfa771b354a452cfab" + integrity sha512-RMn+XS4VTJIwMPOUSj61xlxgBvPeY4G6s5uIn6kt6HB6A/k9ekhr65UkkDD7WzHYs3a9o869qU8tvOZvqeQzgw== dependencies: "@babel/traverse" "^7.20.0" "@babel/types" "^7.20.0" invariant "^2.2.4" - metro-symbolicate "0.76.8" + metro-symbolicate "0.80.9" nullthrows "^1.1.1" - ob1 "0.76.8" + ob1 "0.80.9" source-map "^0.5.6" vlq "^1.0.0" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.76.8.tgz#f102ac1a306d51597ecc8fdf961c0a88bddbca03" - integrity sha512-LrRL3uy2VkzrIXVlxoPtqb40J6Bf1mlPNmUQewipc3qfKKFgtPHBackqDy1YL0njDsWopCKcfGtFYLn0PTUn3w== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.80.9.tgz#8d1d19d26ebb36b9d13dbd29814fdd71d6009db7" + integrity sha512-Ykae12rdqSs98hg41RKEToojuIW85wNdmSe/eHUgMkzbvCFNVgcC0w3dKZEhSsqQOXapXRlLtHkaHLil0UD/EA== dependencies: invariant "^2.2.4" - metro-source-map "0.76.8" + metro-source-map "0.80.9" nullthrows "^1.1.1" source-map "^0.5.6" through2 "^2.0.1" vlq "^1.0.0" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-transform-plugins/-/metro-transform-plugins-0.76.8.tgz#d77c28a6547a8e3b72250f740fcfbd7f5408f8ba" - integrity sha512-PlkGTQNqS51Bx4vuufSQCdSn2R2rt7korzngo+b5GCkeX5pjinPjnO2kNhQ8l+5bO0iUD/WZ9nsM2PGGKIkWFA== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-transform-plugins/-/metro-transform-plugins-0.80.9.tgz#473a2c0a9e48043210547abe61cdeedb77725422" + integrity sha512-UlDk/uc8UdfLNJhPbF3tvwajyuuygBcyp+yBuS/q0z3QSuN/EbLllY3rK8OTD9n4h00qZ/qgxGv/lMFJkwP4vg== dependencies: "@babel/core" "^7.20.0" "@babel/generator" "^7.20.0" @@ -4518,28 +4969,28 @@ [email protected]: "@babel/traverse" "^7.20.0" nullthrows "^1.1.1" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-transform-worker/-/metro-transform-worker-0.76.8.tgz#b9012a196cee205170d0c899b8b175b9305acdea" - integrity sha512-mE1fxVAnJKmwwJyDtThildxxos9+DGs9+vTrx2ktSFMEVTtXS/bIv2W6hux1pqivqAfyJpTeACXHk5u2DgGvIQ== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-transform-worker/-/metro-transform-worker-0.80.9.tgz#f1d8ef4f77228bb7e1d20d3c06934166e8ee3b28" + integrity sha512-c/IrzMUVnI0hSVVit4TXzt3A1GiUltGVlzCmLJWxNrBGHGrJhvgePj38+GXl1Xf4Fd4vx6qLUkKMQ3ux73bFLQ== dependencies: "@babel/core" "^7.20.0" "@babel/generator" "^7.20.0" "@babel/parser" "^7.20.0" "@babel/types" "^7.20.0" - babel-preset-fbjs "^3.4.0" - metro "0.76.8" - metro-babel-transformer "0.76.8" - metro-cache "0.76.8" - metro-cache-key "0.76.8" - metro-source-map "0.76.8" - metro-transform-plugins "0.76.8" + metro "0.80.9" + metro-babel-transformer "0.80.9" + metro-cache "0.80.9" + metro-cache-key "0.80.9" + metro-minify-terser "0.80.9" + metro-source-map "0.80.9" + metro-transform-plugins "0.80.9" nullthrows "^1.1.1" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro/-/metro-0.76.8.tgz#ba526808b99977ca3f9ac5a7432fd02a340d13a6" - integrity sha512-oQA3gLzrrYv3qKtuWArMgHPbHu8odZOD9AoavrqSFllkPgOtmkBvNNDLCELqv5SjBfqjISNffypg+5UGG3y0pg== [email protected], metro@^0.80.3: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro/-/metro-0.80.9.tgz#de3c2011df62036520d51d040d2dde0d015aecb6" + integrity sha512-Bc57Xf3GO2Xe4UWQsBj/oW6YfLPABEu8jfDVDiNmJvoQW4CO34oDPuYKe4KlXzXhcuNsqOtSxpbjCRRVjhhREg== dependencies: "@babel/code-frame" "^7.0.0" "@babel/core" "^7.20.0" @@ -4549,7 +5000,6 @@ [email protected]: "@babel/traverse" "^7.20.0" "@babel/types" "^7.20.0" accepts "^1.3.7" - async "^3.2.2" chalk "^4.0.0" ci-info "^2.0.0" connect "^3.6.5" @@ -4557,28 +5007,24 @@ [email protected]: denodeify "^1.2.1" error-stack-parser "^2.0.6" graceful-fs "^4.2.4" - hermes-parser "0.12.0" + hermes-parser "0.20.1" image-size "^1.0.2" invariant "^2.2.4" - jest-worker "^27.2.0" + jest-worker "^29.6.3" jsc-safe-url "^0.2.2" lodash.throttle "^4.1.1" - metro-babel-transformer "0.76.8" - metro-cache "0.76.8" - metro-cache-key "0.76.8" - metro-config "0.76.8" - metro-core "0.76.8" - metro-file-map "0.76.8" - metro-inspector-proxy "0.76.8" - metro-minify-terser "0.76.8" - metro-minify-uglify "0.76.8" - metro-react-native-babel-preset "0.76.8" - metro-resolver "0.76.8" - metro-runtime "0.76.8" - metro-source-map "0.76.8" - metro-symbolicate "0.76.8" - metro-transform-plugins "0.76.8" - metro-transform-worker "0.76.8" + metro-babel-transformer "0.80.9" + metro-cache "0.80.9" + metro-cache-key "0.80.9" + metro-config "0.80.9" + metro-core "0.80.9" + metro-file-map "0.80.9" + metro-resolver "0.80.9" + metro-runtime "0.80.9" + metro-source-map "0.80.9" + metro-symbolicate "0.80.9" + metro-transform-plugins "0.80.9" + metro-transform-worker "0.80.9" mime-types "^2.1.27" node-fetch "^2.2.0" nullthrows "^1.1.1" @@ -4625,11 +5071,6 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -mimic-fn@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" - integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== - minimatch@^3.0.2, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -4637,10 +5078,17 @@ minimatch@^3.0.2, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@^5.0.1: - version "5.1.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" - integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== +minimatch@^8.0.2: + version "8.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-8.0.4.tgz#847c1b25c014d4e9a7f68aaf63dedd668a626229" + integrity sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^9.0.4: + version "9.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" + integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== dependencies: brace-expansion "^2.0.1" @@ -4649,6 +5097,16 @@ minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== +minipass@^4.2.4: + version "4.2.8" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.8.tgz#f0010f64393ecfc1d1ccb5f582bcaf45f48e1a3a" + integrity sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ== + +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0": + version "7.1.2" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== + mkdirp@^0.5.1: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" @@ -4656,6 +5114,11 @@ mkdirp@^0.5.1: dependencies: minimist "^1.2.6" +mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + [email protected]: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -4676,11 +5139,6 @@ nanoid@^3.1.23: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== -natural-compare-lite@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" - integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -4720,6 +5178,11 @@ node-fetch@^2.2.0, node-fetch@^2.6.0: dependencies: whatwg-url "^5.0.0" +node-forge@^1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" + integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -4747,22 +5210,15 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -npm-run-path@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" - integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== - dependencies: - path-key "^4.0.0" - nullthrows@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1" integrity sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw== [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.76.8.tgz#ac4c459465b1c0e2c29aaa527e09fc463d3ffec8" - integrity sha512-dlBkJJV5M/msj9KYA9upc+nUWVwuOFFTbu28X6kZeGwcuW+JxaHSBZ70SYQnk5M+j5JbNLR6yKHmgW4M5E7X5g== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.80.9.tgz#4ae3edd807536097674ff943509089f5d4e0649f" + integrity sha512-v9yOxowkZbxWhKOaaTyLjIm1aLy4ebMNcSn4NYJKOAI/Qv+SkfEfszpLr2GIxsccmb2Y2HA9qtsqiIJ80ucpVA== object-assign@^4.1.1: version "4.1.1" @@ -4857,13 +5313,6 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -onetime@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" - integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== - dependencies: - mimic-fn "^4.0.0" - open@^6.2.0: version "6.4.0" resolved "https://registry.yarnpkg.com/open/-/open-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" @@ -4871,15 +5320,13 @@ open@^6.2.0: dependencies: is-wsl "^1.1.0" -open@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/open/-/open-9.1.0.tgz#684934359c90ad25742f5a26151970ff8c6c80b6" - integrity sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg== +open@^7.0.3: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== dependencies: - default-browser "^4.0.0" - define-lazy-prop "^3.0.0" - is-inside-container "^1.0.0" - is-wsl "^2.2.0" + is-docker "^2.0.0" + is-wsl "^2.1.1" optionator@^0.9.3: version "0.9.3" @@ -4988,16 +5435,19 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-key@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" - integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== - path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== +path-scurry@^1.6.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" + integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== + dependencies: + lru-cache "^10.2.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -5008,6 +5458,11 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== +picocolors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" + integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== + picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -5085,7 +5540,7 @@ promise@^8.3.0: dependencies: asap "~2.0.6" -prompts@^2.4.0: +prompts@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== @@ -5093,7 +5548,7 @@ prompts@^2.4.0: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@*, prop-types@^15.7.2, prop-types@^15.8.1: +prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -5117,6 +5572,11 @@ query-string@^7.1.3: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" +querystring@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd" + integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg== + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -5134,10 +5594,10 @@ range-parser@~1.2.1: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -react-devtools-core@^4.27.2: - version "4.28.5" - resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.28.5.tgz#c8442b91f068cdf0c899c543907f7f27d79c2508" - integrity sha512-cq/o30z9W2Wb4rzBefjv5fBalHU0rJGZCHAkf/RHSBWSSYwh8PlQTqqOJmgIIbBtpj27T6FIPXeomIjZtCNVqA== +react-devtools-core@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-5.2.0.tgz#072ecd2d84d3653817cc11e4b16f60a3c2b705f9" + integrity sha512-vZK+/gvxxsieAoAyYaiRIVFxlajb7KXhgBDV7OsoMzaAE+IqGpoxusBjIgq5ibqA2IloKu0p9n7tE68z1xs18A== dependencies: shell-quote "^1.6.1" ws "^7" @@ -5162,10 +5622,10 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== -react-native-gesture-handler@^2.12.1: - version "2.14.0" - resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-2.14.0.tgz#d6aec0d8b2e55c67557fd6107e828c0a1a248be8" - integrity sha512-cOmdaqbpzjWrOLUpX3hdSjsMby5wq3PIEdMq7okJeg9DmCzanysHSrktw1cXWNc/B5MAgxAn9J7Km0/4UIqKAQ== +react-native-gesture-handler@^2.16.2: + version "2.16.2" + resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-2.16.2.tgz#032bd2a07334292d7f6cff1dc9d1ec928f72e26d" + integrity sha512-vGFlrDKlmyI+BT+FemqVxmvO7nqxU33cgXVsn6IKAFishvlG3oV2Ds67D5nPkHMea8T+s1IcuMm0bF8ntZtAyg== dependencies: "@egjs/hammerjs" "^2.0.17" hoist-non-react-statics "^3.3.0" @@ -5173,20 +5633,20 @@ react-native-gesture-handler@^2.12.1: lodash "^4.17.21" prop-types "^15.7.2" -react-native-mmkv@^2.10.2: - version "2.11.0" - resolved "https://registry.yarnpkg.com/react-native-mmkv/-/react-native-mmkv-2.11.0.tgz#51b9985f6a5c09fe9c16d8c1861cc2901856ace1" - integrity sha512-28PdUHjZJmAw3q+8zJDAAdohnZMpDC7WgRUJxACOMkcmJeqS3u5cKS/lSq2bhf1CvaeIiHYHUWiyatUjMRCDQQ== +react-native-mmkv@^2.12.2: + version "2.12.2" + resolved "https://registry.yarnpkg.com/react-native-mmkv/-/react-native-mmkv-2.12.2.tgz#4bba0f5f04e2cf222494cce3a9794ba6a4894dee" + integrity sha512-6058Aq0p57chPrUutLGe9fYoiDVDNMU2PKV+lLFUJ3GhoHvUrLdsS1PDSCLr00yqzL4WJQ7TTzH+V8cpyrNcfg== react-native-pressable-opacity@^1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/react-native-pressable-opacity/-/react-native-pressable-opacity-1.0.10.tgz#799df1a913d3b28f42ada765465fe7723eb7166d" integrity sha512-Py9YH9TlS3Lv1so5JCj6bgiqkeYYGupF4ZImlpoyhhId/t/RiSqR68LlASOHgdctqQuqVJObQiFfzX8oZI9+6w== -react-native-reanimated@^3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-3.8.1.tgz#45c13d4bedebef8df3d5a8756f25072de65960d7" - integrity sha512-EdM0vr3JEaNtqvstqESaPfOBy0gjYBkr1iEolWJ82Ax7io8y9OVUIphgsLKTB36CtR1XtmBw0RZVj7KArc7ZVA== +react-native-reanimated@^3.12.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-3.12.0.tgz#2c768d43971bb19e425c436c892bf68c74b9ccab" + integrity sha512-Bwa4jKL/QttnV8pQYiX+1N5a6XgL8yZtMyH+7UbEaW7ZeNCv1Pxp2PmYu/bP3LafCkmS9Yj/hY2adYNKe58g9A== dependencies: "@babel/plugin-transform-arrow-functions" "^7.0.0-0" "@babel/plugin-transform-nullish-coalescing-operator" "^7.0.0-0" @@ -5197,15 +5657,15 @@ react-native-reanimated@^3.8.1: convert-source-map "^2.0.0" invariant "^2.2.4" -react-native-safe-area-context@^4.8.2: - version "4.8.2" - resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.8.2.tgz#e6b3d8acf3c6afcb4b5db03a97f9c37df7668f65" - integrity sha512-ffUOv8BJQ6RqO3nLml5gxJ6ab3EestPiyWekxdzO/1MQ7NF8fW1Mzh1C5QE9yq573Xefnc7FuzGXjtesZGv7cQ== +react-native-safe-area-context@^4.10.4: + version "4.10.4" + resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.10.4.tgz#2c13448a99fc85f05e7e94549a986ff06fce2a6f" + integrity sha512-rkpI8TALvWfTcCgsxWsVrlxycbCawjnkURocH0JqYT5jr4jZcOG9oAevgEL6EKiyhtGi/l73ZKWr55Im0eTTRg== -react-native-screens@^3.24.0: - version "3.29.0" - resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-3.29.0.tgz#1dee0326defbc1d4ef4e68287abb32a8e6b76b29" - integrity sha512-yB1GoAMamFAcYf4ku94uBPn0/ani9QG7NdI98beJ5cet2YFESYYzuEIuU+kt+CNRcO8qqKeugxlfgAa3HyTqlg== +react-native-screens@^3.31.1: + version "3.31.1" + resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-3.31.1.tgz#909a890f669e32b0fb1b1410278b71ad2f8238f6" + integrity sha512-8fRW362pfZ9y4rS8KY5P3DFScrmwo/vu1RrRMMx0PNHbeC9TLq0Kw1ubD83591yz64gLNHFLTVkTJmWeWCXKtQ== dependencies: react-freeze "^1.0.0" warn-once "^0.1.0" @@ -5215,23 +5675,18 @@ react-native-static-safe-area-insets@^2.2.0: resolved "https://registry.yarnpkg.com/react-native-static-safe-area-insets/-/react-native-static-safe-area-insets-2.2.0.tgz#dd86b6a38f43964fac8df8c0e6bc8e062527786c" integrity sha512-TLTW2e2kRK3COSK8gMZzwp4wHguFCtcO18itDLn5av/xQblXt9ylu84o+qD9aKJCBfvtNzGOvqqTKqC5GJRZ/g== -react-native-vector-icons@^10.0.0: - version "10.0.2" - resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-10.0.2.tgz#44724e0787fb13899efce3510698d1ff69aceefb" - integrity sha512-ZwhUkJhIMkGL3cW7IT4sEEHu2AOzerqsRQ73UzXsB+ecBpVK5bRmp0XswiQleZKZalZfs/WIfWLXLfTQHcQo6A== +react-native-vector-icons@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-10.1.0.tgz#c98a225213700177d23492e32d1dc920b9bae8aa" + integrity sha512-fdQjCHIdoXmRoTZ5gvN1FmT4sGLQ2wmQiNZHKJQUYnE2tkIwjGnxNch+6Nd4lHAACvMWO7LOzBNot2u/zlOmkw== dependencies: prop-types "^15.7.2" yargs "^16.1.1" -react-native-video@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/react-native-video/-/react-native-video-5.2.1.tgz#a17e856759d7e17eee9cbd9df0d05ba22e88d457" - integrity sha512-aJlr9MeTuQ0LpZ4n+EC9RvhoKeiPbLtI2Rxy8u7zo/wzGevbRpWHSBj9xZ5YDBXnAVXzuqyNIkGhdw7bfdIBZw== - dependencies: - deprecated-react-native-prop-types "^2.2.0" - keymirror "^0.1.1" - prop-types "^15.7.2" - shaka-player "^2.5.9" +react-native-video@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/react-native-video/-/react-native-video-6.2.0.tgz#4a22dd836ee3992383992cd9fb561d52fc69d2ec" + integrity sha512-7TWKGBkKrwR9V+SI6NB9YWWDZbto3fpT/02s8RnrFEac0h5aEJYe6NqTmz3TcFmIRSNepg2UsEvWGKNpWn4sCA== react-native-worklets-core@^1.3.3: version "1.3.3" @@ -5240,44 +5695,45 @@ react-native-worklets-core@^1.3.3: dependencies: string-hash-64 "^1.0.3" -react-native@^0.72.3: - version "0.72.7" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.72.7.tgz#5bf5b6e6a7ff2239e1d634ddc17c71d5a31927db" - integrity sha512-dqVFojOO9rOvyFbbM3/v9/GJR355OSuBhEY4NQlMIRc2w0Xch5MT/2uPoq3+OvJ+5h7a8LFAco3fucSffG0FbA== - dependencies: - "@jest/create-cache-key-function" "^29.2.1" - "@react-native-community/cli" "11.3.10" - "@react-native-community/cli-platform-android" "11.3.10" - "@react-native-community/cli-platform-ios" "11.3.10" - "@react-native/assets-registry" "^0.72.0" - "@react-native/codegen" "^0.72.7" - "@react-native/gradle-plugin" "^0.72.11" - "@react-native/js-polyfills" "^0.72.1" - "@react-native/normalize-colors" "^0.72.0" - "@react-native/virtualized-lists" "^0.72.8" +react-native@*, react-native@^0.74.2: + version "0.74.2" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.74.2.tgz#172e64e4e79861e2b3da99b86999e4a4c55b8321" + integrity sha512-EBMBjPPL4/GjHMP4NqsZabT3gI5WU9cSmduABGAGrd8uIcmTZ5F2Ng9k6gFmRm7n8e8CULxDNu98ZpQfBjl7Bw== + dependencies: + "@jest/create-cache-key-function" "^29.6.3" + "@react-native-community/cli" "13.6.8" + "@react-native-community/cli-platform-android" "13.6.8" + "@react-native-community/cli-platform-ios" "13.6.8" + "@react-native/assets-registry" "0.74.84" + "@react-native/codegen" "0.74.84" + "@react-native/community-cli-plugin" "0.74.84" + "@react-native/gradle-plugin" "0.74.84" + "@react-native/js-polyfills" "0.74.84" + "@react-native/normalize-colors" "0.74.84" + "@react-native/virtualized-lists" "0.74.84" abort-controller "^3.0.0" anser "^1.4.9" - base64-js "^1.1.2" - deprecated-react-native-prop-types "^4.2.3" + ansi-regex "^5.0.0" + base64-js "^1.5.1" + chalk "^4.0.0" event-target-shim "^5.0.1" - flow-enums-runtime "^0.0.5" + flow-enums-runtime "^0.0.6" invariant "^2.2.4" - jest-environment-node "^29.2.1" + jest-environment-node "^29.6.3" jsc-android "^250231.0.0" memoize-one "^5.0.0" - metro-runtime "0.76.8" - metro-source-map "0.76.8" + metro-runtime "^0.80.3" + metro-source-map "^0.80.3" mkdirp "^0.5.1" nullthrows "^1.1.1" pretty-format "^26.5.2" promise "^8.3.0" - react-devtools-core "^4.27.2" - react-refresh "^0.4.0" + react-devtools-core "^5.0.0" + react-refresh "^0.14.0" react-shallow-renderer "^16.15.0" regenerator-runtime "^0.13.2" scheduler "0.24.0-canary-efb381bbf-20230505" stacktrace-parser "^0.1.10" - use-sync-external-store "^1.0.0" whatwg-fetch "^3.0.0" ws "^6.2.2" yargs "^17.6.2" @@ -5290,6 +5746,11 @@ [email protected]: loose-envify "^1.1.0" scheduler "^0.21.0" +react-refresh@^0.14.0: + version "0.14.2" + resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.2.tgz#3833da01ce32da470f1f936b9d477da5c7028bf9" + integrity sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA== + react-refresh@^0.4.0: version "0.4.3" resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.4.3.tgz#966f1750c191672e76e16c2efa569150cc73ab53" @@ -5303,10 +5764,10 @@ react-shallow-renderer@^16.15.0: object-assign "^4.1.1" react-is "^16.12.0 || ^17.0.0 || ^18.0.0" -react@^18.2.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" - integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== +react@^18.3.1: + version "18.3.1" + resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891" + integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ== dependencies: loose-envify "^1.1.0" @@ -5441,7 +5902,7 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve@^1.14.2, resolve@^1.22.1: +resolve@^1.14.2, resolve@^1.22.8: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -5486,13 +5947,6 @@ rimraf@~2.6.2: dependencies: glob "^7.1.3" -run-applescript@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-5.0.0.tgz#e11e1c932e055d5c6b40d98374e0268d9b11899c" - integrity sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg== - dependencies: - execa "^5.0.0" - run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -5543,6 +5997,14 @@ scheduler@^0.21.0: dependencies: loose-envify "^1.1.0" +selfsigned@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.4.1.tgz#560d90565442a3ed35b674034cec4e95dceb4ae0" + integrity sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q== + dependencies: + "@types/node-forge" "^1.3.0" + node-forge "^1" + semver@^5.6.0: version "5.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" @@ -5560,6 +6022,11 @@ semver@^7.3.7, semver@^7.5.2: dependencies: lru-cache "^6.0.0" +semver@^7.6.0: + version "7.6.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" + integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== + [email protected]: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -5623,13 +6090,6 @@ [email protected]: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== -shaka-player@^2.5.9: - version "2.5.23" - resolved "https://registry.yarnpkg.com/shaka-player/-/shaka-player-2.5.23.tgz#db92d1c6cf2314f0180a2cec11b0e2f2560336f5" - integrity sha512-3MC9k0OXJGw8AZ4n/ZNCZS2yDxx+3as5KgH6Tx4Q5TRboTBBCu6dYPI5vp1DxKeyU12MBN1Zcbs7AKzXv2EnCg== - dependencies: - eme-encryption-scheme-polyfill "^2.0.1" - shallow-clone@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" @@ -5663,7 +6123,7 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -5848,11 +6308,6 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-final-newline@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" - integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== - strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -5894,14 +6349,19 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -synckit@^0.8.5: - version "0.8.6" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.6.tgz#b69b7fbce3917c2673cbdc0d87fb324db4a5b409" - integrity sha512-laHF2savN6sMeHCjLRkheIU4wo3Zg9Ln5YOjOo7sZ5dVQW8yF5pPE5SIw1dsPhq3TRp1jisKRCdPhfs/1WMqDA== +synckit@^0.8.6: + version "0.8.8" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.8.tgz#fe7fe446518e3d3d49f5e429f443cf08b6edfcd7" + integrity sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ== dependencies: - "@pkgr/utils" "^2.4.2" + "@pkgr/core" "^0.1.0" tslib "^2.6.2" +temp-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" + integrity sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg== + temp@^0.8.4: version "0.8.4" resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.4.tgz#8c97a33a4770072e0a05f919396c7665a7dd59f2" @@ -5937,11 +6397,6 @@ through2@^2.0.1: readable-stream "~2.3.6" xtend "~4.0.1" -titleize@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53" - integrity sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ== - [email protected]: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -5969,12 +6424,17 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +ts-api-utils@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" + integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== + tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.1, tslib@^2.6.0, tslib@^2.6.2: +tslib@^2.0.1, tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== @@ -6052,14 +6512,6 @@ typescript@^5.1.6: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== -uglify-es@^3.1.9: - version "3.3.9" - resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" - integrity sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ== - dependencies: - commander "~2.13.0" - source-map "~0.6.1" - unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" @@ -6108,11 +6560,6 @@ unpipe@~1.0.0: resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== -untildify@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" - integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== - update-browserslist-db@^1.0.13: version "1.0.13" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" @@ -6121,6 +6568,14 @@ update-browserslist-db@^1.0.13: escalade "^3.1.1" picocolors "^1.0.0" +update-browserslist-db@^1.0.16: + version "1.0.16" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356" + integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== + dependencies: + escalade "^3.1.2" + picocolors "^1.0.1" + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -6128,16 +6583,11 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -use-latest-callback@^0.1.7: +use-latest-callback@^0.1.9: version "0.1.9" resolved "https://registry.yarnpkg.com/use-latest-callback/-/use-latest-callback-0.1.9.tgz#10191dc54257e65a8e52322127643a8940271e2a" integrity sha512-CL/29uS74AwreI/f2oz2hLTW7ZqVeV5+gxFeGudzQrgkCytrHw33G4KbnQOrRlAEzzAFXi7dDLMC9zhWcVpzmw== -use-sync-external-store@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" - integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== - util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" diff --git a/package/package.json b/package/package.json index abb001e661..bac059a2e5 100644 --- a/package/package.json +++ b/package/package.json @@ -83,23 +83,23 @@ "registry": "https://registry.npmjs.org/" }, "devDependencies": { - "@expo/config-plugins": "^7.2.5", + "@expo/config-plugins": "^8.0.5", "@jamesacarr/eslint-formatter-github-actions": "^0.2.0", - "@react-native/eslint-config": "^0.72.2", - "@react-native/typescript-config": "^0.74.0", - "@release-it/conventional-changelog": "^7.0.0", - "@shopify/react-native-skia": "^1.2.3", - "@types/react": "^18.2.19", - "@types/react-native": "^0.72.2", + "@react-native/eslint-config": "^0.74.84", + "@react-native/typescript-config": "^0.74.84", + "@release-it/conventional-changelog": "^8.0.1", + "@shopify/react-native-skia": "^1.3.4", + "@types/react": "^18.3.3", + "@types/react-native": "^0.73.0", "eslint": "^8.46.0", - "eslint-plugin-prettier": "^5.0.0", + "eslint-plugin-prettier": "^5.1.3", "prettier": "^3.0.1", - "react": "^18.2.0", - "react-native": "^0.72.3", - "react-native-builder-bob": "^0.21.3", - "react-native-reanimated": "^3.8.1", + "react": "^18.3.1", + "react-native": "^0.74.2", + "react-native-builder-bob": "^0.23.2", + "react-native-reanimated": "^3.12.0", "react-native-worklets-core": "^1.3.3", - "release-it": "^16.1.3", + "release-it": "^17.3.0", "typescript": "^5.1.6" }, "peerDependencies": { diff --git a/package/yarn.lock b/package/yarn.lock index 1673f51532..39e647cc07 100644 --- a/package/yarn.lock +++ b/package/yarn.lock @@ -39,6 +39,14 @@ "@babel/highlight" "^7.23.4" chalk "^2.4.2" +"@babel/code-frame@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" + integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== + dependencies: + "@babel/highlight" "^7.24.7" + picocolors "^1.0.0" + "@babel/code-frame@~7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" @@ -91,6 +99,16 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" +"@babel/generator@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.7.tgz#1654d01de20ad66b4b4d99c135471bc654c55e6d" + integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA== + dependencies: + "@babel/types" "^7.24.7" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" @@ -98,6 +116,13 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-annotate-as-pure@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz#5373c7bc8366b12a033b4be1ac13a206c6656aab" + integrity sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-builder-binary-assignment-operator-visitor@^7.22.15": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz#5426b109cf3ad47b91120f8328d8ab1be8b0b956" @@ -146,6 +171,21 @@ "@babel/helper-split-export-declaration" "^7.22.6" semver "^6.3.1" +"@babel/helper-create-class-features-plugin@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.7.tgz#2eaed36b3a1c11c53bdf80d53838b293c52f5b3b" + integrity sha512-kTkaDl7c9vO80zeX1rJxnuRpEsD5tA81yh11X1gQo+PhSti3JS+7qeZo9U4RHobKRiFPKaGK3svUAeb8D0Q7eg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.7" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-function-name" "^7.24.7" + "@babel/helper-member-expression-to-functions" "^7.24.7" + "@babel/helper-optimise-call-expression" "^7.24.7" + "@babel/helper-replace-supers" "^7.24.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + semver "^6.3.1" + "@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.22.15", "@babel/helper-create-regexp-features-plugin@^7.22.5": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz#5ee90093914ea09639b01c711db0d6775e558be1" @@ -171,6 +211,13 @@ resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== +"@babel/helper-environment-visitor@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9" + integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-function-name@^7.22.5", "@babel/helper-function-name@^7.23.0": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" @@ -179,6 +226,14 @@ "@babel/template" "^7.22.15" "@babel/types" "^7.23.0" +"@babel/helper-function-name@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2" + integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA== + dependencies: + "@babel/template" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-hoist-variables@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" @@ -186,6 +241,13 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-hoist-variables@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee" + integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-member-expression-to-functions@^7.22.15", "@babel/helper-member-expression-to-functions@^7.23.0": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz#9263e88cc5e41d39ec18c9a3e0eced59a3e7d366" @@ -193,6 +255,14 @@ dependencies: "@babel/types" "^7.23.0" +"@babel/helper-member-expression-to-functions@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.7.tgz#67613d068615a70e4ed5101099affc7a41c5225f" + integrity sha512-LGeMaf5JN4hAT471eJdBs/GK1DoYIJ5GCtZN/EsL6KUiiDZOvO/eKE11AMZJa2zP4zk4qe9V2O/hxAmkRc8p6w== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-module-imports@^7.22.15": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" @@ -218,6 +288,13 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-optimise-call-expression@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz#8b0a0456c92f6b323d27cfd00d1d664e76692a0f" + integrity sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" @@ -228,6 +305,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz#945681931a52f15ce879fd5b86ce2dae6d3d7f2a" integrity sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w== +"@babel/helper-plugin-utils@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz#98c84fe6fe3d0d3ae7bfc3a5e166a46844feb2a0" + integrity sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg== + "@babel/helper-remap-async-to-generator@^7.18.9", "@babel/helper-remap-async-to-generator@^7.22.20": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz#7b68e1cb4fa964d2996fd063723fb48eca8498e0" @@ -255,6 +337,15 @@ "@babel/helper-member-expression-to-functions" "^7.23.0" "@babel/helper-optimise-call-expression" "^7.22.5" +"@babel/helper-replace-supers@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.24.7.tgz#f933b7eed81a1c0265740edc91491ce51250f765" + integrity sha512-qTAxxBM81VEyoAY0TtLrx1oAEJc09ZK67Q9ljQToqCnA+55eNwCORaxlKyu+rNfX86o8OXRUSNUnrtsAZXM9sg== + dependencies: + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-member-expression-to-functions" "^7.24.7" + "@babel/helper-optimise-call-expression" "^7.24.7" + "@babel/helper-simple-access@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" @@ -269,6 +360,14 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-skip-transparent-expression-wrappers@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz#5f8fa83b69ed5c27adc56044f8be2b3ea96669d9" + integrity sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-split-export-declaration@^7.22.6": version "7.22.6" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" @@ -276,16 +375,33 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-split-export-declaration@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856" + integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-string-parser@^7.23.4": version "7.23.4" resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83" integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== +"@babel/helper-string-parser@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2" + integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg== + "@babel/helper-validator-identifier@^7.22.20": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== + "@babel/helper-validator-option@^7.22.15", "@babel/helper-validator-option@^7.23.5": version "7.23.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" @@ -318,11 +434,26 @@ chalk "^2.4.2" js-tokens "^4.0.0" +"@babel/highlight@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" + integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== + dependencies: + "@babel/helper-validator-identifier" "^7.24.7" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + "@babel/parser@^7.13.16", "@babel/parser@^7.20.0", "@babel/parser@^7.22.15", "@babel/parser@^7.23.6": version "7.23.6" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.6.tgz#ba1c9e512bda72a47e285ae42aff9d2a635a9e3b" integrity sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ== +"@babel/parser@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" + integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.23.3.tgz#5cd1c87ba9380d0afb78469292c954fee5d2411a" @@ -357,7 +488,7 @@ "@babel/helper-remap-async-to-generator" "^7.18.9" "@babel/plugin-syntax-async-generators" "^7.8.4" -"@babel/plugin-proposal-class-properties@^7.0.0", "@babel/plugin-proposal-class-properties@^7.13.0", "@babel/plugin-proposal-class-properties@^7.17.12", "@babel/plugin-proposal-class-properties@^7.18.0": +"@babel/plugin-proposal-class-properties@^7.13.0", "@babel/plugin-proposal-class-properties@^7.17.12", "@babel/plugin-proposal-class-properties@^7.18.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== @@ -373,6 +504,14 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-export-default-from" "^7.23.3" +"@babel/plugin-proposal-logical-assignment-operators@^7.18.0": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz#dfbcaa8f7b4d37b51e8bfb46d94a5aea2bb89d83" + integrity sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug== + dependencies: + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8", "@babel/plugin-proposal-nullish-coalescing-operator@^7.18.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" @@ -389,7 +528,7 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-proposal-object-rest-spread@^7.0.0", "@babel/plugin-proposal-object-rest-spread@^7.20.0": +"@babel/plugin-proposal-object-rest-spread@^7.20.0": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a" integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg== @@ -429,7 +568,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-class-properties@^7.0.0", "@babel/plugin-syntax-class-properties@^7.12.13": +"@babel/plugin-syntax-class-properties@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== @@ -464,7 +603,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.12.1", "@babel/plugin-syntax-flow@^7.18.0", "@babel/plugin-syntax-flow@^7.23.3": +"@babel/plugin-syntax-flow@^7.12.1", "@babel/plugin-syntax-flow@^7.18.0", "@babel/plugin-syntax-flow@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.23.3.tgz#084564e0f3cc21ea6c70c44cff984a1c0509729a" integrity sha512-YZiAIpkJAwQXBJLIQbRFayR5c+gJ35Vcz3bg954k7cd73zqjvhacJuL9RbrzPz8qPmZdgqP6EUKwy0PCNhaaPA== @@ -499,7 +638,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.23.3": +"@babel/plugin-syntax-jsx@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz#8f2e4f8a9b5f9aa16067e142c1ac9cd9f810f473" integrity sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg== @@ -534,7 +673,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.8.3": +"@babel/plugin-syntax-object-rest-spread@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== @@ -624,7 +763,7 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-remap-async-to-generator" "^7.22.20" -"@babel/plugin-transform-block-scoped-functions@^7.0.0", "@babel/plugin-transform-block-scoped-functions@^7.23.3": +"@babel/plugin-transform-block-scoped-functions@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.23.3.tgz#fe1177d715fb569663095e04f3598525d98e8c77" integrity sha512-vI+0sIaPIO6CNuM9Kk5VmXcMVRiOpDh7w2zZt9GXzmE/9KD70CUEVhvPR/etAeNK/FAEkhxQtXOzVF3EuRL41A== @@ -678,7 +817,7 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/template" "^7.22.15" -"@babel/plugin-transform-destructuring@^7.0.0", "@babel/plugin-transform-destructuring@^7.20.0", "@babel/plugin-transform-destructuring@^7.23.3": +"@babel/plugin-transform-destructuring@^7.20.0", "@babel/plugin-transform-destructuring@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.3.tgz#8c9ee68228b12ae3dff986e56ed1ba4f3c446311" integrity sha512-n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw== @@ -724,7 +863,7 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" -"@babel/plugin-transform-flow-strip-types@^7.0.0", "@babel/plugin-transform-flow-strip-types@^7.20.0", "@babel/plugin-transform-flow-strip-types@^7.23.3": +"@babel/plugin-transform-flow-strip-types@^7.20.0", "@babel/plugin-transform-flow-strip-types@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.23.3.tgz#cfa7ca159cc3306fab526fc67091556b51af26ff" integrity sha512-26/pQTf9nQSNVJCrLB1IkHUKyPxR+lMrH2QDPG89+Znu9rAMbtrybdbWeE9bb7gzjmE5iXHEY+e0HUwM6Co93Q== @@ -732,7 +871,7 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-flow" "^7.23.3" -"@babel/plugin-transform-for-of@^7.0.0", "@babel/plugin-transform-for-of@^7.23.6": +"@babel/plugin-transform-for-of@^7.23.6": version "7.23.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.6.tgz#81c37e24171b37b370ba6aaffa7ac86bcb46f94e" integrity sha512-aYH4ytZ0qSuBbpfhuofbg/e96oQ7U2w1Aw/UQmKT+1l39uEhUPoFS3fHevDc1G0OvewyDudfMKY1OulczHzWIw== @@ -772,7 +911,7 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-transform-member-expression-literals@^7.0.0", "@babel/plugin-transform-member-expression-literals@^7.23.3": +"@babel/plugin-transform-member-expression-literals@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.23.3.tgz#e37b3f0502289f477ac0e776b05a833d853cabcc" integrity sha512-sC3LdDBDi5x96LA+Ytekz2ZPk8i/Ck+DEuDbRAll5rknJ5XRTSaPKEYwomLcs1AA8wg9b3KjIQRsnApj+q51Ag== @@ -873,7 +1012,7 @@ "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-transform-parameters" "^7.23.3" -"@babel/plugin-transform-object-super@^7.0.0", "@babel/plugin-transform-object-super@^7.23.3": +"@babel/plugin-transform-object-super@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.23.3.tgz#81fdb636dcb306dd2e4e8fd80db5b2362ed2ebcd" integrity sha512-BwQ8q0x2JG+3lxCVFohg+KbQM7plfpBwThdW9A6TMtWwLsbDA01Ek2Zb/AgDN39BiZsExm4qrXxjk+P1/fzGrA== @@ -914,6 +1053,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" +"@babel/plugin-transform-private-methods@^7.22.5": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.7.tgz#e6318746b2ae70a59d023d5cc1344a2ba7a75f5e" + integrity sha512-COTCOkG2hn4JKGEKBADkA8WNb35TGkkRbI5iT845dB+NyqgO8Hn+ajPbSnIQznneJTa3d30scb6iz/DhH8GsJQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-transform-private-methods@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.23.3.tgz#b2d7a3c97e278bfe59137a978d53b2c2e038c0e4" @@ -922,6 +1069,16 @@ "@babel/helper-create-class-features-plugin" "^7.22.15" "@babel/helper-plugin-utils" "^7.22.5" +"@babel/plugin-transform-private-property-in-object@^7.22.11": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.7.tgz#4eec6bc701288c1fab5f72e6a4bbc9d67faca061" + integrity sha512-9z76mxwnwFxMyxZWEgdgECQglF2Q7cFLm0kMf8pGwt+GSJsY0cONKj/UuO4bOH0w/uAel3ekS4ra5CEAyJRmDA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.7" + "@babel/helper-create-class-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-transform-private-property-in-object@^7.23.4": version "7.23.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz#3ec711d05d6608fd173d9b8de39872d8dbf68bf5" @@ -932,7 +1089,7 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" -"@babel/plugin-transform-property-literals@^7.0.0", "@babel/plugin-transform-property-literals@^7.23.3": +"@babel/plugin-transform-property-literals@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.23.3.tgz#54518f14ac4755d22b92162e4a852d308a560875" integrity sha512-jR3Jn3y7cZp4oEWPFAlRsSWjxKe4PZILGBSd4nis1TsC5qeSpb+nrtihJuDhNI7QHiVbUaiXa0X2RZY3/TI6Nw== @@ -1042,13 +1199,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-template-literals@^7.0.0", "@babel/plugin-transform-template-literals@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.23.3.tgz#5f0f028eb14e50b5d0f76be57f90045757539d07" - integrity sha512-Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/plugin-transform-template-literals@^7.0.0-0": version "7.24.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.1.tgz#15e2166873a30d8617e3e2ccadb86643d327aab7" @@ -1056,6 +1206,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.0" +"@babel/plugin-transform-template-literals@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.23.3.tgz#5f0f028eb14e50b5d0f76be57f90045757539d07" + integrity sha512-Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-transform-typeof-symbol@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.23.3.tgz#9dfab97acc87495c0c449014eb9c547d8966bca4" @@ -1284,6 +1441,15 @@ "@babel/parser" "^7.22.15" "@babel/types" "^7.22.15" +"@babel/template@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.7.tgz#02efcee317d0609d2c07117cb70ef8fb17ab7315" + integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/traverse@^7.20.0", "@babel/traverse@^7.23.6": version "7.23.6" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.6.tgz#b53526a2367a0dd6edc423637f3d2d0f2521abc5" @@ -1300,6 +1466,22 @@ debug "^4.3.1" globals "^11.1.0" +"@babel/traverse@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.7.tgz#de2b900163fa741721ba382163fe46a936c40cf5" + integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.24.7" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-function-name" "^7.24.7" + "@babel/helper-hoist-variables" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/types" "^7.24.7" + debug "^4.3.1" + globals "^11.1.0" + "@babel/types@^7.20.0", "@babel/types@^7.22.15", "@babel/types@^7.22.19", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.4", "@babel/types@^7.23.6", "@babel/types@^7.4.4": version "7.23.6" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.6.tgz#be33fdb151e1f5a56877d704492c240fc71c7ccd" @@ -1309,14 +1491,28 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" -"@eslint-community/eslint-utils@^4.2.0": +"@babel/types@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2" + integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q== + dependencies: + "@babel/helper-string-parser" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" + to-fast-properties "^2.0.0" + +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.10.0": + version "4.10.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.1.tgz#361461e5cb3845d874e61731c11cfedd664d83a0" + integrity sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA== + +"@eslint-community/regexpp@^4.6.1": version "4.10.0" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== @@ -1341,46 +1537,31 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.55.0.tgz#b721d52060f369aa259cf97392403cb9ce892ec6" integrity sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA== -"@expo/config-plugins@^7.2.5": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-7.8.4.tgz#533b5d536c1dc8b5544d64878b51bda28f2e1a1f" - integrity sha512-hv03HYxb/5kX8Gxv/BTI8TLc9L06WzqAfHRRXdbar4zkLcP2oTzvsLEF4/L/TIpD3rsnYa0KU42d0gWRxzPCJg== +"@expo/config-plugins@^8.0.5": + version "8.0.5" + resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-8.0.5.tgz#fc165e59786e399dd4694aae2a7cd716ab8a496c" + integrity sha512-VGseKX1dYvaf2qHUDGzIQwSOJrO5fomH0gE5cKSQyi6wn+Q6rcV2Dj2E5aga+9aKNPL6FxZ0dqRFC3t2sbhaSA== dependencies: - "@expo/config-types" "^50.0.0-alpha.1" - "@expo/fingerprint" "^0.6.0" + "@expo/config-types" "^51.0.0-unreleased" "@expo/json-file" "~8.3.0" "@expo/plist" "^0.1.0" "@expo/sdk-runtime-versions" "^1.0.0" - "@react-native/normalize-color" "^2.0.0" chalk "^4.1.2" debug "^4.3.1" find-up "~5.0.0" getenv "^1.0.0" glob "7.1.6" resolve-from "^5.0.0" - semver "^7.5.3" + semver "^7.5.4" slash "^3.0.0" slugify "^1.6.6" xcode "^3.0.1" xml2js "0.6.0" -"@expo/config-types@^50.0.0-alpha.1": - version "50.0.0" - resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-50.0.0.tgz#b534d3ec997ec60f8af24f6ad56244c8afc71a0b" - integrity sha512-0kkhIwXRT6EdFDwn+zTg9R2MZIAEYGn1MVkyRohAd+C9cXOb5RA8WLQi7vuxKF9m1SMtNAUrf0pO+ENK0+/KSw== - -"@expo/fingerprint@^0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@expo/fingerprint/-/fingerprint-0.6.0.tgz#77366934673d4ecea37284109b4dd67f9e6a7487" - integrity sha512-KfpoVRTMwMNJ/Cf5o+Ou8M/Y0EGSTqK+rbi70M2Y0K2qgWNfMJ1gm6sYO9uc8lcTr7YSYM1Rme3dk7QXhpScNA== - dependencies: - "@expo/spawn-async" "^1.5.0" - chalk "^4.1.2" - debug "^4.3.4" - find-up "^5.0.0" - minimatch "^3.0.4" - p-limit "^3.1.0" - resolve-from "^5.0.0" +"@expo/config-types@^51.0.0-unreleased": + version "51.0.1" + resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-51.0.1.tgz#39f490f97e1ede70ed7e88edc28f073880637a76" + integrity sha512-5JuzUFobFImrUgnq93LeucP44ZMxq8WMXmCtIUf3ZC3mJSwjvvHJBMO2fS/sIlmgvvQk9eq4VnX06/7tgDFMSg== "@expo/json-file@~8.3.0": version "8.3.0" @@ -1405,13 +1586,6 @@ resolved "https://registry.yarnpkg.com/@expo/sdk-runtime-versions/-/sdk-runtime-versions-1.0.0.tgz#d7ebd21b19f1c6b0395e50d78da4416941c57f7c" integrity sha512-Doz2bfiPndXYFPMRwPyGa1k5QaKDVpY806UJj570epIiMzWaYyCtobasyfC++qfIXVb5Ocy7r3tP9d62hAQ7IQ== -"@expo/spawn-async@^1.5.0": - version "1.7.2" - resolved "https://registry.yarnpkg.com/@expo/spawn-async/-/spawn-async-1.7.2.tgz#fcfe66c3e387245e72154b1a7eae8cada6a47f58" - integrity sha512-QdWi16+CHB9JYP7gma19OVVg0BFkvU8zNj9GjWorYI8Iv8FUxjOCcYRuAmX4s/h91e4e7BPsskc8cSrZYho9Ew== - dependencies: - cross-spawn "^7.0.3" - "@fastify/busboy@^2.0.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.0.tgz#0709e9f4cb252351c609c6e6d8d6779a8d25edff" @@ -1458,6 +1632,16 @@ resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c" integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg== +"@inquirer/figures@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.3.tgz#1227cc980f88e6d6ab85abadbf164f5038041edd" + integrity sha512-ErXXzENMH5pJt5/ssXV0DfWUZqly8nGzf0UcBV9xTnP+KyffE2mqyxIMBrZ8ijQck2nU0TQm40EQB53YreyWHw== + +"@isaacs/ttlcache@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@isaacs/ttlcache/-/ttlcache-1.4.1.tgz#21fb23db34e9b6220c6ba023a0118a2dd3461ea2" + integrity sha512-RQgQ4uQ+pLbqXfOmieB91ejmLwvSgv9nLx6sT6sD83s7umBypgg+OIBOBbEUiJXrfpnp9j0mRhYYdzp9uqq3lA== + "@jamesacarr/eslint-formatter-github-actions@^0.2.0": version "0.2.0" resolved "https://registry.yarnpkg.com/@jamesacarr/eslint-formatter-github-actions/-/eslint-formatter-github-actions-0.2.0.tgz#5b4a4fae22cd354b3cbb2bad4c972edbe04e8fef" @@ -1465,7 +1649,7 @@ dependencies: "@actions/core" "^1.10.0" -"@jest/create-cache-key-function@^29.2.1": +"@jest/create-cache-key-function@^29.6.3": version "29.7.0" resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-29.7.0.tgz#793be38148fab78e65f40ae30c36785f4ad859f0" integrity sha512-4QqS3LY5PBmTRHj9sAg1HLoPzqAI0uOX6wI/TRqHIcOxlFidy6YEmCQJk6FSZjNLGCeubDMfmkWL+qaLKhSGQA== @@ -1512,17 +1696,6 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@jest/types@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.5.1.tgz#3c79ec4a8ba61c170bf937bcf9e98a9df175ec80" - integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - "@jest/types@^29.6.3": version "29.6.3" resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" @@ -1544,6 +1717,15 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + "@jridgewell/resolve-uri@^3.1.0": version "3.1.1" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" @@ -1554,6 +1736,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + "@jridgewell/source-map@^0.3.3": version "0.3.5" resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.5.tgz#a3bb4d5c6825aab0d281268f47f6ad5853431e91" @@ -1575,12 +1762,20 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@ljharb/through@^2.3.9": - version "2.3.11" - resolved "https://registry.yarnpkg.com/@ljharb/through/-/through-2.3.11.tgz#783600ff12c06f21a76cc26e33abd0b1595092f9" - integrity sha512-ccfcIDlogiXNq5KcbAwbaO7lMh3Tm1i3khMPYpxlK8hH/W53zN81KM9coerRLOnTGu3nfXIniAmQbRI9OxbC0w== +"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== dependencies: - call-bind "^1.0.2" + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@ljharb/through@^2.3.13": + version "2.3.13" + resolved "https://registry.yarnpkg.com/@ljharb/through/-/through-2.3.13.tgz#b7e4766e0b65aa82e529be945ab078de79874edc" + integrity sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ== + dependencies: + call-bind "^1.0.7" "@nicolo-ribaudo/[email protected]": version "5.1.1-v1" @@ -1610,128 +1805,105 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@octokit/auth-token@^3.0.0": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-3.0.4.tgz#70e941ba742bdd2b49bdb7393e821dea8520a3db" - integrity sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ== - -"@octokit/core@^4.2.1": - version "4.2.4" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-4.2.4.tgz#d8769ec2b43ff37cc3ea89ec4681a20ba58ef907" - integrity sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ== - dependencies: - "@octokit/auth-token" "^3.0.0" - "@octokit/graphql" "^5.0.0" - "@octokit/request" "^6.0.0" - "@octokit/request-error" "^3.0.0" - "@octokit/types" "^9.0.0" +"@octokit/auth-token@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-4.0.0.tgz#40d203ea827b9f17f42a29c6afb93b7745ef80c7" + integrity sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA== + +"@octokit/core@^5.0.2": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-5.2.0.tgz#ddbeaefc6b44a39834e1bb2e58a49a117672a7ea" + integrity sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg== + dependencies: + "@octokit/auth-token" "^4.0.0" + "@octokit/graphql" "^7.1.0" + "@octokit/request" "^8.3.1" + "@octokit/request-error" "^5.1.0" + "@octokit/types" "^13.0.0" before-after-hook "^2.2.0" universal-user-agent "^6.0.0" -"@octokit/endpoint@^7.0.0": - version "7.0.6" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-7.0.6.tgz#791f65d3937555141fb6c08f91d618a7d645f1e2" - integrity sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg== +"@octokit/endpoint@^9.0.1": + version "9.0.5" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-9.0.5.tgz#e6c0ee684e307614c02fc6ac12274c50da465c44" + integrity sha512-ekqR4/+PCLkEBF6qgj8WqJfvDq65RH85OAgrtnVp1mSxaXF03u2xW/hUdweGS5654IlC0wkNYC18Z50tSYTAFw== dependencies: - "@octokit/types" "^9.0.0" - is-plain-object "^5.0.0" + "@octokit/types" "^13.1.0" universal-user-agent "^6.0.0" -"@octokit/graphql@^5.0.0": - version "5.0.6" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-5.0.6.tgz#9eac411ac4353ccc5d3fca7d76736e6888c5d248" - integrity sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw== +"@octokit/graphql@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-7.1.0.tgz#9bc1c5de92f026648131f04101cab949eeffe4e0" + integrity sha512-r+oZUH7aMFui1ypZnAvZmn0KSqAUgE1/tUXIWaqUCa1758ts/Jio84GZuzsvUkme98kv0WFY8//n0J1Z+vsIsQ== dependencies: - "@octokit/request" "^6.0.0" - "@octokit/types" "^9.0.0" + "@octokit/request" "^8.3.0" + "@octokit/types" "^13.0.0" universal-user-agent "^6.0.0" -"@octokit/openapi-types@^18.0.0": - version "18.1.1" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-18.1.1.tgz#09bdfdabfd8e16d16324326da5148010d765f009" - integrity sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw== +"@octokit/openapi-types@^22.2.0": + version "22.2.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-22.2.0.tgz#75aa7dcd440821d99def6a60b5f014207ae4968e" + integrity sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg== -"@octokit/plugin-paginate-rest@^6.1.2": - version "6.1.2" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz#f86456a7a1fe9e58fec6385a85cf1b34072341f8" - integrity sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ== +"@octokit/[email protected]": + version "11.3.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.1.tgz#fe92d04b49f134165d6fbb716e765c2f313ad364" + integrity sha512-ryqobs26cLtM1kQxqeZui4v8FeznirUsksiA+RYemMPJ7Micju0WSkv50dBksTuZks9O5cg4wp+t8fZ/cLY56g== dependencies: - "@octokit/tsconfig" "^1.0.2" - "@octokit/types" "^9.2.3" + "@octokit/types" "^13.5.0" -"@octokit/plugin-request-log@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85" - integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== +"@octokit/plugin-request-log@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-4.0.1.tgz#98a3ca96e0b107380664708111864cb96551f958" + integrity sha512-GihNqNpGHorUrO7Qa9JbAl0dbLnqJVrV8OXe2Zm5/Y4wFkZQDfTreBzVmiRfJVfE4mClXdihHnbpyyO9FSX4HA== -"@octokit/plugin-rest-endpoint-methods@^7.1.2": - version "7.2.3" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.2.3.tgz#37a84b171a6cb6658816c82c4082ac3512021797" - integrity sha512-I5Gml6kTAkzVlN7KCtjOM+Ruwe/rQppp0QU372K1GP7kNOYEKe8Xn5BW4sE62JAHdwpq95OQK/qGNyKQMUzVgA== +"@octokit/[email protected]": + version "13.2.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.2.tgz#af8e5dd2cddfea576f92ffaf9cb84659f302a638" + integrity sha512-EI7kXWidkt3Xlok5uN43suK99VWqc8OaIMktY9d9+RNKl69juoTyxmLoWPIZgJYzi41qj/9zU7G/ljnNOJ5AFA== dependencies: - "@octokit/types" "^10.0.0" + "@octokit/types" "^13.5.0" -"@octokit/request-error@^3.0.0": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-3.0.3.tgz#ef3dd08b8e964e53e55d471acfe00baa892b9c69" - integrity sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ== +"@octokit/request-error@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-5.1.0.tgz#ee4138538d08c81a60be3f320cd71063064a3b30" + integrity sha512-GETXfE05J0+7H2STzekpKObFe765O5dlAKUTLNGeH+x47z7JjXHfsHKo5z21D/o/IOZTUEI6nyWyR+bZVP/n5Q== dependencies: - "@octokit/types" "^9.0.0" + "@octokit/types" "^13.1.0" deprecation "^2.0.0" once "^1.4.0" -"@octokit/request@^6.0.0": - version "6.2.8" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-6.2.8.tgz#aaf480b32ab2b210e9dadd8271d187c93171d8eb" - integrity sha512-ow4+pkVQ+6XVVsekSYBzJC0VTVvh/FCTUUgTsboGq+DTeWdyIFV8WSCdo0RIxk6wSkBTHqIK1mYuY7nOBXOchw== +"@octokit/request@^8.3.0", "@octokit/request@^8.3.1": + version "8.4.0" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-8.4.0.tgz#7f4b7b1daa3d1f48c0977ad8fffa2c18adef8974" + integrity sha512-9Bb014e+m2TgBeEJGEbdplMVWwPmL1FPtggHQRkV+WVsMggPtEkLKPlcVYm/o8xKLkpJ7B+6N8WfQMtDLX2Dpw== dependencies: - "@octokit/endpoint" "^7.0.0" - "@octokit/request-error" "^3.0.0" - "@octokit/types" "^9.0.0" - is-plain-object "^5.0.0" - node-fetch "^2.6.7" + "@octokit/endpoint" "^9.0.1" + "@octokit/request-error" "^5.1.0" + "@octokit/types" "^13.1.0" universal-user-agent "^6.0.0" -"@octokit/[email protected]": - version "19.0.13" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-19.0.13.tgz#e799393264edc6d3c67eeda9e5bd7832dcf974e4" - integrity sha512-/EzVox5V9gYGdbAI+ovYj3nXQT1TtTHRT+0eZPcuC05UFSWO3mdO9UY1C0i2eLF9Un1ONJkAk+IEtYGAC+TahA== +"@octokit/[email protected]": + version "20.1.1" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-20.1.1.tgz#ec775864f53fb42037a954b9a40d4f5275b3dc95" + integrity sha512-MB4AYDsM5jhIHro/dq4ix1iWTLGToIGk6cWF5L6vanFaMble5jTX/UBQyiv05HsWnwUtY8JrfHy2LWfKwihqMw== dependencies: - "@octokit/core" "^4.2.1" - "@octokit/plugin-paginate-rest" "^6.1.2" - "@octokit/plugin-request-log" "^1.0.4" - "@octokit/plugin-rest-endpoint-methods" "^7.1.2" + "@octokit/core" "^5.0.2" + "@octokit/plugin-paginate-rest" "11.3.1" + "@octokit/plugin-request-log" "^4.0.0" + "@octokit/plugin-rest-endpoint-methods" "13.2.2" -"@octokit/tsconfig@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@octokit/tsconfig/-/tsconfig-1.0.2.tgz#59b024d6f3c0ed82f00d08ead5b3750469125af7" - integrity sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA== - -"@octokit/types@^10.0.0": - version "10.0.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-10.0.0.tgz#7ee19c464ea4ada306c43f1a45d444000f419a4a" - integrity sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg== - dependencies: - "@octokit/openapi-types" "^18.0.0" - -"@octokit/types@^9.0.0", "@octokit/types@^9.2.3": - version "9.3.2" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-9.3.2.tgz#3f5f89903b69f6a2d196d78ec35f888c0013cac5" - integrity sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA== +"@octokit/types@^13.0.0", "@octokit/types@^13.1.0", "@octokit/types@^13.5.0": + version "13.5.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-13.5.0.tgz#4796e56b7b267ebc7c921dcec262b3d5bfb18883" + integrity sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ== dependencies: - "@octokit/openapi-types" "^18.0.0" + "@octokit/openapi-types" "^22.2.0" -"@pkgr/utils@^2.4.2": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.4.2.tgz#9e638bbe9a6a6f165580dc943f138fd3309a2cbc" - integrity sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw== - 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" +"@pkgr/core@^0.1.0": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" + integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== "@pnpm/config.env-replace@^1.1.0": version "1.1.0" @@ -1754,132 +1926,122 @@ "@pnpm/network.ca-file" "^1.0.1" config-chain "^1.1.11" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-11.3.10.tgz#70d14dd998ce8ad532266b36a0e5cafe22d300ac" - integrity sha512-g6QjW+DSqoWRHzmIQW3AH22k1AnynWuOdy2YPwYEGgPddTeXZtJphIpEVwDOiC0L4mZv2VmiX33/cGNUwO0cIA== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-13.6.8.tgz#95ce964047f005152ac100394b6dcd5d2cc2a474" + integrity sha512-B1uxlm1N4BQuWFvBL3yRl3LVvydjswsdbTi7tMrHMtSxfRio1p9HjcmDzlzKco09Y+8qBGgakm3jcMZGLbhXQQ== dependencies: - "@react-native-community/cli-tools" "11.3.10" + "@react-native-community/cli-tools" "13.6.8" chalk "^4.1.2" execa "^5.0.0" - prompts "^2.4.0" + fast-glob "^3.3.2" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-11.3.10.tgz#753510a80a98b136fec852e1ea5fa655c13dbd17" - integrity sha512-YYu14nm1JYLS6mDRBz78+zDdSFudLBFpPkhkOoj4LuBhNForQBIqFFHzQbd9/gcguJxfW3vlYSnudfaUI7oGLg== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-13.6.8.tgz#6829ea7cdc237776c300be06f84c222bf17cf4c5" + integrity sha512-RabCkIsWdP4Ex/sf1uSP9qxc30utm+0uIJAjrZkNQynm7T4Lyqn/kT3LKm4yM6M0Qk61YxGguiaXF4601vAduw== dependencies: - "@react-native-community/cli-tools" "11.3.10" + "@react-native-community/cli-tools" "13.6.8" chalk "^4.1.2" cosmiconfig "^5.1.0" deepmerge "^4.3.0" - glob "^7.1.3" + fast-glob "^3.3.2" joi "^17.2.1" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-11.3.10.tgz#b16ebf770ba3cc76bf46580f101d00dacf919824" - integrity sha512-kyitGV3RsjlXIioq9lsuawha2GUBPCTAyXV6EBlm3qlyF3dMniB3twEvz+fIOid/e1ZeucH3Tzy5G3qcP8yWoA== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-13.6.8.tgz#d52fccd4b3e0860d96d75ff5b0ebb128bdc93dfd" + integrity sha512-2cS+MX/Su6sVSjqpDftFOXbK7EuPg98xzsPkdPhkQnkZwvXqodK9CAMuDMbx3lBHHtrPrpMbBCpFmPN8iVOnlA== dependencies: serve-static "^1.13.1" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-11.3.10.tgz#161b8fd1b485cd52f7a19b2025696070b9d2b6a1" - integrity sha512-DpMsfCWKZ15L9nFK/SyDvpl5v6MjV+arMHMC1i8kR+DOmf2xWmp/pgMywKk0/u50yGB9GwxBHt3i/S/IMK5Ylg== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-13.6.8.tgz#05f696d94e975e4dcf7f9a1fde32fb43e4bb8a5f" + integrity sha512-/3Vdy9J3hyiu0y3nd/CU3kBqPlTRxnLXg7V6jrA1jbTOlZAMyV9imEkrqEaGK0SMOyMhh9Pipf98Ozhk0Nl4QA== dependencies: - "@react-native-community/cli-config" "11.3.10" - "@react-native-community/cli-platform-android" "11.3.10" - "@react-native-community/cli-platform-ios" "11.3.10" - "@react-native-community/cli-tools" "11.3.10" + "@react-native-community/cli-config" "13.6.8" + "@react-native-community/cli-platform-android" "13.6.8" + "@react-native-community/cli-platform-apple" "13.6.8" + "@react-native-community/cli-platform-ios" "13.6.8" + "@react-native-community/cli-tools" "13.6.8" chalk "^4.1.2" command-exists "^1.2.8" - envinfo "^7.7.2" + deepmerge "^4.3.0" + envinfo "^7.10.0" execa "^5.0.0" hermes-profile-transformer "^0.0.6" - ip "^1.1.5" node-stream-zip "^1.9.1" ora "^5.4.1" - prompts "^2.4.0" semver "^7.5.2" strip-ansi "^5.2.0" - sudo-prompt "^9.0.0" wcwidth "^1.0.1" yaml "^2.2.1" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-11.3.10.tgz#f3d4f069ca472b1d8b4e8132cf9c44097a58ca19" - integrity sha512-vqINuzAlcHS9ImNwJtT43N7kfBQ7ro9A8O1Gpc5TQ0A8V36yGG8eoCHeauayklVVgMZpZL6f6mcoLLr9IOgBZQ== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-13.6.8.tgz#85f10f663bc79f299146e749c48c06ebc4da9e29" + integrity sha512-lZi/OBFuZUj5cLK94oEgtrtmxGoqeYVRcnHXl/R5c4put9PDl+qH2bEMlGZkFiw57ae3UZKr3TMk+1s4jh3FYQ== dependencies: - "@react-native-community/cli-platform-android" "11.3.10" - "@react-native-community/cli-tools" "11.3.10" + "@react-native-community/cli-platform-android" "13.6.8" + "@react-native-community/cli-tools" "13.6.8" chalk "^4.1.2" hermes-profile-transformer "^0.0.6" - ip "^1.1.5" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-11.3.10.tgz#756dd73ad78bf2f20c678683dfc48cb764b1b590" - integrity sha512-RGu9KuDIXnrcNkacSHj5ETTQtp/D/835L6veE2jMigO21p//gnKAjw3AVLCysGr8YXYfThF8OSOALrwNc94puQ== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-13.6.8.tgz#a3672512a9b844f93d6050537c59dd58e1b12f17" + integrity sha512-vWrqeLRRTwp2kO33nbrAgbYn8HR2c2CpIfyVJY9Ckk7HGUSwDyxdcSu7YBvt2ShdfLZH0HctWFNXsgGrfg6BDw== dependencies: - "@react-native-community/cli-tools" "11.3.10" + "@react-native-community/cli-tools" "13.6.8" chalk "^4.1.2" execa "^5.0.0" - glob "^7.1.3" + fast-glob "^3.3.2" + fast-xml-parser "^4.2.4" logkitty "^0.7.1" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-11.3.10.tgz#f8a9bca1181802f12ed15714d5a496e60096cbed" - integrity sha512-JjduMrBM567/j4Hvjsff77dGSLMA0+p9rr0nShlgnKPcc+0J4TDy0hgWpUceM7OG00AdDjpetAPupz0kkAh4cQ== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-apple/-/cli-platform-apple-13.6.8.tgz#4d46a2d6678a7b3264768f97393f082ed9afb264" + integrity sha512-1JPohnlXPqU44zns3ALEzIbH2cKRw6JtEDJERgLuEUbs2r2NeJgqDbKyZ7fTTO8o+pegDnn6+Rr7qGVVOuUzzg== dependencies: - "@react-native-community/cli-tools" "11.3.10" + "@react-native-community/cli-tools" "13.6.8" chalk "^4.1.2" execa "^5.0.0" + fast-glob "^3.3.2" fast-xml-parser "^4.0.12" - glob "^7.1.3" ora "^5.4.1" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-11.3.10.tgz#6ed67dda2518d3dabae20f3b38f66a0a9bd8e962" - integrity sha512-ZYAc5Hc+QVqJgj1XFbpKnIPbSJ9xKcBnfQrRhR+jFyt2DWx85u4bbzY1GSVc/USs0UbSUXv4dqPbnmOJz52EYQ== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-13.6.8.tgz#2de1bd8529825781108c1cbba4f5b25cb062581c" + integrity sha512-/IIcIRM8qaoD7iZqsvtf6Qq1AwtChWYfB9sTn3mTiolZ5Zd5bXH37g+6liPfAICRkj2Ptq3iXmjrDVUQAxrOXw== dependencies: - "@react-native-community/cli-server-api" "11.3.10" - "@react-native-community/cli-tools" "11.3.10" - chalk "^4.1.2" - execa "^5.0.0" - metro "0.76.8" - metro-config "0.76.8" - metro-core "0.76.8" - metro-react-native-babel-transformer "0.76.8" - metro-resolver "0.76.8" - metro-runtime "0.76.8" - readline "^1.3.0" + "@react-native-community/cli-platform-apple" "13.6.8" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-11.3.10.tgz#2c4940d921711f2c78f0b61f126e8dbbbef6277c" - integrity sha512-WEwHWIpqx3gA6Da+lrmq8+z78E1XbxxjBlvHAXevhjJj42N4SO417eZiiUVrFzEFVVJSUee9n9aRa0kUR+0/2w== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-13.6.8.tgz#fc654a2990a5f0b6f0b67ef04b25f699bee63f63" + integrity sha512-Lx664oWTzpVfbKUTy+3GIX7e+Mt5Zn+zdkM4ehllNdik/lbB3tM9Nrg8PSvOfI+tTXs2w55+nIydLfH+0FqJVg== dependencies: - "@react-native-community/cli-debugger-ui" "11.3.10" - "@react-native-community/cli-tools" "11.3.10" + "@react-native-community/cli-debugger-ui" "13.6.8" + "@react-native-community/cli-tools" "13.6.8" compression "^1.7.1" connect "^3.6.5" errorhandler "^1.5.1" nocache "^3.0.1" pretty-format "^26.6.2" serve-static "^1.13.1" - ws "^7.5.1" + ws "^6.2.2" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-11.3.10.tgz#d7bbe3fd8b338004f996f03f53a5373d9caab91c" - integrity sha512-4kCuCwVcGagSrNg9vxMNVhynwpByuC/J5UnKGEet3HuqmoDhQW15m18fJXiehA8J+u9WBvHduefy9nZxO0C06Q== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-13.6.8.tgz#65a9f49ce66f0e639d855e745c8dfa7ae7b6c142" + integrity sha512-1MYlae9EkbjC7DBYOGMH5xF9yDoeNYUKgEdDjL6WAUBoF2gtwiZPM6igLKi/+dhb5sCtC7fiLrLi0Oevdf+RmQ== dependencies: appdirsjs "^1.2.4" chalk "^4.1.2" + execa "^5.0.0" find-up "^5.0.0" mime "^2.4.1" node-fetch "^2.6.0" @@ -1887,123 +2049,242 @@ ora "^5.4.1" semver "^7.5.2" shell-quote "^1.7.3" + sudo-prompt "^9.0.0" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-11.3.10.tgz#cb02186cd247108bcea5ff93c4c97bb3c8dd8f22" - integrity sha512-0FHK/JE7bTn0x1y8Lk5m3RISDHIBQqWLltO2Mf7YQ6cAeKs8iNOJOeKaHJEY+ohjsOyCziw+XSC4cY57dQrwNA== +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-13.6.8.tgz#1c357d3290a48232e3e639d48e43e31e422ce436" + integrity sha512-C4mVByy0i+/NPuPhdMLBR7ubEVkjVS1VwoQu/BoG1crJFNE+167QXAzH01eFbXndsjZaMWmD4Gerx7TYc6lHfA== dependencies: joi "^17.2.1" -"@react-native-community/[email protected]": - version "11.3.10" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-11.3.10.tgz#ea88d20982cfc9ed7a5170d04aeedd2abf092348" - integrity sha512-bIx0t5s9ewH1PlcEcuQUD+UnVrCjPGAfjhVR5Gew565X60nE+GTIHRn70nMv9G4he/amBF+Z+vf5t8SNZEWMwg== - dependencies: - "@react-native-community/cli-clean" "11.3.10" - "@react-native-community/cli-config" "11.3.10" - "@react-native-community/cli-debugger-ui" "11.3.10" - "@react-native-community/cli-doctor" "11.3.10" - "@react-native-community/cli-hermes" "11.3.10" - "@react-native-community/cli-plugin-metro" "11.3.10" - "@react-native-community/cli-server-api" "11.3.10" - "@react-native-community/cli-tools" "11.3.10" - "@react-native-community/cli-types" "11.3.10" +"@react-native-community/[email protected]": + version "13.6.8" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-13.6.8.tgz#d52c22620242e161bddcd2e0b6dbacd8743ca09b" + integrity sha512-0lRdgLNaXixWY4BfFRl1J6Ao9Lapo2z+++iE7TD4GAbuxOWJSyFi+KUA8XNfSDyML4jFO02MZgyBPxAWdaminQ== + dependencies: + "@react-native-community/cli-clean" "13.6.8" + "@react-native-community/cli-config" "13.6.8" + "@react-native-community/cli-debugger-ui" "13.6.8" + "@react-native-community/cli-doctor" "13.6.8" + "@react-native-community/cli-hermes" "13.6.8" + "@react-native-community/cli-server-api" "13.6.8" + "@react-native-community/cli-tools" "13.6.8" + "@react-native-community/cli-types" "13.6.8" chalk "^4.1.2" commander "^9.4.1" + deepmerge "^4.3.0" execa "^5.0.0" find-up "^4.1.0" fs-extra "^8.1.0" graceful-fs "^4.1.3" - prompts "^2.4.0" + prompts "^2.4.2" semver "^7.5.2" -"@react-native/assets-registry@^0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.72.0.tgz#c82a76a1d86ec0c3907be76f7faf97a32bbed05d" - integrity sha512-Im93xRJuHHxb1wniGhBMsxLwcfzdYreSZVQGDoMJgkd6+Iky61LInGEHnQCTN0fKNYF1Dvcofb4uMmE1RQHXHQ== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.74.84.tgz#aa472f82c1b7d8a30098c8ba22fad7b3dbb5be5f" + integrity sha512-dzUhwyaX04QosWZ8zyaaNB/WYZIdeDN1lcpfQbqiOhZJShRH+FLTDVONE/dqlMQrP+EO7lDqF0RrlIt9lnOCQQ== + +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.74.84.tgz#a3a72c188d875601704a421e395f6909fdec40f3" + integrity sha512-UR4uiii5szIJA84mSC6GJOfYKDq7/ThyetOQT62+BBcyGeHVtHlNLNRzgaMeLqIQaT8Fq4pccMI+7QqLOMXzdw== + dependencies: + "@react-native/codegen" "0.74.84" + +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.74.84.tgz#703ebfc810d82c9f51f033352abd5f9fa70d492b" + integrity sha512-WUfu6Y4aGuVdocQZvx33BJiQWFH6kRCHYbZfBn2psgFrSRLgQWEQrDCxqPFObNAVSayM0rNhp2FvI5K/Eyeqlg== + dependencies: + "@babel/core" "^7.20.0" + "@babel/plugin-proposal-async-generator-functions" "^7.0.0" + "@babel/plugin-proposal-class-properties" "^7.18.0" + "@babel/plugin-proposal-export-default-from" "^7.0.0" + "@babel/plugin-proposal-logical-assignment-operators" "^7.18.0" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.0" + "@babel/plugin-proposal-numeric-separator" "^7.0.0" + "@babel/plugin-proposal-object-rest-spread" "^7.20.0" + "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" + "@babel/plugin-proposal-optional-chaining" "^7.20.0" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + "@babel/plugin-syntax-export-default-from" "^7.0.0" + "@babel/plugin-syntax-flow" "^7.18.0" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.0.0" + "@babel/plugin-syntax-optional-chaining" "^7.0.0" + "@babel/plugin-transform-arrow-functions" "^7.0.0" + "@babel/plugin-transform-async-to-generator" "^7.20.0" + "@babel/plugin-transform-block-scoping" "^7.0.0" + "@babel/plugin-transform-classes" "^7.0.0" + "@babel/plugin-transform-computed-properties" "^7.0.0" + "@babel/plugin-transform-destructuring" "^7.20.0" + "@babel/plugin-transform-flow-strip-types" "^7.20.0" + "@babel/plugin-transform-function-name" "^7.0.0" + "@babel/plugin-transform-literals" "^7.0.0" + "@babel/plugin-transform-modules-commonjs" "^7.0.0" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.0.0" + "@babel/plugin-transform-parameters" "^7.0.0" + "@babel/plugin-transform-private-methods" "^7.22.5" + "@babel/plugin-transform-private-property-in-object" "^7.22.11" + "@babel/plugin-transform-react-display-name" "^7.0.0" + "@babel/plugin-transform-react-jsx" "^7.0.0" + "@babel/plugin-transform-react-jsx-self" "^7.0.0" + "@babel/plugin-transform-react-jsx-source" "^7.0.0" + "@babel/plugin-transform-runtime" "^7.0.0" + "@babel/plugin-transform-shorthand-properties" "^7.0.0" + "@babel/plugin-transform-spread" "^7.0.0" + "@babel/plugin-transform-sticky-regex" "^7.0.0" + "@babel/plugin-transform-typescript" "^7.5.0" + "@babel/plugin-transform-unicode-regex" "^7.0.0" + "@babel/template" "^7.0.0" + "@react-native/babel-plugin-codegen" "0.74.84" + babel-plugin-transform-flow-enums "^0.0.2" + react-refresh "^0.14.0" -"@react-native/codegen@^0.72.7": - version "0.72.7" - resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.72.7.tgz#b6832ce631ac63143024ea094a6b5480a780e589" - integrity sha512-O7xNcGeXGbY+VoqBGNlZ3O05gxfATlwE1Q1qQf5E38dK+tXn5BY4u0jaQ9DPjfE8pBba8g/BYI1N44lynidMtg== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.74.84.tgz#d3425a510b7da558ef5088d9b0aa5e0b1c05c783" + integrity sha512-0hXlnu9i0o8v+gXKQi+x6T471L85kCDwW4WrJiYAeOheWrQdNNW6rC3g8+LL7HXAf7QcHGU/8/d57iYfdVK2BQ== dependencies: "@babel/parser" "^7.20.0" - flow-parser "^0.206.0" + glob "^7.1.1" + hermes-parser "0.19.1" + invariant "^2.2.4" jscodeshift "^0.14.0" + mkdirp "^0.5.1" nullthrows "^1.1.1" -"@react-native/eslint-config@^0.72.2": - version "0.72.2" - resolved "https://registry.yarnpkg.com/@react-native/eslint-config/-/eslint-config-0.72.2.tgz#31da4cec65ad2805d4db9fdda138452821d72133" - integrity sha512-rAYuQQXzi63W7+9Pu/+23od/b/lTSzHjMFibum3sKgdG2LIyvhoMEWQ5+Chu7TqebqYy1b9SDn/KEMHvpWFtNg== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.74.84.tgz#223a0defe8118dc57c8ac852ddd13517ea10c4e2" + integrity sha512-GBKE+1sUh86fS2XXV46gMCNHMc1KetshMbYJ0AhDhldpaILZHqRBX50mdVsiYVvkzp4QjM0nmYqefuJ9NVwicQ== + dependencies: + "@react-native-community/cli-server-api" "13.6.8" + "@react-native-community/cli-tools" "13.6.8" + "@react-native/dev-middleware" "0.74.84" + "@react-native/metro-babel-transformer" "0.74.84" + chalk "^4.0.0" + execa "^5.1.1" + metro "^0.80.3" + metro-config "^0.80.3" + metro-core "^0.80.3" + node-fetch "^2.2.0" + querystring "^0.2.1" + readline "^1.3.0" + +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.74.84.tgz#0bde122a988916b6a50f05a7c3ab1c5db029b149" + integrity sha512-YUEA03UNFbiYzHpYxlcS2D9+3eNT5YLGkl5yRg3nOSN6KbCc/OttGnNZme+tuSOJwjMN/vcvtDKYkTqjJw8U0A== + +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.74.84.tgz#19ccfece791742f83f4c0a22a8c14593a45562a2" + integrity sha512-veYw/WmyrAOQHUiIeULzn2duJQnXDPiKq2jZ/lcmDo6jsLirpp+Q73lx09TYgy/oVoPRuV0nfmU3x9B6EV/7qQ== + dependencies: + "@isaacs/ttlcache" "^1.4.1" + "@react-native/debugger-frontend" "0.74.84" + "@rnx-kit/chromium-edge-launcher" "^1.0.0" + chrome-launcher "^0.15.2" + connect "^3.6.5" + debug "^2.2.0" + node-fetch "^2.2.0" + nullthrows "^1.1.1" + open "^7.0.3" + selfsigned "^2.4.1" + serve-static "^1.13.1" + temp-dir "^2.0.0" + ws "^6.2.2" + +"@react-native/eslint-config@^0.74.84": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/eslint-config/-/eslint-config-0.74.84.tgz#b39cc52811752afd7d6b9ffcf20c1b0f0f4cc1fd" + integrity sha512-QpMeMzg6QPN54K0LFasuqX52nyRF0dPIoh7ErXW7OoDatOMfxjB5CK7jVc1MqhKnUe5mz50BdQ44SOpzYr3xvw== dependencies: "@babel/core" "^7.20.0" "@babel/eslint-parser" "^7.20.0" - "@react-native/eslint-plugin" "^0.72.0" - "@typescript-eslint/eslint-plugin" "^5.30.5" - "@typescript-eslint/parser" "^5.30.5" + "@react-native/eslint-plugin" "0.74.84" + "@typescript-eslint/eslint-plugin" "^7.1.1" + "@typescript-eslint/parser" "^7.1.1" eslint-config-prettier "^8.5.0" eslint-plugin-eslint-comments "^3.2.0" eslint-plugin-ft-flow "^2.0.1" - eslint-plugin-jest "^26.5.3" + eslint-plugin-jest "^27.9.0" eslint-plugin-prettier "^4.2.1" eslint-plugin-react "^7.30.1" eslint-plugin-react-hooks "^4.6.0" eslint-plugin-react-native "^4.0.0" -"@react-native/eslint-plugin@^0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@react-native/eslint-plugin/-/eslint-plugin-0.72.0.tgz#7ec4c6a73dfde4bd6b4a4d3c462cfdc2637bf91d" - integrity sha512-xWQthnyKd+H22TBqeJUTFebsyWAAwzUb7EQCT8F/WMZsS1sv5UG+2cM/cU9/2HEbVZgxHYuLIi915WznjKPvlg== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/eslint-plugin/-/eslint-plugin-0.74.84.tgz#f0e9618551c9340caca7624001f8ce32794715c9" + integrity sha512-pDzo4Qm1uPZQne2sv0QK89ePxP/i+ZHjrBW3rkTVStLvsDVdyFahMmt6bzJTdYL2cGgK2oyNmfXtvO57INOu3Q== -"@react-native/gradle-plugin@^0.72.11": - version "0.72.11" - resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.72.11.tgz#c063ef12778706611de7a1e42b74b14d9405fb9f" - integrity sha512-P9iRnxiR2w7EHcZ0mJ+fmbPzMby77ZzV6y9sJI3lVLJzF7TLSdbwcQyD3lwMsiL+q5lKUHoZJS4sYmih+P2HXw== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.74.84.tgz#6ff25fad5f78c276afde96ffc42e04e92d6d92b1" + integrity sha512-wYWC5WWXqzCCe4PDogz9pNc4xH5ZamahW5XGSbrrYJ5V3walZ+7z43V6iEBJkZbLjj9YBcSttkXYGr1Xh4veAg== -"@react-native/js-polyfills@^0.72.1": - version "0.72.1" - resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.72.1.tgz#905343ef0c51256f128256330fccbdb35b922291" - integrity sha512-cRPZh2rBswFnGt5X5EUEPs0r+pAsXxYsifv/fgy9ZLQokuT52bPH+9xjDR+7TafRua5CttGW83wP4TntRcWNDA== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.74.84.tgz#edf0e8463616a2683269bbfe3957590f7ebd910c" + integrity sha512-+PgxuUjBw9JVlz6m4ECsIJMLbDopnr4rpLmsG32hQaJrg0wMuvHtsgAY/J/aVCSG2GNUXexfjrnhc+O9yGOZXQ== -"@react-native/normalize-color@^2.0.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@react-native/normalize-color/-/normalize-color-2.1.0.tgz#939b87a9849e81687d3640c5efa2a486ac266f91" - integrity sha512-Z1jQI2NpdFJCVgpY+8Dq/Bt3d+YUi1928Q+/CZm/oh66fzM0RUl54vvuXlPJKybH4pdCZey1eDTPaLHkMPNgWA== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.74.84.tgz#6c2c1632bdf557f176c9d489fbb676522ffb222a" + integrity sha512-YtVGq7jkgyUECv5yt4BOFbOXyW4ddUn8+dnwGGpJKdfhXYL5o5++AxNdE+2x+SZdkj3JUVekGKPwRabFECABaw== + dependencies: + "@babel/core" "^7.20.0" + "@react-native/babel-preset" "0.74.84" + hermes-parser "0.19.1" + nullthrows "^1.1.1" -"@react-native/normalize-colors@<0.73.0", "@react-native/normalize-colors@^0.72.0": - version "0.72.0" - resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.72.0.tgz#14294b7ed3c1d92176d2a00df48456e8d7d62212" - integrity sha512-285lfdqSXaqKuBbbtP9qL2tDrfxdOFtIMvkKadtleRQkdOxx+uzGvFr82KHmc/sSiMtfXGp7JnFYWVh4sFl7Yw== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.74.84.tgz#4764d59775c17a6ed193509cb01ae2f42dd5c045" + integrity sha512-Y5W6x8cC5RuakUcTVUFNAIhUZ/tYpuqHZlRBoAuakrTwVuoNHXfQki8lj1KsYU7rW6e3VWgdEx33AfOQpdNp6A== -"@react-native/typescript-config@^0.74.0": - version "0.74.0" - resolved "https://registry.yarnpkg.com/@react-native/typescript-config/-/typescript-config-0.74.0.tgz#cb2cb58e4e424593c4ff5859e50d24dd54b14a63" - integrity sha512-Nt7AkbuLXIfoWmUrlTp06UTUj6LrMhwJhf/ReEHVpiaVJRjuqfjmwelvW/6dGSJjPFtYvziC+iaLLeyv2oBV7w== +"@react-native/typescript-config@^0.74.84": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/typescript-config/-/typescript-config-0.74.84.tgz#aff6132ced5679c99b33b4e3a6747338b99e5e09" + integrity sha512-yMAyxl0wzRKT6JkQV0WCryiBQ1hj97u/JiT4LjXbwpPSErgiTRq+SKwhKH5vhSw9P0O8JCLIG6rS5rkbjranDg== -"@react-native/virtualized-lists@^0.72.4", "@react-native/virtualized-lists@^0.72.8": - version "0.72.8" - resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.72.8.tgz#a2c6a91ea0f1d40eb5a122fb063daedb92ed1dc3" - integrity sha512-J3Q4Bkuo99k7mu+jPS9gSUSgq+lLRSI/+ahXNwV92XgJ/8UgOTxu2LPwhJnBk/sQKxq7E8WkZBnBiozukQMqrw== +"@react-native/[email protected]": + version "0.74.84" + resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.74.84.tgz#cf32fffc93072942532c9c81bd7e4c01a2949626" + integrity sha512-XcV+qdqt2WihaY4iRm/M1FdSy+18lecU9mRXNmy9YK8g9Th/8XbNtmmKI0qWBx3KxyuXMH/zd0ps05YTrX16kw== dependencies: invariant "^2.2.4" nullthrows "^1.1.1" -"@release-it/conventional-changelog@^7.0.0": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@release-it/conventional-changelog/-/conventional-changelog-7.0.2.tgz#0d4f3a8b3af0657607f14b8a9fedf4a6aa70b304" - integrity sha512-rsUKWNnU39xivgC2IanjRkEOPsTu2X2jgJGpNHF+mndpOUr1WAROmIaix1o3ne2zseT+GLyZII2NC8FgYaM7xA== +"@release-it/conventional-changelog@^8.0.1": + version "8.0.1" + resolved "https://registry.yarnpkg.com/@release-it/conventional-changelog/-/conventional-changelog-8.0.1.tgz#7aba0162769a001b11fa72ab05ca3f108c2657e3" + integrity sha512-pwc9jaBYDaSX5TXw6rEnPfqDkKJN2sFBhYpON1kBi9T3sA9EOBncC4ed0Bv3L1ciNb6eqEJXPfp+tQMqVlv/eg== dependencies: concat-stream "^2.0.0" conventional-changelog "^5.1.0" - conventional-recommended-bump "^8.0.0" + conventional-recommended-bump "^9.0.0" semver "^7.5.4" -"@shopify/react-native-skia@^1.2.3": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@shopify/react-native-skia/-/react-native-skia-1.2.3.tgz#d87efd01c362b69f62375ce950c30e453586d6f9" - integrity sha512-gyUD/HGsMyZ+YAoWxVh24HYN5juwC/dZWINL/0sKP7Ttee/0igCRxWPneH1BbVH28dhyf+tvksQNUwpMM3VWbg== +"@rnx-kit/chromium-edge-launcher@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@rnx-kit/chromium-edge-launcher/-/chromium-edge-launcher-1.0.0.tgz#c0df8ea00a902c7a417cd9655aab06de398b939c" + integrity sha512-lzD84av1ZQhYUS+jsGqJiCMaJO2dn9u+RTT9n9q6D3SaKVwWqv+7AoRKqBu19bkwyE+iFRl1ymr40QS90jVFYg== + dependencies: + "@types/node" "^18.0.0" + escape-string-regexp "^4.0.0" + is-wsl "^2.2.0" + lighthouse-logger "^1.0.0" + mkdirp "^1.0.4" + rimraf "^3.0.2" + +"@shopify/react-native-skia@^1.3.4": + version "1.3.4" + resolved "https://registry.yarnpkg.com/@shopify/react-native-skia/-/react-native-skia-1.3.4.tgz#c14dfc3f8a7e77907d77a72cb225fb019c9c43ac" + integrity sha512-SskehEpndqsQyurCbGOni57pGt7ssxAc+Tu8NXiWJR3VZ7qE6JH2xOICKml6mwCAeGErab4dc7hP4VEVX+OInA== dependencies: canvaskit-wasm "0.39.1" react-reconciler "0.27.0" @@ -2035,6 +2316,11 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-5.6.0.tgz#41dd6093d34652cddb5d5bdeee04eafc33826668" integrity sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g== +"@sindresorhus/merge-streams@^2.1.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz#719df7fb41766bc143369eaa0dd56d8dc87c9958" + integrity sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg== + "@sinonjs/commons@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.0.tgz#beb434fe875d965265e04722ccfc21df7f755d72" @@ -2090,6 +2376,13 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== +"@types/node-forge@^1.3.0": + version "1.3.11" + resolved "https://registry.yarnpkg.com/@types/node-forge/-/node-forge-1.3.11.tgz#0972ea538ddb0f4d9c2fa0ec5db5724773a604da" + integrity sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ== + dependencies: + "@types/node" "*" + "@types/node@*": version "20.10.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.4.tgz#b246fd84d55d5b1b71bf51f964bd514409347198" @@ -2097,6 +2390,13 @@ dependencies: undici-types "~5.26.4" +"@types/node@^18.0.0": + version "18.19.34" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.34.tgz#c3fae2bbbdb94b4a52fe2d229d0dccce02ef3d27" + integrity sha512-eXF4pfBNV5DAMKGbI02NnDtWrQ40hAN558/2vvS4gMpMIxaf6JmD7YjnZbq0Q9TDSSkKBamime8ewRoomHdt4g== + dependencies: + undici-types "~5.26.4" + "@types/normalize-package-data@^2.4.1": version "2.4.4" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901" @@ -2112,28 +2412,21 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.11.tgz#2596fb352ee96a1379c657734d4b913a613ad563" integrity sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng== -"@types/react-native@^0.72.2": - version "0.72.8" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.72.8.tgz#eb6238fab289f5f132f7ccf138bdfe6f21ed93e1" - integrity sha512-St6xA7+EoHN5mEYfdWnfYt0e8u6k2FR0P9s2arYgakQGFgU1f9FlPrIEcj0X24pLCF5c5i3WVuLCUdiCYHmOoA== +"@types/react-native@^0.73.0": + version "0.73.0" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.73.0.tgz#b316be230745779814caa533360262140b0f5984" + integrity sha512-6ZRPQrYM72qYKGWidEttRe6M5DZBEV5F+MHMHqd4TTYx0tfkcdrUFGdef6CCxY0jXU7wldvd/zA/b0A/kTeJmA== dependencies: - "@react-native/virtualized-lists" "^0.72.4" - "@types/react" "*" + react-native "*" -"@types/react@*", "@types/react@^18.2.19": - version "18.2.48" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.48.tgz#11df5664642d0bd879c1f58bc1d37205b064e8f1" - integrity sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w== +"@types/react@^18.3.3": + version "18.3.3" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.3.tgz#9679020895318b0915d7a3ab004d92d33375c45f" + integrity sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw== dependencies: "@types/prop-types" "*" - "@types/scheduler" "*" csstype "^3.0.2" -"@types/scheduler@*": - version "0.16.8" - resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.8.tgz#ce5ace04cfeabe7ef87c0091e50752e36707deff" - integrity sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A== - "@types/semver@^7.3.12": version "7.5.6" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" @@ -2156,13 +2449,6 @@ dependencies: "@types/yargs-parser" "*" -"@types/yargs@^16.0.0": - version "16.0.9" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.9.tgz#ba506215e45f7707e6cbcaf386981155b7ab956e" - integrity sha512-tHhzvkFXZQeTECenFoRljLBYPZJ7jAVxqqtEI0qTLOmuultnFp4I9yKE17vTuhf7BkhCu7I4XuemPgikDVuYqA== - dependencies: - "@types/yargs-parser" "*" - "@types/yargs@^17.0.8": version "17.0.32" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.32.tgz#030774723a2f7faafebf645f4e5a48371dca6229" @@ -2170,30 +2456,30 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^5.30.5": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" - integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== +"@typescript-eslint/eslint-plugin@^7.1.1": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.13.0.tgz#3cdeb5d44d051b21a9567535dd90702b2a42c6ff" + integrity sha512-FX1X6AF0w8MdVFLSdqwqN/me2hyhuQg4ykN6ZpVhh1ij/80pTvDKclX1sZB9iqex8SjQfVhwMKs3JtnnMLzG9w== dependencies: - "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/type-utils" "5.62.0" - "@typescript-eslint/utils" "5.62.0" - debug "^4.3.4" + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "7.13.0" + "@typescript-eslint/type-utils" "7.13.0" + "@typescript-eslint/utils" "7.13.0" + "@typescript-eslint/visitor-keys" "7.13.0" graphemer "^1.4.0" - ignore "^5.2.0" - natural-compare-lite "^1.4.0" - semver "^7.3.7" - tsutils "^3.21.0" + ignore "^5.3.1" + natural-compare "^1.4.0" + ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^5.30.5": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" - integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== +"@typescript-eslint/parser@^7.1.1": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.13.0.tgz#9489098d68d57ad392f507495f2b82ce8b8f0a6b" + integrity sha512-EjMfl69KOS9awXXe83iRN7oIEXy9yYdqWfqdrFAYAAr6syP8eLEFI7ZE4939antx2mNgPRW/o1ybm2SFYkbTVA== dependencies: - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/scope-manager" "7.13.0" + "@typescript-eslint/types" "7.13.0" + "@typescript-eslint/typescript-estree" "7.13.0" + "@typescript-eslint/visitor-keys" "7.13.0" debug "^4.3.4" "@typescript-eslint/[email protected]": @@ -2204,21 +2490,34 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/[email protected]": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" - integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== +"@typescript-eslint/[email protected]": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.13.0.tgz#6927d6451537ce648c6af67a2327378d4cc18462" + integrity sha512-ZrMCe1R6a01T94ilV13egvcnvVJ1pxShkE0+NDjDzH4nvG1wXpwsVI5bZCvE7AEDH1mXEx5tJSVR68bLgG7Dng== dependencies: - "@typescript-eslint/typescript-estree" "5.62.0" - "@typescript-eslint/utils" "5.62.0" + "@typescript-eslint/types" "7.13.0" + "@typescript-eslint/visitor-keys" "7.13.0" + +"@typescript-eslint/[email protected]": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.13.0.tgz#4587282b5227a23753ea8b233805ecafc3924c76" + integrity sha512-xMEtMzxq9eRkZy48XuxlBFzpVMDurUAfDu5Rz16GouAtXm0TaAoTFzqWUFPPuQYXI/CDaH/Bgx/fk/84t/Bc9A== + dependencies: + "@typescript-eslint/typescript-estree" "7.13.0" + "@typescript-eslint/utils" "7.13.0" debug "^4.3.4" - tsutils "^3.21.0" + ts-api-utils "^1.3.0" "@typescript-eslint/[email protected]": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== +"@typescript-eslint/[email protected]": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.13.0.tgz#0cca95edf1f1fdb0cfe1bb875e121b49617477c5" + integrity sha512-QWuwm9wcGMAuTsxP+qz6LBBd3Uq8I5Nv8xb0mk54jmNoCyDspnMvVsOxI6IsMmway5d1S9Su2+sCKv1st2l6eA== + "@typescript-eslint/[email protected]": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" @@ -2232,7 +2531,31 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/[email protected]", "@typescript-eslint/utils@^5.10.0": +"@typescript-eslint/[email protected]": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.13.0.tgz#4cc24fc155088ebf3b3adbad62c7e60f72c6de1c" + integrity sha512-cAvBvUoobaoIcoqox1YatXOnSl3gx92rCZoMRPzMNisDiM12siGilSM4+dJAekuuHTibI2hVC2fYK79iSFvWjw== + dependencies: + "@typescript-eslint/types" "7.13.0" + "@typescript-eslint/visitor-keys" "7.13.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" + +"@typescript-eslint/[email protected]": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.13.0.tgz#f84e7e8aeceae945a9a3f40d077fd95915308004" + integrity sha512-jceD8RgdKORVnB4Y6BqasfIkFhl4pajB1wVxrF4akxD2QPM8GNYjgGwEzYS+437ewlqqrg7Dw+6dhdpjMpeBFQ== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "7.13.0" + "@typescript-eslint/types" "7.13.0" + "@typescript-eslint/typescript-estree" "7.13.0" + +"@typescript-eslint/utils@^5.10.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== @@ -2254,6 +2577,14 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/[email protected]": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.13.0.tgz#2eb7ce8eb38c2b0d4a494d1fe1908e7071a1a353" + integrity sha512-nxn+dozQx+MK61nn/JP+M4eCkHDSxSLDpgE3WcQo0+fkjEolnaB5jswvIKC4K56By8MMgIho7f1PVxERHEo8rw== + dependencies: + "@typescript-eslint/types" "7.13.0" + eslint-visitor-keys "^3.4.3" + "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" @@ -2549,11 +2880,6 @@ [email protected]: dependencies: retry "0.13.1" -async@^3.2.2: - version "3.2.5" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" - integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== - asynciterator.prototype@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz#8c5df0514936cdd133604dfcc9d3fb93f09b2b62" @@ -2595,11 +2921,6 @@ babel-plugin-polyfill-regenerator@^0.5.3: dependencies: "@babel/helper-define-polyfill-provider" "^0.4.4" -babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: - version "7.0.0-beta.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz#aa213c1435e2bffeb6fca842287ef534ad05d5cf" - integrity sha512-Xj9XuRuz3nTSbaTXWv3itLOcxyF4oPD8douBBmj7U9BBC6nEBYfyOJYQMf/8PJAFotC62UY5dFfIGEPr7WswzQ== - babel-plugin-transform-flow-enums@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-enums/-/babel-plugin-transform-flow-enums-0.0.2.tgz#d1d0cc9bdc799c850ca110d0ddc9f21b9ec3ef25" @@ -2607,45 +2928,12 @@ babel-plugin-transform-flow-enums@^0.0.2: dependencies: "@babel/plugin-syntax-flow" "^7.12.1" -babel-preset-fbjs@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-3.4.0.tgz#38a14e5a7a3b285a3f3a86552d650dca5cf6111c" - integrity sha512-9ywCsCvo1ojrw0b+XYk7aFvTH6D9064t0RIL1rtMf3nsa02Xw41MS7sZw216Im35xj/UY0PDBQsa1brUDDF1Ow== - dependencies: - "@babel/plugin-proposal-class-properties" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/plugin-syntax-class-properties" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-block-scoped-functions" "^7.0.0" - "@babel/plugin-transform-block-scoping" "^7.0.0" - "@babel/plugin-transform-classes" "^7.0.0" - "@babel/plugin-transform-computed-properties" "^7.0.0" - "@babel/plugin-transform-destructuring" "^7.0.0" - "@babel/plugin-transform-flow-strip-types" "^7.0.0" - "@babel/plugin-transform-for-of" "^7.0.0" - "@babel/plugin-transform-function-name" "^7.0.0" - "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-member-expression-literals" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/plugin-transform-object-super" "^7.0.0" - "@babel/plugin-transform-parameters" "^7.0.0" - "@babel/plugin-transform-property-literals" "^7.0.0" - "@babel/plugin-transform-react-display-name" "^7.0.0" - "@babel/plugin-transform-react-jsx" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-template-literals" "^7.0.0" - babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-js@^1.1.2, base64-js@^1.2.3, base64-js@^1.3.1, base64-js@^1.5.1: +base64-js@^1.2.3, base64-js@^1.3.1, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -2660,7 +2948,7 @@ before-after-hook@^2.2.0: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c" integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== [email protected], big-integer@^1.6.44: [email protected]: version "1.6.52" resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.52.tgz#60a887f3047614a8e1bffe5d7173490a97dc8c85" integrity sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg== @@ -2674,16 +2962,7 @@ bl@^4.1.0: inherits "^2.0.4" readable-stream "^3.4.0" -bl@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-5.1.0.tgz#183715f678c7188ecef9fe475d90209400624273" - integrity sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ== - dependencies: - buffer "^6.0.3" - inherits "^2.0.4" - readable-stream "^3.4.0" - -boxen@^7.0.0: +boxen@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/boxen/-/boxen-7.1.1.tgz#f9ba525413c2fec9cdb88987d835c4f7cad9c8f4" integrity sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog== @@ -2711,13 +2990,6 @@ [email protected]: dependencies: big-integer "1.6.x" -bplist-parser@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e" - integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw== - dependencies: - big-integer "^1.6.44" - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -2770,20 +3042,12 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" -buffer@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - -bundle-name@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a" - integrity sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw== +bundle-name@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-4.1.0.tgz#f3b96b34160d6431a19d7688135af7cfb8797889" + integrity sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q== dependencies: - run-applescript "^5.0.0" + run-applescript "^7.0.0" [email protected]: version "3.0.0" @@ -2817,6 +3081,17 @@ call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.4, call-bind@^1.0.5: get-intrinsic "^1.2.1" set-function-length "^1.1.1" +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" @@ -2868,7 +3143,7 @@ [email protected]: dependencies: "@webgpu/types" "0.1.21" [email protected], chalk@^5.0.0, chalk@^5.0.1, chalk@^5.2.0, chalk@^5.3.0: [email protected], chalk@^5.2.0, chalk@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== @@ -2895,6 +3170,16 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +chrome-launcher@^0.15.2: + version "0.15.2" + resolved "https://registry.yarnpkg.com/chrome-launcher/-/chrome-launcher-0.15.2.tgz#4e6404e32200095fdce7f6a1e1004f9bd36fa5da" + integrity sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ== + dependencies: + "@types/node" "*" + escape-string-regexp "^4.0.0" + is-wsl "^2.2.0" + lighthouse-logger "^1.0.0" + ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" @@ -2929,7 +3214,7 @@ cli-cursor@^4.0.0: dependencies: restore-cursor "^4.0.0" -cli-spinners@^2.5.0, cli-spinners@^2.9.0: +cli-spinners@^2.5.0, cli-spinners@^2.9.2: version "2.9.2" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== @@ -3015,11 +3300,6 @@ commander@^9.4.1: resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== -commander@~2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" - integrity sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA== - commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -3164,7 +3444,7 @@ conventional-changelog-jshint@^4.0.0: dependencies: compare-func "^2.0.0" -conventional-changelog-preset-loader@^4.0.0, conventional-changelog-preset-loader@^4.1.0: +conventional-changelog-preset-loader@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-4.1.0.tgz#996bc40d516471c5bf8248fdc30222563b9bcfe6" integrity sha512-HozQjJicZTuRhCRTq4rZbefaiCzRM2pr6u2NL3XhrmQm4RMnDXfESU6JKu/pnKwx5xtdkYfNCsbhN5exhiKGJA== @@ -3213,17 +3493,16 @@ conventional-commits-parser@^5.0.0: meow "^12.0.1" split2 "^4.0.0" -conventional-recommended-bump@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-8.0.0.tgz#81d959ca9b0bf2321acd6abaa59b7505d9ab1400" - integrity sha512-yvGN+VMy00WIe/pJufpmN+I4B2cM/WFK+CFCmDcjyVLyQR6J1KT2iecmA4NQ58gQAiNkvStEjcZp/W9h1JDM1A== +conventional-recommended-bump@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-9.0.0.tgz#2910b08b10e6c705301335ab916e7438eba5907f" + integrity sha512-HR1yD0G5HgYAu6K0wJjLd7QGRK8MQDqqj6Tn1n/ja1dFwBCE6QmV+iSgQ5F7hkx7OUR/8bHpxJqYtXj2f/opPQ== dependencies: - concat-stream "^2.0.0" - conventional-changelog-preset-loader "^4.0.0" + conventional-changelog-preset-loader "^4.1.0" conventional-commits-filter "^4.0.0" conventional-commits-parser "^5.0.0" git-raw-commits "^4.0.0" - git-semver-tags "^6.0.0" + git-semver-tags "^7.0.0" meow "^12.0.1" convert-source-map@^2.0.0: @@ -3243,15 +3522,15 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== [email protected]: - version "8.3.6" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.3.6.tgz#060a2b871d66dba6c8538ea1118ba1ac16f5fae3" - integrity sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA== [email protected]: + version "9.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-9.0.0.tgz#34c3fc58287b915f3ae905ab6dc3de258b55ad9d" + integrity sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg== dependencies: + env-paths "^2.2.1" import-fresh "^3.3.0" js-yaml "^4.1.0" parse-json "^5.2.0" - path-type "^4.0.0" cosmiconfig@^5.0.5, cosmiconfig@^5.1.0: version "5.2.1" @@ -3315,7 +3594,7 @@ dayjs@^1.8.15: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.10.tgz#68acea85317a6e164457d6d6947564029a6a16a0" integrity sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ== [email protected], debug@^2.2.0: [email protected], debug@^2.2.0, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -3361,23 +3640,18 @@ deepmerge@^4.3.0: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== -default-browser-id@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c" - integrity sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA== - dependencies: - bplist-parser "^0.2.0" - untildify "^4.0.0" +default-browser-id@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-5.0.0.tgz#a1d98bf960c15082d8a3fa69e83150ccccc3af26" + integrity sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA== -default-browser@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-4.0.0.tgz#53c9894f8810bf86696de117a6ce9085a3cbc7da" - integrity sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA== +default-browser@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-5.2.1.tgz#7b7ba61204ff3e425b556869ae6d3e9d9f1712cf" + integrity sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg== dependencies: - bundle-name "^3.0.0" - default-browser-id "^3.0.0" - execa "^7.1.1" - titleize "^3.0.0" + bundle-name "^4.1.0" + default-browser-id "^5.0.0" defaults@^1.0.3: version "1.0.4" @@ -3400,6 +3674,15 @@ define-data-property@^1.0.1, define-data-property@^1.1.1: gopd "^1.0.1" has-property-descriptors "^1.0.0" +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-lazy-prop@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f" @@ -3447,15 +3730,6 @@ [email protected]: resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== -deprecated-react-native-prop-types@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-4.2.3.tgz#0ef845c1a80ef1636bd09060e4cdf70f9727e5ad" - integrity sha512-2rLTiMKidIFFYpIVM69UnQKngLqQfL6I11Ch8wGSBftS18FUXda+o2we2950X+1dmbgps28niI3qwyH4eX3Z1g== - dependencies: - "@react-native/normalize-colors" "<0.73.0" - invariant "^2.2.4" - prop-types "^15.8.1" - deprecation@^2.0.0: version "2.3.1" resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" @@ -3516,7 +3790,7 @@ electron-to-chromium@^1.4.601: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.610.tgz#e17b22203f4aa2e1ed77759c720546d95a51186f" integrity sha512-mqi2oL1mfeHYtOdCxbPQYV/PL7YrQlxbvFEZ0Ee8GbDdShimqt2/S6z2RWqysuvlwdOrQdqvE0KZrBTipAeJzg== -emoji-regex@^10.2.1: +emoji-regex@^10.3.0: version "10.3.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.3.0.tgz#76998b9268409eb3dae3de989254d456e70cfe23" integrity sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw== @@ -3543,10 +3817,15 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" -envinfo@^7.7.2: - version "7.11.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.11.0.tgz#c3793f44284a55ff8c82faf1ffd91bc6478ea01f" - integrity sha512-G9/6xF1FPbIw0TtalAMaVPpiq2aDEuKLXM314jPVAO9r2fo2a4BLqMNkmRS7O/xPPZ+COAhGIz3ETvHEV3eUcg== +env-paths@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== + +envinfo@^7.10.0: + version "7.13.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.13.0.tgz#81fbb81e5da35d74e814941aeab7c325a606fb31" + integrity sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q== error-ex@^1.3.1, error-ex@^1.3.2: version "1.3.2" @@ -3620,6 +3899,18 @@ es-array-method-boxes-properly@^1.0.0: resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + es-get-iterator@^1.0.2: version "1.1.3" resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" @@ -3710,11 +4001,6 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -escape-string-regexp@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" - integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== - escodegen@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" @@ -3747,10 +4033,10 @@ eslint-plugin-ft-flow@^2.0.1: lodash "^4.17.21" string-natural-compare "^3.0.1" -eslint-plugin-jest@^26.5.3: - version "26.9.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.9.0.tgz#7931c31000b1c19e57dbfb71bbf71b817d1bf949" - integrity sha512-TWJxWGp1J628gxh2KhaH1H1paEdgE2J61BBF1I59c6xWeL5+D1BzMxGDN/nXAfX+aSkR5u80K+XhskK6Gwq9ng== +eslint-plugin-jest@^27.9.0: + version "27.9.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz#7c98a33605e1d8b8442ace092b60e9919730000b" + integrity sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug== dependencies: "@typescript-eslint/utils" "^5.10.0" @@ -3761,13 +4047,13 @@ eslint-plugin-prettier@^4.2.1: dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-prettier@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz#a3b399f04378f79f066379f544e42d6b73f11515" - integrity sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg== +eslint-plugin-prettier@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz#17cfade9e732cef32b5f5be53bd4e07afd8e67e1" + integrity sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw== dependencies: prettier-linter-helpers "^1.0.0" - synckit "^0.8.5" + synckit "^0.8.6" eslint-plugin-react-hooks@^4.6.0: version "4.6.0" @@ -3931,19 +4217,19 @@ event-target-shim@^5.0.0, event-target-shim@^5.0.1: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== [email protected], execa@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-7.2.0.tgz#657e75ba984f42a70f38928cedc87d6f2d4fe4e9" - integrity sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA== [email protected]: + version "8.0.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-8.0.1.tgz#51f6a5943b580f963c3ca9c6321796db8cc39b8c" + integrity sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== dependencies: cross-spawn "^7.0.3" - get-stream "^6.0.1" - human-signals "^4.3.0" + get-stream "^8.0.1" + human-signals "^5.0.0" is-stream "^3.0.0" merge-stream "^2.0.0" npm-run-path "^5.1.0" onetime "^6.0.0" - signal-exit "^3.0.7" + signal-exit "^4.1.0" strip-final-newline "^3.0.0" execa@^4.0.3: @@ -3995,7 +4281,7 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== -fast-glob@^3.2.9, fast-glob@^3.3.0: +fast-glob@^3.2.9, fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -4023,6 +4309,13 @@ fast-xml-parser@^4.0.12: dependencies: strnum "^1.0.5" +fast-xml-parser@^4.2.4: + version "4.4.0" + resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.4.0.tgz#341cc98de71e9ba9e651a67f41f1752d1441a501" + integrity sha512-kLY3jFlwIYwBNDojclKsNAC12sfD6NwW74QB2CoNGPvtVxjliYehVunB3HYyNi+n4Tt1dAcgwYvmKF/Z18flqg== + dependencies: + strnum "^1.0.5" + fastq@^1.6.0: version "1.15.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" @@ -4045,14 +4338,6 @@ fetch-blob@^3.1.2, fetch-blob@^3.1.4: node-domexception "^1.0.0" web-streams-polyfill "^3.0.3" -figures@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-5.0.0.tgz#126cd055052dea699f8a54e8c9450e6ecfc44d5f" - integrity sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg== - dependencies: - escape-string-regexp "^5.0.0" - is-unicode-supported "^1.2.0" - file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" @@ -4134,21 +4419,16 @@ flatted@^3.2.9: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== -flow-enums-runtime@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/flow-enums-runtime/-/flow-enums-runtime-0.0.5.tgz#95884bfcc82edaf27eef7e1dd09732331cfbafbc" - integrity sha512-PSZF9ZuaZD03sT9YaIs0FrGJ7lSUw7rHZIex+73UYVXg46eL/wxN5PaVcPJFudE2cJu5f0fezitV5aBkLHPUOQ== +flow-enums-runtime@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/flow-enums-runtime/-/flow-enums-runtime-0.0.6.tgz#5bb0cd1b0a3e471330f4d109039b7eba5cb3e787" + integrity sha512-3PYnM29RFXwvAN6Pc/scUfkI7RwhQ/xqyLUyPNlXUp9S40zI8nup9tUSrTLSVnWGBN38FNiGWbwZOB6uR4OGdw== flow-parser@0.*: version "0.223.3" resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.223.3.tgz#9e331f635b3d4b5e0875bfc4f5dd79bf9c42c795" integrity sha512-9KxxDKSB22ovMpSULbOL/QAQGPN6M0YMS3PubQvB0jVc4W7QP6VhasIVic7MzKcJSh0BAVs4J6SZjoH0lDDNlg== -flow-parser@^0.206.0: - version "0.206.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.206.0.tgz#f4f794f8026535278393308e01ea72f31000bfef" - integrity sha512-HVzoK3r6Vsg+lKvlIZzaWNBVai+FXTX1wdYhz/wVlH13tb/gOdLXmlTqy6odmTBhT5UoWUbq0k8263Qhr9d88w== - for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -4231,6 +4511,11 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-east-asian-width@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz#5e6ebd9baee6fb8b7b6bd505221065f0cd91f64e" + integrity sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA== + get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.2.tgz#281b7622971123e1ef4b3c90fd7539306da93f3b" @@ -4241,6 +4526,17 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" +get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-stream@^5.0.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" @@ -4253,6 +4549,11 @@ get-stream@^6.0.0, get-stream@^6.0.1: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +get-stream@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" + integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== + get-symbol-description@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" @@ -4285,14 +4586,6 @@ git-raw-commits@^4.0.0: meow "^12.0.1" split2 "^4.0.0" -git-semver-tags@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-6.0.0.tgz#b011ef94ae23ec8121f311d92a5969fc91502e15" - integrity sha512-v5BL6psuUy+Ftuo99141XlOIDoJtKw5+YyDANS7fknSP0iT4cVIanc3toDsH4K+VpIWc19l2/xkwQmXMfloeUA== - dependencies: - meow "^12.0.1" - semver "^7.5.2" - git-semver-tags@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-7.0.1.tgz#74426e7d7710e5a263655e78b4c651eed804d63e" @@ -4309,10 +4602,10 @@ git-up@^7.0.0: is-ssh "^1.4.0" parse-url "^8.1.0" [email protected]: - version "13.1.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-13.1.0.tgz#07e136b5baa08d59fabdf0e33170de425adf07b4" - integrity sha512-5FvPJP/70WkIprlUZ33bm4UAaFdjcLkJLpWft1BeZKqwR0uhhNGoKwlUaPtVb4LxCSQ++erHapRak9kWGj+FCA== [email protected]: + version "14.0.0" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-14.0.0.tgz#18ce834726d5fbca0c25a4555101aa277017418f" + integrity sha512-NnLweV+2A4nCvn4U/m2AoYu0pPKlsmhK9cknG7IMwsjFY1S2jxM+mAhsDxyxfCIGfGaD+dozsyX4b6vkYc83yQ== dependencies: git-up "^7.0.0" @@ -4342,7 +4635,7 @@ [email protected]: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.1.3: +glob@^7.0.0, glob@^7.1.1, glob@^7.1.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -4391,16 +4684,17 @@ globalthis@^1.0.3: dependencies: define-properties "^1.1.3" [email protected]: - version "13.2.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-13.2.2.tgz#63b90b1bf68619c2135475cbd4e71e66aa090592" - integrity sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w== [email protected]: + version "14.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-14.0.1.tgz#a1b44841aa7f4c6d8af2bc39951109d77301959b" + integrity sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ== dependencies: - dir-glob "^3.0.1" - fast-glob "^3.3.0" + "@sindresorhus/merge-streams" "^2.1.0" + fast-glob "^3.3.2" ignore "^5.2.4" - merge2 "^1.4.1" - slash "^4.0.0" + path-type "^5.0.0" + slash "^5.1.0" + unicorn-magic "^0.1.0" globby@^11.0.1, globby@^11.1.0: version "11.1.0" @@ -4504,6 +4798,13 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.2.2" +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + has-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" @@ -4521,11 +4822,6 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" -has-yarn@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-3.0.0.tgz#c3c21e559730d1d3b57e28af1f30d06fac38147d" - integrity sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA== - hasown@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" @@ -4533,17 +4829,29 @@ hasown@^2.0.0: dependencies: function-bind "^1.1.2" [email protected]: - version "0.12.0" - resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.12.0.tgz#8a289f9aee854854422345e6995a48613bac2ca8" - integrity sha512-+e8xR6SCen0wyAKrMT3UD0ZCCLymKhRgjEB5sS28rKiFir/fXgLoeRilRUssFCILmGHb+OvHDUlhxs0+IEyvQw== [email protected]: + version "0.19.1" + resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.19.1.tgz#d5924f5fac2bf0532547ae9f506d6db8f3c96392" + integrity sha512-daLGV3Q2MKk8w4evNMKwS8zBE/rcpA800nu1Q5kM08IKijoSnPe9Uo1iIxzPKRkn95IxxsgBMPeYHt3VG4ej2g== [email protected]: - version "0.12.0" - resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.12.0.tgz#114dc26697cfb41a6302c215b859b74224383773" - integrity sha512-d4PHnwq6SnDLhYl3LHNHvOg7nQ6rcI7QVil418REYksv0Mh3cEkHDcuhGxNQ3vgnLSLl4QSvDrFCwQNYdpWlzw== [email protected]: + version "0.20.1" + resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.20.1.tgz#0b9a544cf883a779a8e1444b915fa365bef7f72d" + integrity sha512-SQpZK4BzR48kuOg0v4pb3EAGNclzIlqMj3Opu/mu7bbAoFw6oig6cEt/RAi0zTFW/iW6Iz9X9ggGuZTAZ/yZHg== + [email protected]: + version "0.19.1" + resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.19.1.tgz#1044348097165b7c93dc198a80b04ed5130d6b1a" + integrity sha512-Vp+bXzxYJWrpEuJ/vXxUsLnt0+y4q9zyi4zUlkLqD8FKv4LjIfOvP69R/9Lty3dCyKh0E2BU7Eypqr63/rKT/A== + dependencies: + hermes-estree "0.19.1" + [email protected]: + version "0.20.1" + resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.20.1.tgz#ad10597b99f718b91e283f81cbe636c50c3cff92" + integrity sha512-BL5P83cwCogI8D7rrDCgsFY0tdYUtmFP9XaXtl2IQjC+2Xo+4okjfXintlTxcIwl4qeGddEl28Z11kbVIw0aNA== dependencies: - hermes-estree "0.12.0" + hermes-estree "0.20.1" hermes-profile-transformer@^0.0.6: version "0.0.6" @@ -4583,6 +4891,14 @@ http-proxy-agent@^7.0.0: agent-base "^7.1.0" debug "^4.3.4" +http-proxy-agent@^7.0.1: + version "7.0.2" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + http2-wrapper@^2.1.10: version "2.2.1" resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-2.2.1.tgz#310968153dcdedb160d8b72114363ef5fce1f64a" @@ -4599,6 +4915,14 @@ https-proxy-agent@^7.0.2: agent-base "^7.0.2" debug "4" +https-proxy-agent@^7.0.3: + version "7.0.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz#8e97b841a029ad8ddc8731f26595bad868cb4168" + integrity sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg== + dependencies: + agent-base "^7.0.2" + debug "4" + human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -4609,10 +4933,10 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -human-signals@^4.3.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" - integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== +human-signals@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" + integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== iconv-lite@^0.4.24: version "0.4.24" @@ -4621,7 +4945,7 @@ iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -ieee754@^1.1.13, ieee754@^1.2.1: +ieee754@^1.1.13: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -4631,6 +4955,11 @@ ignore@^5.0.5, ignore@^5.2.0, ignore@^5.2.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg== +ignore@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" + integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + image-size@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/image-size/-/image-size-1.0.2.tgz#d778b6d0ab75b2737c1556dd631652eb963bc486" @@ -4692,18 +5021,18 @@ ini@^1.3.4, ini@~1.3.0: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== [email protected]: - version "9.2.11" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-9.2.11.tgz#e9003755c233a414fceda1891c23bd622cad4a95" - integrity sha512-B2LafrnnhbRzCWfAdOXisUzL89Kg8cVJlYmhqoi3flSiV/TveO+nsXwgKr9h9PIo+J1hz7nBSk6gegRIMBBf7g== [email protected]: + version "9.2.22" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-9.2.22.tgz#718cb4153f0d35176aab27d495f8e358d1e2008f" + integrity sha512-SqLLa/Oe5rZUagTR9z+Zd6izyatHglbmbvVofo1KzuVB54YHleWzeHNLoR7FOICGOeQSqeLh1cordb3MzhGcEw== dependencies: - "@ljharb/through" "^2.3.9" + "@inquirer/figures" "^1.0.2" + "@ljharb/through" "^2.3.13" ansi-escapes "^4.3.2" chalk "^5.3.0" cli-cursor "^3.1.0" cli-width "^4.1.0" external-editor "^3.1.0" - figures "^5.0.0" lodash "^4.17.21" mute-stream "1.0.0" ora "^5.4.1" @@ -4734,7 +5063,7 @@ invariant@^2.2.4: dependencies: loose-envify "^1.0.0" -ip@^1.1.5, ip@^1.1.8: +ip@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48" integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg== @@ -4801,7 +5130,7 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== [email protected], is-ci@^3.0.1: [email protected]: version "3.0.1" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ== @@ -4889,6 +5218,11 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: dependencies: is-extglob "^2.1.1" +is-in-ci@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-in-ci/-/is-in-ci-0.1.0.tgz#5e07d6a02ec3a8292d3f590973357efa3fceb0d3" + integrity sha512-d9PXLEY0v1iJ64xLiQMJ51J128EYHAaOR4yZqQi8aHGfw6KgifM3/Viw1oZZ1GCVmb3gBuyhLyHj0HgR2DhSXQ== + is-inside-container@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" @@ -4963,11 +5297,6 @@ is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-plain-object@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" - integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== - is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -5057,11 +5386,16 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== -is-unicode-supported@^1.1.0, is-unicode-supported@^1.2.0, is-unicode-supported@^1.3.0: +is-unicode-supported@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ== +is-unicode-supported@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-2.0.0.tgz#fdf32df9ae98ff6ab2cedc155a5a6e895701c451" + integrity sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q== + is-weakmap@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" @@ -5092,17 +5426,19 @@ is-wsl@^1.1.0: resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" integrity sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw== -is-wsl@^2.2.0: +is-wsl@^2.1.1, is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== dependencies: is-docker "^2.0.0" -is-yarn-global@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.4.1.tgz#b312d902b313f81e4eaf98b6361ba2b45cd694bb" - integrity sha512-/kppl+R+LO5VmhYSEWARUFjodS25D68gvj8W7z0I7OWhUla5xWu8KL6CtB2V0R6yqhnRgbcaREMr4EEM6htLPQ== +is-wsl@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2" + integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw== + dependencies: + is-inside-container "^1.0.0" isarray@^2.0.5: version "2.0.5" @@ -5124,10 +5460,10 @@ isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== [email protected]: - version "6.0.0" - resolved "https://registry.yarnpkg.com/issue-parser/-/issue-parser-6.0.0.tgz#b1edd06315d4f2044a9755daf85fdafde9b4014a" - integrity sha512-zKa/Dxq2lGsBIXQ7CUZWTHfvxPC2ej0KfO7fIPqLlHB9J2hJ7rGhZ5rilhuufylr4RXYPzJUeFjKxz305OsNlA== [email protected]: + version "7.0.0" + resolved "https://registry.yarnpkg.com/issue-parser/-/issue-parser-7.0.0.tgz#27b832c5f5967da897e08ca1949d188e98873b1a" + integrity sha512-jgAw78HO3gs9UrKqJNQvfDj9Ouy8Mhu40fbEJ8yXff4MW8+/Fcn9iFjyWUQ6SKbX8ipPk3X5A3AyfYHRu6uVLw== dependencies: lodash.capitalize "^4.2.1" lodash.escaperegexp "^4.1.2" @@ -5159,7 +5495,7 @@ iterator.prototype@^1.1.2: reflect.getprototypeof "^1.0.4" set-function-name "^2.0.1" -jest-environment-node@^29.2.1: +jest-environment-node@^29.6.3: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== @@ -5200,23 +5536,6 @@ jest-mock@^29.7.0: "@types/node" "*" jest-util "^29.7.0" -jest-regex-util@^27.0.6: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.5.1.tgz#4da143f7e9fd1e542d4aa69617b38e4a78365b95" - integrity sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg== - -jest-util@^27.2.0: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.5.1.tgz#3ba9771e8e31a0b85da48fe0b0891fb86c01c2f9" - integrity sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw== - dependencies: - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - jest-util@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" @@ -5229,7 +5548,7 @@ jest-util@^29.7.0: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-validate@^29.2.1: +jest-validate@^29.6.3: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== @@ -5241,20 +5560,16 @@ jest-validate@^29.2.1: leven "^3.1.0" pretty-format "^29.7.0" -jest-worker@^27.2.0: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== +jest-worker@^29.6.3: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" + integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== dependencies: "@types/node" "*" + jest-util "^29.7.0" merge-stream "^2.0.0" supports-color "^8.0.0" -jetifier@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/jetifier/-/jetifier-2.0.0.tgz#699391367ca1fe7bc4da5f8bf691eb117758e4cb" - integrity sha512-J4Au9KuT74te+PCCCHKgAjyLlEa+2VyIAEPNCdE5aNkAJ6FAJcAqcdzEkSnzNksIa9NkGmC4tPiClk2e7tCJuQ== - joi@^17.2.1: version "17.11.0" resolved "https://registry.yarnpkg.com/joi/-/joi-17.11.0.tgz#aa9da753578ec7720e6f0ca2c7046996ed04fc1a" @@ -5444,6 +5759,14 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +lighthouse-logger@^1.0.0: + version "1.4.2" + resolved "https://registry.yarnpkg.com/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz#aef90f9e97cd81db367c7634292ee22079280aaa" + integrity sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g== + dependencies: + debug "^2.6.9" + marky "^1.2.2" + lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -5536,13 +5859,13 @@ log-symbols@^4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" -log-symbols@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-5.1.0.tgz#a20e3b9a5f53fac6aeb8e2bb22c07cf2c8f16d93" - integrity sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA== +log-symbols@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-6.0.0.tgz#bb95e5f05322651cac30c0feb6404f9f2a8a9439" + integrity sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw== dependencies: - chalk "^5.0.0" - is-unicode-supported "^1.1.0" + chalk "^5.3.0" + is-unicode-supported "^1.3.0" logkitty@^0.7.1: version "0.7.1" @@ -5609,6 +5932,11 @@ [email protected]: dependencies: tmpl "1.0.5" +marky@^1.2.2: + version "1.2.5" + resolved "https://registry.yarnpkg.com/marky/-/marky-1.2.5.tgz#55796b688cbd72390d2d399eaaf1832c9413e3c0" + integrity sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q== + memoize-one@^5.0.0: version "5.2.1" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" @@ -5629,62 +5957,60 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.76.8.tgz#5efd1027353b36b73706164ef09c290dceac096a" - integrity sha512-Hh6PW34Ug/nShlBGxkwQJSgPGAzSJ9FwQXhUImkzdsDgVu6zj5bx258J8cJVSandjNoQ8nbaHK6CaHlnbZKbyA== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.80.9.tgz#7051ba377b7d2140abd23f4846bbbb1e81fea99b" + integrity sha512-d76BSm64KZam1nifRZlNJmtwIgAeZhZG3fi3K+EmPOlrR8rDtBxQHDSN3fSGeNB9CirdTyabTMQCkCup6BXFSQ== dependencies: "@babel/core" "^7.20.0" - hermes-parser "0.12.0" + hermes-parser "0.20.1" nullthrows "^1.1.1" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-cache-key/-/metro-cache-key-0.76.8.tgz#8a0a5e991c06f56fcc584acadacb313c312bdc16" - integrity sha512-buKQ5xentPig9G6T37Ww/R/bC+/V1MA5xU/D8zjnhlelsrPG6w6LtHUS61ID3zZcMZqYaELWk5UIadIdDsaaLw== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-cache-key/-/metro-cache-key-0.80.9.tgz#a04cbb0a7828509bb10dde9789ef761c0c60bc3d" + integrity sha512-hRcYGhEiWIdM87hU0fBlcGr+tHDEAT+7LYNCW89p5JhErFt/QaAkVx4fb5bW3YtXGv5BTV7AspWPERoIb99CXg== [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.76.8.tgz#296c1c189db2053b89735a8f33dbe82575f53661" - integrity sha512-QBJSJIVNH7Hc/Yo6br/U/qQDUpiUdRgZ2ZBJmvAbmAKp2XDzsapnMwK/3BGj8JNWJF7OLrqrYHsRsukSbUBpvQ== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.80.9.tgz#b914318a90dbcd51b4c27836184519c441ba5123" + integrity sha512-ujEdSI43QwI+Dj2xuNax8LMo8UgKuXJEdxJkzGPU6iIx42nYa1byQ+aADv/iPh5sh5a//h5FopraW5voXSgm2w== dependencies: - metro-core "0.76.8" + metro-core "0.80.9" rimraf "^3.0.2" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.76.8.tgz#20bd5397fcc6096f98d2a813a7cecb38b8af062d" - integrity sha512-SL1lfKB0qGHALcAk2zBqVgQZpazDYvYFGwCK1ikz0S6Y/CM2i2/HwuZN31kpX6z3mqjv/6KvlzaKoTb1otuSAA== [email protected], metro-config@^0.80.3: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.80.9.tgz#4eb6948b0ddc7c38d9d4ba8ddf22a67ca1c2bc06" + integrity sha512-28wW7CqS3eJrunRGnsibWldqgwRP9ywBEf7kg+uzUHkSFJNKPM1K3UNSngHmH0EZjomizqQA2Zi6/y6VdZMolg== dependencies: connect "^3.6.5" cosmiconfig "^5.0.5" - jest-validate "^29.2.1" - metro "0.76.8" - metro-cache "0.76.8" - metro-core "0.76.8" - metro-runtime "0.76.8" + jest-validate "^29.6.3" + metro "0.80.9" + metro-cache "0.80.9" + metro-core "0.80.9" + metro-runtime "0.80.9" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.76.8.tgz#917c8157c63406cb223522835abb8e7c6291dcad" - integrity sha512-sl2QLFI3d1b1XUUGxwzw/KbaXXU/bvFYrSKz6Sg19AdYGWFyzsgZ1VISRIDf+HWm4R/TJXluhWMEkEtZuqi3qA== [email protected], metro-core@^0.80.3: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.80.9.tgz#3af21d0b09d71ec9c0840f028bffb36bc3619727" + integrity sha512-tbltWQn+XTdULkGdzHIxlxk4SdnKxttvQQV3wpqqFbHDteR4gwCyTR2RyYJvxgU7HELfHtrVbqgqAdlPByUSbg== dependencies: lodash.throttle "^4.1.1" - metro-resolver "0.76.8" + metro-resolver "0.80.9" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-file-map/-/metro-file-map-0.76.8.tgz#a1db1185b6c316904ba6b53d628e5d1323991d79" - integrity sha512-A/xP1YNEVwO1SUV9/YYo6/Y1MmzhL4ZnVgcJC3VmHp/BYVOXVStzgVbWv2wILe56IIMkfXU+jpXrGKKYhFyHVw== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-file-map/-/metro-file-map-0.80.9.tgz#ed8783f6e35dfc005794344c2a9fcd6e914885aa" + integrity sha512-sBUjVtQMHagItJH/wGU9sn3k2u0nrCl0CdR4SFMO1tksXLKbkigyQx4cbpcyPVOAmGTVuy3jyvBlELaGCAhplQ== dependencies: anymatch "^3.0.3" debug "^2.2.0" fb-watchman "^2.0.0" graceful-fs "^4.2.4" invariant "^2.2.4" - jest-regex-util "^27.0.6" - jest-util "^27.2.0" - jest-worker "^27.2.0" + jest-worker "^29.6.3" micromatch "^4.0.4" node-abort-controller "^3.1.1" nullthrows "^1.1.1" @@ -5692,130 +6018,55 @@ [email protected]: optionalDependencies: fsevents "^2.3.2" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-inspector-proxy/-/metro-inspector-proxy-0.76.8.tgz#6b8678a7461b0b42f913a7881cc9319b4d3cddff" - integrity sha512-Us5o5UEd4Smgn1+TfHX4LvVPoWVo9VsVMn4Ldbk0g5CQx3Gu0ygc/ei2AKPGTwsOZmKxJeACj7yMH2kgxQP/iw== - dependencies: - connect "^3.6.5" - debug "^2.2.0" - node-fetch "^2.2.0" - ws "^7.5.1" - yargs "^17.6.2" - [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-minify-terser/-/metro-minify-terser-0.76.8.tgz#915ab4d1419257fc6a0b9fa15827b83fe69814bf" - integrity sha512-Orbvg18qXHCrSj1KbaeSDVYRy/gkro2PC7Fy2tDSH1c9RB4aH8tuMOIXnKJE+1SXxBtjWmQ5Yirwkth2DyyEZA== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-minify-terser/-/metro-minify-terser-0.80.9.tgz#2b7798cba2bd4bd69cc5ce05a45bf66291542f83" + integrity sha512-FEeCeFbkvvPuhjixZ1FYrXtO0araTpV6UbcnGgDUpH7s7eR5FG/PiJz3TsuuPP/HwCK19cZtQydcA2QrCw446A== dependencies: terser "^5.15.0" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-minify-uglify/-/metro-minify-uglify-0.76.8.tgz#74745045ea2dd29f8783db483b2fce58385ba695" - integrity sha512-6l8/bEvtVaTSuhG1FqS0+Mc8lZ3Bl4RI8SeRIifVLC21eeSDp4CEBUWSGjpFyUDfi6R5dXzYaFnSgMNyfxADiQ== - dependencies: - uglify-es "^3.1.9" - [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.76.8.tgz#7476efae14363cbdfeeec403b4f01d7348e6c048" - integrity sha512-Ptza08GgqzxEdK8apYsjTx2S8WDUlS2ilBlu9DR1CUcHmg4g3kOkFylZroogVAUKtpYQNYwAvdsjmrSdDNtiAg== - dependencies: - "@babel/core" "^7.20.0" - "@babel/plugin-proposal-async-generator-functions" "^7.0.0" - "@babel/plugin-proposal-class-properties" "^7.18.0" - "@babel/plugin-proposal-export-default-from" "^7.0.0" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.0" - "@babel/plugin-proposal-numeric-separator" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.20.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" - "@babel/plugin-proposal-optional-chaining" "^7.20.0" - "@babel/plugin-syntax-dynamic-import" "^7.8.0" - "@babel/plugin-syntax-export-default-from" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.18.0" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.0.0" - "@babel/plugin-syntax-optional-chaining" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-async-to-generator" "^7.20.0" - "@babel/plugin-transform-block-scoping" "^7.0.0" - "@babel/plugin-transform-classes" "^7.0.0" - "@babel/plugin-transform-computed-properties" "^7.0.0" - "@babel/plugin-transform-destructuring" "^7.20.0" - "@babel/plugin-transform-flow-strip-types" "^7.20.0" - "@babel/plugin-transform-function-name" "^7.0.0" - "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.0.0" - "@babel/plugin-transform-parameters" "^7.0.0" - "@babel/plugin-transform-react-display-name" "^7.0.0" - "@babel/plugin-transform-react-jsx" "^7.0.0" - "@babel/plugin-transform-react-jsx-self" "^7.0.0" - "@babel/plugin-transform-react-jsx-source" "^7.0.0" - "@babel/plugin-transform-runtime" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-sticky-regex" "^7.0.0" - "@babel/plugin-transform-typescript" "^7.5.0" - "@babel/plugin-transform-unicode-regex" "^7.0.0" - "@babel/template" "^7.0.0" - babel-plugin-transform-flow-enums "^0.0.2" - react-refresh "^0.4.0" - [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.76.8.tgz#c3a98e1f4cd5faf1e21eba8e004b94a90c4db69b" - integrity sha512-3h+LfS1WG1PAzhq8QF0kfXjxuXetbY/lgz8vYMQhgrMMp17WM1DNJD0gjx8tOGYbpbBC1qesJ45KMS4o5TA73A== - dependencies: - "@babel/core" "^7.20.0" - babel-preset-fbjs "^3.4.0" - hermes-parser "0.12.0" - metro-react-native-babel-preset "0.76.8" - nullthrows "^1.1.1" - [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.76.8.tgz#0862755b9b84e26853978322464fb37c6fdad76d" - integrity sha512-KccOqc10vrzS7ZhG2NSnL2dh3uVydarB7nOhjreQ7C4zyWuiW9XpLC4h47KtGQv3Rnv/NDLJYeDqaJ4/+140HQ== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.80.9.tgz#bae9120a0553e0cb59da6429e83a7e97465cc1a8" + integrity sha512-wAPIjkN59BQN6gocVsAvvpZ1+LQkkqUaswlT++cJafE/e54GoVkMNCmrR4BsgQHr9DknZ5Um/nKueeN7kaEz9w== [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.76.8.tgz#74b2d301a2be5f3bbde91b8f1312106f8ffe50c3" - integrity sha512-XKahvB+iuYJSCr3QqCpROli4B4zASAYpkK+j3a0CJmokxCDNbgyI4Fp88uIL6rNaZfN0Mv35S0b99SdFXIfHjg== [email protected], metro-runtime@^0.80.3: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.80.9.tgz#665312bd4e4d38fea921b3153d6ab47846eb4f08" + integrity sha512-8PTVIgrVcyU+X/rVCy/9yxNlvXsBCk5JwwkbAm/Dm+Abo6NBGtNjWF0M1Xo/NWCb4phamNWcD7cHdR91HhbJvg== dependencies: "@babel/runtime" "^7.0.0" - react-refresh "^0.4.0" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.76.8.tgz#f085800152a6ba0b41ca26833874d31ec36c5a53" - integrity sha512-Hh0ncPsHPVf6wXQSqJqB3K9Zbudht4aUtNpNXYXSxH+pteWqGAXnjtPsRAnCsCWl38wL0jYF0rJDdMajUI3BDw== [email protected], metro-source-map@^0.80.3: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.80.9.tgz#df8f673137548f37ab9f9dcfa771b354a452cfab" + integrity sha512-RMn+XS4VTJIwMPOUSj61xlxgBvPeY4G6s5uIn6kt6HB6A/k9ekhr65UkkDD7WzHYs3a9o869qU8tvOZvqeQzgw== dependencies: "@babel/traverse" "^7.20.0" "@babel/types" "^7.20.0" invariant "^2.2.4" - metro-symbolicate "0.76.8" + metro-symbolicate "0.80.9" nullthrows "^1.1.1" - ob1 "0.76.8" + ob1 "0.80.9" source-map "^0.5.6" vlq "^1.0.0" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.76.8.tgz#f102ac1a306d51597ecc8fdf961c0a88bddbca03" - integrity sha512-LrRL3uy2VkzrIXVlxoPtqb40J6Bf1mlPNmUQewipc3qfKKFgtPHBackqDy1YL0njDsWopCKcfGtFYLn0PTUn3w== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.80.9.tgz#8d1d19d26ebb36b9d13dbd29814fdd71d6009db7" + integrity sha512-Ykae12rdqSs98hg41RKEToojuIW85wNdmSe/eHUgMkzbvCFNVgcC0w3dKZEhSsqQOXapXRlLtHkaHLil0UD/EA== dependencies: invariant "^2.2.4" - metro-source-map "0.76.8" + metro-source-map "0.80.9" nullthrows "^1.1.1" source-map "^0.5.6" through2 "^2.0.1" vlq "^1.0.0" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-transform-plugins/-/metro-transform-plugins-0.76.8.tgz#d77c28a6547a8e3b72250f740fcfbd7f5408f8ba" - integrity sha512-PlkGTQNqS51Bx4vuufSQCdSn2R2rt7korzngo+b5GCkeX5pjinPjnO2kNhQ8l+5bO0iUD/WZ9nsM2PGGKIkWFA== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-transform-plugins/-/metro-transform-plugins-0.80.9.tgz#473a2c0a9e48043210547abe61cdeedb77725422" + integrity sha512-UlDk/uc8UdfLNJhPbF3tvwajyuuygBcyp+yBuS/q0z3QSuN/EbLllY3rK8OTD9n4h00qZ/qgxGv/lMFJkwP4vg== dependencies: "@babel/core" "^7.20.0" "@babel/generator" "^7.20.0" @@ -5823,28 +6074,28 @@ [email protected]: "@babel/traverse" "^7.20.0" nullthrows "^1.1.1" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro-transform-worker/-/metro-transform-worker-0.76.8.tgz#b9012a196cee205170d0c899b8b175b9305acdea" - integrity sha512-mE1fxVAnJKmwwJyDtThildxxos9+DGs9+vTrx2ktSFMEVTtXS/bIv2W6hux1pqivqAfyJpTeACXHk5u2DgGvIQ== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro-transform-worker/-/metro-transform-worker-0.80.9.tgz#f1d8ef4f77228bb7e1d20d3c06934166e8ee3b28" + integrity sha512-c/IrzMUVnI0hSVVit4TXzt3A1GiUltGVlzCmLJWxNrBGHGrJhvgePj38+GXl1Xf4Fd4vx6qLUkKMQ3ux73bFLQ== dependencies: "@babel/core" "^7.20.0" "@babel/generator" "^7.20.0" "@babel/parser" "^7.20.0" "@babel/types" "^7.20.0" - babel-preset-fbjs "^3.4.0" - metro "0.76.8" - metro-babel-transformer "0.76.8" - metro-cache "0.76.8" - metro-cache-key "0.76.8" - metro-source-map "0.76.8" - metro-transform-plugins "0.76.8" + metro "0.80.9" + metro-babel-transformer "0.80.9" + metro-cache "0.80.9" + metro-cache-key "0.80.9" + metro-minify-terser "0.80.9" + metro-source-map "0.80.9" + metro-transform-plugins "0.80.9" nullthrows "^1.1.1" [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/metro/-/metro-0.76.8.tgz#ba526808b99977ca3f9ac5a7432fd02a340d13a6" - integrity sha512-oQA3gLzrrYv3qKtuWArMgHPbHu8odZOD9AoavrqSFllkPgOtmkBvNNDLCELqv5SjBfqjISNffypg+5UGG3y0pg== [email protected], metro@^0.80.3: + version "0.80.9" + resolved "https://registry.yarnpkg.com/metro/-/metro-0.80.9.tgz#de3c2011df62036520d51d040d2dde0d015aecb6" + integrity sha512-Bc57Xf3GO2Xe4UWQsBj/oW6YfLPABEu8jfDVDiNmJvoQW4CO34oDPuYKe4KlXzXhcuNsqOtSxpbjCRRVjhhREg== dependencies: "@babel/code-frame" "^7.0.0" "@babel/core" "^7.20.0" @@ -5854,7 +6105,6 @@ [email protected]: "@babel/traverse" "^7.20.0" "@babel/types" "^7.20.0" accepts "^1.3.7" - async "^3.2.2" chalk "^4.0.0" ci-info "^2.0.0" connect "^3.6.5" @@ -5862,28 +6112,24 @@ [email protected]: denodeify "^1.2.1" error-stack-parser "^2.0.6" graceful-fs "^4.2.4" - hermes-parser "0.12.0" + hermes-parser "0.20.1" image-size "^1.0.2" invariant "^2.2.4" - jest-worker "^27.2.0" + jest-worker "^29.6.3" jsc-safe-url "^0.2.2" lodash.throttle "^4.1.1" - metro-babel-transformer "0.76.8" - metro-cache "0.76.8" - metro-cache-key "0.76.8" - metro-config "0.76.8" - metro-core "0.76.8" - metro-file-map "0.76.8" - metro-inspector-proxy "0.76.8" - metro-minify-terser "0.76.8" - metro-minify-uglify "0.76.8" - metro-react-native-babel-preset "0.76.8" - metro-resolver "0.76.8" - metro-runtime "0.76.8" - metro-source-map "0.76.8" - metro-symbolicate "0.76.8" - metro-transform-plugins "0.76.8" - metro-transform-worker "0.76.8" + metro-babel-transformer "0.80.9" + metro-cache "0.80.9" + metro-cache-key "0.80.9" + metro-config "0.80.9" + metro-core "0.80.9" + metro-file-map "0.80.9" + metro-resolver "0.80.9" + metro-runtime "0.80.9" + metro-source-map "0.80.9" + metro-symbolicate "0.80.9" + metro-transform-plugins "0.80.9" + metro-transform-worker "0.80.9" mime-types "^2.1.27" node-fetch "^2.2.0" nullthrows "^1.1.1" @@ -5959,6 +6205,13 @@ minimatch@^5.0.1: dependencies: brace-expansion "^2.0.1" +minimatch@^9.0.4: + version "9.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" + integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== + dependencies: + brace-expansion "^2.0.1" + minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" @@ -5971,6 +6224,11 @@ mkdirp@^0.5.1: dependencies: minimist "^1.2.6" +mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + [email protected]: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -5991,11 +6249,6 @@ [email protected]: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e" integrity sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA== -natural-compare-lite@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" - integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -6054,13 +6307,18 @@ [email protected]: fetch-blob "^3.1.4" formdata-polyfill "^4.0.10" -node-fetch@^2.2.0, node-fetch@^2.6.0, node-fetch@^2.6.7: +node-fetch@^2.2.0, node-fetch@^2.6.0: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== dependencies: whatwg-url "^5.0.0" +node-forge@^1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" + integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -6115,10 +6373,10 @@ nullthrows@^1.1.1: resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1" integrity sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw== [email protected]: - version "0.76.8" - resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.76.8.tgz#ac4c459465b1c0e2c29aaa527e09fc463d3ffec8" - integrity sha512-dlBkJJV5M/msj9KYA9upc+nUWVwuOFFTbu28X6kZeGwcuW+JxaHSBZ70SYQnk5M+j5JbNLR6yKHmgW4M5E7X5g== [email protected]: + version "0.80.9" + resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.80.9.tgz#4ae3edd807536097674ff943509089f5d4e0649f" + integrity sha512-v9yOxowkZbxWhKOaaTyLjIm1aLy4ebMNcSn4NYJKOAI/Qv+SkfEfszpLr2GIxsccmb2Y2HA9qtsqiIJ80ucpVA== object-assign@^4.1.1: version "4.1.1" @@ -6220,15 +6478,15 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" [email protected], open@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/open/-/open-9.1.0.tgz#684934359c90ad25742f5a26151970ff8c6c80b6" - integrity sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg== [email protected]: + version "10.1.0" + resolved "https://registry.yarnpkg.com/open/-/open-10.1.0.tgz#a7795e6e5d519abe4286d9937bb24b51122598e1" + integrity sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw== dependencies: - default-browser "^4.0.0" + default-browser "^5.2.1" define-lazy-prop "^3.0.0" is-inside-container "^1.0.0" - is-wsl "^2.2.0" + is-wsl "^3.1.0" open@^6.2.0: version "6.4.0" @@ -6237,6 +6495,14 @@ open@^6.2.0: dependencies: is-wsl "^1.1.0" +open@^7.0.3: + version "7.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== + dependencies: + is-docker "^2.0.0" + is-wsl "^2.1.1" + optionator@^0.9.3: version "0.9.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" @@ -6249,19 +6515,19 @@ optionator@^0.9.3: prelude-ls "^1.2.1" type-check "^0.4.0" [email protected]: - version "7.0.1" - resolved "https://registry.yarnpkg.com/ora/-/ora-7.0.1.tgz#cdd530ecd865fe39e451a0e7697865669cb11930" - integrity sha512-0TUxTiFJWv+JnjWm4o9yvuskpEJLXTcng8MJuKd+SzAzp2o+OP3HWqNhB4OdJRt1Vsd9/mR0oyaEYlOnL7XIRw== [email protected]: + version "8.0.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-8.0.1.tgz#6dcb9250a629642cbe0d2df3a6331ad6f7a2af3e" + integrity sha512-ANIvzobt1rls2BDny5fWZ3ZVKyD6nscLvfFRpQgfWsythlcsVUC9kL0zq6j2Z5z9wwp1kd7wpsD/T9qNPVLCaQ== dependencies: chalk "^5.3.0" cli-cursor "^4.0.0" - cli-spinners "^2.9.0" + cli-spinners "^2.9.2" is-interactive "^2.0.0" - is-unicode-supported "^1.3.0" - log-symbols "^5.1.0" - stdin-discarder "^0.1.0" - string-width "^6.1.0" + is-unicode-supported "^2.0.0" + log-symbols "^6.0.0" + stdin-discarder "^0.2.1" + string-width "^7.0.0" strip-ansi "^7.1.0" ora@^5.4.1: @@ -6304,7 +6570,7 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.2, p-limit@^3.1.0: +p-limit@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -6486,6 +6752,11 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +path-type@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-5.0.0.tgz#14b01ed7aea7ddf9c7c3f46181d4d04f9c785bb8" + integrity sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg== + picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" @@ -6582,7 +6853,7 @@ promise@^8.3.0: dependencies: asap "~2.0.6" -prompts@^2.4.0, prompts@^2.4.2: +prompts@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== @@ -6609,15 +6880,15 @@ protocols@^2.0.0, protocols@^2.0.1: resolved "https://registry.yarnpkg.com/protocols/-/protocols-2.0.1.tgz#8f155da3fc0f32644e83c5782c8e8212ccf70a86" integrity sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q== [email protected]: - version "6.3.1" - resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.3.1.tgz#40e7b230552cf44fd23ffaf7c59024b692612687" - integrity sha512-Rb5RVBy1iyqOtNl15Cw/llpeLH8bsb37gM1FUfKQ+Wck6xHlbAhWGUFiTRHtkjqGTA5pSHz6+0hrPW/oECihPQ== [email protected]: + version "6.4.0" + resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.4.0.tgz#b4e2dd51dee2b377748aef8d45604c2d7608652d" + integrity sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ== dependencies: agent-base "^7.0.2" debug "^4.3.4" - http-proxy-agent "^7.0.0" - https-proxy-agent "^7.0.2" + http-proxy-agent "^7.0.1" + https-proxy-agent "^7.0.3" lru-cache "^7.14.1" pac-proxy-agent "^7.0.1" proxy-from-env "^1.1.0" @@ -6648,6 +6919,11 @@ pupa@^3.1.0: dependencies: escape-goat "^4.0.0" +querystring@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd" + integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg== + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -6680,10 +6956,10 @@ [email protected]: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-devtools-core@^4.27.2: - version "4.28.5" - resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.28.5.tgz#c8442b91f068cdf0c899c543907f7f27d79c2508" - integrity sha512-cq/o30z9W2Wb4rzBefjv5fBalHU0rJGZCHAkf/RHSBWSSYwh8PlQTqqOJmgIIbBtpj27T6FIPXeomIjZtCNVqA== +react-devtools-core@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-5.2.0.tgz#072ecd2d84d3653817cc11e4b16f60a3c2b705f9" + integrity sha512-vZK+/gvxxsieAoAyYaiRIVFxlajb7KXhgBDV7OsoMzaAE+IqGpoxusBjIgq5ibqA2IloKu0p9n7tE68z1xs18A== dependencies: shell-quote "^1.6.1" ws "^7" @@ -6703,10 +6979,10 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== -react-native-builder-bob@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/react-native-builder-bob/-/react-native-builder-bob-0.21.3.tgz#6cdef5a020bae60286e72c6941df9a2d410e3f19" - integrity sha512-ZlEXWzgIRfRvQEDEYnoTeJ2og5zDbORB0BMGzpE34TxO22+DZeXH4yFYUtZLrUxvUi5WVo/1V2sVjjnUNZL85Q== +react-native-builder-bob@^0.23.2: + version "0.23.2" + resolved "https://registry.yarnpkg.com/react-native-builder-bob/-/react-native-builder-bob-0.23.2.tgz#9f3f6509a9cba8102468169963ca7e1f0aa941a5" + integrity sha512-ehv2XKS9cvPR5JR7FIpSx3qY7tULkljT2Kb82FBAxXsFLjqlRU1WfqHRLh6lytL2XqAxLQODpPfHUH53SsXnag== dependencies: "@babel/core" "^7.18.5" "@babel/plugin-proposal-class-properties" "^7.17.12" @@ -6727,13 +7003,11 @@ react-native-builder-bob@^0.21.3: prompts "^2.4.2" which "^2.0.2" yargs "^17.5.1" - optionalDependencies: - jetifier "^2.0.0" -react-native-reanimated@^3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-3.8.1.tgz#45c13d4bedebef8df3d5a8756f25072de65960d7" - integrity sha512-EdM0vr3JEaNtqvstqESaPfOBy0gjYBkr1iEolWJ82Ax7io8y9OVUIphgsLKTB36CtR1XtmBw0RZVj7KArc7ZVA== +react-native-reanimated@^3.12.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-3.12.0.tgz#2c768d43971bb19e425c436c892bf68c74b9ccab" + integrity sha512-Bwa4jKL/QttnV8pQYiX+1N5a6XgL8yZtMyH+7UbEaW7ZeNCv1Pxp2PmYu/bP3LafCkmS9Yj/hY2adYNKe58g9A== dependencies: "@babel/plugin-transform-arrow-functions" "^7.0.0-0" "@babel/plugin-transform-nullish-coalescing-operator" "^7.0.0-0" @@ -6751,44 +7025,45 @@ react-native-worklets-core@^1.3.3: dependencies: string-hash-64 "^1.0.3" -react-native@^0.72.3: - version "0.72.7" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.72.7.tgz#5bf5b6e6a7ff2239e1d634ddc17c71d5a31927db" - integrity sha512-dqVFojOO9rOvyFbbM3/v9/GJR355OSuBhEY4NQlMIRc2w0Xch5MT/2uPoq3+OvJ+5h7a8LFAco3fucSffG0FbA== - dependencies: - "@jest/create-cache-key-function" "^29.2.1" - "@react-native-community/cli" "11.3.10" - "@react-native-community/cli-platform-android" "11.3.10" - "@react-native-community/cli-platform-ios" "11.3.10" - "@react-native/assets-registry" "^0.72.0" - "@react-native/codegen" "^0.72.7" - "@react-native/gradle-plugin" "^0.72.11" - "@react-native/js-polyfills" "^0.72.1" - "@react-native/normalize-colors" "^0.72.0" - "@react-native/virtualized-lists" "^0.72.8" +react-native@*, react-native@^0.74.2: + version "0.74.2" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.74.2.tgz#172e64e4e79861e2b3da99b86999e4a4c55b8321" + integrity sha512-EBMBjPPL4/GjHMP4NqsZabT3gI5WU9cSmduABGAGrd8uIcmTZ5F2Ng9k6gFmRm7n8e8CULxDNu98ZpQfBjl7Bw== + dependencies: + "@jest/create-cache-key-function" "^29.6.3" + "@react-native-community/cli" "13.6.8" + "@react-native-community/cli-platform-android" "13.6.8" + "@react-native-community/cli-platform-ios" "13.6.8" + "@react-native/assets-registry" "0.74.84" + "@react-native/codegen" "0.74.84" + "@react-native/community-cli-plugin" "0.74.84" + "@react-native/gradle-plugin" "0.74.84" + "@react-native/js-polyfills" "0.74.84" + "@react-native/normalize-colors" "0.74.84" + "@react-native/virtualized-lists" "0.74.84" abort-controller "^3.0.0" anser "^1.4.9" - base64-js "^1.1.2" - deprecated-react-native-prop-types "^4.2.3" + ansi-regex "^5.0.0" + base64-js "^1.5.1" + chalk "^4.0.0" event-target-shim "^5.0.1" - flow-enums-runtime "^0.0.5" + flow-enums-runtime "^0.0.6" invariant "^2.2.4" - jest-environment-node "^29.2.1" + jest-environment-node "^29.6.3" jsc-android "^250231.0.0" memoize-one "^5.0.0" - metro-runtime "0.76.8" - metro-source-map "0.76.8" + metro-runtime "^0.80.3" + metro-source-map "^0.80.3" mkdirp "^0.5.1" nullthrows "^1.1.1" pretty-format "^26.5.2" promise "^8.3.0" - react-devtools-core "^4.27.2" - react-refresh "^0.4.0" + react-devtools-core "^5.0.0" + react-refresh "^0.14.0" react-shallow-renderer "^16.15.0" regenerator-runtime "^0.13.2" scheduler "0.24.0-canary-efb381bbf-20230505" stacktrace-parser "^0.1.10" - use-sync-external-store "^1.0.0" whatwg-fetch "^3.0.0" ws "^6.2.2" yargs "^17.6.2" @@ -6801,10 +7076,10 @@ [email protected]: loose-envify "^1.1.0" scheduler "^0.21.0" -react-refresh@^0.4.0: - version "0.4.3" - resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.4.3.tgz#966f1750c191672e76e16c2efa569150cc73ab53" - integrity sha512-Hwln1VNuGl/6bVwnd0Xdn1e84gT/8T9aYNL+HAKDArLCS7LWjwr7StE30IEYbIkx0Vi3vs+coQxe+SQDbGbbpA== +react-refresh@^0.14.0: + version "0.14.2" + resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.2.tgz#3833da01ce32da470f1f936b9d477da5c7028bf9" + integrity sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA== react-shallow-renderer@^16.15.0: version "16.15.0" @@ -6814,10 +7089,10 @@ react-shallow-renderer@^16.15.0: object-assign "^4.1.1" react-is "^16.12.0 || ^17.0.0 || ^18.0.0" -react@^18.2.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" - integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== +react@^18.3.1: + version "18.3.1" + resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891" + integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ== dependencies: loose-envify "^1.1.0" @@ -6967,37 +7242,37 @@ regjsparser@^0.9.1: dependencies: jsesc "~0.5.0" -release-it@^16.1.3: - version "16.3.0" - resolved "https://registry.yarnpkg.com/release-it/-/release-it-16.3.0.tgz#d962283fd72cc24d80d1956fcc020922326f7a5a" - integrity sha512-CP+WwKbgEvXreq6Iz9po3BtcyELtTxrt5RXRGnazQ0eCphPxFZR29+8sEZRCsJq2IKvlwb5mFUbf92u426oQog== +release-it@^17.3.0: + version "17.3.0" + resolved "https://registry.yarnpkg.com/release-it/-/release-it-17.3.0.tgz#6174f82ac21d1c50c894327ad9aebfec4a604d6b" + integrity sha512-7t9a2WEwqQKCdteshZUrO/3RX60plS5CzYAFr5+4Zj8qvRx1pFOFVglJSz4BeFAEd2yejpPxfI60+qRUzLEDZw== dependencies: "@iarna/toml" "2.2.5" - "@octokit/rest" "19.0.13" + "@octokit/rest" "20.1.1" async-retry "1.3.3" chalk "5.3.0" - cosmiconfig "8.3.6" - execa "7.2.0" - git-url-parse "13.1.0" - globby "13.2.2" + cosmiconfig "9.0.0" + execa "8.0.1" + git-url-parse "14.0.0" + globby "14.0.1" got "13.0.0" - inquirer "9.2.11" + inquirer "9.2.22" is-ci "3.0.1" - issue-parser "6.0.0" + issue-parser "7.0.0" lodash "4.17.21" mime-types "2.1.35" new-github-release-url "2.0.0" node-fetch "3.3.2" - open "9.1.0" - ora "7.0.1" + open "10.1.0" + ora "8.0.1" os-name "5.1.0" promise.allsettled "1.0.7" - proxy-agent "6.3.1" - semver "7.5.4" + proxy-agent "6.4.0" + semver "7.6.2" shelljs "0.8.5" - update-notifier "6.0.2" + update-notifier "7.0.0" url-join "5.0.0" - wildcard-match "5.1.2" + wildcard-match "5.1.3" yargs-parser "21.1.1" require-directory@^2.1.1: @@ -7095,12 +7370,10 @@ rimraf@~2.6.2: dependencies: glob "^7.1.3" -run-applescript@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-5.0.0.tgz#e11e1c932e055d5c6b40d98374e0268d9b11899c" - integrity sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg== - dependencies: - execa "^5.0.0" +run-applescript@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-7.0.0.tgz#e5a553c2bffd620e169d276c1cd8f1b64778fbeb" + integrity sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A== run-async@^3.0.0: version "3.0.0" @@ -7174,6 +7447,14 @@ scheduler@^0.21.0: dependencies: loose-envify "^1.1.0" +selfsigned@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.4.1.tgz#560d90565442a3ed35b674034cec4e95dceb4ae0" + integrity sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q== + dependencies: + "@types/node-forge" "^1.3.0" + node-forge "^1" + semver-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-4.0.0.tgz#3afcf5ed6d62259f5c72d0d5d50dffbdc9680df5" @@ -7181,12 +7462,10 @@ semver-diff@^4.0.0: dependencies: semver "^7.3.5" [email protected], semver@^7.3.5, semver@^7.3.7, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4: - version "7.5.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== - dependencies: - lru-cache "^6.0.0" [email protected], semver@^7.6.0: + version "7.6.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" + integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== semver@^5.6.0: version "5.7.2" @@ -7198,6 +7477,13 @@ semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== +semver@^7.3.5, semver@^7.3.7, semver@^7.5.2, 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" + [email protected]: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -7247,6 +7533,18 @@ set-function-length@^1.1.1: gopd "^1.0.1" has-property-descriptors "^1.0.0" +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + 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" @@ -7303,11 +7601,16 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +signal-exit@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + simple-plist@^1.1.0: version "1.3.1" resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.3.1.tgz#16e1d8f62c6c9b691b8383127663d834112fb017" @@ -7327,10 +7630,10 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slash@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" - integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== +slash@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-5.1.0.tgz#be3adddcdf09ac38eebe8dcdc7b1a57a75b095ce" + integrity sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg== slice-ansi@^2.0.0: version "2.1.0" @@ -7456,12 +7759,10 @@ statuses@~1.5.0: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== -stdin-discarder@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/stdin-discarder/-/stdin-discarder-0.1.0.tgz#22b3e400393a8e28ebf53f9958f3880622efde21" - integrity sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ== - dependencies: - bl "^5.0.0" +stdin-discarder@^0.2.1: + version "0.2.2" + resolved "https://registry.yarnpkg.com/stdin-discarder/-/stdin-discarder-0.2.2.tgz#390037f44c4ae1a1ae535c5fe38dc3aba8d997be" + integrity sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ== stop-iteration-iterator@^1.0.0: version "1.0.0" @@ -7503,14 +7804,14 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -string-width@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-6.1.0.tgz#96488d6ed23f9ad5d82d13522af9e4c4c3fd7518" - integrity sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ== +string-width@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-7.1.0.tgz#d994252935224729ea3719c49f7206dc9c46550a" + integrity sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw== dependencies: - eastasianwidth "^0.2.0" - emoji-regex "^10.2.1" - strip-ansi "^7.0.1" + emoji-regex "^10.3.0" + get-east-asian-width "^1.0.0" + strip-ansi "^7.1.0" string.prototype.matchall@^4.0.8: version "4.0.10" @@ -7645,14 +7946,19 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -synckit@^0.8.5: - version "0.8.6" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.6.tgz#b69b7fbce3917c2673cbdc0d87fb324db4a5b409" - integrity sha512-laHF2savN6sMeHCjLRkheIU4wo3Zg9Ln5YOjOo7sZ5dVQW8yF5pPE5SIw1dsPhq3TRp1jisKRCdPhfs/1WMqDA== +synckit@^0.8.6: + version "0.8.8" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.8.tgz#fe7fe446518e3d3d49f5e429f443cf08b6edfcd7" + integrity sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ== dependencies: - "@pkgr/utils" "^2.4.2" + "@pkgr/core" "^0.1.0" tslib "^2.6.2" +temp-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" + integrity sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg== + temp@^0.8.4: version "0.8.4" resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.4.tgz#8c97a33a4770072e0a05f919396c7665a7dd59f2" @@ -7698,11 +8004,6 @@ through2@^2.0.1: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -titleize@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53" - integrity sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ== - tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -7737,12 +8038,17 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +ts-api-utils@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" + integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== + tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.1, tslib@^2.1.0, tslib@^2.6.0, tslib@^2.6.2: +tslib@^2.0.1, tslib@^2.1.0, tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== @@ -7862,14 +8168,6 @@ typescript@^5.1.6: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== -uglify-es@^3.1.9: - version "3.3.9" - resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" - integrity sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ== - dependencies: - commander "~2.13.0" - source-map "~0.6.1" - uglify-js@^3.1.4: version "3.17.4" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" @@ -7925,6 +8223,11 @@ unicode-property-aliases-ecmascript@^2.0.0: resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== +unicorn-magic@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/unicorn-magic/-/unicorn-magic-0.1.0.tgz#1bb9a51c823aaf9d73a8bfcd3d1a23dde94b0ce4" + integrity sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ== + unique-string@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-3.0.0.tgz#84a1c377aff5fd7a8bc6b55d8244b2bd90d75b9a" @@ -7952,11 +8255,6 @@ unpipe@~1.0.0: resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== -untildify@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" - integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== - update-browserslist-db@^1.0.13: version "1.0.13" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" @@ -7965,23 +8263,21 @@ update-browserslist-db@^1.0.13: escalade "^3.1.1" picocolors "^1.0.0" [email protected]: - version "6.0.2" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-6.0.2.tgz#a6990253dfe6d5a02bd04fbb6a61543f55026b60" - integrity sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og== [email protected]: + version "7.0.0" + resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-7.0.0.tgz#295aa782dadab784ed4073f7ffaea1fb2123031c" + integrity sha512-Hv25Bh+eAbOLlsjJreVPOs4vd51rrtCrmhyOJtbpAojro34jS4KQaEp4/EvlHJX7jSO42VvEFpkastVyXyIsdQ== dependencies: - boxen "^7.0.0" - chalk "^5.0.1" + boxen "^7.1.1" + chalk "^5.3.0" configstore "^6.0.0" - has-yarn "^3.0.0" import-lazy "^4.0.0" - is-ci "^3.0.1" + is-in-ci "^0.1.0" is-installed-globally "^0.4.0" is-npm "^6.0.0" - is-yarn-global "^0.4.0" latest-version "^7.0.0" pupa "^3.1.0" - semver "^7.3.7" + semver "^7.5.4" semver-diff "^4.0.0" xdg-basedir "^5.1.0" @@ -7997,11 +8293,6 @@ [email protected]: resolved "https://registry.yarnpkg.com/url-join/-/url-join-5.0.0.tgz#c2f1e5cbd95fa91082a93b58a1f42fecb4bdbcf1" integrity sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA== -use-sync-external-store@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" - integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== - util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -8146,10 +8437,10 @@ widest-line@^4.0.1: dependencies: string-width "^5.0.1" [email protected]: - version "5.1.2" - resolved "https://registry.yarnpkg.com/wildcard-match/-/wildcard-match-5.1.2.tgz#66b438001391674d8599b45da051e0bd9f33cd2a" - integrity sha512-qNXwI591Z88c8bWxp+yjV60Ch4F8Riawe3iGxbzquhy8Xs9m+0+SLFBGb/0yCTIDElawtaImC37fYZ+dr32KqQ== [email protected]: + version "5.1.3" + resolved "https://registry.yarnpkg.com/wildcard-match/-/wildcard-match-5.1.3.tgz#7420e57a17307afed9e51eee36aa1dcc1b73ce11" + integrity sha512-a95hPUk+BNzSGLntNXYxsjz2Hooi5oL7xOfJR6CKwSsSALh7vUNuTlzsrZowtYy38JNduYFRVhFv19ocqNOZlg== windows-release@^5.0.1: version "5.1.1"
NETworkManager
https://github.com/BornToBeRoot/NETworkManager
5922a88ca23aa0d752b162bb0781a39f3618db0f
dependabot[bot]
2023-03-30 13:31:10
Build(deps): Bump AWSSDK.EC2 from 3.7.128.4 to 3.7.128.5 in /Source (#2117)
Bumps [AWSSDK.EC2](https://github.com/aws/aws-sdk-net) from 3.7.128.4 to 3.7.128.5. - [Release notes](https://github.com/aws/aws-sdk-net/releases) - [Commits](https://github.com/aws/aws-sdk-net/commits) ---
Build(deps): Bump AWSSDK.EC2 from 3.7.128.4 to 3.7.128.5 in /Source (#2117) Bumps [AWSSDK.EC2](https://github.com/aws/aws-sdk-net) from 3.7.128.4 to 3.7.128.5. - [Release notes](https://github.com/aws/aws-sdk-net/releases) - [Commits](https://github.com/aws/aws-sdk-net/commits) --- updated-dependencies: - dependency-name: AWSSDK.EC2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
diff --git a/Source/NETworkManager/NETworkManager.csproj b/Source/NETworkManager/NETworkManager.csproj index bdf6754468..628df15482 100644 --- a/Source/NETworkManager/NETworkManager.csproj +++ b/Source/NETworkManager/NETworkManager.csproj @@ -58,7 +58,7 @@ </ItemGroup> <ItemGroup> <PackageReference Include="AirspaceFixer" Version="1.0.6" /> - <PackageReference Include="AWSSDK.EC2" Version="3.7.128.4" /> + <PackageReference Include="AWSSDK.EC2" Version="3.7.128.5" /> <PackageReference Include="DnsClient" Version="1.7.0" /> <PackageReference Include="IPNetwork2" Version="2.6.556" /> <PackageReference Include="Lextm.SharpSnmpLib" Version="12.5.1" />
google-api-nodejs-client
https://github.com/googleapis/google-api-nodejs-client
8f35f5c4a625a171b807626ca89c845f78c69c6e
Yoshi Automation
2023-05-02 08:24:05
fix(appengine): update the API
#### appengine:v1alpha The following keys were changed: - schemas.Location.description #### appengine:v1beta The following keys were changed: - schemas.Location.description #### appengine:v1 The following keys were changed: - schemas.Location.description
fix(appengine): update the API #### appengine:v1alpha The following keys were changed: - schemas.Location.description #### appengine:v1beta The following keys were changed: - schemas.Location.description #### appengine:v1 The following keys were changed: - schemas.Location.description
diff --git a/discovery/appengine-v1.json b/discovery/appengine-v1.json index 448819c5e7..4053b414f9 100644 --- a/discovery/appengine-v1.json +++ b/discovery/appengine-v1.json @@ -1687,7 +1687,7 @@ } } }, - "revision": "20230403", + "revision": "20230424", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { @@ -2815,7 +2815,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/discovery/appengine-v1alpha.json b/discovery/appengine-v1alpha.json index 8eb06c1a83..25c102a6f9 100644 --- a/discovery/appengine-v1alpha.json +++ b/discovery/appengine-v1alpha.json @@ -887,7 +887,7 @@ } } }, - "revision": "20230403", + "revision": "20230424", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "AuthorizedCertificate": { @@ -1147,7 +1147,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/discovery/appengine-v1beta.json b/discovery/appengine-v1beta.json index 20c4585d65..1f0df40dd9 100644 --- a/discovery/appengine-v1beta.json +++ b/discovery/appengine-v1beta.json @@ -1898,7 +1898,7 @@ } } }, - "revision": "20230403", + "revision": "20230424", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { @@ -3077,7 +3077,7 @@ "type": "object" }, "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "description": "A resource that represents a Google Cloud location.", "id": "Location", "properties": { "displayName": { diff --git a/src/apis/appengine/v1.ts b/src/apis/appengine/v1.ts index 1fc7e40f5d..fe0cced785 100644 --- a/src/apis/appengine/v1.ts +++ b/src/apis/appengine/v1.ts @@ -934,7 +934,7 @@ export namespace appengine_v1 { timeout?: string | null; } /** - * A resource that represents Google Cloud Platform location. + * A resource that represents a Google Cloud location. */ export interface Schema$Location { /** diff --git a/src/apis/appengine/v1alpha.ts b/src/apis/appengine/v1alpha.ts index f7d8b49298..a96f9c6f0c 100644 --- a/src/apis/appengine/v1alpha.ts +++ b/src/apis/appengine/v1alpha.ts @@ -328,7 +328,7 @@ export namespace appengine_v1alpha { operations?: Schema$Operation[]; } /** - * A resource that represents Google Cloud Platform location. + * A resource that represents a Google Cloud location. */ export interface Schema$Location { /** diff --git a/src/apis/appengine/v1beta.ts b/src/apis/appengine/v1beta.ts index 280b97b157..c596f33c5d 100644 --- a/src/apis/appengine/v1beta.ts +++ b/src/apis/appengine/v1beta.ts @@ -976,7 +976,7 @@ export namespace appengine_v1beta { timeout?: string | null; } /** - * A resource that represents Google Cloud Platform location. + * A resource that represents a Google Cloud location. */ export interface Schema$Location { /**
appsmith
https://github.com/appsmithorg/appsmith
764d8f3cb503b38f0e21a7f709d89da0bce80680
Pawan Kumar
2024-10-30 16:43:00
chore: fix prop name in options control (#37130)
/ok-to-test tags="@tag.Widget" The options control was using `options` as the property name for the options array even when thee prop name was not `options`. This was causing issues when the property name was different. <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/11590623056> > Commit: 1e16edb367a0bbbfb54db681cb34283f01724e0a > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11590623056&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Widget` > Spec: > <hr>Wed, 30 Oct 2024 11:11:49 UTC <!-- end of auto-generated comment: Cypress test results --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced the `OptionControl` component to support dynamic property updates based on component props. - **Bug Fixes** - Improved the handling of property updates, allowing for more flexible and accurate updates. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
chore: fix prop name in options control (#37130) /ok-to-test tags="@tag.Widget" The options control was using `options` as the property name for the options array even when thee prop name was not `options`. This was causing issues when the property name was different. <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/11590623056> > Commit: 1e16edb367a0bbbfb54db681cb34283f01724e0a > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11590623056&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Widget` > Spec: > <hr>Wed, 30 Oct 2024 11:11:49 UTC <!-- end of auto-generated comment: Cypress test results --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced the `OptionControl` component to support dynamic property updates based on component props. - **Bug Fixes** - Improved the handling of property updates, allowing for more flexible and accurate updates. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
diff --git a/app/client/src/components/propertyControls/OptionControl.tsx b/app/client/src/components/propertyControls/OptionControl.tsx index 8a9ceebdf137..c4ab3c911c5b 100644 --- a/app/client/src/components/propertyControls/OptionControl.tsx +++ b/app/client/src/components/propertyControls/OptionControl.tsx @@ -20,7 +20,7 @@ class OptionControl extends BaseControl<ControlProps> { options: SegmentedControlOption[], isUpdatedViaKeyboard = false, ) => { - this.updateProperty("options", options, isUpdatedViaKeyboard); + this.updateProperty(this.props.propertyName, options, isUpdatedViaKeyboard); }; static getControlType() {
mapperly
https://github.com/riok/mapperly
49923eefa959be9087af0d36bfe3136a48d28965
dependabot[bot]
2023-08-15 20:41:49
chore(deps): Bump Verify.XUnit from 20.6.0 to 20.8.0 (#649)
Bumps [Verify.XUnit](https://github.com/VerifyTests/Verify) from 20.6.0 to 20.8.0. - [Release notes](https://github.com/VerifyTests/Verify/releases) - [Commits](https://github.com/VerifyTests/Verify/compare/20.6.0...20.8.0) ---
chore(deps): Bump Verify.XUnit from 20.6.0 to 20.8.0 (#649) Bumps [Verify.XUnit](https://github.com/VerifyTests/Verify) from 20.6.0 to 20.8.0. - [Release notes](https://github.com/VerifyTests/Verify/releases) - [Commits](https://github.com/VerifyTests/Verify/compare/20.6.0...20.8.0) --- updated-dependencies: - dependency-name: Verify.XUnit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 830f53ce6e..a8dee72999 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -24,7 +24,7 @@ <PrivateAssets>all</PrivateAssets> </PackageReference> <PackageReference Include="Meziantou.Xunit.ParallelTestFramework" Version="2.1.0"/> - <PackageReference Include="Verify.XUnit" Version="20.6.0" /> + <PackageReference Include="Verify.XUnit" Version="20.8.0" /> <PackageReference Include="Moq" Version="4.18.4" /> </ItemGroup> </Project>
bytebase
https://github.com/bytebase/bytebase
404836e01598cc0bfd07fc05fc7b8504a3157110
Danny Xu
2023-11-17 07:27:37
chore: use statement sheet from change history (#9386)
* chore: use statement sheet * chore: update
chore: use statement sheet from change history (#9386) * chore: use statement sheet * chore: update
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vue index d93a239e8cf095..3897830a6f2e84 100644 --- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vue +++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryForm.vue @@ -68,7 +68,6 @@ import { useChangeHistoryStore, useDBSchemaV1Store, useDatabaseV1Store, - useLocalSheetStore, } from "@/store"; import { UNKNOWN_ID } from "@/types"; import { AffectedTable, EmptyAffectedTable } from "@/types/changeHistory"; @@ -81,7 +80,6 @@ import { extractDatabaseResourceName, getAffectedTablesOfChangeHistory, keyBy, - setSheetStatement, } from "@/utils"; import ChangeHistoryDetailPanel from "../../ChangeHistoryDetailPanel"; import { useChangelistDetailContext } from "../../context"; @@ -102,7 +100,6 @@ type LocalState = { const { project } = useChangelistDetailContext(); const { changesFromChangeHistory: changes } = useAddChangeContext(); -const localSheetStore = useLocalSheetStore(); const state = reactive<LocalState>({ isLoading: false, @@ -166,13 +163,8 @@ const selectedChangeHistoryList = computed<string[]>({ if (existedChange) { updatedChanges.push(existedChange); } else { - const uid = localSheetStore.nextUID(); - const sheet = localSheetStore.createLocalSheet( - `${project.value.name}/sheets/${uid}` - ); - setSheetStatement(sheet, changeHistory.statement); updatedChanges.push({ - sheet: sheet.name, + sheet: changeHistory.statementSheet, source: changeHistory.name, }); }
deno
https://github.com/denoland/deno
d5c00ef50e6519fccde54a577e038f0ebb1282e9
Yusuke Tanaka
2024-09-18 10:05:48
feat(cli): evaluate code snippets in JSDoc and markdown (#25220)
This commit lets `deno test --doc` command actually evaluate code snippets in JSDoc and markdown files. ## How it works 1. Extract code snippets from JSDoc or code fences 2. Convert them into pseudo files by wrapping them in `Deno.test(...)` 3. Register the pseudo files as in-memory files 4. Run type-check and evaluation We apply some magic at the step 2 - let's say we have the following file named `mod.ts` as an input: ````ts /** * ```ts * import { assertEquals } from "jsr:@std/assert/equals"; * * assertEquals(add(1, 2), 3); * ``` */ export function add(a: number, b: number) { return a + b; } ```` This is virtually transformed into: ```ts import { assertEquals } from "jsr:@std/assert/equals"; import { add } from "files:///path/to/mod.ts"; Deno.test("mod.ts$2-7.ts", async () => { assertEquals(add(1, 2), 3); }); ``` Note that a new import statement is inserted here to make `add` function available. In a nutshell, all items exported from `mod.ts` become available in the generated pseudo file with this automatic import insertion. The intention behind this design is that, from library user's standpoint, it should be very obvious that this `add` function is what this example code is attached to. Also, if there is an explicit import statement like `import { add } from "./mod.ts"`, this import path `./mod.ts` is not helpful for doc readers because they will need to import it in a different way. The automatic import insertion has some edge cases, in particular where there is a local variable in a snippet with the same name as one of the exported items. This case is addressed by employing swc's scope analysis (see test cases for more details). ## "type-checking only" mode stays around This change will likely impact a lot of existing doc tests in the ecosystem because some doc tests rely on the fact that they are not evaluated - some cause side effects if executed, some throw errors at runtime although they do pass the type check, etc. To help those tests gradually transition to the ones runnable with the new `deno test --doc`, we will keep providing the ability to run type-checking only via `deno check --doc`. Additionally there is a `--doc-only` option added to the `check` subcommand too, which is useful when you want to type-check on code snippets in markdown files, as normal `deno check` command doesn't accept markdown. ## Demo
feat(cli): evaluate code snippets in JSDoc and markdown (#25220) This commit lets `deno test --doc` command actually evaluate code snippets in JSDoc and markdown files. ## How it works 1. Extract code snippets from JSDoc or code fences 2. Convert them into pseudo files by wrapping them in `Deno.test(...)` 3. Register the pseudo files as in-memory files 4. Run type-check and evaluation We apply some magic at the step 2 - let's say we have the following file named `mod.ts` as an input: ````ts /** * ```ts * import { assertEquals } from "jsr:@std/assert/equals"; * * assertEquals(add(1, 2), 3); * ``` */ export function add(a: number, b: number) { return a + b; } ```` This is virtually transformed into: ```ts import { assertEquals } from "jsr:@std/assert/equals"; import { add } from "files:///path/to/mod.ts"; Deno.test("mod.ts$2-7.ts", async () => { assertEquals(add(1, 2), 3); }); ``` Note that a new import statement is inserted here to make `add` function available. In a nutshell, all items exported from `mod.ts` become available in the generated pseudo file with this automatic import insertion. The intention behind this design is that, from library user's standpoint, it should be very obvious that this `add` function is what this example code is attached to. Also, if there is an explicit import statement like `import { add } from "./mod.ts"`, this import path `./mod.ts` is not helpful for doc readers because they will need to import it in a different way. The automatic import insertion has some edge cases, in particular where there is a local variable in a snippet with the same name as one of the exported items. This case is addressed by employing swc's scope analysis (see test cases for more details). ## "type-checking only" mode stays around This change will likely impact a lot of existing doc tests in the ecosystem because some doc tests rely on the fact that they are not evaluated - some cause side effects if executed, some throw errors at runtime although they do pass the type check, etc. To help those tests gradually transition to the ones runnable with the new `deno test --doc`, we will keep providing the ability to run type-checking only via `deno check --doc`. Additionally there is a `--doc-only` option added to the `check` subcommand too, which is useful when you want to type-check on code snippets in markdown files, as normal `deno check` command doesn't accept markdown. ## Demo https://github.com/user-attachments/assets/47e9af73-d16e-472d-b09e-1853b9e8f5ce --- Closes #4716
diff --git a/cli/args/flags.rs b/cli/args/flags.rs index f832c2a623294d..92336a0a16fdf9 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -109,6 +109,8 @@ pub struct CacheFlags { #[derive(Clone, Debug, Eq, PartialEq)] pub struct CheckFlags { pub files: Vec<String>, + pub doc: bool, + pub doc_only: bool, } #[derive(Clone, Debug, Eq, PartialEq)] @@ -1694,6 +1696,19 @@ Unless --reload is specified, this command will not re-download already cached d .conflicts_with("no-remote") .hide(true) ) + .arg( + Arg::new("doc") + .long("doc") + .help("Type-check code blocks in JSDoc as well as actual code") + .action(ArgAction::SetTrue) + ) + .arg( + Arg::new("doc-only") + .long("doc-only") + .help("Type-check code blocks in JSDoc and Markdown only") + .action(ArgAction::SetTrue) + .conflicts_with("doc") + ) .arg( Arg::new("file") .num_args(1..) @@ -2789,7 +2804,7 @@ or <c>**/__tests__/**</>: .arg( Arg::new("doc") .long("doc") - .help("Type-check code blocks in JSDoc and Markdown") + .help("Evaluate code blocks in JSDoc and Markdown") .action(ArgAction::SetTrue) .help_heading(TEST_HEADING), ) @@ -4121,7 +4136,11 @@ fn check_parse( if matches.get_flag("all") || matches.get_flag("remote") { flags.type_check_mode = TypeCheckMode::All; } - flags.subcommand = DenoSubcommand::Check(CheckFlags { files }); + flags.subcommand = DenoSubcommand::Check(CheckFlags { + files, + doc: matches.get_flag("doc"), + doc_only: matches.get_flag("doc-only"), + }); Ok(()) } @@ -6862,12 +6881,55 @@ mod tests { Flags { subcommand: DenoSubcommand::Check(CheckFlags { files: svec!["script.ts"], + doc: false, + doc_only: false, + }), + type_check_mode: TypeCheckMode::Local, + ..Flags::default() + } + ); + + let r = flags_from_vec(svec!["deno", "check", "--doc", "script.ts"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Check(CheckFlags { + files: svec!["script.ts"], + doc: true, + doc_only: false, }), type_check_mode: TypeCheckMode::Local, ..Flags::default() } ); + let r = flags_from_vec(svec!["deno", "check", "--doc-only", "markdown.md"]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Check(CheckFlags { + files: svec!["markdown.md"], + doc: false, + doc_only: true, + }), + type_check_mode: TypeCheckMode::Local, + ..Flags::default() + } + ); + + // `--doc` and `--doc-only` are mutually exclusive + let r = flags_from_vec(svec![ + "deno", + "check", + "--doc", + "--doc-only", + "script.ts" + ]); + assert_eq!( + r.unwrap_err().kind(), + clap::error::ErrorKind::ArgumentConflict + ); + for all_flag in ["--remote", "--all"] { let r = flags_from_vec(svec!["deno", "check", all_flag, "script.ts"]); assert_eq!( @@ -6875,6 +6937,8 @@ mod tests { Flags { subcommand: DenoSubcommand::Check(CheckFlags { files: svec!["script.ts"], + doc: false, + doc_only: false, }), type_check_mode: TypeCheckMode::All, ..Flags::default() diff --git a/cli/lsp/testing/execution.rs b/cli/lsp/testing/execution.rs index a8cea8dd449a21..55d81f34278b96 100644 --- a/cli/lsp/testing/execution.rs +++ b/cli/lsp/testing/execution.rs @@ -234,16 +234,9 @@ impl TestRun { &cli_options.permissions_options(), )?; let main_graph_container = factory.main_module_graph_container().await?; - test::check_specifiers( - factory.file_fetcher()?, - main_graph_container, - self - .queue - .iter() - .map(|s| (s.clone(), test::TestMode::Executable)) - .collect(), - ) - .await?; + main_graph_container + .check_specifiers(&self.queue.iter().cloned().collect::<Vec<_>>()) + .await?; let (concurrent_jobs, fail_fast) = if let DenoSubcommand::Test(test_flags) = cli_options.sub_command() { diff --git a/cli/main.rs b/cli/main.rs index 10d9ead4e846cc..a7e1c8342e5059 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -121,12 +121,7 @@ async fn run_subcommand(flags: Arc<Flags>) -> Result<i32, AnyError> { tools::installer::install_from_entrypoints(flags, &cache_flags.files).await }), DenoSubcommand::Check(check_flags) => spawn_subcommand(async move { - let factory = CliFactory::from_flags(flags); - let main_graph_container = - factory.main_module_graph_container().await?; - main_graph_container - .load_and_type_check_files(&check_flags.files) - .await + tools::check::check(flags, check_flags).await }), DenoSubcommand::Clean => spawn_subcommand(async move { tools::clean::clean() diff --git a/cli/tools/check.rs b/cli/tools/check.rs index d50af52307820e..9c464fa1694fe8 100644 --- a/cli/tools/check.rs +++ b/cli/tools/check.rs @@ -15,7 +15,9 @@ use once_cell::sync::Lazy; use regex::Regex; use crate::args::check_warn_tsconfig; +use crate::args::CheckFlags; use crate::args::CliOptions; +use crate::args::Flags; use crate::args::TsConfig; use crate::args::TsConfigType; use crate::args::TsTypeLib; @@ -24,13 +26,57 @@ use crate::cache::CacheDBHash; use crate::cache::Caches; use crate::cache::FastInsecureHasher; use crate::cache::TypeCheckCache; +use crate::factory::CliFactory; use crate::graph_util::BuildFastCheckGraphOptions; use crate::graph_util::ModuleGraphBuilder; use crate::npm::CliNpmResolver; use crate::tsc; use crate::tsc::Diagnostics; +use crate::util::extract; use crate::util::path::to_percent_decoded_str; +pub async fn check( + flags: Arc<Flags>, + check_flags: CheckFlags, +) -> Result<(), AnyError> { + let factory = CliFactory::from_flags(flags); + + let main_graph_container = factory.main_module_graph_container().await?; + + let specifiers = + main_graph_container.collect_specifiers(&check_flags.files)?; + if specifiers.is_empty() { + log::warn!("{} No matching files found.", colors::yellow("Warning")); + } + + let specifiers_for_typecheck = if check_flags.doc || check_flags.doc_only { + let file_fetcher = factory.file_fetcher()?; + + let mut specifiers_for_typecheck = if check_flags.doc { + specifiers.clone() + } else { + vec![] + }; + + for s in specifiers { + let file = file_fetcher.fetch_bypass_permissions(&s).await?; + let snippet_files = extract::extract_snippet_files(file)?; + for snippet_file in snippet_files { + specifiers_for_typecheck.push(snippet_file.specifier.clone()); + file_fetcher.insert_memory_files(snippet_file); + } + } + + specifiers_for_typecheck + } else { + specifiers + }; + + main_graph_container + .check_specifiers(&specifiers_for_typecheck) + .await +} + /// Options for performing a check of a module graph. Note that the decision to /// emit or not is determined by the `ts_config` settings. pub struct CheckOptions { diff --git a/cli/tools/test/mod.rs b/cli/tools/test/mod.rs index 63382ffc6763e0..d043ffcbaa4dfe 100644 --- a/cli/tools/test/mod.rs +++ b/cli/tools/test/mod.rs @@ -9,21 +9,18 @@ use crate::display; use crate::factory::CliFactory; use crate::file_fetcher::File; use crate::file_fetcher::FileFetcher; -use crate::graph_container::MainModuleGraphContainer; use crate::graph_util::has_graph_root_local_dependent_changed; use crate::ops; +use crate::util::extract::extract_doc_tests; use crate::util::file_watcher; use crate::util::fs::collect_specifiers; use crate::util::path::get_extension; use crate::util::path::is_script_ext; -use crate::util::path::mapped_specifier_for_tsc; use crate::util::path::matches_pattern_or_exact_path; use crate::worker::CliMainWorkerFactory; use crate::worker::CoverageCollector; -use deno_ast::swc::common::comments::CommentKind; use deno_ast::MediaType; -use deno_ast::SourceRangedForSpanned; use deno_config::glob::FilePatterns; use deno_config::glob::WalkEntry; use deno_core::anyhow; @@ -151,6 +148,20 @@ pub enum TestMode { Both, } +impl TestMode { + /// Returns `true` if the test mode indicates that code snippet extraction is + /// needed. + fn needs_test_extraction(&self) -> bool { + matches!(self, Self::Documentation | Self::Both) + } + + /// Returns `true` if the test mode indicates that the test should be + /// type-checked and run. + fn needs_test_run(&self) -> bool { + matches!(self, Self::Executable | Self::Both) + } +} + #[derive(Clone, Debug, Default)] pub struct TestFilter { pub substring: Option<String>, @@ -1174,233 +1185,6 @@ async fn wait_for_activity_to_stabilize( }) } -fn extract_files_from_regex_blocks( - specifier: &ModuleSpecifier, - source: &str, - media_type: MediaType, - file_line_index: usize, - blocks_regex: &Regex, - lines_regex: &Regex, -) -> Result<Vec<File>, AnyError> { - let files = blocks_regex - .captures_iter(source) - .filter_map(|block| { - block.get(1)?; - - let maybe_attributes: Option<Vec<_>> = block - .get(1) - .map(|attributes| attributes.as_str().split(' ').collect()); - - let file_media_type = if let Some(attributes) = maybe_attributes { - if attributes.contains(&"ignore") { - return None; - } - - match attributes.first() { - Some(&"js") => MediaType::JavaScript, - Some(&"javascript") => MediaType::JavaScript, - Some(&"mjs") => MediaType::Mjs, - Some(&"cjs") => MediaType::Cjs, - Some(&"jsx") => MediaType::Jsx, - Some(&"ts") => MediaType::TypeScript, - Some(&"typescript") => MediaType::TypeScript, - Some(&"mts") => MediaType::Mts, - Some(&"cts") => MediaType::Cts, - Some(&"tsx") => MediaType::Tsx, - _ => MediaType::Unknown, - } - } else { - media_type - }; - - if file_media_type == MediaType::Unknown { - return None; - } - - let line_offset = source[0..block.get(0).unwrap().start()] - .chars() - .filter(|c| *c == '\n') - .count(); - - let line_count = block.get(0).unwrap().as_str().split('\n').count(); - - let body = block.get(2).unwrap(); - let text = body.as_str(); - - // TODO(caspervonb) generate an inline source map - let mut file_source = String::new(); - for line in lines_regex.captures_iter(text) { - let text = line.get(1).unwrap(); - writeln!(file_source, "{}", text.as_str()).unwrap(); - } - - let file_specifier = ModuleSpecifier::parse(&format!( - "{}${}-{}", - specifier, - file_line_index + line_offset + 1, - file_line_index + line_offset + line_count + 1, - )) - .unwrap(); - let file_specifier = - mapped_specifier_for_tsc(&file_specifier, file_media_type) - .map(|s| ModuleSpecifier::parse(&s).unwrap()) - .unwrap_or(file_specifier); - - Some(File { - specifier: file_specifier, - maybe_headers: None, - source: file_source.into_bytes().into(), - }) - }) - .collect(); - - Ok(files) -} - -fn extract_files_from_source_comments( - specifier: &ModuleSpecifier, - source: Arc<str>, - media_type: MediaType, -) -> Result<Vec<File>, AnyError> { - let parsed_source = deno_ast::parse_module(deno_ast::ParseParams { - specifier: specifier.clone(), - text: source, - media_type, - capture_tokens: false, - maybe_syntax: None, - scope_analysis: false, - })?; - let comments = parsed_source.comments().get_vec(); - let blocks_regex = lazy_regex::regex!(r"```([^\r\n]*)\r?\n([\S\s]*?)```"); - let lines_regex = lazy_regex::regex!(r"(?:\* ?)(?:\# ?)?(.*)"); - - let files = comments - .iter() - .filter(|comment| { - if comment.kind != CommentKind::Block || !comment.text.starts_with('*') { - return false; - } - - true - }) - .flat_map(|comment| { - extract_files_from_regex_blocks( - specifier, - &comment.text, - media_type, - parsed_source.text_info_lazy().line_index(comment.start()), - blocks_regex, - lines_regex, - ) - }) - .flatten() - .collect(); - - Ok(files) -} - -fn extract_files_from_fenced_blocks( - specifier: &ModuleSpecifier, - source: &str, - media_type: MediaType, -) -> Result<Vec<File>, AnyError> { - // The pattern matches code blocks as well as anything in HTML comment syntax, - // but it stores the latter without any capturing groups. This way, a simple - // check can be done to see if a block is inside a comment (and skip typechecking) - // or not by checking for the presence of capturing groups in the matches. - let blocks_regex = - lazy_regex::regex!(r"(?s)<!--.*?-->|```([^\r\n]*)\r?\n([\S\s]*?)```"); - let lines_regex = lazy_regex::regex!(r"(?:\# ?)?(.*)"); - - extract_files_from_regex_blocks( - specifier, - source, - media_type, - /* file line index */ 0, - blocks_regex, - lines_regex, - ) -} - -async fn fetch_inline_files( - file_fetcher: &FileFetcher, - specifiers: Vec<ModuleSpecifier>, -) -> Result<Vec<File>, AnyError> { - let mut files = Vec::new(); - for specifier in specifiers { - let file = file_fetcher - .fetch_bypass_permissions(&specifier) - .await? - .into_text_decoded()?; - - let inline_files = if file.media_type == MediaType::Unknown { - extract_files_from_fenced_blocks( - &file.specifier, - &file.source, - file.media_type, - ) - } else { - extract_files_from_source_comments( - &file.specifier, - file.source, - file.media_type, - ) - }; - - files.extend(inline_files?); - } - - Ok(files) -} - -/// Type check a collection of module and document specifiers. -pub async fn check_specifiers( - file_fetcher: &FileFetcher, - main_graph_container: &Arc<MainModuleGraphContainer>, - specifiers: Vec<(ModuleSpecifier, TestMode)>, -) -> Result<(), AnyError> { - let inline_files = fetch_inline_files( - file_fetcher, - specifiers - .iter() - .filter_map(|(specifier, mode)| { - if *mode != TestMode::Executable { - Some(specifier.clone()) - } else { - None - } - }) - .collect(), - ) - .await?; - - let mut module_specifiers = specifiers - .into_iter() - .filter_map(|(specifier, mode)| { - if mode != TestMode::Documentation { - Some(specifier) - } else { - None - } - }) - .collect::<Vec<_>>(); - - if !inline_files.is_empty() { - module_specifiers - .extend(inline_files.iter().map(|file| file.specifier.clone())); - - for file in inline_files { - file_fetcher.insert_memory_files(file); - } - } - - main_graph_container - .check_specifiers(&module_specifiers) - .await?; - - Ok(()) -} - static HAS_TEST_RUN_SIGINT_HANDLER: AtomicBool = AtomicBool::new(false); /// Test a collection of specifiers with test modes concurrently. @@ -1788,14 +1572,19 @@ pub async fn run_tests( return Err(generic_error("No test modules found")); } + let doc_tests = get_doc_tests(&specifiers_with_mode, file_fetcher).await?; + let specifiers_for_typecheck_and_test = + get_target_specifiers(specifiers_with_mode, &doc_tests); + for doc_test in doc_tests { + file_fetcher.insert_memory_files(doc_test); + } + let main_graph_container = factory.main_module_graph_container().await?; - check_specifiers( - file_fetcher, - main_graph_container, - specifiers_with_mode.clone(), - ) - .await?; + // Typecheck + main_graph_container + .check_specifiers(&specifiers_for_typecheck_and_test) + .await?; if workspace_test_options.no_run { return Ok(()); @@ -1804,17 +1593,12 @@ pub async fn run_tests( let worker_factory = Arc::new(factory.create_cli_main_worker_factory().await?); + // Run tests test_specifiers( worker_factory, &permissions, permission_desc_parser, - specifiers_with_mode - .into_iter() - .filter_map(|(s, m)| match m { - TestMode::Documentation => None, - _ => Some(s), - }) - .collect(), + specifiers_for_typecheck_and_test, TestSpecifiersOptions { cwd: Url::from_directory_path(cli_options.initial_cwd()).map_err( |_| { @@ -1949,8 +1733,6 @@ pub async fn run_tests_with_watch( test_modules.clone() }; - let worker_factory = - Arc::new(factory.create_cli_main_worker_factory().await?); let specifiers_with_mode = fetch_specifiers_with_test_mode( &cli_options, file_fetcher, @@ -1962,30 +1744,34 @@ pub async fn run_tests_with_watch( .filter(|(specifier, _)| test_modules_to_reload.contains(specifier)) .collect::<Vec<(ModuleSpecifier, TestMode)>>(); + let doc_tests = + get_doc_tests(&specifiers_with_mode, file_fetcher).await?; + let specifiers_for_typecheck_and_test = + get_target_specifiers(specifiers_with_mode, &doc_tests); + for doc_test in doc_tests { + file_fetcher.insert_memory_files(doc_test); + } + let main_graph_container = factory.main_module_graph_container().await?; - check_specifiers( - file_fetcher, - main_graph_container, - specifiers_with_mode.clone(), - ) - .await?; + + // Typecheck + main_graph_container + .check_specifiers(&specifiers_for_typecheck_and_test) + .await?; if workspace_test_options.no_run { return Ok(()); } + let worker_factory = + Arc::new(factory.create_cli_main_worker_factory().await?); + test_specifiers( worker_factory, &permissions, permission_desc_parser, - specifiers_with_mode - .into_iter() - .filter_map(|(s, m)| match m { - TestMode::Documentation => None, - _ => Some(s), - }) - .collect(), + specifiers_for_typecheck_and_test, TestSpecifiersOptions { cwd: Url::from_directory_path(cli_options.initial_cwd()).map_err( |_| { @@ -2020,6 +1806,38 @@ pub async fn run_tests_with_watch( Ok(()) } +/// Extracts doc tests from files specified by the given specifiers. +async fn get_doc_tests( + specifiers_with_mode: &[(Url, TestMode)], + file_fetcher: &FileFetcher, +) -> Result<Vec<File>, AnyError> { + let specifiers_needing_extraction = specifiers_with_mode + .iter() + .filter(|(_, mode)| mode.needs_test_extraction()) + .map(|(s, _)| s); + + let mut doc_tests = Vec::new(); + for s in specifiers_needing_extraction { + let file = file_fetcher.fetch_bypass_permissions(s).await?; + doc_tests.extend(extract_doc_tests(file)?); + } + + Ok(doc_tests) +} + +/// Get a list of specifiers that we need to perform typecheck and run tests on. +/// The result includes "pseudo specifiers" for doc tests. +fn get_target_specifiers( + specifiers_with_mode: Vec<(Url, TestMode)>, + doc_tests: &[File], +) -> Vec<Url> { + specifiers_with_mode + .into_iter() + .filter_map(|(s, mode)| mode.needs_test_run().then_some(s)) + .chain(doc_tests.iter().map(|d| d.specifier.clone())) + .collect() +} + /// Tracks failures for the `--fail-fast` argument in /// order to tell when to stop running tests. #[derive(Clone, Default)] diff --git a/cli/util/extract.rs b/cli/util/extract.rs new file mode 100644 index 00000000000000..e27a79347a8021 --- /dev/null +++ b/cli/util/extract.rs @@ -0,0 +1,1410 @@ +// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +use deno_ast::swc::ast; +use deno_ast::swc::atoms::Atom; +use deno_ast::swc::common::collections::AHashSet; +use deno_ast::swc::common::comments::CommentKind; +use deno_ast::swc::common::DUMMY_SP; +use deno_ast::swc::utils as swc_utils; +use deno_ast::swc::visit::as_folder; +use deno_ast::swc::visit::FoldWith as _; +use deno_ast::swc::visit::Visit; +use deno_ast::swc::visit::VisitMut; +use deno_ast::swc::visit::VisitWith as _; +use deno_ast::MediaType; +use deno_ast::SourceRangedForSpanned as _; +use deno_core::error::AnyError; +use deno_core::ModuleSpecifier; +use regex::Regex; +use std::collections::BTreeSet; +use std::fmt::Write as _; +use std::sync::Arc; + +use crate::file_fetcher::File; +use crate::util::path::mapped_specifier_for_tsc; + +/// Extracts doc tests from a given file, transforms them into pseudo test +/// files by wrapping the content of the doc tests in a `Deno.test` call, and +/// returns a list of the pseudo test files. +/// +/// The difference from [`extract_snippet_files`] is that this function wraps +/// extracted code snippets in a `Deno.test` call. +pub fn extract_doc_tests(file: File) -> Result<Vec<File>, AnyError> { + extract_inner(file, WrapKind::DenoTest) +} + +/// Extracts code snippets from a given file and returns a list of the extracted +/// files. +/// +/// The difference from [`extract_doc_tests`] is that this function does *not* +/// wrap extracted code snippets in a `Deno.test` call. +pub fn extract_snippet_files(file: File) -> Result<Vec<File>, AnyError> { + extract_inner(file, WrapKind::NoWrap) +} + +#[derive(Clone, Copy)] +enum WrapKind { + DenoTest, + NoWrap, +} + +fn extract_inner( + file: File, + wrap_kind: WrapKind, +) -> Result<Vec<File>, AnyError> { + let file = file.into_text_decoded()?; + + let exports = match deno_ast::parse_program(deno_ast::ParseParams { + specifier: file.specifier.clone(), + text: file.source.clone(), + media_type: file.media_type, + capture_tokens: false, + scope_analysis: false, + maybe_syntax: None, + }) { + Ok(parsed) => { + let mut c = ExportCollector::default(); + c.visit_program(parsed.program_ref()); + c + } + Err(_) => ExportCollector::default(), + }; + + let extracted_files = if file.media_type == MediaType::Unknown { + extract_files_from_fenced_blocks( + &file.specifier, + &file.source, + file.media_type, + )? + } else { + extract_files_from_source_comments( + &file.specifier, + file.source.clone(), + file.media_type, + )? + }; + + extracted_files + .into_iter() + .map(|extracted_file| { + generate_pseudo_file(extracted_file, &file.specifier, &exports, wrap_kind) + }) + .collect::<Result<_, _>>() +} + +fn extract_files_from_fenced_blocks( + specifier: &ModuleSpecifier, + source: &str, + media_type: MediaType, +) -> Result<Vec<File>, AnyError> { + // The pattern matches code blocks as well as anything in HTML comment syntax, + // but it stores the latter without any capturing groups. This way, a simple + // check can be done to see if a block is inside a comment (and skip typechecking) + // or not by checking for the presence of capturing groups in the matches. + let blocks_regex = + lazy_regex::regex!(r"(?s)<!--.*?-->|```([^\r\n]*)\r?\n([\S\s]*?)```"); + let lines_regex = lazy_regex::regex!(r"(?:\# ?)?(.*)"); + + extract_files_from_regex_blocks( + specifier, + source, + media_type, + /* file line index */ 0, + blocks_regex, + lines_regex, + ) +} + +fn extract_files_from_source_comments( + specifier: &ModuleSpecifier, + source: Arc<str>, + media_type: MediaType, +) -> Result<Vec<File>, AnyError> { + let parsed_source = deno_ast::parse_module(deno_ast::ParseParams { + specifier: specifier.clone(), + text: source, + media_type, + capture_tokens: false, + maybe_syntax: None, + scope_analysis: false, + })?; + let comments = parsed_source.comments().get_vec(); + let blocks_regex = lazy_regex::regex!(r"```([^\r\n]*)\r?\n([\S\s]*?)```"); + let lines_regex = lazy_regex::regex!(r"(?:\* ?)(?:\# ?)?(.*)"); + + let files = comments + .iter() + .filter(|comment| { + if comment.kind != CommentKind::Block || !comment.text.starts_with('*') { + return false; + } + + true + }) + .flat_map(|comment| { + extract_files_from_regex_blocks( + specifier, + &comment.text, + media_type, + parsed_source.text_info_lazy().line_index(comment.start()), + blocks_regex, + lines_regex, + ) + }) + .flatten() + .collect(); + + Ok(files) +} + +fn extract_files_from_regex_blocks( + specifier: &ModuleSpecifier, + source: &str, + media_type: MediaType, + file_line_index: usize, + blocks_regex: &Regex, + lines_regex: &Regex, +) -> Result<Vec<File>, AnyError> { + let files = blocks_regex + .captures_iter(source) + .filter_map(|block| { + block.get(1)?; + + let maybe_attributes: Option<Vec<_>> = block + .get(1) + .map(|attributes| attributes.as_str().split(' ').collect()); + + let file_media_type = if let Some(attributes) = maybe_attributes { + if attributes.contains(&"ignore") { + return None; + } + + match attributes.first() { + Some(&"js") => MediaType::JavaScript, + Some(&"javascript") => MediaType::JavaScript, + Some(&"mjs") => MediaType::Mjs, + Some(&"cjs") => MediaType::Cjs, + Some(&"jsx") => MediaType::Jsx, + Some(&"ts") => MediaType::TypeScript, + Some(&"typescript") => MediaType::TypeScript, + Some(&"mts") => MediaType::Mts, + Some(&"cts") => MediaType::Cts, + Some(&"tsx") => MediaType::Tsx, + _ => MediaType::Unknown, + } + } else { + media_type + }; + + if file_media_type == MediaType::Unknown { + return None; + } + + let line_offset = source[0..block.get(0).unwrap().start()] + .chars() + .filter(|c| *c == '\n') + .count(); + + let line_count = block.get(0).unwrap().as_str().split('\n').count(); + + let body = block.get(2).unwrap(); + let text = body.as_str(); + + // TODO(caspervonb) generate an inline source map + let mut file_source = String::new(); + for line in lines_regex.captures_iter(text) { + let text = line.get(1).unwrap(); + writeln!(file_source, "{}", text.as_str()).unwrap(); + } + + let file_specifier = ModuleSpecifier::parse(&format!( + "{}${}-{}", + specifier, + file_line_index + line_offset + 1, + file_line_index + line_offset + line_count + 1, + )) + .unwrap(); + let file_specifier = + mapped_specifier_for_tsc(&file_specifier, file_media_type) + .map(|s| ModuleSpecifier::parse(&s).unwrap()) + .unwrap_or(file_specifier); + + Some(File { + specifier: file_specifier, + maybe_headers: None, + source: file_source.into_bytes().into(), + }) + }) + .collect(); + + Ok(files) +} + +#[derive(Default)] +struct ExportCollector { + named_exports: BTreeSet<Atom>, + default_export: Option<Atom>, +} + +impl ExportCollector { + fn to_import_specifiers( + &self, + symbols_to_exclude: &AHashSet<Atom>, + ) -> Vec<ast::ImportSpecifier> { + let mut import_specifiers = vec![]; + + if let Some(default_export) = &self.default_export { + if !symbols_to_exclude.contains(default_export) { + import_specifiers.push(ast::ImportSpecifier::Default( + ast::ImportDefaultSpecifier { + span: DUMMY_SP, + local: ast::Ident { + span: DUMMY_SP, + ctxt: Default::default(), + sym: default_export.clone(), + optional: false, + }, + }, + )); + } + } + + for named_export in &self.named_exports { + if symbols_to_exclude.contains(named_export) { + continue; + } + + import_specifiers.push(ast::ImportSpecifier::Named( + ast::ImportNamedSpecifier { + span: DUMMY_SP, + local: ast::Ident { + span: DUMMY_SP, + ctxt: Default::default(), + sym: named_export.clone(), + optional: false, + }, + imported: None, + is_type_only: false, + }, + )); + } + + import_specifiers + } +} + +impl Visit for ExportCollector { + fn visit_ts_module_decl(&mut self, ts_module_decl: &ast::TsModuleDecl) { + if ts_module_decl.declare { + return; + } + + ts_module_decl.visit_children_with(self); + } + + fn visit_export_decl(&mut self, export_decl: &ast::ExportDecl) { + match &export_decl.decl { + ast::Decl::Class(class) => { + self.named_exports.insert(class.ident.sym.clone()); + } + ast::Decl::Fn(func) => { + self.named_exports.insert(func.ident.sym.clone()); + } + ast::Decl::Var(var) => { + for var_decl in &var.decls { + let atoms = extract_sym_from_pat(&var_decl.name); + self.named_exports.extend(atoms); + } + } + ast::Decl::TsEnum(ts_enum) => { + self.named_exports.insert(ts_enum.id.sym.clone()); + } + ast::Decl::TsModule(ts_module) => { + if ts_module.declare { + return; + } + + match &ts_module.id { + ast::TsModuleName::Ident(ident) => { + self.named_exports.insert(ident.sym.clone()); + } + ast::TsModuleName::Str(s) => { + self.named_exports.insert(s.value.clone()); + } + } + } + ast::Decl::TsTypeAlias(ts_type_alias) => { + self.named_exports.insert(ts_type_alias.id.sym.clone()); + } + ast::Decl::TsInterface(ts_interface) => { + self.named_exports.insert(ts_interface.id.sym.clone()); + } + ast::Decl::Using(_) => {} + } + } + + fn visit_export_default_decl( + &mut self, + export_default_decl: &ast::ExportDefaultDecl, + ) { + match &export_default_decl.decl { + ast::DefaultDecl::Class(class) => { + if let Some(ident) = &class.ident { + self.default_export = Some(ident.sym.clone()); + } + } + ast::DefaultDecl::Fn(func) => { + if let Some(ident) = &func.ident { + self.default_export = Some(ident.sym.clone()); + } + } + ast::DefaultDecl::TsInterfaceDecl(_) => {} + } + } + + fn visit_export_named_specifier( + &mut self, + export_named_specifier: &ast::ExportNamedSpecifier, + ) { + fn get_atom(export_name: &ast::ModuleExportName) -> Atom { + match export_name { + ast::ModuleExportName::Ident(ident) => ident.sym.clone(), + ast::ModuleExportName::Str(s) => s.value.clone(), + } + } + + match &export_named_specifier.exported { + Some(exported) => { + self.named_exports.insert(get_atom(exported)); + } + None => { + self + .named_exports + .insert(get_atom(&export_named_specifier.orig)); + } + } + } + + fn visit_named_export(&mut self, named_export: &ast::NamedExport) { + // ExportCollector does not handle re-exports + if named_export.src.is_some() { + return; + } + + named_export.visit_children_with(self); + } +} + +fn extract_sym_from_pat(pat: &ast::Pat) -> Vec<Atom> { + fn rec(pat: &ast::Pat, atoms: &mut Vec<Atom>) { + match pat { + ast::Pat::Ident(binding_ident) => { + atoms.push(binding_ident.sym.clone()); + } + ast::Pat::Array(array_pat) => { + for elem in array_pat.elems.iter().flatten() { + rec(elem, atoms); + } + } + ast::Pat::Rest(rest_pat) => { + rec(&rest_pat.arg, atoms); + } + ast::Pat::Object(object_pat) => { + for prop in &object_pat.props { + match prop { + ast::ObjectPatProp::Assign(assign_pat_prop) => { + atoms.push(assign_pat_prop.key.sym.clone()); + } + ast::ObjectPatProp::KeyValue(key_value_pat_prop) => { + rec(&key_value_pat_prop.value, atoms); + } + ast::ObjectPatProp::Rest(rest_pat) => { + rec(&rest_pat.arg, atoms); + } + } + } + } + ast::Pat::Assign(assign_pat) => { + rec(&assign_pat.left, atoms); + } + ast::Pat::Invalid(_) | ast::Pat::Expr(_) => {} + } + } + + let mut atoms = vec![]; + rec(pat, &mut atoms); + atoms +} + +/// Generates a "pseudo" file from a given file by applying the following +/// transformations: +/// +/// 1. Injects `import` statements for expoted items from the base file +/// 2. If `wrap_kind` is [`WrapKind::DenoTest`], wraps the content of the file +/// in a `Deno.test` call. +/// +/// For example, given a file that looks like: +/// +/// ```ts +/// import { assertEquals } from "@std/assert/equals"; +/// +/// assertEquals(increment(1), 2); +/// ``` +/// +/// and the base file (from which the above snippet was extracted): +/// +/// ```ts +/// export function increment(n: number): number { +/// return n + 1; +/// } +/// +/// export const SOME_CONST = "HELLO"; +/// ``` +/// +/// The generated pseudo test file would look like (if `wrap_in_deno_test` is enabled): +/// +/// ```ts +/// import { assertEquals } from "@std/assert/equals"; +/// import { increment, SOME_CONST } from "./base.ts"; +/// +/// Deno.test("./base.ts$1-3.ts", async () => { +/// assertEquals(increment(1), 2); +/// }); +/// ``` +/// +/// # Edge case - duplicate identifier +/// +/// If a given file imports, say, `doSomething` from an external module while +/// the base file exports `doSomething` as well, the generated pseudo test file +/// would end up having two duplciate imports for `doSomething`, causing the +/// duplicate identifier error. +/// +/// To avoid this issue, when a given file imports `doSomething`, this takes +/// precedence over the automatic import injection for the base file's +/// `doSomething`. So the generated pseudo test file would look like: +/// +/// ```ts +/// import { assertEquals } from "@std/assert/equals"; +/// import { doSomething } from "./some_external_module.ts"; +/// +/// Deno.test("./base.ts$1-3.ts", async () => { +/// assertEquals(doSomething(1), 2); +/// }); +/// ``` +fn generate_pseudo_file( + file: File, + base_file_specifier: &ModuleSpecifier, + exports: &ExportCollector, + wrap_kind: WrapKind, +) -> Result<File, AnyError> { + let file = file.into_text_decoded()?; + + let parsed = deno_ast::parse_program(deno_ast::ParseParams { + specifier: file.specifier.clone(), + text: file.source, + media_type: file.media_type, + capture_tokens: false, + scope_analysis: true, + maybe_syntax: None, + })?; + + let top_level_atoms = swc_utils::collect_decls_with_ctxt::<Atom, _>( + parsed.program_ref(), + parsed.top_level_context(), + ); + + let transformed = + parsed + .program_ref() + .clone() + .fold_with(&mut as_folder(Transform { + specifier: &file.specifier, + base_file_specifier, + exports_from_base: exports, + atoms_to_be_excluded_from_import: top_level_atoms, + wrap_kind, + })); + + let source = deno_ast::swc::codegen::to_code(&transformed); + + log::debug!("{}:\n{}", file.specifier, source); + + Ok(File { + specifier: file.specifier, + maybe_headers: None, + source: source.into_bytes().into(), + }) +} + +struct Transform<'a> { + specifier: &'a ModuleSpecifier, + base_file_specifier: &'a ModuleSpecifier, + exports_from_base: &'a ExportCollector, + atoms_to_be_excluded_from_import: AHashSet<Atom>, + wrap_kind: WrapKind, +} + +impl<'a> VisitMut for Transform<'a> { + fn visit_mut_program(&mut self, node: &mut ast::Program) { + let new_module_items = match node { + ast::Program::Module(module) => { + let mut module_decls = vec![]; + let mut stmts = vec![]; + + for item in &module.body { + match item { + ast::ModuleItem::ModuleDecl(decl) => { + module_decls.push(decl.clone()); + } + ast::ModuleItem::Stmt(stmt) => { + stmts.push(stmt.clone()); + } + } + } + + let mut transformed_items = vec![]; + transformed_items + .extend(module_decls.into_iter().map(ast::ModuleItem::ModuleDecl)); + let import_specifiers = self + .exports_from_base + .to_import_specifiers(&self.atoms_to_be_excluded_from_import); + if !import_specifiers.is_empty() { + transformed_items.push(ast::ModuleItem::ModuleDecl( + ast::ModuleDecl::Import(ast::ImportDecl { + span: DUMMY_SP, + specifiers: import_specifiers, + src: Box::new(ast::Str { + span: DUMMY_SP, + value: self.base_file_specifier.to_string().into(), + raw: None, + }), + type_only: false, + with: None, + phase: ast::ImportPhase::Evaluation, + }), + )); + } + match self.wrap_kind { + WrapKind::DenoTest => { + transformed_items.push(ast::ModuleItem::Stmt(wrap_in_deno_test( + stmts, + self.specifier.to_string().into(), + ))); + } + WrapKind::NoWrap => { + transformed_items + .extend(stmts.into_iter().map(ast::ModuleItem::Stmt)); + } + } + + transformed_items + } + ast::Program::Script(script) => { + let mut transformed_items = vec![]; + + let import_specifiers = self + .exports_from_base + .to_import_specifiers(&self.atoms_to_be_excluded_from_import); + if !import_specifiers.is_empty() { + transformed_items.push(ast::ModuleItem::ModuleDecl( + ast::ModuleDecl::Import(ast::ImportDecl { + span: DUMMY_SP, + specifiers: import_specifiers, + src: Box::new(ast::Str { + span: DUMMY_SP, + value: self.base_file_specifier.to_string().into(), + raw: None, + }), + type_only: false, + with: None, + phase: ast::ImportPhase::Evaluation, + }), + )); + } + + match self.wrap_kind { + WrapKind::DenoTest => { + transformed_items.push(ast::ModuleItem::Stmt(wrap_in_deno_test( + script.body.clone(), + self.specifier.to_string().into(), + ))); + } + WrapKind::NoWrap => { + transformed_items.extend( + script.body.clone().into_iter().map(ast::ModuleItem::Stmt), + ); + } + } + + transformed_items + } + }; + + *node = ast::Program::Module(ast::Module { + span: DUMMY_SP, + body: new_module_items, + shebang: None, + }); + } +} + +fn wrap_in_deno_test(stmts: Vec<ast::Stmt>, test_name: Atom) -> ast::Stmt { + ast::Stmt::Expr(ast::ExprStmt { + span: DUMMY_SP, + expr: Box::new(ast::Expr::Call(ast::CallExpr { + span: DUMMY_SP, + callee: ast::Callee::Expr(Box::new(ast::Expr::Member(ast::MemberExpr { + span: DUMMY_SP, + obj: Box::new(ast::Expr::Ident(ast::Ident { + span: DUMMY_SP, + sym: "Deno".into(), + optional: false, + ..Default::default() + })), + prop: ast::MemberProp::Ident(ast::IdentName { + span: DUMMY_SP, + sym: "test".into(), + }), + }))), + args: vec![ + ast::ExprOrSpread { + spread: None, + expr: Box::new(ast::Expr::Lit(ast::Lit::Str(ast::Str { + span: DUMMY_SP, + value: test_name, + raw: None, + }))), + }, + ast::ExprOrSpread { + spread: None, + expr: Box::new(ast::Expr::Arrow(ast::ArrowExpr { + span: DUMMY_SP, + params: vec![], + body: Box::new(ast::BlockStmtOrExpr::BlockStmt(ast::BlockStmt { + span: DUMMY_SP, + stmts, + ..Default::default() + })), + is_async: true, + is_generator: false, + type_params: None, + return_type: None, + ..Default::default() + })), + }, + ], + type_args: None, + ..Default::default() + })), + }) +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::file_fetcher::TextDecodedFile; + use deno_ast::swc::atoms::Atom; + use pretty_assertions::assert_eq; + + #[test] + fn test_extract_doc_tests() { + struct Input { + source: &'static str, + specifier: &'static str, + } + struct Expected { + source: &'static str, + specifier: &'static str, + media_type: MediaType, + } + struct Test { + input: Input, + expected: Vec<Expected>, + } + + let tests = [ + Test { + input: Input { + source: r#""#, + specifier: "file:///main.ts", + }, + expected: vec![], + }, + Test { + input: Input { + source: r#" +/** + * ```ts + * import { assertEquals } from "@std/assert/equal"; + * + * assertEquals(add(1, 2), 3); + * ``` + */ +export function add(a: number, b: number): number { + return a + b; +} +"#, + specifier: "file:///main.ts", + }, + expected: vec![Expected { + source: r#"import { assertEquals } from "@std/assert/equal"; +import { add } from "file:///main.ts"; +Deno.test("file:///main.ts$3-8.ts", async ()=>{ + assertEquals(add(1, 2), 3); +}); +"#, + specifier: "file:///main.ts$3-8.ts", + media_type: MediaType::TypeScript, + }], + }, + Test { + input: Input { + source: r#" +/** + * ```ts + * foo(); + * ``` + */ +export function foo() {} + +export default class Bar {} +"#, + specifier: "file:///main.ts", + }, + expected: vec![Expected { + source: r#"import Bar, { foo } from "file:///main.ts"; +Deno.test("file:///main.ts$3-6.ts", async ()=>{ + foo(); +}); +"#, + specifier: "file:///main.ts$3-6.ts", + media_type: MediaType::TypeScript, + }], + }, + Test { + input: Input { + source: r#" +/** + * ```ts + * const input = { a: 42 } satisfies Args; + * foo(input); + * ``` + */ +export function foo(args: Args) {} + +export type Args = { a: number }; +"#, + specifier: "file:///main.ts", + }, + expected: vec![Expected { + source: r#"import { Args, foo } from "file:///main.ts"; +Deno.test("file:///main.ts$3-7.ts", async ()=>{ + const input = { + a: 42 + } satisfies Args; + foo(input); +}); +"#, + specifier: "file:///main.ts$3-7.ts", + media_type: MediaType::TypeScript, + }], + }, + Test { + input: Input { + source: r#" +/** + * This is a module-level doc. + * + * ```ts + * foo(); + * ``` + * + * @module doc + */ +"#, + specifier: "file:///main.ts", + }, + expected: vec![Expected { + source: r#"Deno.test("file:///main.ts$5-8.ts", async ()=>{ + foo(); +}); +"#, + specifier: "file:///main.ts$5-8.ts", + media_type: MediaType::TypeScript, + }], + }, + Test { + input: Input { + source: r#" +/** + * This is a module-level doc. + * + * ```js + * const cls = new MyClass(); + * ``` + * + * @module doc + */ + +/** + * ```ts + * foo(); + * ``` + */ +export function foo() {} + +export default class MyClass {} + +export * from "./other.ts"; +"#, + specifier: "file:///main.ts", + }, + expected: vec![ + Expected { + source: r#"import MyClass, { foo } from "file:///main.ts"; +Deno.test("file:///main.ts$5-8.js", async ()=>{ + const cls = new MyClass(); +}); +"#, + specifier: "file:///main.ts$5-8.js", + media_type: MediaType::JavaScript, + }, + Expected { + source: r#"import MyClass, { foo } from "file:///main.ts"; +Deno.test("file:///main.ts$13-16.ts", async ()=>{ + foo(); +}); +"#, + specifier: "file:///main.ts$13-16.ts", + media_type: MediaType::TypeScript, + }, + ], + }, + // Avoid duplicate imports + Test { + input: Input { + source: r#" +/** + * ```ts + * import { DUPLICATE1 } from "./other1.ts"; + * import * as DUPLICATE2 from "./other2.js"; + * import { foo as DUPLICATE3 } from "./other3.tsx"; + * + * foo(); + * ``` + */ +export function foo() {} + +export const DUPLICATE1 = "dup1"; +const DUPLICATE2 = "dup2"; +export default DUPLICATE2; +const DUPLICATE3 = "dup3"; +export { DUPLICATE3 }; +"#, + specifier: "file:///main.ts", + }, + expected: vec![Expected { + source: r#"import { DUPLICATE1 } from "./other1.ts"; +import * as DUPLICATE2 from "./other2.js"; +import { foo as DUPLICATE3 } from "./other3.tsx"; +import { foo } from "file:///main.ts"; +Deno.test("file:///main.ts$3-10.ts", async ()=>{ + foo(); +}); +"#, + specifier: "file:///main.ts$3-10.ts", + media_type: MediaType::TypeScript, + }], + }, + // duplication of imported identifier and local identifier is fine + Test { + input: Input { + source: r#" +/** + * ```ts + * const foo = createFoo(); + * foo(); + * ``` + */ +export function createFoo() { + return () => "created foo"; +} + +export const foo = () => "foo"; +"#, + specifier: "file:///main.ts", + }, + expected: vec![Expected { + source: r#"import { createFoo } from "file:///main.ts"; +Deno.test("file:///main.ts$3-7.ts", async ()=>{ + const foo = createFoo(); + foo(); +}); +"#, + specifier: "file:///main.ts$3-7.ts", + media_type: MediaType::TypeScript, + }], + }, + // example code has an exported item `foo` - because `export` must be at + // the top level, `foo` is "hoisted" to the top level instead of being + // wrapped in `Deno.test`. + Test { + input: Input { + source: r#" +/** + * ```ts + * doSomething(); + * export const foo = 42; + * ``` + */ +export function doSomething() {} +"#, + specifier: "file:///main.ts", + }, + expected: vec![Expected { + source: r#"export const foo = 42; +import { doSomething } from "file:///main.ts"; +Deno.test("file:///main.ts$3-7.ts", async ()=>{ + doSomething(); +}); +"#, + specifier: "file:///main.ts$3-7.ts", + media_type: MediaType::TypeScript, + }], + }, + Test { + input: Input { + source: r#" +# Header + +This is a *markdown*. + +```js +import { assertEquals } from "@std/assert/equal"; +import { add } from "jsr:@deno/non-existent"; + +assertEquals(add(1, 2), 3); +``` +"#, + specifier: "file:///README.md", + }, + expected: vec![Expected { + source: r#"import { assertEquals } from "@std/assert/equal"; +import { add } from "jsr:@deno/non-existent"; +Deno.test("file:///README.md$6-12.js", async ()=>{ + assertEquals(add(1, 2), 3); +}); +"#, + specifier: "file:///README.md$6-12.js", + media_type: MediaType::JavaScript, + }], + }, + ]; + + for test in tests { + let file = File { + specifier: ModuleSpecifier::parse(test.input.specifier).unwrap(), + maybe_headers: None, + source: test.input.source.as_bytes().into(), + }; + let got_decoded = extract_doc_tests(file) + .unwrap() + .into_iter() + .map(|f| f.into_text_decoded().unwrap()) + .collect::<Vec<_>>(); + let expected = test + .expected + .iter() + .map(|e| TextDecodedFile { + specifier: ModuleSpecifier::parse(e.specifier).unwrap(), + media_type: e.media_type, + source: e.source.into(), + }) + .collect::<Vec<_>>(); + assert_eq!(got_decoded, expected); + } + } + + #[test] + fn test_extract_snippet_files() { + struct Input { + source: &'static str, + specifier: &'static str, + } + struct Expected { + source: &'static str, + specifier: &'static str, + media_type: MediaType, + } + struct Test { + input: Input, + expected: Vec<Expected>, + } + + let tests = [ + Test { + input: Input { + source: r#""#, + specifier: "file:///main.ts", + }, + expected: vec![], + }, + Test { + input: Input { + source: r#" +/** + * ```ts + * import { assertEquals } from "@std/assert/equals"; + * + * assertEquals(add(1, 2), 3); + * ``` + */ +export function add(a: number, b: number): number { + return a + b; +} +"#, + specifier: "file:///main.ts", + }, + expected: vec![Expected { + source: r#"import { assertEquals } from "@std/assert/equals"; +import { add } from "file:///main.ts"; +assertEquals(add(1, 2), 3); +"#, + specifier: "file:///main.ts$3-8.ts", + media_type: MediaType::TypeScript, + }], + }, + Test { + input: Input { + source: r#" +/** + * ```ts + * import { assertEquals } from "@std/assert/equals"; + * import { DUPLICATE } from "./other.ts"; + * + * assertEquals(add(1, 2), 3); + * ``` + */ +export function add(a: number, b: number): number { + return a + b; +} + +export const DUPLICATE = "dup"; +"#, + specifier: "file:///main.ts", + }, + expected: vec![Expected { + source: r#"import { assertEquals } from "@std/assert/equals"; +import { DUPLICATE } from "./other.ts"; +import { add } from "file:///main.ts"; +assertEquals(add(1, 2), 3); +"#, + specifier: "file:///main.ts$3-9.ts", + media_type: MediaType::TypeScript, + }], + }, + // duplication of imported identifier and local identifier is fine, since + // we wrap the snippet in a block. + // This would be a problem if the local one is declared with `var`, as + // `var` is not block scoped but function scoped. For now we don't handle + // this case assuming that `var` is not used in modern code. + Test { + input: Input { + source: r#" + /** + * ```ts + * const foo = createFoo(); + * foo(); + * ``` + */ + export function createFoo() { + return () => "created foo"; + } + + export const foo = () => "foo"; + "#, + specifier: "file:///main.ts", + }, + expected: vec![Expected { + source: r#"import { createFoo } from "file:///main.ts"; +const foo = createFoo(); +foo(); +"#, + specifier: "file:///main.ts$3-7.ts", + media_type: MediaType::TypeScript, + }], + }, + Test { + input: Input { + source: r#" +# Header + +This is a *markdown*. + +```js +import { assertEquals } from "@std/assert/equal"; +import { add } from "jsr:@deno/non-existent"; + +assertEquals(add(1, 2), 3); +``` +"#, + specifier: "file:///README.md", + }, + expected: vec![Expected { + source: r#"import { assertEquals } from "@std/assert/equal"; +import { add } from "jsr:@deno/non-existent"; +assertEquals(add(1, 2), 3); +"#, + specifier: "file:///README.md$6-12.js", + media_type: MediaType::JavaScript, + }], + }, + ]; + + for test in tests { + let file = File { + specifier: ModuleSpecifier::parse(test.input.specifier).unwrap(), + maybe_headers: None, + source: test.input.source.as_bytes().into(), + }; + let got_decoded = extract_snippet_files(file) + .unwrap() + .into_iter() + .map(|f| f.into_text_decoded().unwrap()) + .collect::<Vec<_>>(); + let expected = test + .expected + .iter() + .map(|e| TextDecodedFile { + specifier: ModuleSpecifier::parse(e.specifier).unwrap(), + media_type: e.media_type, + source: e.source.into(), + }) + .collect::<Vec<_>>(); + assert_eq!(got_decoded, expected); + } + } + + #[test] + fn test_export_collector() { + fn helper(input: &'static str) -> ExportCollector { + let mut collector = ExportCollector::default(); + let parsed = deno_ast::parse_module(deno_ast::ParseParams { + specifier: deno_ast::ModuleSpecifier::parse("file:///main.ts").unwrap(), + text: input.into(), + media_type: deno_ast::MediaType::TypeScript, + capture_tokens: false, + scope_analysis: false, + maybe_syntax: None, + }) + .unwrap(); + + collector.visit_program(parsed.program_ref()); + collector + } + + struct Test { + input: &'static str, + named_expected: BTreeSet<Atom>, + default_expected: Option<Atom>, + } + + macro_rules! atom_set { + ($( $x:expr ),*) => { + [$( Atom::from($x) ),*].into_iter().collect::<BTreeSet<_>>() + }; + } + + let tests = [ + Test { + input: r#"export const foo = 42;"#, + named_expected: atom_set!("foo"), + default_expected: None, + }, + Test { + input: r#"export let foo = 42;"#, + named_expected: atom_set!("foo"), + default_expected: None, + }, + Test { + input: r#"export var foo = 42;"#, + named_expected: atom_set!("foo"), + default_expected: None, + }, + Test { + input: r#"export const foo = () => {};"#, + named_expected: atom_set!("foo"), + default_expected: None, + }, + Test { + input: r#"export function foo() {}"#, + named_expected: atom_set!("foo"), + default_expected: None, + }, + Test { + input: r#"export class Foo {}"#, + named_expected: atom_set!("Foo"), + default_expected: None, + }, + Test { + input: r#"export enum Foo {}"#, + named_expected: atom_set!("Foo"), + default_expected: None, + }, + Test { + input: r#"export module Foo {}"#, + named_expected: atom_set!("Foo"), + default_expected: None, + }, + Test { + input: r#"export module "foo" {}"#, + named_expected: atom_set!("foo"), + default_expected: None, + }, + Test { + input: r#"export namespace Foo {}"#, + named_expected: atom_set!("Foo"), + default_expected: None, + }, + Test { + input: r#"export type Foo = string;"#, + named_expected: atom_set!("Foo"), + default_expected: None, + }, + Test { + input: r#"export interface Foo {};"#, + named_expected: atom_set!("Foo"), + default_expected: None, + }, + Test { + input: r#"export let name1, name2;"#, + named_expected: atom_set!("name1", "name2"), + default_expected: None, + }, + Test { + input: r#"export const name1 = 1, name2 = 2;"#, + named_expected: atom_set!("name1", "name2"), + default_expected: None, + }, + Test { + input: r#"export function* generatorFunc() {}"#, + named_expected: atom_set!("generatorFunc"), + default_expected: None, + }, + Test { + input: r#"export const { name1, name2: bar } = obj;"#, + named_expected: atom_set!("name1", "bar"), + default_expected: None, + }, + Test { + input: r#"export const [name1, name2] = arr;"#, + named_expected: atom_set!("name1", "name2"), + default_expected: None, + }, + Test { + input: r#"export const { name1 = 42 } = arr;"#, + named_expected: atom_set!("name1"), + default_expected: None, + }, + Test { + input: r#"export default function foo() {}"#, + named_expected: atom_set!(), + default_expected: Some("foo".into()), + }, + Test { + input: r#"export { foo, bar as barAlias };"#, + named_expected: atom_set!("foo", "barAlias"), + default_expected: None, + }, + Test { + input: r#" +export default class Foo {} +export let value1 = 42; +const value2 = "Hello"; +const value3 = "World"; +export { value2 }; +"#, + named_expected: atom_set!("value1", "value2"), + default_expected: Some("Foo".into()), + }, + // overloaded function + Test { + input: r#" +export function foo(a: number): boolean; +export function foo(a: boolean): string; +export function foo(a: number | boolean): boolean | string { + return typeof a === "number" ? true : "hello"; +} +"#, + named_expected: atom_set!("foo"), + default_expected: None, + }, + // The collector deliberately does not handle re-exports, because from + // doc reader's perspective, an example code would become hard to follow + // if it uses re-exported items (as opposed to normal, non-re-exported + // items that would look verbose if an example code explicitly imports + // them). + Test { + input: r#" +export * from "./module1.ts"; +export * as name1 from "./module2.ts"; +export { name2, name3 as N3 } from "./module3.js"; +export { default } from "./module4.ts"; +export { default as myDefault } from "./module5.ts"; +"#, + named_expected: atom_set!(), + default_expected: None, + }, + Test { + input: r#" +export namespace Foo { + export type MyType = string; + export const myValue = 42; + export function myFunc(): boolean; +} +"#, + named_expected: atom_set!("Foo"), + default_expected: None, + }, + Test { + input: r#" +declare namespace Foo { + export type MyType = string; + export const myValue = 42; + export function myFunc(): boolean; +} +"#, + named_expected: atom_set!(), + default_expected: None, + }, + Test { + input: r#" +declare module Foo { + export type MyType = string; + export const myValue = 42; + export function myFunc(): boolean; +} +"#, + named_expected: atom_set!(), + default_expected: None, + }, + Test { + input: r#" +declare global { + export type MyType = string; + export const myValue = 42; + export function myFunc(): boolean; +} +"#, + named_expected: atom_set!(), + default_expected: None, + }, + ]; + + for test in tests { + let got = helper(test.input); + assert_eq!(got.named_exports, test.named_expected); + assert_eq!(got.default_export, test.default_expected); + } + } +} diff --git a/cli/util/mod.rs b/cli/util/mod.rs index b9071c496357ce..e59b09d2c7167e 100644 --- a/cli/util/mod.rs +++ b/cli/util/mod.rs @@ -7,6 +7,7 @@ pub mod console; pub mod diff; pub mod display; pub mod draw_thread; +pub mod extract; pub mod file_watcher; pub mod fs; pub mod logger; diff --git a/tests/integration/check_tests.rs b/tests/integration/check_tests.rs index 1ccec41ebbaac4..121dcb837c80df 100644 --- a/tests/integration/check_tests.rs +++ b/tests/integration/check_tests.rs @@ -185,8 +185,8 @@ fn reload_flag() { fn typecheck_declarations_ns() { let context = TestContextBuilder::for_jsr().build(); let args = vec![ - "test".to_string(), - "--doc".to_string(), + "check".to_string(), + "--doc-only".to_string(), util::root_path() .join("cli/tsc/dts/lib.deno.ns.d.ts") .to_string_lossy() @@ -208,8 +208,8 @@ fn typecheck_declarations_ns() { fn typecheck_declarations_unstable() { let context = TestContext::default(); let args = vec![ - "test".to_string(), - "--doc".to_string(), + "check".to_string(), + "--doc-only".to_string(), util::root_path() .join("cli/tsc/dts/lib.deno.unstable.d.ts") .to_string_lossy() diff --git a/tests/integration/watcher_tests.rs b/tests/integration/watcher_tests.rs index 27c59a27d8607e..56686cd14ab5b5 100644 --- a/tests/integration/watcher_tests.rs +++ b/tests/integration/watcher_tests.rs @@ -1022,6 +1022,8 @@ async fn test_watch_doc() { let mut child = util::deno_cmd() .current_dir(t.path()) .arg("test") + .arg("--config") + .arg(util::deno_config_path()) .arg("--watch") .arg("--doc") .arg(t.path()) @@ -1039,26 +1041,110 @@ async fn test_watch_doc() { wait_contains("Test finished", &mut stderr_lines).await; let foo_file = t.path().join("foo.ts"); + let foo_file_url = foo_file.url_file(); foo_file.write( r#" - export default function foo() {} + export function add(a: number, b: number) { + return a + b; + } + "#, + ); + + wait_contains("ok | 0 passed | 0 failed", &mut stdout_lines).await; + wait_contains("Test finished", &mut stderr_lines).await; + + // Trigger a type error + foo_file.write( + r#" + /** + * ```ts + * const sum: string = add(1, 2); + * ``` + */ + export function add(a: number, b: number) { + return a + b; + } "#, ); + assert_eq!( + skip_restarting_line(&mut stderr_lines).await, + format!("Check {foo_file_url}$3-6.ts") + ); + assert_eq!( + next_line(&mut stderr_lines).await.unwrap(), + "error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'." + ); + assert_eq!( + next_line(&mut stderr_lines).await.unwrap(), + " const sum: string = add(1, 2);" + ); + assert_eq!(next_line(&mut stderr_lines).await.unwrap(), " ~~~"); + assert_eq!( + next_line(&mut stderr_lines).await.unwrap(), + format!(" at {foo_file_url}$3-6.ts:3:11") + ); + wait_contains("Test failed", &mut stderr_lines).await; + + // Trigger a runtime error foo_file.write( r#" /** * ```ts - * import foo from "./foo.ts"; + * import { assertEquals } from "@std/assert/equals"; + * + * assertEquals(add(1, 2), 4); * ``` */ - export default function foo() {} + export function add(a: number, b: number) { + return a + b; + } "#, ); - // We only need to scan for a Check file://.../foo.ts$3-6 line that - // corresponds to the documentation block being type-checked. - assert_contains!(skip_restarting_line(&mut stderr_lines).await, "foo.ts$3-6"); + wait_contains("running 1 test from", &mut stdout_lines).await; + assert_contains!( + next_line(&mut stdout_lines).await.unwrap(), + &format!("{foo_file_url}$3-8.ts ... FAILED") + ); + wait_contains("ERRORS", &mut stdout_lines).await; + wait_contains( + "error: AssertionError: Values are not equal.", + &mut stdout_lines, + ) + .await; + wait_contains("- 3", &mut stdout_lines).await; + wait_contains("+ 4", &mut stdout_lines).await; + wait_contains("FAILURES", &mut stdout_lines).await; + wait_contains("FAILED | 0 passed | 1 failed", &mut stdout_lines).await; + + wait_contains("Test failed", &mut stderr_lines).await; + + // Fix the runtime error + foo_file.write( + r#" + /** + * ```ts + * import { assertEquals } from "@std/assert/equals"; + * + * assertEquals(add(1, 2), 3); + * ``` + */ + export function add(a: number, b: number) { + return a + b; + } + "#, + ); + + wait_contains("running 1 test from", &mut stdout_lines).await; + assert_contains!( + next_line(&mut stdout_lines).await.unwrap(), + &format!("{foo_file_url}$3-8.ts ... ok") + ); + wait_contains("ok | 1 passed | 0 failed", &mut stdout_lines).await; + + wait_contains("Test finished", &mut stderr_lines).await; + check_alive_then_kill(child); } diff --git a/tests/specs/check/typecheck_doc_duplicate_identifiers/__test__.jsonc b/tests/specs/check/typecheck_doc_duplicate_identifiers/__test__.jsonc new file mode 100644 index 00000000000000..8596142ddec87e --- /dev/null +++ b/tests/specs/check/typecheck_doc_duplicate_identifiers/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "check --doc --config ../../../config/deno.json mod.ts", + "exitCode": 0, + "output": "mod.out" +} diff --git a/tests/specs/check/typecheck_doc_duplicate_identifiers/mod.out b/tests/specs/check/typecheck_doc_duplicate_identifiers/mod.out new file mode 100644 index 00000000000000..d01daafa5aadae --- /dev/null +++ b/tests/specs/check/typecheck_doc_duplicate_identifiers/mod.out @@ -0,0 +1,2 @@ +Check [WILDCARD]/mod.ts +Check [WILDCARD]/mod.ts$2-8.ts diff --git a/tests/specs/check/typecheck_doc_duplicate_identifiers/mod.ts b/tests/specs/check/typecheck_doc_duplicate_identifiers/mod.ts new file mode 100644 index 00000000000000..576f702400b775 --- /dev/null +++ b/tests/specs/check/typecheck_doc_duplicate_identifiers/mod.ts @@ -0,0 +1,13 @@ +/** + * ```ts + * import { assertEquals } from "@std/assert/equals"; + * + * const foo = createFoo(3); + * assertEquals(foo, 9); + * ``` + */ +export function createFoo(x: number): number { + return x * x; +} + +export const foo = 42; diff --git a/tests/specs/check/typecheck_doc_failure/__test__.jsonc b/tests/specs/check/typecheck_doc_failure/__test__.jsonc new file mode 100644 index 00000000000000..5d95f2666826c1 --- /dev/null +++ b/tests/specs/check/typecheck_doc_failure/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "check --doc mod.ts", + "exitCode": 1, + "output": "mod.out" +} diff --git a/tests/specs/check/typecheck_doc_failure/mod.out b/tests/specs/check/typecheck_doc_failure/mod.out new file mode 100644 index 00000000000000..61fd5499e50a6b --- /dev/null +++ b/tests/specs/check/typecheck_doc_failure/mod.out @@ -0,0 +1,6 @@ +Check [WILDCARD]/mod.ts +Check [WILDCARD]/mod.ts$2-5.ts +error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. +const sum: string = add(1, 2); + ~~~ + at [WILDCARD]/mod.ts$2-5.ts:2:7 diff --git a/tests/specs/check/typecheck_doc_failure/mod.ts b/tests/specs/check/typecheck_doc_failure/mod.ts new file mode 100644 index 00000000000000..281d7f41b97ab3 --- /dev/null +++ b/tests/specs/check/typecheck_doc_failure/mod.ts @@ -0,0 +1,8 @@ +/** + * ```ts + * const sum: string = add(1, 2); + * ``` + */ +export function add(a: number, b: number): number { + return a + b; +} diff --git a/tests/specs/check/typecheck_doc_in_markdown/__test__.jsonc b/tests/specs/check/typecheck_doc_in_markdown/__test__.jsonc new file mode 100644 index 00000000000000..00f98c4d0e9224 --- /dev/null +++ b/tests/specs/check/typecheck_doc_in_markdown/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "check --doc-only markdown.md", + "exitCode": 1, + "output": "markdown.out" +} diff --git a/tests/specs/check/typecheck_doc_in_markdown/markdown.md b/tests/specs/check/typecheck_doc_in_markdown/markdown.md new file mode 100644 index 00000000000000..d18dbd108761a9 --- /dev/null +++ b/tests/specs/check/typecheck_doc_in_markdown/markdown.md @@ -0,0 +1,31 @@ +# Documentation + +The following block does not have a language attribute and should be ignored: + +``` +This is a fenced block without attributes, it's invalid and it should be ignored. +``` + +The following block should be given a js extension on extraction: + +```js +console.log("js"); +``` + +The following block should be given a ts extension on extraction: + +```ts +console.log("ts"); +``` + +The following example contains the ignore attribute and will be ignored: + +```ts ignore +const value: Invalid = "ignored"; +``` + +The following example will trigger the type-checker to fail: + +```ts +const a: string = 42; +``` diff --git a/tests/specs/check/typecheck_doc_in_markdown/markdown.out b/tests/specs/check/typecheck_doc_in_markdown/markdown.out new file mode 100644 index 00000000000000..acc05dc818baac --- /dev/null +++ b/tests/specs/check/typecheck_doc_in_markdown/markdown.out @@ -0,0 +1,7 @@ +Check [WILDCARD]/markdown.md$11-14.js +Check [WILDCARD]/markdown.md$17-20.ts +Check [WILDCARD]/markdown.md$29-32.ts +error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. +const a: string = 42; + ^ + at [WILDCARD]/markdown.md$29-32.ts:1:7 diff --git a/tests/specs/check/typecheck_doc_success/__test__.jsonc b/tests/specs/check/typecheck_doc_success/__test__.jsonc new file mode 100644 index 00000000000000..24fee3f2c906a9 --- /dev/null +++ b/tests/specs/check/typecheck_doc_success/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "check --doc mod.ts", + "exitCode": 0, + "output": "mod.out" +} diff --git a/tests/specs/check/typecheck_doc_success/mod.out b/tests/specs/check/typecheck_doc_success/mod.out new file mode 100644 index 00000000000000..8658af4f891ef7 --- /dev/null +++ b/tests/specs/check/typecheck_doc_success/mod.out @@ -0,0 +1,2 @@ +Check [WILDCARD]/tests/specs/check/typecheck_doc_success/mod.ts +Check [WILDCARD]/tests/specs/check/typecheck_doc_success/mod.ts$2-5.ts diff --git a/tests/specs/check/typecheck_doc_success/mod.ts b/tests/specs/check/typecheck_doc_success/mod.ts new file mode 100644 index 00000000000000..793be27117139c --- /dev/null +++ b/tests/specs/check/typecheck_doc_success/mod.ts @@ -0,0 +1,12 @@ +/** + * ```ts + * const sum: number = add(1, 2); + * ``` + * + * ```mts ignore + * const sum: boolean = add(3, 4); + * ``` + */ +export function add(a: number, b: number): number { + return a + b; +} diff --git a/tests/specs/test/doc/main.out b/tests/specs/test/doc/main.out index b55989f96e4ebb..a255823708427c 100644 --- a/tests/specs/test/doc/main.out +++ b/tests/specs/test/doc/main.out @@ -4,6 +4,6 @@ Check [WILDCARD]/main.ts$14-17.ts Check [WILDCARD]/main.ts$18-21.tsx Check [WILDCARD]/main.ts$30-35.ts error: TS2367 [ERROR]: This comparison appears to be unintentional because the types 'string' and 'number' have no overlap. -console.assert(check() == 42); - ~~~~~~~~~~~~~ - at [WILDCARD]/main.ts$30-35.ts:3:16 + console.assert(check() == 42); + ~~~~~~~~~~~~~ + at [WILDCARD]/main.ts$30-35.ts:3:20 diff --git a/tests/specs/test/doc_duplicate_identifier/__test__.jsonc b/tests/specs/test/doc_duplicate_identifier/__test__.jsonc new file mode 100644 index 00000000000000..2a8e6aafca60b5 --- /dev/null +++ b/tests/specs/test/doc_duplicate_identifier/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "test --doc --config ../../../config/deno.json main.ts", + "exitCode": 0, + "output": "main.out" +} diff --git a/tests/specs/test/doc_duplicate_identifier/main.out b/tests/specs/test/doc_duplicate_identifier/main.out new file mode 100644 index 00000000000000..9196405a653533 --- /dev/null +++ b/tests/specs/test/doc_duplicate_identifier/main.out @@ -0,0 +1,11 @@ +Check [WILDCARD]/main.ts +Check [WILDCARD]/main.ts$11-19.ts +Check [WILDCARD]/main.ts$25-30.ts +running 0 tests from ./main.ts +running 1 test from ./main.ts$11-19.ts +[WILDCARD]/main.ts$11-19.ts ... ok ([WILDCARD]ms) +running 1 test from ./main.ts$25-30.ts +[WILDCARD]/main.ts$25-30.ts ... ok ([WILDCARD]ms) + +ok | 2 passed | 0 failed ([WILDCARD]ms) + diff --git a/tests/specs/test/doc_duplicate_identifier/main.ts b/tests/specs/test/doc_duplicate_identifier/main.ts new file mode 100644 index 00000000000000..df78294d0ac078 --- /dev/null +++ b/tests/specs/test/doc_duplicate_identifier/main.ts @@ -0,0 +1,33 @@ +// `deno test --doc` tries to convert the example code snippets into pseudo +// test files in a way that all the exported items are available without +// explicit import statements. Therefore, in the test code, you don't have to +// write like `import { add } from "./main.ts";`. +// However, this automatic import resolution might conflict with other +// explicitly declared identifiers in the test code you write. This spec test +// makes sure that such cases will not cause any issues - explicit identifiers +// take precedence. + +/** + * ```ts + * import { assertEquals } from "@std/assert/equals"; + * import { getModuleName, createFoo } from "./mod.ts"; + * + * const foo = createFoo(); + * assertEquals(getModuleName(), "mod.ts"); + * assertEquals(add(1, 2), foo()); + * ``` + */ +export function add(a: number, b: number): number { + return a + b; +} + +/** + * ```ts + * import { assertEquals } from "@std/assert/equals"; + * + * assertEquals(getModuleName(), "main.ts"); + * ``` + */ +export const getModuleName = () => "main.ts"; + +export let foo = 1234; diff --git a/tests/specs/test/doc_duplicate_identifier/mod.ts b/tests/specs/test/doc_duplicate_identifier/mod.ts new file mode 100644 index 00000000000000..c613a99adf16e4 --- /dev/null +++ b/tests/specs/test/doc_duplicate_identifier/mod.ts @@ -0,0 +1,7 @@ +export function getModuleName() { + return "mod.ts"; +} + +export const createFoo = () => { + return () => 3; +}; diff --git a/tests/specs/test/doc_failure/__test__.jsonc b/tests/specs/test/doc_failure/__test__.jsonc new file mode 100644 index 00000000000000..79f16ad8d8d72a --- /dev/null +++ b/tests/specs/test/doc_failure/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "test --doc --config ../../../config/deno.json main.ts", + "exitCode": 1, + "output": "main.out" +} diff --git a/tests/specs/test/doc_failure/main.out b/tests/specs/test/doc_failure/main.out new file mode 100644 index 00000000000000..01b03297f8629b --- /dev/null +++ b/tests/specs/test/doc_failure/main.out @@ -0,0 +1,60 @@ +Check [WILDCARD]/main.ts +Check [WILDCARD]/main.ts$2-9.ts +Check [WILDCARD]/main.ts$13-18.ts +Check [WILDCARD]/main.ts$24-29.ts +running 0 tests from ./main.ts +running 1 test from ./main.ts$2-9.ts +[WILDCARD]/main.ts$2-9.ts ... FAILED ([WILDCARD]ms) +running 1 test from ./main.ts$13-18.ts +[WILDCARD]/main.ts$13-18.ts ... FAILED ([WILDCARD]ms) +running 1 test from ./main.ts$24-29.ts +[WILDCARD]/main.ts$24-29.ts ... FAILED ([WILDCARD]ms) + + ERRORS + +[WILDCARD]/main.ts$13-18.ts => ./main.ts$13-18.ts:3:6 +error: AssertionError: Values are not equal. + + + [Diff] Actual / Expected + + +- 3 ++ 4 + + throw new AssertionError(message); + ^ + at assertEquals ([WILDCARD]/std/assert/equals.ts:[WILDCARD]) + at [WILDCARD]/main.ts$13-18.ts:4:5 + +[WILDCARD]/main.ts$2-9.ts => ./main.ts$2-9.ts:3:6 +error: AssertionError: Expected actual: "2.5e+0" to be close to "2": delta "5e-1" is greater than "2e-7". + throw new AssertionError( + ^ + at assertAlmostEquals ([WILDCARD]/std/assert/almost_equals.ts:[WILDCARD]) + at [WILDCARD]/main.ts$2-9.ts:6:5 + +[WILDCARD]/main.ts$24-29.ts => ./main.ts$24-29.ts:3:6 +error: AssertionError: Values are not equal. + + + [Diff] Actual / Expected + + +- 4 ++ 3 + + throw new AssertionError(message); + ^ + at assertEquals ([WILDCARD]/std/assert/equals.ts:[WILDCARD]) + at [WILDCARD]/main.ts$24-29.ts:4:5 + + FAILURES + +[WILDCARD]/main.ts$13-18.ts => ./main.ts$13-18.ts:3:6 +[WILDCARD]/main.ts$2-9.ts => ./main.ts$2-9.ts:3:6 +[WILDCARD]/main.ts$24-29.ts => ./main.ts$24-29.ts:3:6 + +FAILED | 0 passed | 3 failed ([WILDCARD]ms) + +error: Test failed diff --git a/tests/specs/test/doc_failure/main.ts b/tests/specs/test/doc_failure/main.ts new file mode 100644 index 00000000000000..7ec678c034585a --- /dev/null +++ b/tests/specs/test/doc_failure/main.ts @@ -0,0 +1,32 @@ +/** + * ```ts + * import { assertAlmostEquals } from "@std/assert/almost-equals"; + * + * const x = sub(3, 1); + * const y = div(5, x); + * assertAlmostEquals(y, 2.0); // throws + * ``` + * @module doc + */ + +/** + * ```ts + * import { assertEquals } from "@std/assert/equals"; + * + * assertEquals(div(6, 2), 4); // throws + * ``` + */ +export function div(a: number, b: number): number { + return a / b; +} + +/** + * ```ts + * import { assertEquals } from "@std/assert/equals"; + * + * assertEquals(sub(6, 2), 3); // throws + * ``` + */ +const sub = (a: number, b: number): number => a - b; + +export { sub }; diff --git a/tests/specs/test/doc_only/__test__.jsonc b/tests/specs/test/doc_only/__test__.jsonc index 077b733a331010..f40260ae7251a9 100644 --- a/tests/specs/test/doc_only/__test__.jsonc +++ b/tests/specs/test/doc_only/__test__.jsonc @@ -1,5 +1,5 @@ { - "args": "test --doc --allow-all doc_only", + "args": "test --doc --config ../../../config/deno.json doc_only", "exitCode": 0, "output": "main.out" } diff --git a/tests/specs/test/doc_only/doc_only/mod.ts b/tests/specs/test/doc_only/doc_only/mod.ts index 467d850a27fb1d..a389302ce8b092 100644 --- a/tests/specs/test/doc_only/doc_only/mod.ts +++ b/tests/specs/test/doc_only/doc_only/mod.ts @@ -1,6 +1,8 @@ /** * ```ts - * import "./mod.ts"; + * import { assertEquals } from "@std/assert/equals"; + * + * assertEquals(42, 40 + 2); * ``` */ Deno.test("unreachable", function () { diff --git a/tests/specs/test/doc_only/main.out b/tests/specs/test/doc_only/main.out index a2eff5e89d34cd..634bd7636d88ab 100644 --- a/tests/specs/test/doc_only/main.out +++ b/tests/specs/test/doc_only/main.out @@ -1,4 +1,6 @@ -Check [WILDCARD]/doc_only/mod.ts$2-5.ts +Check [WILDCARD]/doc_only/mod.ts$2-7.ts +running 1 test from ./doc_only/mod.ts$2-7.ts +[WILDCARD]/doc_only/mod.ts$2-7.ts ... ok ([WILDCARD]ms) -ok | 0 passed | 0 failed ([WILDCARD]) +ok | 1 passed | 0 failed ([WILDCARD]ms) diff --git a/tests/specs/test/doc_permission_respected/__test__.jsonc b/tests/specs/test/doc_permission_respected/__test__.jsonc new file mode 100644 index 00000000000000..43c2910844d7ba --- /dev/null +++ b/tests/specs/test/doc_permission_respected/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "test --doc --allow-env=PATH --reload main.ts", + "exitCode": 1, + "output": "main.out" +} diff --git a/tests/specs/test/doc_permission_respected/main.out b/tests/specs/test/doc_permission_respected/main.out new file mode 100644 index 00000000000000..928d4f3cece0de --- /dev/null +++ b/tests/specs/test/doc_permission_respected/main.out @@ -0,0 +1,25 @@ +Check [WILDCARD]/main.ts +Check [WILDCARD]/main.ts$3-6.ts +Check [WILDCARD]/main.ts$8-11.ts +running 0 tests from ./main.ts +running 1 test from ./main.ts$3-6.ts +[WILDCARD]/main.ts$3-6.ts ... ok ([WILDCARD]ms) +running 1 test from ./main.ts$8-11.ts +[WILDCARD]/main.ts$8-11.ts ... FAILED ([WILDCARD]ms) + + ERRORS + +[WILDCARD]/main.ts$8-11.ts => ./main.ts$8-11.ts:1:6 +error: NotCapable: Requires env access to "USER", run again with the --allow-env flag + const _user = Deno.env.get("USER"); + ^ + at Object.getEnv [as get] ([WILDCARD]) + at [WILDCARD]/main.ts$8-11.ts:2:28 + + FAILURES + +[WILDCARD]/main.ts$8-11.ts => ./main.ts$8-11.ts:1:6 + +FAILED | 1 passed | 1 failed ([WILDCARD]ms) + +error: Test failed diff --git a/tests/specs/test/doc_permission_respected/main.ts b/tests/specs/test/doc_permission_respected/main.ts new file mode 100644 index 00000000000000..fdc7743a86a44a --- /dev/null +++ b/tests/specs/test/doc_permission_respected/main.ts @@ -0,0 +1,12 @@ +/** + * This should succeed because we pass `--allow-env=PATH` + * ```ts + * const _path = Deno.env.get("PATH"); + * ``` + * + * This should fail because we don't allow for env access to `USER` + * ```ts + * const _user = Deno.env.get("USER"); + * ``` + * @module doc + */ diff --git a/tests/specs/test/doc_success/__test__.jsonc b/tests/specs/test/doc_success/__test__.jsonc new file mode 100644 index 00000000000000..2a8e6aafca60b5 --- /dev/null +++ b/tests/specs/test/doc_success/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "test --doc --config ../../../config/deno.json main.ts", + "exitCode": 0, + "output": "main.out" +} diff --git a/tests/specs/test/doc_success/main.out b/tests/specs/test/doc_success/main.out new file mode 100644 index 00000000000000..cf1e69b6711811 --- /dev/null +++ b/tests/specs/test/doc_success/main.out @@ -0,0 +1,19 @@ +Check [WILDCARD]/main.ts$8-13.js +Check [WILDCARD]/main.ts$14-19.jsx +Check [WILDCARD]/main.ts$20-25.ts +Check [WILDCARD]/main.ts$26-31.tsx +Check [WILDCARD]/main.ts$42-47.ts +running 0 tests from ./main.ts +running 1 test from ./main.ts$8-13.js +[WILDCARD]/main.ts$8-13.js ... ok ([WILDCARD]ms) +running 1 test from ./main.ts$14-19.jsx +[WILDCARD]/main.ts$14-19.jsx ... ok ([WILDCARD]ms) +running 1 test from ./main.ts$20-25.ts +[WILDCARD]/main.ts$20-25.ts ... ok ([WILDCARD]ms) +running 1 test from ./main.ts$26-31.tsx +[WILDCARD]/main.ts$26-31.tsx ... ok ([WILDCARD]ms) +running 1 test from ./main.ts$42-47.ts +[WILDCARD]/main.ts$42-47.ts ... ok ([WILDCARD]ms) + +ok | 5 passed | 0 failed ([WILDCARD]ms) + diff --git a/tests/specs/test/doc_success/main.ts b/tests/specs/test/doc_success/main.ts new file mode 100644 index 00000000000000..6ab339ca4f3d01 --- /dev/null +++ b/tests/specs/test/doc_success/main.ts @@ -0,0 +1,50 @@ +/** + * ``` + * import { assertEquals } from "@std/assert/equals"; + * + * assertEquals(add(1, 2), 3); + * ``` + * + * ```js + * import { assertEquals } from "@std/assert/equals"; + * + * assertEquals(add(1, 2), 3); + * ``` + * + * ```jsx + * import { assertEquals } from "@std/assert/equals"; + * + * assertEquals(add(1, 2), 3); + * ``` + * + * ```ts + * import { assertEquals } from "@std/assert/equals"; + * + * assertEquals(add(1, 2), 3); + * ``` + * + * ```tsx + * import { assertEquals } from "@std/assert/equals"; + * + * assertEquals(add(1, 2), 3); + * ``` + * + * ```text + * import { assertEquals } from "@std/assert/equals"; + * + * assertEquals(add(1, 2), 3); + * ``` + * + * @module doc + */ + +/** + * ```ts + * import { assertEquals } from "@std/assert/equals"; + * + * assertEquals(add(1, 2), 3); + * ``` + */ +export function add(a: number, b: number): number { + return a + b; +} diff --git a/tests/specs/test/doc_ts_declare_global/__test__.jsonc b/tests/specs/test/doc_ts_declare_global/__test__.jsonc new file mode 100644 index 00000000000000..db1e607aadd290 --- /dev/null +++ b/tests/specs/test/doc_ts_declare_global/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "test --doc --config ../../../config/deno.json lib.d.ts", + "exitCode": 0, + "output": "lib.d.ts.out" +} diff --git a/tests/specs/test/doc_ts_declare_global/lib.d.ts b/tests/specs/test/doc_ts_declare_global/lib.d.ts new file mode 100644 index 00000000000000..a5f442910005b9 --- /dev/null +++ b/tests/specs/test/doc_ts_declare_global/lib.d.ts @@ -0,0 +1,13 @@ +export {}; + +declare global { + /** + * ```ts + * import { assertEquals } from "@std/assert/equals"; + * import "./mod.js"; + * + * assertEquals(myFunction(1, 2), 3); + * ``` + */ + export function myFunction(a: number, b: number): number; +} diff --git a/tests/specs/test/doc_ts_declare_global/lib.d.ts.out b/tests/specs/test/doc_ts_declare_global/lib.d.ts.out new file mode 100644 index 00000000000000..2d6d8dbc853ae9 --- /dev/null +++ b/tests/specs/test/doc_ts_declare_global/lib.d.ts.out @@ -0,0 +1,6 @@ +Check [WILDCARD]/lib$d$ts$5-11.ts +running 1 test from ./lib$d$ts$5-11.ts +[WILDCARD]/lib$d$ts$5-11.ts ... ok ([WILDCARD]ms) + +ok | 1 passed | 0 failed ([WILDCARD]ms) + diff --git a/tests/specs/test/doc_ts_declare_global/mod.js b/tests/specs/test/doc_ts_declare_global/mod.js new file mode 100644 index 00000000000000..1b378d2a7a3f92 --- /dev/null +++ b/tests/specs/test/doc_ts_declare_global/mod.js @@ -0,0 +1 @@ +globalThis.myFunction = (a, b) => a + b; diff --git a/tests/specs/test/doc_ts_namespace_decl/__test__.jsonc b/tests/specs/test/doc_ts_namespace_decl/__test__.jsonc new file mode 100644 index 00000000000000..db1e607aadd290 --- /dev/null +++ b/tests/specs/test/doc_ts_namespace_decl/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "test --doc --config ../../../config/deno.json lib.d.ts", + "exitCode": 0, + "output": "lib.d.ts.out" +} diff --git a/tests/specs/test/doc_ts_namespace_decl/lib.d.ts b/tests/specs/test/doc_ts_namespace_decl/lib.d.ts new file mode 100644 index 00000000000000..e7c81cb5f14477 --- /dev/null +++ b/tests/specs/test/doc_ts_namespace_decl/lib.d.ts @@ -0,0 +1,11 @@ +declare namespace MyNamespace { + /** + * ```ts + * import { assertEquals } from "@std/assert/equals"; + * import "./mod.js"; + * + * assertEquals(MyNamespace.add(1, 2), 3); + * ``` + */ + export function add(a: number, b: number): number; +} diff --git a/tests/specs/test/doc_ts_namespace_decl/lib.d.ts.out b/tests/specs/test/doc_ts_namespace_decl/lib.d.ts.out new file mode 100644 index 00000000000000..2c9e71dc4ac0aa --- /dev/null +++ b/tests/specs/test/doc_ts_namespace_decl/lib.d.ts.out @@ -0,0 +1,6 @@ +Check [WILDCARD]/lib$d$ts$3-9.ts +running 1 test from ./lib$d$ts$3-9.ts +[WILDCARD]/lib$d$ts$3-9.ts ... ok ([WILDCARD]ms) + +ok | 1 passed | 0 failed ([WILDCARD]ms) + diff --git a/tests/specs/test/doc_ts_namespace_decl/mod.js b/tests/specs/test/doc_ts_namespace_decl/mod.js new file mode 100644 index 00000000000000..6a96c342fb4d24 --- /dev/null +++ b/tests/specs/test/doc_ts_namespace_decl/mod.js @@ -0,0 +1,5 @@ +globalThis.MyNamespace = { + add(a, b) { + return a + b; + }, +}; diff --git a/tests/specs/test/markdown/main.out b/tests/specs/test/markdown/main.out index 30327c72f70088..bdbd4325f059de 100644 --- a/tests/specs/test/markdown/main.out +++ b/tests/specs/test/markdown/main.out @@ -2,6 +2,6 @@ Check [WILDCARD]/main.md$11-14.js Check [WILDCARD]/main.md$17-20.ts Check [WILDCARD]/main.md$29-32.ts error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. -const a: string = 42; - ^ - at [WILDCARD]/main.md$29-32.ts:1:7 + const a: string = 42; + ^ + at [WILDCARD]/main.md$29-32.ts:2:11 diff --git a/tests/specs/test/markdown_full_block_names/main.out b/tests/specs/test/markdown_full_block_names/main.out index 9e64522dd225ab..d7e991ce10ea09 100644 --- a/tests/specs/test/markdown_full_block_names/main.out +++ b/tests/specs/test/markdown_full_block_names/main.out @@ -1,6 +1,6 @@ Check [WILDCARD]/main.md$5-8.js Check [WILDCARD]/main.md$17-20.ts error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. -const a: string = 42; - ^ - at [WILDCARD]/main.md$17-20.ts:1:7 + const a: string = 42; + ^ + at [WILDCARD]/main.md$17-20.ts:2:11 diff --git a/tests/specs/test/markdown_ignore_html_comment/main.out b/tests/specs/test/markdown_ignore_html_comment/main.out index 4de73884535afb..d30ba7822bc998 100644 --- a/tests/specs/test/markdown_ignore_html_comment/main.out +++ b/tests/specs/test/markdown_ignore_html_comment/main.out @@ -1,5 +1,5 @@ Check [WILDCARD]/main.md$34-37.ts error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. -const a: string = 42; - ^ - at [WILDCARD]/main.md$34-37.ts:1:7 + const a: string = 42; + ^ + at [WILDCARD]/main.md$34-37.ts:2:11 diff --git a/tests/specs/test/markdown_windows/main.out b/tests/specs/test/markdown_windows/main.out index 30327c72f70088..bdbd4325f059de 100644 --- a/tests/specs/test/markdown_windows/main.out +++ b/tests/specs/test/markdown_windows/main.out @@ -2,6 +2,6 @@ Check [WILDCARD]/main.md$11-14.js Check [WILDCARD]/main.md$17-20.ts Check [WILDCARD]/main.md$29-32.ts error: TS2322 [ERROR]: Type 'number' is not assignable to type 'string'. -const a: string = 42; - ^ - at [WILDCARD]/main.md$29-32.ts:1:7 + const a: string = 42; + ^ + at [WILDCARD]/main.md$29-32.ts:2:11 diff --git a/tests/specs/test/type_check_with_doc/main.out b/tests/specs/test/type_check_with_doc/main.out index 931a6a5f3ef279..56b7ba9e8b9c64 100644 --- a/tests/specs/test/type_check_with_doc/main.out +++ b/tests/specs/test/type_check_with_doc/main.out @@ -6,8 +6,8 @@ const a: string = 1; at file://[WILDCARD]/main.ts:8:7 TS2322 [ERROR]: Type 'string' is not assignable to type 'number'. -const b: number = "1"; - ^ - at file://[WILDCARD]/main.ts$2-5.ts:1:7 + const b: number = "1"; + ^ + at file://[WILDCARD]/main.ts$2-5.ts:2:11 Found 2 errors.
cloud-hypervisor
https://github.com/cloud-hypervisor/cloud-hypervisor
c5e5cd22db6c4148f3665e9a54c3e88fa27ea236
dependabot[bot]
2024-08-30 05:47:48
build: Bump proc-macro2 from 1.0.85 to 1.0.86
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.85 to 1.0.86. - [Release notes](https://github.com/dtolnay/proc-macro2/releases) - [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.85...1.0.86) ---
build: Bump proc-macro2 from 1.0.85 to 1.0.86 Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.85 to 1.0.86. - [Release notes](https://github.com/dtolnay/proc-macro2/releases) - [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.85...1.0.86) --- updated-dependencies: - dependency-name: proc-macro2 dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
diff --git a/Cargo.lock b/Cargo.lock index 0eb1df9a67..bcd7141872 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1711,9 +1711,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ]
ant-design
https://github.com/ant-design/ant-design
8f064303363591a7766347efb03316127a83a416
afc163
2022-04-21 19:39:59
fix: DropDownProps => DropdownProps (#35161)
* fix: DropDown => Dropdown * chore: leave DropDownProps for compatibility
fix: DropDownProps => DropdownProps (#35161) * fix: DropDown => Dropdown * chore: leave DropDownProps for compatibility
diff --git a/components/breadcrumb/BreadcrumbItem.tsx b/components/breadcrumb/BreadcrumbItem.tsx index 14a3838705cc..9977d8682e09 100644 --- a/components/breadcrumb/BreadcrumbItem.tsx +++ b/components/breadcrumb/BreadcrumbItem.tsx @@ -1,15 +1,15 @@ import * as React from 'react'; import DownOutlined from '@ant-design/icons/DownOutlined'; -import DropDown, { DropDownProps } from '../dropdown/dropdown'; +import Dropdown, { DropdownProps } from '../dropdown/dropdown'; import { ConfigContext } from '../config-provider'; export interface BreadcrumbItemProps { prefixCls?: string; separator?: React.ReactNode; href?: string; - overlay?: DropDownProps['overlay']; - dropdownProps?: DropDownProps; + overlay?: DropdownProps['overlay']; + dropdownProps?: DropdownProps; onClick?: React.MouseEventHandler<HTMLAnchorElement | HTMLSpanElement>; className?: string; children?: React.ReactNode; @@ -27,16 +27,16 @@ const BreadcrumbItem: BreadcrumbItemInterface = ({ }) => { const { getPrefixCls } = React.useContext(ConfigContext); const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls); - /** If overlay is have Wrap a DropDown */ + /** If overlay is have Wrap a Dropdown */ const renderBreadcrumbNode = (breadcrumbItem: React.ReactNode) => { if (overlay) { return ( - <DropDown overlay={overlay} placement="bottom" {...dropdownProps}> + <Dropdown overlay={overlay} placement="bottom" {...dropdownProps}> <span className={`${prefixCls}-overlay-link`}> {breadcrumbItem} <DownOutlined /> </span> - </DropDown> + </Dropdown> ); } return breadcrumbItem; diff --git a/components/dropdown/dropdown-button.tsx b/components/dropdown/dropdown-button.tsx index 010dff1cd10e..373e641783a2 100644 --- a/components/dropdown/dropdown-button.tsx +++ b/components/dropdown/dropdown-button.tsx @@ -5,13 +5,13 @@ import Button, { ButtonProps } from '../button'; import { ButtonHTMLType } from '../button/button'; import { ButtonGroupProps } from '../button/button-group'; import { ConfigContext } from '../config-provider'; -import Dropdown, { DropDownProps } from './dropdown'; +import Dropdown, { DropdownProps } from './dropdown'; const ButtonGroup = Button.Group; export type DropdownButtonType = 'default' | 'primary' | 'ghost' | 'dashed' | 'link' | 'text'; -export interface DropdownButtonProps extends ButtonGroupProps, DropDownProps { +export interface DropdownButtonProps extends ButtonGroupProps, DropdownProps { type?: DropdownButtonType; htmlType?: ButtonHTMLType; disabled?: boolean; @@ -76,7 +76,7 @@ const DropdownButton: DropdownButtonInterface = props => { overlayClassName, overlayStyle, destroyPopupOnHide, - } as DropDownProps; + } as DropdownProps; if ('visible' in props) { dropdownProps.visible = visible; diff --git a/components/dropdown/dropdown.tsx b/components/dropdown/dropdown.tsx index 15b555b84e67..217e0682f4d0 100644 --- a/components/dropdown/dropdown.tsx +++ b/components/dropdown/dropdown.tsx @@ -41,7 +41,7 @@ export type DropdownArrowOptions = { pointAtCenter?: boolean; }; -export interface DropDownProps { +export interface DropdownProps { arrow?: boolean | DropdownArrowOptions; trigger?: ('click' | 'hover' | 'contextMenu')[]; overlay: React.ReactElement | OverlayFunc; @@ -64,7 +64,7 @@ export interface DropDownProps { children?: React.ReactNode; } -interface DropdownInterface extends React.FC<DropDownProps> { +interface DropdownInterface extends React.FC<DropdownProps> { Button: typeof DropdownButton; } diff --git a/components/dropdown/index.tsx b/components/dropdown/index.tsx index cd9278b430d7..65b29a3f66ad 100644 --- a/components/dropdown/index.tsx +++ b/components/dropdown/index.tsx @@ -1,5 +1,10 @@ import Dropdown from './dropdown'; -export { DropDownProps } from './dropdown'; -export { DropdownButtonProps, DropdownButtonType } from './dropdown-button'; +export type { + DropdownProps, + // typo, but we need to support it for backwards compatibility + // https://github.com/ant-design/ant-design/pull/35161 + DropdownProps as DropDownProps, +} from './dropdown'; +export type { DropdownButtonProps, DropdownButtonType } from './dropdown-button'; export default Dropdown; diff --git a/components/index.tsx b/components/index.tsx index 3915e62f22d6..f62bf9e05b6b 100644 --- a/components/index.tsx +++ b/components/index.tsx @@ -78,7 +78,12 @@ export { default as Descriptions } from './descriptions'; export type { DividerProps } from './divider'; export { default as Divider } from './divider'; -export type { DropDownProps } from './dropdown'; +export type { + DropdownProps, + // typo, but we need to support it for backwards compatibility + // https://github.com/ant-design/ant-design/pull/35161 + DropdownProps as DropDownProps, +} from './dropdown'; export { default as Dropdown } from './dropdown'; export type { DrawerProps } from './drawer'; diff --git a/components/select/index.tsx b/components/select/index.tsx index 35c76c05ad37..f43cd2d0bc2f 100755 --- a/components/select/index.tsx +++ b/components/select/index.tsx @@ -130,7 +130,7 @@ const InternalSelect = <OptionType extends BaseOptionType | DefaultOptionType = const selectProps = omit(props as typeof props & { itemIcon: any }, ['suffixIcon', 'itemIcon']); - const rcSelectRtlDropDownClassName = classNames(dropdownClassName, { + const rcSelectRtlDropdownClassName = classNames(dropdownClassName, { [`${prefixCls}-dropdown-${direction}`]: direction === 'rtl', }); @@ -181,7 +181,7 @@ const InternalSelect = <OptionType extends BaseOptionType | DefaultOptionType = notFoundContent={mergedNotFound} className={mergedClassName} getPopupContainer={getPopupContainer || getContextPopupContainer} - dropdownClassName={rcSelectRtlDropDownClassName} + dropdownClassName={rcSelectRtlDropdownClassName} showArrow={hasFeedback || showArrow} /> ); diff --git a/components/table/__tests__/Table.filter.test.js b/components/table/__tests__/Table.filter.test.js index 23fc1f97cee3..310abaec5f0e 100644 --- a/components/table/__tests__/Table.filter.test.js +++ b/components/table/__tests__/Table.filter.test.js @@ -2198,7 +2198,7 @@ describe('Table.filter', () => { }); }); - it('filterDropDown should support filterResetToDefaultFilteredValue', () => { + it('filterDropdown should support filterResetToDefaultFilteredValue', () => { jest.useFakeTimers(); jest.spyOn(console, 'error').mockImplementation(() => undefined);
influxdb
https://github.com/influxdata/influxdb
f81885c17273c5657b8e8f503c5b7df37ff1dc94
Marco Neumann
2021-08-20 13:25:49
fix: limit kafka consumer queue to 10MB
I think that while this value limits the maximum memory consumption, it is too optimistic.
fix: limit kafka consumer queue to 10MB I think that while this value limits the maximum memory consumption, it is too optimistic.
diff --git a/write_buffer/src/kafka.rs b/write_buffer/src/kafka.rs index 32b5331612c..feff39ce6a9 100644 --- a/write_buffer/src/kafka.rs +++ b/write_buffer/src/kafka.rs @@ -255,7 +255,7 @@ impl KafkaBufferConsumer { cfg.set("session.timeout.ms", "6000"); cfg.set("enable.auto.commit", "false"); cfg.set("statistics.interval.ms", "15000"); - cfg.set("queued.max.messages.kbytes", "100000"); + cfg.set("queued.max.messages.kbytes", "10000"); // Create a unique group ID for this database's consumer as we don't want to create // consumer groups.
greptimedb
https://github.com/GreptimeTeam/greptimedb
05f21679d6060987642a35d40b53624d7da3f722
Weny Xu
2025-01-23 14:14:17
feat: replace `DensePrimaryKeyCodec` with `Arc<dyn PrimaryKeyCodec>` (#5408)
* feat: use `PrimaryKeyCodec` trait object * feat: introduce `RewritePrimaryKey` * chore: apply suggestions from CR * fix: fix clippy * chore: add comments
feat: replace `DensePrimaryKeyCodec` with `Arc<dyn PrimaryKeyCodec>` (#5408) * feat: use `PrimaryKeyCodec` trait object * feat: introduce `RewritePrimaryKey` * chore: apply suggestions from CR * fix: fix clippy * chore: add comments
diff --git a/src/mito2/src/memtable/bulk/context.rs b/src/mito2/src/memtable/bulk/context.rs index a3c019ebec40..0380afd7e086 100644 --- a/src/mito2/src/memtable/bulk/context.rs +++ b/src/mito2/src/memtable/bulk/context.rs @@ -22,7 +22,7 @@ use store_api::metadata::RegionMetadataRef; use store_api::storage::ColumnId; use table::predicate::Predicate; -use crate::row_converter::DensePrimaryKeyCodec; +use crate::row_converter::{build_primary_key_codec, DensePrimaryKeyCodec}; use crate::sst::parquet::file_range::RangeBase; use crate::sst::parquet::format::ReadFormat; use crate::sst::parquet::reader::SimpleFilterContext; @@ -41,7 +41,7 @@ impl BulkIterContext { projection: &Option<&[ColumnId]>, predicate: Option<Predicate>, ) -> Self { - let codec = DensePrimaryKeyCodec::new(&region_metadata); + let codec = build_primary_key_codec(&region_metadata); let simple_filters = predicate .as_ref() diff --git a/src/mito2/src/memtable/bulk/part.rs b/src/mito2/src/memtable/bulk/part.rs index 6c132ce64458..07f5fda5295e 100644 --- a/src/mito2/src/memtable/bulk/part.rs +++ b/src/mito2/src/memtable/bulk/part.rs @@ -562,7 +562,7 @@ mod tests { let batch_values = batches .into_iter() .map(|b| { - let pk_values = pk_encoder.decode_dense(b.primary_key()).unwrap(); + let pk_values = pk_encoder.decode(b.primary_key()).unwrap().into_dense(); let timestamps = b .timestamps() .as_any() diff --git a/src/mito2/src/memtable/partition_tree.rs b/src/mito2/src/memtable/partition_tree.rs index 4bcd432d414a..78a8b7d847d9 100644 --- a/src/mito2/src/memtable/partition_tree.rs +++ b/src/mito2/src/memtable/partition_tree.rs @@ -31,9 +31,8 @@ use std::sync::atomic::{AtomicI64, AtomicU64, AtomicUsize, Ordering}; use std::sync::Arc; use common_base::readable_size::ReadableSize; -pub(crate) use primary_key_filter::DensePrimaryKeyFilter; +pub(crate) use primary_key_filter::{DensePrimaryKeyFilter, SparsePrimaryKeyFilter}; use serde::{Deserialize, Serialize}; -use store_api::codec::PrimaryKeyEncoding; use store_api::metadata::RegionMetadataRef; use store_api::storage::{ColumnId, SequenceNumber}; use table::predicate::Predicate; @@ -48,7 +47,7 @@ use crate::memtable::{ MemtableId, MemtableRange, MemtableRangeContext, MemtableRanges, MemtableRef, MemtableStats, }; use crate::region::options::MergeMode; -use crate::row_converter::{DensePrimaryKeyCodec, PrimaryKeyCodec}; +use crate::row_converter::{build_primary_key_codec, PrimaryKeyCodec}; /// Use `1/DICTIONARY_SIZE_FACTOR` of OS memory as dictionary size. pub(crate) const DICTIONARY_SIZE_FACTOR: u64 = 8; @@ -330,22 +329,14 @@ impl PartitionTreeMemtableBuilder { impl MemtableBuilder for PartitionTreeMemtableBuilder { fn build(&self, id: MemtableId, metadata: &RegionMetadataRef) -> MemtableRef { - match metadata.primary_key_encoding { - PrimaryKeyEncoding::Dense => { - let codec = Arc::new(DensePrimaryKeyCodec::new(metadata)); - Arc::new(PartitionTreeMemtable::new( - id, - codec, - metadata.clone(), - self.write_buffer_manager.clone(), - &self.config, - )) - } - PrimaryKeyEncoding::Sparse => { - //TODO(weny): Implement sparse primary key encoding. - todo!() - } - } + let codec = build_primary_key_codec(metadata); + Arc::new(PartitionTreeMemtable::new( + id, + codec, + metadata.clone(), + self.write_buffer_manager.clone(), + &self.config, + )) } } @@ -382,7 +373,7 @@ mod tests { use store_api::storage::RegionId; use super::*; - use crate::row_converter::{DensePrimaryKeyCodec, PrimaryKeyCodecExt}; + use crate::row_converter::DensePrimaryKeyCodec; use crate::test_util::memtable_util::{ self, collect_iter_timestamps, region_metadata_to_row_schema, }; @@ -794,7 +785,7 @@ mod tests { let mut reader = new_memtable.iter(None, None, None).unwrap(); let batch = reader.next().unwrap().unwrap(); - let pk = codec.decode(batch.primary_key()).unwrap(); + let pk = codec.decode(batch.primary_key()).unwrap().into_dense(); if let Value::String(s) = &pk[2] { assert_eq!("10min", s.as_utf8()); } else { diff --git a/src/mito2/src/memtable/partition_tree/tree.rs b/src/mito2/src/memtable/partition_tree/tree.rs index d02b13ddb47a..4645ca7ab953 100644 --- a/src/mito2/src/memtable/partition_tree/tree.rs +++ b/src/mito2/src/memtable/partition_tree/tree.rs @@ -96,6 +96,21 @@ impl PartitionTree { } } + fn verify_primary_key_length(&self, kv: &KeyValue) -> Result<()> { + // The sparse primary key codec does not have a fixed number of fields. + if let Some(expected_num_fields) = self.row_codec.num_fields() { + ensure!( + expected_num_fields == kv.num_primary_keys(), + PrimaryKeyLengthMismatchSnafu { + expect: expected_num_fields, + actual: kv.num_primary_keys(), + } + ); + } + // TODO(weny): verify the primary key length for sparse primary key codec. + Ok(()) + } + // TODO(yingwen): The size computed from values is inaccurate. /// Write key-values into the tree. /// @@ -110,13 +125,7 @@ impl PartitionTree { let has_pk = !self.metadata.primary_key.is_empty(); for kv in kvs.iter() { - ensure!( - kv.num_primary_keys() == self.row_codec.num_fields(), - PrimaryKeyLengthMismatchSnafu { - expect: self.row_codec.num_fields(), - actual: kv.num_primary_keys(), - } - ); + self.verify_primary_key_length(&kv)?; // Safety: timestamp of kv must be both present and a valid timestamp value. let ts = kv.timestamp().as_timestamp().unwrap().unwrap().value(); metrics.min_ts = metrics.min_ts.min(ts); @@ -161,13 +170,7 @@ impl PartitionTree { ) -> Result<()> { let has_pk = !self.metadata.primary_key.is_empty(); - ensure!( - kv.num_primary_keys() == self.row_codec.num_fields(), - PrimaryKeyLengthMismatchSnafu { - expect: self.row_codec.num_fields(), - actual: kv.num_primary_keys(), - } - ); + self.verify_primary_key_length(&kv)?; // Safety: timestamp of kv must be both present and a valid timestamp value. let ts = kv.timestamp().as_timestamp().unwrap().unwrap().value(); metrics.min_ts = metrics.min_ts.min(ts); diff --git a/src/mito2/src/memtable/time_series.rs b/src/mito2/src/memtable/time_series.rs index a7c41648f39f..88fa058c6b59 100644 --- a/src/mito2/src/memtable/time_series.rs +++ b/src/mito2/src/memtable/time_series.rs @@ -51,7 +51,7 @@ use crate::metrics::{READ_ROWS_TOTAL, READ_STAGE_ELAPSED}; use crate::read::dedup::LastNonNullIter; use crate::read::{Batch, BatchBuilder, BatchColumn}; use crate::region::options::MergeMode; -use crate::row_converter::{DensePrimaryKeyCodec, PrimaryKeyCodec, PrimaryKeyCodecExt}; +use crate::row_converter::{DensePrimaryKeyCodec, PrimaryKeyCodecExt}; /// Initial vector builder capacity. const INITIAL_BUILDER_CAPACITY: usize = 0; @@ -146,12 +146,13 @@ impl TimeSeriesMemtable { fn write_key_value(&self, kv: KeyValue, stats: &mut WriteMetrics) -> Result<()> { ensure!( - kv.num_primary_keys() == self.row_codec.num_fields(), + self.row_codec.num_fields() == kv.num_primary_keys(), PrimaryKeyLengthMismatchSnafu { expect: self.row_codec.num_fields(), - actual: kv.num_primary_keys() + actual: kv.num_primary_keys(), } ); + let primary_key_encoded = self.row_codec.encode(kv.primary_keys())?; let fields = kv.fields().collect::<Vec<_>>(); @@ -585,7 +586,7 @@ fn prune_primary_key( let pk_values = if let Some(pk_values) = series.pk_cache.as_ref() { pk_values } else { - let pk_values = codec.decode(pk); + let pk_values = codec.decode_dense_without_column_id(pk); if let Err(e) = pk_values { error!(e; "Failed to decode primary key"); return true; @@ -1176,7 +1177,12 @@ mod tests { let row_codec = Arc::new(DensePrimaryKeyCodec::with_fields( schema .primary_key_columns() - .map(|c| SortField::new(c.column_schema.data_type.clone())) + .map(|c| { + ( + c.column_id, + SortField::new(c.column_schema.data_type.clone()), + ) + }) .collect(), )); let set = Arc::new(SeriesSet::new(schema.clone(), row_codec)); diff --git a/src/mito2/src/read.rs b/src/mito2/src/read.rs index 6001d3062491..2f9bdff7b036 100644 --- a/src/mito2/src/read.rs +++ b/src/mito2/src/read.rs @@ -40,7 +40,7 @@ use datatypes::arrow::compute::SortOptions; use datatypes::arrow::row::{RowConverter, SortField}; use datatypes::prelude::{ConcreteDataType, DataType, ScalarVector}; use datatypes::types::TimestampType; -use datatypes::value::{Value, ValueRef}; +use datatypes::value::ValueRef; use datatypes::vectors::{ BooleanVector, Helper, TimestampMicrosecondVector, TimestampMillisecondVector, TimestampNanosecondVector, TimestampSecondVector, UInt32Vector, UInt64Vector, UInt8Vector, @@ -58,6 +58,7 @@ use crate::error::{ use crate::memtable::BoxedBatchIterator; use crate::metrics::{READ_BATCHES_RETURN, READ_ROWS_RETURN, READ_STAGE_ELAPSED}; use crate::read::prune::PruneReader; +use crate::row_converter::CompositeValues; /// Storage internal representation of a batch of rows for a primary key (time series). /// @@ -68,7 +69,7 @@ pub struct Batch { /// Primary key encoded in a comparable form. primary_key: Vec<u8>, /// Possibly decoded `primary_key` values. Some places would decode it in advance. - pk_values: Option<Vec<Value>>, + pk_values: Option<CompositeValues>, /// Timestamps of rows, should be sorted and not null. timestamps: VectorRef, /// Sequences of rows @@ -114,12 +115,12 @@ impl Batch { } /// Returns possibly decoded primary-key values. - pub fn pk_values(&self) -> Option<&[Value]> { - self.pk_values.as_deref() + pub fn pk_values(&self) -> Option<&CompositeValues> { + self.pk_values.as_ref() } /// Sets possibly decoded primary-key values. - pub fn set_pk_values(&mut self, pk_values: Vec<Value>) { + pub fn set_pk_values(&mut self, pk_values: CompositeValues) { self.pk_values = Some(pk_values); } diff --git a/src/mito2/src/read/compat.rs b/src/mito2/src/read/compat.rs index 1de5d624210c..c103bbaa9c94 100644 --- a/src/mito2/src/read/compat.rs +++ b/src/mito2/src/read/compat.rs @@ -15,6 +15,7 @@ //! Utilities to adapt readers with different schema. use std::collections::HashMap; +use std::sync::Arc; use datatypes::data_type::ConcreteDataType; use datatypes::value::Value; @@ -26,7 +27,10 @@ use store_api::storage::ColumnId; use crate::error::{CompatReaderSnafu, CreateDefaultSnafu, Result}; use crate::read::projection::ProjectionMapper; use crate::read::{Batch, BatchColumn, BatchReader}; -use crate::row_converter::{DensePrimaryKeyCodec, PrimaryKeyCodec, SortField}; +use crate::row_converter::{ + build_primary_key_codec, build_primary_key_codec_with_fields, CompositeValues, PrimaryKeyCodec, + SortField, +}; /// Reader to adapt schema of underlying reader to expected schema. pub struct CompatReader<R> { @@ -68,6 +72,8 @@ impl<R: BatchReader> BatchReader for CompatReader<R> { /// A helper struct to adapt schema of the batch to an expected schema. pub(crate) struct CompatBatch { + /// Optional primary key adapter. + rewrite_pk: Option<RewritePrimaryKey>, /// Optional primary key adapter. compat_pk: Option<CompatPrimaryKey>, /// Optional fields adapter. @@ -79,10 +85,12 @@ impl CompatBatch { /// - `mapper` is built from the metadata users expect to see. /// - `reader_meta` is the metadata of the input reader. pub(crate) fn new(mapper: &ProjectionMapper, reader_meta: RegionMetadataRef) -> Result<Self> { + let rewrite_pk = may_rewrite_primary_key(mapper.metadata(), &reader_meta); let compat_pk = may_compat_primary_key(mapper.metadata(), &reader_meta)?; let compat_fields = may_compat_fields(mapper, &reader_meta)?; Ok(Self { + rewrite_pk, compat_pk, compat_fields, }) @@ -90,6 +98,9 @@ impl CompatBatch { /// Adapts the `batch` to the expected schema. pub(crate) fn compat_batch(&self, mut batch: Batch) -> Result<Batch> { + if let Some(rewrite_pk) = &self.rewrite_pk { + batch = rewrite_pk.compat(batch)?; + } if let Some(compat_pk) = &self.compat_pk { batch = compat_pk.compat(batch)?; } @@ -101,10 +112,15 @@ impl CompatBatch { } } -/// Returns true if `left` and `right` have same columns to read. -/// -/// It only consider column ids. -pub(crate) fn has_same_columns(left: &RegionMetadata, right: &RegionMetadata) -> bool { +/// Returns true if `left` and `right` have same columns and primary key encoding. +pub(crate) fn has_same_columns_and_pk_encoding( + left: &RegionMetadata, + right: &RegionMetadata, +) -> bool { + if left.primary_key_encoding != right.primary_key_encoding { + return false; + } + if left.column_metadatas.len() != right.column_metadatas.len() { return false; } @@ -127,16 +143,17 @@ pub(crate) fn has_same_columns(left: &RegionMetadata, right: &RegionMetadata) -> #[derive(Debug)] struct CompatPrimaryKey { /// Row converter to append values to primary keys. - converter: DensePrimaryKeyCodec, + converter: Arc<dyn PrimaryKeyCodec>, /// Default values to append. - values: Vec<Value>, + values: Vec<(ColumnId, Value)>, } impl CompatPrimaryKey { /// Make primary key of the `batch` compatible. fn compat(&self, mut batch: Batch) -> Result<Batch> { - let mut buffer = - Vec::with_capacity(batch.primary_key().len() + self.converter.estimated_size()); + let mut buffer = Vec::with_capacity( + batch.primary_key().len() + self.converter.estimated_size().unwrap_or_default(), + ); buffer.extend_from_slice(batch.primary_key()); self.converter.encode_values(&self.values, &mut buffer)?; @@ -144,9 +161,7 @@ impl CompatPrimaryKey { // update cache if let Some(pk_values) = &mut batch.pk_values { - for value in &self.values { - pk_values.push(value.clone()); - } + pk_values.extend(&self.values); } Ok(batch) @@ -211,6 +226,25 @@ impl CompatFields { } } +fn may_rewrite_primary_key( + expect: &RegionMetadata, + actual: &RegionMetadata, +) -> Option<RewritePrimaryKey> { + if expect.primary_key_encoding == actual.primary_key_encoding { + return None; + } + + let fields = expect.primary_key.clone(); + let original = build_primary_key_codec(actual); + let new = build_primary_key_codec(expect); + + Some(RewritePrimaryKey { + original, + new, + fields, + }) +} + /// Creates a [CompatPrimaryKey] if needed. fn may_compat_primary_key( expect: &RegionMetadata, @@ -248,7 +282,10 @@ fn may_compat_primary_key( for column_id in to_add { // Safety: The id comes from expect region metadata. let column = expect.column_by_id(*column_id).unwrap(); - fields.push(SortField::new(column.column_schema.data_type.clone())); + fields.push(( + *column_id, + SortField::new(column.column_schema.data_type.clone()), + )); let default_value = column .column_schema .create_default() @@ -263,9 +300,11 @@ fn may_compat_primary_key( column.column_schema.name ), })?; - values.push(default_value); + values.push((*column_id, default_value)); } - let converter = DensePrimaryKeyCodec::with_fields(fields); + // Using expect primary key encoding to build the converter + let converter = + build_primary_key_codec_with_fields(expect.primary_key_encoding, fields.into_iter()); Ok(Some(CompatPrimaryKey { converter, values })) } @@ -350,6 +389,53 @@ enum IndexOrDefault { }, } +/// Adapter to rewrite primary key. +struct RewritePrimaryKey { + /// Original primary key codec. + original: Arc<dyn PrimaryKeyCodec>, + /// New primary key codec. + new: Arc<dyn PrimaryKeyCodec>, + /// Order of the fields in the new primary key. + fields: Vec<ColumnId>, +} + +impl RewritePrimaryKey { + /// Make primary key of the `batch` compatible. + fn compat(&self, mut batch: Batch) -> Result<Batch> { + let values = if let Some(pk_values) = batch.pk_values() { + pk_values + } else { + let new_pk_values = self.original.decode(batch.primary_key())?; + batch.set_pk_values(new_pk_values); + // Safety: We ensure pk_values is not None. + batch.pk_values().as_ref().unwrap() + }; + + let mut buffer = Vec::with_capacity( + batch.primary_key().len() + self.new.estimated_size().unwrap_or_default(), + ); + match values { + CompositeValues::Dense(values) => { + self.new.encode_values(values.as_slice(), &mut buffer)?; + } + CompositeValues::Sparse(values) => { + let values = self + .fields + .iter() + .map(|id| { + let value = values.get_or_null(*id); + (*id, value.as_value_ref()) + }) + .collect::<Vec<_>>(); + self.new.encode_value_refs(&values, &mut buffer)?; + } + } + batch.set_primary_key(buffer); + + Ok(batch) + } +} + #[cfg(test)] mod tests { use std::sync::Arc; @@ -359,11 +445,12 @@ mod tests { use datatypes::schema::ColumnSchema; use datatypes::value::ValueRef; use datatypes::vectors::{Int64Vector, TimestampMillisecondVector, UInt64Vector, UInt8Vector}; + use store_api::codec::PrimaryKeyEncoding; use store_api::metadata::{ColumnMetadata, RegionMetadataBuilder}; use store_api::storage::RegionId; use super::*; - use crate::row_converter::PrimaryKeyCodecExt; + use crate::row_converter::{DensePrimaryKeyCodec, PrimaryKeyCodecExt, SparsePrimaryKeyCodec}; use crate::test_util::{check_reader_result, VecBatchReader}; /// Creates a new [RegionMetadata]. @@ -396,7 +483,7 @@ mod tests { /// Encode primary key. fn encode_key(keys: &[Option<&str>]) -> Vec<u8> { let fields = (0..keys.len()) - .map(|_| SortField::new(ConcreteDataType::string_datatype())) + .map(|_| (0, SortField::new(ConcreteDataType::string_datatype()))) .collect(); let converter = DensePrimaryKeyCodec::with_fields(fields); let row = keys.iter().map(|str_opt| match str_opt { @@ -407,6 +494,24 @@ mod tests { converter.encode(row).unwrap() } + /// Encode sparse primary key. + fn encode_sparse_key(keys: &[(ColumnId, Option<&str>)]) -> Vec<u8> { + let fields = (0..keys.len()) + .map(|_| (1, SortField::new(ConcreteDataType::string_datatype()))) + .collect(); + let converter = SparsePrimaryKeyCodec::with_fields(fields); + let row = keys + .iter() + .map(|(id, str_opt)| match str_opt { + Some(v) => (*id, ValueRef::String(v)), + None => (*id, ValueRef::Null), + }) + .collect::<Vec<_>>(); + let mut buffer = vec![]; + converter.encode_value_refs(&row, &mut buffer).unwrap(); + buffer + } + /// Creates a batch for specific primary `key`. /// /// `fields`: [(column_id of the field, is null)] @@ -526,6 +631,25 @@ mod tests { .is_none()); } + #[test] + fn test_same_pk_encoding() { + let reader_meta = Arc::new(new_metadata( + &[ + ( + 0, + SemanticType::Timestamp, + ConcreteDataType::timestamp_millisecond_datatype(), + ), + (1, SemanticType::Tag, ConcreteDataType::string_datatype()), + ], + &[1], + )); + + assert!(may_compat_primary_key(&reader_meta, &reader_meta) + .unwrap() + .is_none()); + } + #[test] fn test_same_fields() { let reader_meta = Arc::new(new_metadata( @@ -747,4 +871,58 @@ mod tests { ) .await; } + + #[tokio::test] + async fn test_compat_reader_different_pk_encoding() { + let mut reader_meta = new_metadata( + &[ + ( + 0, + SemanticType::Timestamp, + ConcreteDataType::timestamp_millisecond_datatype(), + ), + (1, SemanticType::Tag, ConcreteDataType::string_datatype()), + (2, SemanticType::Field, ConcreteDataType::int64_datatype()), + ], + &[1], + ); + reader_meta.primary_key_encoding = PrimaryKeyEncoding::Dense; + let reader_meta = Arc::new(reader_meta); + let mut expect_meta = new_metadata( + &[ + ( + 0, + SemanticType::Timestamp, + ConcreteDataType::timestamp_millisecond_datatype(), + ), + (1, SemanticType::Tag, ConcreteDataType::string_datatype()), + (2, SemanticType::Field, ConcreteDataType::int64_datatype()), + (3, SemanticType::Tag, ConcreteDataType::string_datatype()), + (4, SemanticType::Field, ConcreteDataType::int64_datatype()), + ], + &[1, 3], + ); + expect_meta.primary_key_encoding = PrimaryKeyEncoding::Sparse; + let expect_meta = Arc::new(expect_meta); + + let mapper = ProjectionMapper::all(&expect_meta).unwrap(); + let k1 = encode_key(&[Some("a")]); + let k2 = encode_key(&[Some("b")]); + let source_reader = VecBatchReader::new(&[ + new_batch(&k1, &[(2, false)], 1000, 3), + new_batch(&k2, &[(2, false)], 1000, 3), + ]); + + let mut compat_reader = CompatReader::new(&mapper, reader_meta, source_reader).unwrap(); + let k1 = encode_sparse_key(&[(1, Some("a")), (3, None)]); + let k2 = encode_sparse_key(&[(1, Some("b")), (3, None)]); + check_reader_result( + &mut compat_reader, + &[ + new_batch(&k1, &[(2, false), (4, true)], 1000, 3), + new_batch(&k2, &[(2, false), (4, true)], 1000, 3), + ], + ) + .await; + } } diff --git a/src/mito2/src/read/projection.rs b/src/mito2/src/read/projection.rs index 4ffc021e42cd..883f55406644 100644 --- a/src/mito2/src/read/projection.rs +++ b/src/mito2/src/read/projection.rs @@ -33,7 +33,7 @@ use store_api::storage::ColumnId; use crate::cache::CacheStrategy; use crate::error::{InvalidRequestSnafu, Result}; use crate::read::Batch; -use crate::row_converter::{DensePrimaryKeyCodec, PrimaryKeyCodec}; +use crate::row_converter::{build_primary_key_codec, CompositeValues, PrimaryKeyCodec}; /// Only cache vector when its length `<=` this value. const MAX_VECTOR_LENGTH_TO_CACHE: usize = 16384; @@ -47,7 +47,7 @@ pub struct ProjectionMapper { /// Output record batch contains tags. has_tags: bool, /// Decoder for primary key. - codec: DensePrimaryKeyCodec, + codec: Arc<dyn PrimaryKeyCodec>, /// Schema for converted [RecordBatch]. output_schema: SchemaRef, /// Ids of columns to project. It keeps ids in the same order as the `projection` @@ -92,8 +92,8 @@ impl ProjectionMapper { // Safety: idx is valid. column_schemas.push(metadata.schema.column_schemas()[*idx].clone()); } - let codec = DensePrimaryKeyCodec::new(metadata); + let codec = build_primary_key_codec(metadata); if is_empty_projection { // If projection is empty, we don't output any column. return Ok(ProjectionMapper { @@ -134,7 +134,7 @@ impl ProjectionMapper { has_tags = true; // We always read all primary key so the column always exists and the tag // index is always valid. - BatchIndex::Tag(index) + BatchIndex::Tag((index, column.column_id)) } SemanticType::Timestamp => BatchIndex::Timestamp, SemanticType::Field => { @@ -213,15 +213,15 @@ impl ProjectionMapper { // Skips decoding pk if we don't need to output it. let pk_values = if self.has_tags { match batch.pk_values() { - Some(v) => v.to_vec(), + Some(v) => v.clone(), None => self .codec - .decode_dense(batch.primary_key()) + .decode(batch.primary_key()) .map_err(BoxedError::new) .context(ExternalSnafu)?, } } else { - Vec::new() + CompositeValues::Dense(vec![]) }; let mut columns = Vec::with_capacity(self.output_schema.num_columns()); @@ -232,8 +232,11 @@ impl ProjectionMapper { .zip(self.output_schema.column_schemas()) { match index { - BatchIndex::Tag(idx) => { - let value = &pk_values[*idx]; + BatchIndex::Tag((idx, column_id)) => { + let value = match &pk_values { + CompositeValues::Dense(v) => &v[*idx].1, + CompositeValues::Sparse(v) => v.get_or_null(*column_id), + }; let vector = repeated_vector_with_cache( &column_schema.data_type, value, @@ -259,7 +262,7 @@ impl ProjectionMapper { #[derive(Debug, Clone, Copy)] enum BatchIndex { /// Index in primary keys. - Tag(usize), + Tag((usize, ColumnId)), /// The time index column. Timestamp, /// Index in fields. @@ -321,7 +324,7 @@ mod tests { use super::*; use crate::cache::CacheManager; use crate::read::BatchBuilder; - use crate::row_converter::{PrimaryKeyCodecExt, SortField}; + use crate::row_converter::{DensePrimaryKeyCodec, PrimaryKeyCodecExt, SortField}; use crate::test_util::meta_util::TestRegionMetadataBuilder; fn new_batch( @@ -332,7 +335,12 @@ mod tests { ) -> Batch { let converter = DensePrimaryKeyCodec::with_fields( (0..tags.len()) - .map(|_| SortField::new(ConcreteDataType::int64_datatype())) + .map(|idx| { + ( + idx as u32, + SortField::new(ConcreteDataType::int64_datatype()), + ) + }) .collect(), ); let primary_key = converter diff --git a/src/mito2/src/read/scan_region.rs b/src/mito2/src/read/scan_region.rs index b5c4eecd0c0d..193e3c3e1764 100644 --- a/src/mito2/src/read/scan_region.rs +++ b/src/mito2/src/read/scan_region.rs @@ -767,7 +767,7 @@ impl ScanInput { } } }; - if !compat::has_same_columns( + if !compat::has_same_columns_and_pk_encoding( self.mapper.metadata(), file_range_ctx.read_format().metadata(), ) { diff --git a/src/mito2/src/row_converter.rs b/src/mito2/src/row_converter.rs index 75f015d4494f..4d0635d3cc45 100644 --- a/src/mito2/src/row_converter.rs +++ b/src/mito2/src/row_converter.rs @@ -13,10 +13,8 @@ // limitations under the License. mod dense; -// TODO(weny): remove it. -#[allow(unused)] mod sparse; - +use std::fmt::Debug; use std::sync::Arc; use common_recordbatch::filter::SimpleFilterEvaluator; @@ -24,7 +22,8 @@ use datatypes::value::{Value, ValueRef}; pub use dense::{DensePrimaryKeyCodec, SortField}; pub use sparse::{SparsePrimaryKeyCodec, SparseValues}; use store_api::codec::PrimaryKeyEncoding; -use store_api::metadata::RegionMetadataRef; +use store_api::metadata::{RegionMetadata, RegionMetadataRef}; +use store_api::storage::ColumnId; use crate::error::Result; use crate::memtable::key_values::KeyValue; @@ -49,9 +48,6 @@ pub trait PrimaryKeyCodecExt { fn encode_to_vec<'a, I>(&self, row: I, buffer: &mut Vec<u8>) -> Result<()> where I: Iterator<Item = ValueRef<'a>>; - - /// Decode row values from bytes. - fn decode(&self, bytes: &[u8]) -> Result<Vec<Value>>; } pub trait PrimaryKeyFilter: Send + Sync { @@ -59,15 +55,63 @@ pub trait PrimaryKeyFilter: Send + Sync { fn matches(&mut self, pk: &[u8]) -> bool; } -pub trait PrimaryKeyCodec: Send + Sync { +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum CompositeValues { + Dense(Vec<(ColumnId, Value)>), + Sparse(SparseValues), +} + +impl CompositeValues { + /// Extends the composite values with the given values. + pub fn extend(&mut self, values: &[(ColumnId, Value)]) { + match self { + CompositeValues::Dense(dense_values) => { + for (column_id, value) in values { + dense_values.push((*column_id, value.clone())); + } + } + CompositeValues::Sparse(sprase_value) => { + for (column_id, value) in values { + sprase_value.insert(*column_id, value.clone()); + } + } + } + } +} + +#[cfg(test)] +impl CompositeValues { + pub fn into_sparse(self) -> SparseValues { + match self { + CompositeValues::Sparse(v) => v, + _ => panic!("CompositeValues is not sparse"), + } + } + + pub fn into_dense(self) -> Vec<Value> { + match self { + CompositeValues::Dense(v) => v.into_iter().map(|(_, v)| v).collect(), + _ => panic!("CompositeValues is not dense"), + } + } +} + +pub trait PrimaryKeyCodec: Send + Sync + Debug { /// Encodes a key value to bytes. fn encode_key_value(&self, key_value: &KeyValue, buffer: &mut Vec<u8>) -> Result<()>; /// Encodes values to bytes. - fn encode_values(&self, values: &[Value], buffer: &mut Vec<u8>) -> Result<()>; + fn encode_values(&self, values: &[(ColumnId, Value)], buffer: &mut Vec<u8>) -> Result<()>; + + /// Encodes values to bytes. + fn encode_value_refs( + &self, + values: &[(ColumnId, ValueRef)], + buffer: &mut Vec<u8>, + ) -> Result<()>; /// Returns the number of fields in the primary key. - fn num_fields(&self) -> usize; + fn num_fields(&self) -> Option<usize>; /// Returns a primary key filter factory. fn primary_key_filter( @@ -86,9 +130,33 @@ pub trait PrimaryKeyCodec: Send + Sync { /// Decodes the primary key from the given bytes. /// - /// Returns a [`Vec<Value>`] that follows the primary key ordering. - fn decode_dense(&self, bytes: &[u8]) -> Result<Vec<Value>>; + /// Returns a [`CompositeValues`] that follows the primary key ordering. + fn decode(&self, bytes: &[u8]) -> Result<CompositeValues>; /// Decode the leftmost value from bytes. fn decode_leftmost(&self, bytes: &[u8]) -> Result<Option<Value>>; } + +/// Builds a primary key codec from region metadata. +pub fn build_primary_key_codec(region_metadata: &RegionMetadata) -> Arc<dyn PrimaryKeyCodec> { + let fields = region_metadata.primary_key_columns().map(|col| { + ( + col.column_id, + SortField::new(col.column_schema.data_type.clone()), + ) + }); + build_primary_key_codec_with_fields(region_metadata.primary_key_encoding, fields) +} + +/// Builds a primary key codec from region metadata. +pub fn build_primary_key_codec_with_fields( + encoding: PrimaryKeyEncoding, + fields: impl Iterator<Item = (ColumnId, SortField)>, +) -> Arc<dyn PrimaryKeyCodec> { + match encoding { + PrimaryKeyEncoding::Dense => Arc::new(DensePrimaryKeyCodec::with_fields(fields.collect())), + PrimaryKeyEncoding::Sparse => { + Arc::new(SparsePrimaryKeyCodec::with_fields(fields.collect())) + } + } +} diff --git a/src/mito2/src/row_converter/dense.rs b/src/mito2/src/row_converter/dense.rs index 5c21428523f8..8c3d497d7e21 100644 --- a/src/mito2/src/row_converter/dense.rs +++ b/src/mito2/src/row_converter/dense.rs @@ -30,8 +30,9 @@ use serde::{Deserialize, Serialize}; use snafu::ResultExt; use store_api::codec::PrimaryKeyEncoding; use store_api::metadata::{RegionMetadata, RegionMetadataRef}; +use store_api::storage::ColumnId; -use super::PrimaryKeyFilter; +use super::{CompositeValues, PrimaryKeyFilter}; use crate::error::{ self, FieldTypeMismatchSnafu, NotSupportedFieldSnafu, Result, SerializeFieldSnafu, }; @@ -312,34 +313,31 @@ impl PrimaryKeyCodecExt for DensePrimaryKeyCodec { { self.encode_dense(row, buffer) } - - fn decode(&self, bytes: &[u8]) -> Result<Vec<Value>> { - self.decode_dense(bytes) - } } /// A memory-comparable row [`Value`] encoder/decoder. #[derive(Clone, Debug)] pub struct DensePrimaryKeyCodec { /// Primary key fields. - ordered_primary_key_columns: Arc<Vec<SortField>>, + ordered_primary_key_columns: Arc<Vec<(ColumnId, SortField)>>, } impl DensePrimaryKeyCodec { pub fn new(metadata: &RegionMetadata) -> Self { - let ordered_primary_key_columns = Arc::new( - metadata - .primary_key_columns() - .map(|c| SortField::new(c.column_schema.data_type.clone())) - .collect::<Vec<_>>(), - ); - - Self { - ordered_primary_key_columns, - } + let ordered_primary_key_columns = metadata + .primary_key_columns() + .map(|c| { + ( + c.column_id, + SortField::new(c.column_schema.data_type.clone()), + ) + }) + .collect::<Vec<_>>(); + + Self::with_fields(ordered_primary_key_columns) } - pub fn with_fields(fields: Vec<SortField>) -> Self { + pub fn with_fields(fields: Vec<(ColumnId, SortField)>) -> Self { Self { ordered_primary_key_columns: Arc::new(fields), } @@ -350,12 +348,42 @@ impl DensePrimaryKeyCodec { I: Iterator<Item = ValueRef<'a>>, { let mut serializer = Serializer::new(buffer); - for (value, field) in row.zip(self.ordered_primary_key_columns.iter()) { + for (value, (_, field)) in row.zip(self.ordered_primary_key_columns.iter()) { field.serialize(&mut serializer, &value)?; } Ok(()) } + /// Decode primary key values from bytes. + pub fn decode_dense(&self, bytes: &[u8]) -> Result<Vec<(ColumnId, Value)>> { + let mut deserializer = Deserializer::new(bytes); + let mut values = Vec::with_capacity(self.ordered_primary_key_columns.len()); + for (column_id, field) in self.ordered_primary_key_columns.iter() { + let value = field.deserialize(&mut deserializer)?; + values.push((*column_id, value)); + } + Ok(values) + } + + /// Decode primary key values from bytes without column id. + pub fn decode_dense_without_column_id(&self, bytes: &[u8]) -> Result<Vec<Value>> { + let mut deserializer = Deserializer::new(bytes); + let mut values = Vec::with_capacity(self.ordered_primary_key_columns.len()); + for (_, field) in self.ordered_primary_key_columns.iter() { + let value = field.deserialize(&mut deserializer)?; + values.push(value); + } + Ok(values) + } + + /// Returns the field at `pos`. + /// + /// # Panics + /// Panics if `pos` is out of bounds. + fn field_at(&self, pos: usize) -> &SortField { + &self.ordered_primary_key_columns[pos].1 + } + /// Decode value at `pos` in `bytes`. /// /// The i-th element in offsets buffer is how many bytes to skip in order to read value at `pos`. @@ -370,7 +398,7 @@ impl DensePrimaryKeyCodec { // We computed the offset before. let to_skip = offsets_buf[pos]; deserializer.advance(to_skip); - return self.ordered_primary_key_columns[pos].deserialize(&mut deserializer); + return self.field_at(pos).deserialize(&mut deserializer); } if offsets_buf.is_empty() { @@ -379,7 +407,8 @@ impl DensePrimaryKeyCodec { for i in 0..pos { // Offset to skip before reading value i. offsets_buf.push(offset); - let skip = self.ordered_primary_key_columns[i] + let skip = self + .field_at(i) .skip_deserialize(bytes, &mut deserializer)?; offset += skip; } @@ -393,7 +422,8 @@ impl DensePrimaryKeyCodec { deserializer.advance(offset); for i in value_start..pos { // Skip value i. - let skip = self.ordered_primary_key_columns[i] + let skip = self + .field_at(i) .skip_deserialize(bytes, &mut deserializer)?; // Offset for the value at i + 1. offset += skip; @@ -401,15 +431,19 @@ impl DensePrimaryKeyCodec { } } - self.ordered_primary_key_columns[pos].deserialize(&mut deserializer) + self.field_at(pos).deserialize(&mut deserializer) } pub fn estimated_size(&self) -> usize { self.ordered_primary_key_columns .iter() - .map(|f| f.estimated_size()) + .map(|(_, f)| f.estimated_size()) .sum() } + + pub fn num_fields(&self) -> usize { + self.ordered_primary_key_columns.len() + } } impl PrimaryKeyCodec for DensePrimaryKeyCodec { @@ -417,16 +451,25 @@ impl PrimaryKeyCodec for DensePrimaryKeyCodec { self.encode_dense(key_value.primary_keys(), buffer) } - fn encode_values(&self, values: &[Value], buffer: &mut Vec<u8>) -> Result<()> { - self.encode_dense(values.iter().map(|v| v.as_value_ref()), buffer) + fn encode_values(&self, values: &[(ColumnId, Value)], buffer: &mut Vec<u8>) -> Result<()> { + self.encode_dense(values.iter().map(|(_, v)| v.as_value_ref()), buffer) + } + + fn encode_value_refs( + &self, + values: &[(ColumnId, ValueRef)], + buffer: &mut Vec<u8>, + ) -> Result<()> { + let iter = values.iter().map(|(_, v)| *v); + self.encode_dense(iter, buffer) } fn estimated_size(&self) -> Option<usize> { Some(self.estimated_size()) } - fn num_fields(&self) -> usize { - self.ordered_primary_key_columns.len() + fn num_fields(&self) -> Option<usize> { + Some(self.num_fields()) } fn encoding(&self) -> PrimaryKeyEncoding { @@ -445,20 +488,14 @@ impl PrimaryKeyCodec for DensePrimaryKeyCodec { )) } - fn decode_dense(&self, bytes: &[u8]) -> Result<Vec<Value>> { - let mut deserializer = Deserializer::new(bytes); - let mut values = Vec::with_capacity(self.ordered_primary_key_columns.len()); - for f in self.ordered_primary_key_columns.iter() { - let value = f.deserialize(&mut deserializer)?; - values.push(value); - } - Ok(values) + fn decode(&self, bytes: &[u8]) -> Result<CompositeValues> { + Ok(CompositeValues::Dense(self.decode_dense(bytes)?)) } fn decode_leftmost(&self, bytes: &[u8]) -> Result<Option<Value>> { // TODO(weny, yinwen): avoid decoding the whole primary key. let mut values = self.decode_dense(bytes)?; - Ok(values.pop()) + Ok(values.pop().map(|(_, v)| v)) } } @@ -476,14 +513,14 @@ mod tests { let encoder = DensePrimaryKeyCodec::with_fields( data_types .iter() - .map(|t| SortField::new(t.clone())) + .map(|t| (0, SortField::new(t.clone()))) .collect::<Vec<_>>(), ); let value_ref = row.iter().map(|v| v.as_value_ref()).collect::<Vec<_>>(); let result = encoder.encode(value_ref.iter().cloned()).unwrap(); - let decoded = encoder.decode(&result).unwrap(); + let decoded = encoder.decode(&result).unwrap().into_dense(); assert_eq!(decoded, row); let mut decoded = Vec::new(); let mut offsets = Vec::new(); @@ -502,14 +539,14 @@ mod tests { #[test] fn test_memcmp() { let encoder = DensePrimaryKeyCodec::with_fields(vec![ - SortField::new(ConcreteDataType::string_datatype()), - SortField::new(ConcreteDataType::int64_datatype()), + (0, SortField::new(ConcreteDataType::string_datatype())), + (1, SortField::new(ConcreteDataType::int64_datatype())), ]); let values = [Value::String("abcdefgh".into()), Value::Int64(128)]; let value_ref = values.iter().map(|v| v.as_value_ref()).collect::<Vec<_>>(); let result = encoder.encode(value_ref.iter().cloned()).unwrap(); - let decoded = encoder.decode(&result).unwrap(); + let decoded = encoder.decode(&result).unwrap().into_dense(); assert_eq!(&values, &decoded as &[Value]); } diff --git a/src/mito2/src/row_converter/sparse.rs b/src/mito2/src/row_converter/sparse.rs index 6beca6412a6b..91a5623110d3 100644 --- a/src/mito2/src/row_converter/sparse.rs +++ b/src/mito2/src/row_converter/sparse.rs @@ -15,25 +15,30 @@ use std::collections::{HashMap, HashSet}; use std::sync::Arc; +use common_recordbatch::filter::SimpleFilterEvaluator; use datatypes::prelude::ConcreteDataType; use datatypes::value::{Value, ValueRef}; use memcomparable::{Deserializer, Serializer}; use serde::{Deserialize, Serialize}; use snafu::ResultExt; +use store_api::codec::PrimaryKeyEncoding; use store_api::metadata::RegionMetadataRef; use store_api::storage::consts::ReservedColumnId; use store_api::storage::ColumnId; -use crate::error::{DeserializeFieldSnafu, Result, SerializeFieldSnafu}; +use crate::error::{DeserializeFieldSnafu, Result, SerializeFieldSnafu, UnsupportedOperationSnafu}; +use crate::memtable::key_values::KeyValue; +use crate::memtable::partition_tree::SparsePrimaryKeyFilter; use crate::row_converter::dense::SortField; -use crate::row_converter::PrimaryKeyCodec; +use crate::row_converter::{CompositeValues, PrimaryKeyCodec, PrimaryKeyFilter}; /// A codec for sparse key of metrics. -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct SparsePrimaryKeyCodec { inner: Arc<SparsePrimaryKeyCodecInner>, } +#[derive(Debug)] struct SparsePrimaryKeyCodecInner { // Internal fields table_id_field: SortField, @@ -66,6 +71,11 @@ impl SparseValues { self.values.get(&column_id).unwrap_or(&Value::Null) } + /// Returns the value of the given column, or [`None`] if the column is not present. + pub fn get(&self, column_id: &ColumnId) -> Option<&Value> { + self.values.get(column_id) + } + /// Inserts a new value into the [`SparseValues`]. pub fn insert(&mut self, column_id: ColumnId, value: Value) { self.values.insert(column_id, value); @@ -111,6 +121,17 @@ impl SparsePrimaryKeyCodec { } } + pub fn with_fields(fields: Vec<(ColumnId, SortField)>) -> Self { + Self { + inner: Arc::new(SparsePrimaryKeyCodecInner { + columns: Some(fields.iter().map(|f| f.0).collect()), + table_id_field: SortField::new(ConcreteDataType::uint32_datatype()), + tsid_field: SortField::new(ConcreteDataType::uint64_datatype()), + label_field: SortField::new(ConcreteDataType::string_datatype()), + }), + } + } + /// Returns the field of the given column id. fn get_field(&self, column_id: ColumnId) -> Option<&SortField> { // if the `columns` is not specified, all unknown columns is primary key(label field). @@ -224,6 +245,59 @@ impl SparsePrimaryKeyCodec { } } +impl PrimaryKeyCodec for SparsePrimaryKeyCodec { + fn encode_key_value(&self, _key_value: &KeyValue, _buffer: &mut Vec<u8>) -> Result<()> { + UnsupportedOperationSnafu { + err_msg: "The encode_key_value method is not supported in SparsePrimaryKeyCodec.", + } + .fail() + } + + fn encode_values(&self, values: &[(ColumnId, Value)], buffer: &mut Vec<u8>) -> Result<()> { + self.encode_to_vec(values.iter().map(|v| (v.0, v.1.as_value_ref())), buffer) + } + + fn encode_value_refs( + &self, + values: &[(ColumnId, ValueRef)], + buffer: &mut Vec<u8>, + ) -> Result<()> { + self.encode_to_vec(values.iter().map(|v| (v.0, v.1)), buffer) + } + + fn estimated_size(&self) -> Option<usize> { + None + } + + fn num_fields(&self) -> Option<usize> { + None + } + + fn encoding(&self) -> PrimaryKeyEncoding { + PrimaryKeyEncoding::Sparse + } + + fn primary_key_filter( + &self, + metadata: &RegionMetadataRef, + filters: Arc<Vec<SimpleFilterEvaluator>>, + ) -> Box<dyn PrimaryKeyFilter> { + Box::new(SparsePrimaryKeyFilter::new( + metadata.clone(), + filters, + self.clone(), + )) + } + + fn decode(&self, bytes: &[u8]) -> Result<CompositeValues> { + Ok(CompositeValues::Sparse(self.decode_sparse(bytes)?)) + } + + fn decode_leftmost(&self, bytes: &[u8]) -> Result<Option<Value>> { + self.decode_leftmost(bytes) + } +} + #[cfg(test)] mod tests { use std::sync::Arc; diff --git a/src/mito2/src/sst/index/bloom_filter/creator.rs b/src/mito2/src/sst/index/bloom_filter/creator.rs index 0f97ea102711..3dfe15dfd5af 100644 --- a/src/mito2/src/sst/index/bloom_filter/creator.rs +++ b/src/mito2/src/sst/index/bloom_filter/creator.rs @@ -30,7 +30,7 @@ use crate::error::{ PuffinAddBlobSnafu, PushBloomFilterValueSnafu, Result, }; use crate::read::Batch; -use crate::row_converter::SortField; +use crate::row_converter::{CompositeValues, SortField}; use crate::sst::file::FileId; use crate::sst::index::bloom_filter::INDEX_BLOB_TYPE; use crate::sst::index::codec::{IndexValueCodec, IndexValuesCodec}; @@ -108,7 +108,10 @@ impl BloomFilterIndexer { return Ok(None); } - let codec = IndexValuesCodec::from_tag_columns(metadata.primary_key_columns()); + let codec = IndexValuesCodec::from_tag_columns( + metadata.primary_key_encoding, + metadata.primary_key_columns(), + ); let indexer = Self { creators, temp_file_provider, @@ -192,11 +195,26 @@ impl BloomFilterIndexer { let n = batch.num_rows(); guard.inc_row_count(n); + // TODO(weny, zhenchi): lazy decode + let values = self.codec.decode(batch.primary_key())?; // Tags - for ((col_id, _), field, value) in self.codec.decode(batch.primary_key())? { + for (idx, (col_id, field)) in self.codec.fields().iter().enumerate() { let Some(creator) = self.creators.get_mut(col_id) else { continue; }; + + let value = match &values { + CompositeValues::Dense(vec) => { + let value = &vec[idx].1; + if value.is_null() { + None + } else { + Some(value) + } + } + CompositeValues::Sparse(sparse_values) => sparse_values.get(col_id), + }; + let elems = value .map(|v| { let mut buf = vec![]; @@ -411,7 +429,7 @@ pub(crate) mod tests { } pub fn new_batch(str_tag: impl AsRef<str>, u64_field: impl IntoIterator<Item = u64>) -> Batch { - let fields = vec![SortField::new(ConcreteDataType::string_datatype())]; + let fields = vec![(0, SortField::new(ConcreteDataType::string_datatype()))]; let codec = DensePrimaryKeyCodec::with_fields(fields); let row: [ValueRef; 1] = [str_tag.as_ref().into()]; let primary_key = codec.encode(row.into_iter()).unwrap(); diff --git a/src/mito2/src/sst/index/codec.rs b/src/mito2/src/sst/index/codec.rs index 23702ba41448..5d08cc7b2934 100644 --- a/src/mito2/src/sst/index/codec.rs +++ b/src/mito2/src/sst/index/codec.rs @@ -12,15 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. +use std::collections::HashMap; +use std::sync::Arc; + use datatypes::data_type::ConcreteDataType; -use datatypes::value::{Value, ValueRef}; +use datatypes::value::ValueRef; use memcomparable::Serializer; use snafu::{ensure, OptionExt, ResultExt}; +use store_api::codec::PrimaryKeyEncoding; use store_api::metadata::ColumnMetadata; use store_api::storage::ColumnId; use crate::error::{FieldTypeMismatchSnafu, IndexEncodeNullSnafu, Result}; -use crate::row_converter::{DensePrimaryKeyCodec, PrimaryKeyCodec, SortField}; +use crate::row_converter::{ + build_primary_key_codec_with_fields, CompositeValues, PrimaryKeyCodec, SortField, +}; /// Encodes index values according to their data types for sorting and storage use. pub struct IndexValueCodec; @@ -62,26 +68,35 @@ impl IndexValueCodec { pub struct IndexValuesCodec { /// Tuples containing column id and its corresponding index_name (result of `to_string` on ColumnId), /// to minimize redundant `to_string` calls. - column_ids: Vec<(ColumnId, String)>, + column_ids: HashMap<ColumnId, String>, /// The data types of tag columns. - fields: Vec<SortField>, + fields: Vec<(ColumnId, SortField)>, /// The decoder for the primary key. - decoder: DensePrimaryKeyCodec, + decoder: Arc<dyn PrimaryKeyCodec>, } impl IndexValuesCodec { /// Creates a new `IndexValuesCodec` from a list of `ColumnMetadata` of tag columns. - pub fn from_tag_columns<'a>(tag_columns: impl Iterator<Item = &'a ColumnMetadata>) -> Self { + pub fn from_tag_columns<'a>( + primary_key_encoding: PrimaryKeyEncoding, + tag_columns: impl Iterator<Item = &'a ColumnMetadata>, + ) -> Self { let (column_ids, fields): (Vec<_>, Vec<_>) = tag_columns .map(|column| { ( (column.column_id, column.column_id.to_string()), - SortField::new(column.column_schema.data_type.clone()), + ( + column.column_id, + SortField::new(column.column_schema.data_type.clone()), + ), ) }) .unzip(); - let decoder = DensePrimaryKeyCodec::with_fields(fields.clone()); + let column_ids = column_ids.into_iter().collect(); + let decoder = + build_primary_key_codec_with_fields(primary_key_encoding, fields.clone().into_iter()); + Self { column_ids, fields, @@ -89,26 +104,19 @@ impl IndexValuesCodec { } } + /// Returns the column ids of the index. + pub fn column_ids(&self) -> &HashMap<ColumnId, String> { + &self.column_ids + } + + /// Returns the fields of the index. + pub fn fields(&self) -> &[(ColumnId, SortField)] { + &self.fields + } + /// Decodes a primary key into its corresponding column ids, data types and values. - pub fn decode( - &self, - primary_key: &[u8], - ) -> Result<impl Iterator<Item = (&(ColumnId, String), &SortField, Option<Value>)>> { - let values = self.decoder.decode_dense(primary_key)?; - - let iter = values - .into_iter() - .zip(&self.column_ids) - .zip(&self.fields) - .map(|((value, column_id), encoder)| { - if value.is_null() { - (column_id, encoder, None) - } else { - (column_id, encoder, Some(value)) - } - }); - - Ok(iter) + pub fn decode(&self, primary_key: &[u8]) -> Result<CompositeValues> { + self.decoder.decode(primary_key) } } @@ -116,10 +124,12 @@ impl IndexValuesCodec { mod tests { use datatypes::data_type::ConcreteDataType; use datatypes::schema::ColumnSchema; + use datatypes::value::Value; + use store_api::metadata::ColumnMetadata; use super::*; use crate::error::Error; - use crate::row_converter::{PrimaryKeyCodecExt, SortField}; + use crate::row_converter::{DensePrimaryKeyCodec, PrimaryKeyCodecExt, SortField}; #[test] fn test_encode_value_basic() { @@ -167,27 +177,18 @@ mod tests { ]; let primary_key = DensePrimaryKeyCodec::with_fields(vec![ - SortField::new(ConcreteDataType::string_datatype()), - SortField::new(ConcreteDataType::int64_datatype()), + (0, SortField::new(ConcreteDataType::string_datatype())), + (1, SortField::new(ConcreteDataType::int64_datatype())), ]) .encode([ValueRef::Null, ValueRef::Int64(10)].into_iter()) .unwrap(); - let codec = IndexValuesCodec::from_tag_columns(tag_columns.iter()); - let mut iter = codec.decode(&primary_key).unwrap(); - - let ((column_id, col_id_str), field, value) = iter.next().unwrap(); - assert_eq!(*column_id, 1); - assert_eq!(col_id_str, "1"); - assert_eq!(field, &SortField::new(ConcreteDataType::string_datatype())); - assert_eq!(value, None); - - let ((column_id, col_id_str), field, value) = iter.next().unwrap(); - assert_eq!(*column_id, 2); - assert_eq!(col_id_str, "2"); - assert_eq!(field, &SortField::new(ConcreteDataType::int64_datatype())); - assert_eq!(value, Some(Value::Int64(10))); + let codec = + IndexValuesCodec::from_tag_columns(PrimaryKeyEncoding::Dense, tag_columns.iter()); + let values = codec.decode(&primary_key).unwrap().into_dense(); - assert!(iter.next().is_none()); + assert_eq!(values.len(), 2); + assert_eq!(values[0], Value::Null); + assert_eq!(values[1], Value::Int64(10)); } } diff --git a/src/mito2/src/sst/index/inverted_index/creator.rs b/src/mito2/src/sst/index/inverted_index/creator.rs index 669d4ff6f23e..7903f2a496d9 100644 --- a/src/mito2/src/sst/index/inverted_index/creator.rs +++ b/src/mito2/src/sst/index/inverted_index/creator.rs @@ -34,7 +34,7 @@ use crate::error::{ PushIndexValueSnafu, Result, }; use crate::read::Batch; -use crate::row_converter::SortField; +use crate::row_converter::{CompositeValues, SortField}; use crate::sst::file::FileId; use crate::sst::index::codec::{IndexValueCodec, IndexValuesCodec}; use crate::sst::index::intermediate::{ @@ -101,7 +101,10 @@ impl InvertedIndexer { ); let index_creator = Box::new(SortIndexCreator::new(sorter, segment_row_count)); - let codec = IndexValuesCodec::from_tag_columns(metadata.primary_key_columns()); + let codec = IndexValuesCodec::from_tag_columns( + metadata.primary_key_encoding, + metadata.primary_key_columns(), + ); Self { codec, index_creator, @@ -180,11 +183,25 @@ impl InvertedIndexer { let n = batch.num_rows(); guard.inc_row_count(n); - for ((col_id, col_id_str), field, value) in self.codec.decode(batch.primary_key())? { + // TODO(weny, zhenchi): lazy decode + let values = self.codec.decode(batch.primary_key())?; + for (idx, (col_id, field)) in self.codec.fields().iter().enumerate() { if !self.indexed_column_ids.contains(col_id) { continue; } + let value = match &values { + CompositeValues::Dense(vec) => { + let value = &vec[idx].1; + if value.is_null() { + None + } else { + Some(value) + } + } + CompositeValues::Sparse(sparse_values) => sparse_values.get(col_id), + }; + if let Some(value) = value.as_ref() { self.value_buf.clear(); IndexValueCodec::encode_nonnull_value( @@ -194,6 +211,9 @@ impl InvertedIndexer { )?; } + // Safety: the column id is guaranteed to be in the map + let col_id_str = self.codec.column_ids().get(col_id).unwrap(); + // non-null value -> Some(encoded_bytes), null value -> None let value = value.is_some().then_some(self.value_buf.as_slice()); self.index_creator @@ -381,8 +401,8 @@ mod tests { u64_field: impl IntoIterator<Item = u64>, ) -> Batch { let fields = vec![ - SortField::new(ConcreteDataType::string_datatype()), - SortField::new(ConcreteDataType::int32_datatype()), + (0, SortField::new(ConcreteDataType::string_datatype())), + (1, SortField::new(ConcreteDataType::int32_datatype())), ]; let codec = DensePrimaryKeyCodec::with_fields(fields); let row: [ValueRef; 2] = [str_tag.as_ref().into(), i32_tag.into().into()]; diff --git a/src/mito2/src/sst/parquet/file_range.rs b/src/mito2/src/sst/parquet/file_range.rs index 388dc24677b4..e8241a453fb8 100644 --- a/src/mito2/src/sst/parquet/file_range.rs +++ b/src/mito2/src/sst/parquet/file_range.rs @@ -33,7 +33,7 @@ use crate::read::compat::CompatBatch; use crate::read::last_row::RowGroupLastRowCachedReader; use crate::read::prune::PruneReader; use crate::read::Batch; -use crate::row_converter::{DensePrimaryKeyCodec, PrimaryKeyCodecExt}; +use crate::row_converter::{CompositeValues, PrimaryKeyCodec}; use crate::sst::file::FileHandle; use crate::sst::parquet::format::ReadFormat; use crate::sst::parquet::reader::{RowGroupReader, RowGroupReaderBuilder, SimpleFilterContext}; @@ -156,7 +156,7 @@ impl FileRangeContext { reader_builder: RowGroupReaderBuilder, filters: Vec<SimpleFilterContext>, read_format: ReadFormat, - codec: DensePrimaryKeyCodec, + codec: Arc<dyn PrimaryKeyCodec>, ) -> Self { Self { reader_builder, @@ -237,7 +237,7 @@ pub(crate) struct RangeBase { /// Helper to read the SST. pub(crate) read_format: ReadFormat, /// Decoder for primary keys - pub(crate) codec: DensePrimaryKeyCodec, + pub(crate) codec: Arc<dyn PrimaryKeyCodec>, /// Optional helper to compat batches. pub(crate) compat_batch: Option<CompatBatch>, } @@ -264,15 +264,25 @@ impl RangeBase { input.set_pk_values(self.codec.decode(input.primary_key())?); input.pk_values().unwrap() }; - // Safety: this is a primary key - let pk_index = self - .read_format - .metadata() - .primary_key_index(filter.column_id()) - .unwrap(); - let pk_value = pk_values[pk_index] - .try_to_scalar_value(filter.data_type()) - .context(FieldTypeMismatchSnafu)?; + let pk_value = match pk_values { + CompositeValues::Dense(v) => { + // Safety: this is a primary key + let pk_index = self + .read_format + .metadata() + .primary_key_index(filter.column_id()) + .unwrap(); + v[pk_index] + .1 + .try_to_scalar_value(filter.data_type()) + .context(FieldTypeMismatchSnafu)? + } + CompositeValues::Sparse(v) => { + let v = v.get_or_null(filter.column_id()); + v.try_to_scalar_value(filter.data_type()) + .context(FieldTypeMismatchSnafu)? + } + }; if filter .filter() .evaluate_scalar(&pk_value) diff --git a/src/mito2/src/sst/parquet/format.rs b/src/mito2/src/sst/parquet/format.rs index 34a1da565e40..c90907f0eb26 100644 --- a/src/mito2/src/sst/parquet/format.rs +++ b/src/mito2/src/sst/parquet/format.rs @@ -48,7 +48,7 @@ use crate::error::{ ConvertVectorSnafu, InvalidBatchSnafu, InvalidRecordBatchSnafu, NewRecordBatchSnafu, Result, }; use crate::read::{Batch, BatchBuilder, BatchColumn}; -use crate::row_converter::{DensePrimaryKeyCodec, PrimaryKeyCodec, SortField}; +use crate::row_converter::{build_primary_key_codec_with_fields, SortField}; use crate::sst::file::{FileMeta, FileTimeRange}; use crate::sst::to_sst_arrow_schema; @@ -391,6 +391,7 @@ impl ReadFormat { column: &ColumnMetadata, is_min: bool, ) -> Option<ArrayRef> { + let primary_key_encoding = self.metadata.primary_key_encoding; let is_first_tag = self .metadata .primary_key @@ -402,9 +403,15 @@ impl ReadFormat { return None; } - let converter = DensePrimaryKeyCodec::with_fields(vec![SortField::new( - column.column_schema.data_type.clone(), - )]); + let converter = build_primary_key_codec_with_fields( + primary_key_encoding, + [( + column.column_id, + SortField::new(column.column_schema.data_type.clone()), + )] + .into_iter(), + ); + let values = row_groups.iter().map(|meta| { let stats = meta .borrow() diff --git a/src/mito2/src/sst/parquet/reader.rs b/src/mito2/src/sst/parquet/reader.rs index 6854c072a1a3..4aecf744d696 100644 --- a/src/mito2/src/sst/parquet/reader.rs +++ b/src/mito2/src/sst/parquet/reader.rs @@ -49,7 +49,7 @@ use crate::metrics::{ }; use crate::read::prune::{PruneReader, Source}; use crate::read::{Batch, BatchReader}; -use crate::row_converter::DensePrimaryKeyCodec; +use crate::row_converter::build_primary_key_codec; use crate::sst::file::FileHandle; use crate::sst::index::bloom_filter::applier::BloomFilterIndexApplierRef; use crate::sst::index::fulltext_index::applier::FulltextIndexApplierRef; @@ -253,7 +253,7 @@ impl ParquetReaderBuilder { vec![] }; - let codec = DensePrimaryKeyCodec::new(read_format.metadata()); + let codec = build_primary_key_codec(read_format.metadata()); let context = FileRangeContext::new(reader_builder, filters, read_format, codec); diff --git a/src/mito2/src/test_util/memtable_util.rs b/src/mito2/src/test_util/memtable_util.rs index 369ba95f354d..4cb4469dc08d 100644 --- a/src/mito2/src/test_util/memtable_util.rs +++ b/src/mito2/src/test_util/memtable_util.rs @@ -326,8 +326,8 @@ pub(crate) fn encode_keys( /// Encode one key. pub(crate) fn encode_key_by_kv(key_value: &KeyValue) -> Vec<u8> { let row_codec = DensePrimaryKeyCodec::with_fields(vec![ - SortField::new(ConcreteDataType::string_datatype()), - SortField::new(ConcreteDataType::uint32_datatype()), + (0, SortField::new(ConcreteDataType::string_datatype())), + (1, SortField::new(ConcreteDataType::uint32_datatype())), ]); row_codec.encode(key_value.primary_keys()).unwrap() } diff --git a/src/mito2/src/test_util/sst_util.rs b/src/mito2/src/test_util/sst_util.rs index ce8cd4412f63..8bef6d205ba3 100644 --- a/src/mito2/src/test_util/sst_util.rs +++ b/src/mito2/src/test_util/sst_util.rs @@ -85,7 +85,12 @@ pub fn sst_region_metadata() -> RegionMetadata { /// Encodes a primary key for specific tags. pub fn new_primary_key(tags: &[&str]) -> Vec<u8> { let fields = (0..tags.len()) - .map(|_| SortField::new(ConcreteDataType::string_datatype())) + .map(|idx| { + ( + idx as u32, + SortField::new(ConcreteDataType::string_datatype()), + ) + }) .collect(); let converter = DensePrimaryKeyCodec::with_fields(fields); converter
amis
https://github.com/baidu/amis
fe4f23da6f41d8b7dc4048449ffe25b0bf970fb8
吴多益
2021-06-29 11:33:44
fix: 修复 jssdk 的 alert、toast 不支持 locale 设置问题 (#2170)
* 更新 snapshot * feat: datetime 组件时间支持可点选 (#2100) * 文档和一些小修改 (#2107) * jssdk 支持 hash路由改造 * 更新文档 * default value 和 value 逻辑优化 * 优化 value 的处理逻辑 * 同步值应该固定某一种模式 * name 干脆支持 filter 好了 * 更新的时候获取数据不一致 * 修复 qrcode 获取值方式 * columns 有可能不是数组 * fix: 修复 jssdk 的 alert、toast 不支持 locale 设置问题
fix: 修复 jssdk 的 alert、toast 不支持 locale 设置问题 (#2170) * 更新 snapshot * feat: datetime 组件时间支持可点选 (#2100) * 文档和一些小修改 (#2107) * jssdk 支持 hash路由改造 * 更新文档 * default value 和 value 逻辑优化 * 优化 value 的处理逻辑 * 同步值应该固定某一种模式 * name 干脆支持 filter 好了 * 更新的时候获取数据不一致 * 修复 qrcode 获取值方式 * columns 有可能不是数组 * fix: 修复 jssdk 的 alert、toast 不支持 locale 设置问题 Co-authored-by: 2betop <[email protected]> Co-authored-by: Allen <[email protected]> Co-authored-by: RickCole <[email protected]>
diff --git a/examples/embed.tsx b/examples/embed.tsx index 882adff9080..55157bafe9b 100644 --- a/examples/embed.tsx +++ b/examples/embed.tsx @@ -323,9 +323,11 @@ export function embed( position={(env && env.toastPosition) || 'top-right'} closeButton={false} timeout={5000} + locale={props.locale} theme={env?.theme} /> <AlertComponent + locale={props.locale} theme={env?.theme} container={() => env?.getModalContainer?.() || container} />
appsmith
https://github.com/appsmithorg/appsmith
8d32ee8f229a7f21e4054e3c8f94cda9f8de5194
sneha122
2024-11-28 13:40:32
chore: Google sheet shared drive support added behind a flag (#37776)
## Description This PR hides shared drive support for Google Sheets Integration behind a feature flag as we need to do thorough testing for it. The feature flag implementation done in this PR involves passing feature flags from server to google sheets plugin module. This temporary feature flagging solution tech debt can be removed once the testing is done and once we would release this feature to all. **Why feature flags are only available at server module?** Because they have a dependency on UserIdentifierService, SessionUserService, TenantService etc which exists at server module. Supporting feature flags out of the box at plugin module level would require significant efforts to migrate these dependencies.
chore: Google sheet shared drive support added behind a flag (#37776) ## Description This PR hides shared drive support for Google Sheets Integration behind a feature flag as we need to do thorough testing for it. The feature flag implementation done in this PR involves passing feature flags from server to google sheets plugin module. This temporary feature flagging solution tech debt can be removed once the testing is done and once we would release this feature to all. **Why feature flags are only available at server module?** Because they have a dependency on UserIdentifierService, SessionUserService, TenantService etc which exists at server module. Supporting feature flags out of the box at plugin module level would require significant efforts to migrate these dependencies. Fixes #37714 _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.Authentication, @tag.Datasource" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/12063930619> > Commit: 47f08f9903e78e050f18ad304dd736acb61b8b28 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12063930619&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Authentication, @tag.Datasource` > Spec: > <hr>Thu, 28 Nov 2024 07:38:58 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Introduced support for Google Sheets shared drive through feature flags. - Added new methods to handle feature flags in plugin execution and triggering processes. - Enhanced action execution and triggering logic to utilize feature flags for dynamic behavior. - **Bug Fixes** - Improved error handling for plugin execution processes. - **Tests** - Integrated `FeatureFlagService` into the testing framework for enhanced test coverage. - Expanded test scenarios to include various response types and error conditions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: “sneha122” <“[email protected]”>
diff --git a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/enums/FeatureFlagEnum.java b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/enums/FeatureFlagEnum.java index e3e96745784a..9849422cd531 100644 --- a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/enums/FeatureFlagEnum.java +++ b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/enums/FeatureFlagEnum.java @@ -14,6 +14,7 @@ public enum FeatureFlagEnum { APP_NAVIGATION_LOGO_UPLOAD, release_embed_hide_share_settings_enabled, rollout_datasource_test_rate_limit_enabled, + release_google_sheets_shared_drive_support_enabled, // Deprecated CE flags over here release_git_autocommit_feature_enabled, diff --git a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/plugins/PluginExecutor.java b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/plugins/PluginExecutor.java index d912594f4a5a..a95a7c2988ac 100644 --- a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/plugins/PluginExecutor.java +++ b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/plugins/PluginExecutor.java @@ -247,6 +247,50 @@ default Mono<ActionExecutionResult> executeParameterizedWithMetrics( .tap(Micrometer.observation(observationRegistry)); } + // TODO: Following methods of executeParameterizedWithFlags, executeParameterizedWithMetricsAndFlags, + // triggerWithFlags are + // added + // to support feature flags in the plugin modules. Current implementation of featureFlagService is only available in + // server module + // and not available in any of the plugin modules due to dependencies on SessionUserService, TenantService etc. + // Hence, these methods are added to support feature flags in the plugin modules. + // Ideal solution would be to move featureFlagService and its dependencies to the shared interface module + // But this is a bigger change and will be done in future. Current change of passing flags was done to resolve + // release blocker + // https://github.com/appsmithorg/appsmith/issues/37714 + // Once thorogh testing of shared drive support is done, we can remove this tech debt of passing feature flags like + // this. + default Mono<ActionExecutionResult> executeParameterizedWithFlags( + C connection, + ExecuteActionDTO executeActionDTO, + DatasourceConfiguration datasourceConfiguration, + ActionConfiguration actionConfiguration, + Map<String, Boolean> featureFlagMap) { + return this.executeParameterized(connection, executeActionDTO, datasourceConfiguration, actionConfiguration); + } + + default Mono<ActionExecutionResult> executeParameterizedWithMetricsAndFlags( + C connection, + ExecuteActionDTO executeActionDTO, + DatasourceConfiguration datasourceConfiguration, + ActionConfiguration actionConfiguration, + ObservationRegistry observationRegistry, + Map<String, Boolean> featureFlagMap) { + return this.executeParameterizedWithFlags( + connection, executeActionDTO, datasourceConfiguration, actionConfiguration, featureFlagMap) + .tag("plugin", this.getClass().getName()) + .name(ACTION_EXECUTION_PLUGIN_EXECUTION) + .tap(Micrometer.observation(observationRegistry)); + } + + default Mono<TriggerResultDTO> triggerWithFlags( + C connection, + DatasourceConfiguration datasourceConfiguration, + TriggerRequestDTO request, + Map<String, Boolean> featureFlagMap) { + return this.trigger(connection, datasourceConfiguration, request); + } + /** * This function is responsible for preparing the action and datasource configurations to be ready for execution. * diff --git a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/ExecutionMethod.java b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/ExecutionMethod.java index ae6bef0a7c94..552f61f9323d 100644 --- a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/ExecutionMethod.java +++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/ExecutionMethod.java @@ -77,7 +77,9 @@ default Mono<Object> executePrerequisites(MethodConfig methodConfig, OAuth2 oaut return Mono.just(true); } - WebClient.RequestHeadersSpec<?> getExecutionClient(WebClient webClient, MethodConfig methodConfig); + default WebClient.RequestHeadersSpec<?> getExecutionClient(WebClient webClient, MethodConfig methodConfig) { + return null; + } default JsonNode transformExecutionResponse( JsonNode response, MethodConfig methodConfig, Set<String> userAuthorizedSheetIds) { @@ -102,4 +104,9 @@ default Map<DataType, DataType> getDataTypeConversionMap() { conversionMap.put(DataType.FLOAT, DataType.DOUBLE); return conversionMap; } + + default WebClient.RequestHeadersSpec<?> getExecutionClientWithFlags( + WebClient webClient, MethodConfig methodConfig, Map<String, Boolean> featureFlagMap) { + return getExecutionClient(webClient, methodConfig); + } } diff --git a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/FileListMethod.java b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/FileListMethod.java index 2d6b3aea8e17..4e092ee38022 100644 --- a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/FileListMethod.java +++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/FileListMethod.java @@ -1,5 +1,6 @@ package com.external.config; +import com.appsmith.external.enums.FeatureFlagEnum; import com.appsmith.external.exceptions.pluginExceptions.AppsmithPluginException; import com.external.constants.ErrorMessages; import com.external.enums.GoogleSheetMethodEnum; @@ -24,8 +25,9 @@ * API reference: https://developers.google.com/sheets/api/guides/migration#list_spreadsheets_for_the_authenticated_user */ public class FileListMethod implements ExecutionMethod, TriggerMethod { - ObjectMapper objectMapper; + private final String SHARED_DRIVE_PARAMS = + "&includeItemsFromAllDrives=true&supportsAllDrives=true&corpora=allDrives"; public FileListMethod(ObjectMapper objectMapper) { this.objectMapper = objectMapper; @@ -37,10 +39,16 @@ public boolean validateExecutionMethodRequest(MethodConfig methodConfig) { } @Override - public WebClient.RequestHeadersSpec<?> getExecutionClient(WebClient webClient, MethodConfig methodConfig) { + public WebClient.RequestHeadersSpec<?> getExecutionClientWithFlags( + WebClient webClient, MethodConfig methodConfig, Map<String, Boolean> featureFlagMap) { + // TODO: Flags are needed here for google sheets integration to support shared drive behind a flag + // Once thoroughly tested, this flag can be removed + Boolean isSharedDriveSupportEnabled = featureFlagMap.getOrDefault( + FeatureFlagEnum.release_google_sheets_shared_drive_support_enabled.name(), Boolean.FALSE); UriComponentsBuilder uriBuilder = getBaseUriBuilder( this.BASE_DRIVE_API_URL, - "?includeItemsFromAllDrives=true&supportsAllDrives=true&orderBy=name&q=mimeType%3D'application%2Fvnd.google-apps.spreadsheet'%20and%20trashed%3Dfalse", + "?orderBy=name&q=mimeType%3D'application%2Fvnd.google-apps.spreadsheet'%20and%20trashed%3Dfalse" + + (isSharedDriveSupportEnabled.equals(Boolean.TRUE) ? SHARED_DRIVE_PARAMS : ""), true); return webClient @@ -74,8 +82,9 @@ public boolean validateTriggerMethodRequest(MethodConfig methodConfig) { } @Override - public WebClient.RequestHeadersSpec<?> getTriggerClient(WebClient webClient, MethodConfig methodConfig) { - return this.getExecutionClient(webClient, methodConfig); + public WebClient.RequestHeadersSpec<?> getTriggerClientWithFlags( + WebClient webClient, MethodConfig methodConfig, Map<String, Boolean> featureFlagMap) { + return this.getExecutionClientWithFlags(webClient, methodConfig, featureFlagMap); } @Override diff --git a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/TriggerMethod.java b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/TriggerMethod.java index 3528aea5db6b..0a385e64e770 100644 --- a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/TriggerMethod.java +++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/TriggerMethod.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.databind.JsonNode; import org.springframework.web.reactive.function.client.WebClient; +import java.util.Map; import java.util.Set; /** @@ -21,7 +22,17 @@ public interface TriggerMethod { /** * Returns with the specification required to hit that particular trigger request */ - WebClient.RequestHeadersSpec<?> getTriggerClient(WebClient webClient, MethodConfig methodConfig); + default WebClient.RequestHeadersSpec<?> getTriggerClient(WebClient webClient, MethodConfig methodConfig) { + return null; + } + + /** + * Returns with the specification required to hit that particular trigger request + */ + default WebClient.RequestHeadersSpec<?> getTriggerClientWithFlags( + WebClient webClient, MethodConfig methodConfig, Map<String, Boolean> featureFlagMap) { + return getTriggerClient(webClient, methodConfig); + } /** * Transforms the response from the end point into an Appsmith friendly structure diff --git a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/plugins/GoogleSheetsPlugin.java b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/plugins/GoogleSheetsPlugin.java index f336d54b8fc2..f006c050dd36 100644 --- a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/plugins/GoogleSheetsPlugin.java +++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/plugins/GoogleSheetsPlugin.java @@ -81,6 +81,23 @@ public Mono<ActionExecutionResult> executeParameterized( ExecuteActionDTO executeActionDTO, DatasourceConfiguration datasourceConfiguration, ActionConfiguration actionConfiguration) { + return executeParameterizedWithFlags( + connection, executeActionDTO, datasourceConfiguration, actionConfiguration, null); + } + + @Override + public Mono<TriggerResultDTO> trigger( + Void connection, DatasourceConfiguration datasourceConfiguration, TriggerRequestDTO request) { + return triggerWithFlags(connection, datasourceConfiguration, request, null); + } + + @Override + public Mono<ActionExecutionResult> executeParameterizedWithFlags( + Void connection, + ExecuteActionDTO executeActionDTO, + DatasourceConfiguration datasourceConfiguration, + ActionConfiguration actionConfiguration, + Map<String, Boolean> featureFlagMap) { log.debug(Thread.currentThread().getName() + ": executeParameterized() called for GoogleSheets plugin."); boolean smartJsonSubstitution; @@ -133,13 +150,14 @@ public Mono<ActionExecutionResult> executeParameterized( prepareConfigurationsForExecution(executeActionDTO, actionConfiguration, datasourceConfiguration); - return this.executeCommon(connection, datasourceConfiguration, actionConfiguration); + return this.executeCommon(connection, datasourceConfiguration, actionConfiguration, featureFlagMap); } public Mono<ActionExecutionResult> executeCommon( Void connection, DatasourceConfiguration datasourceConfiguration, - ActionConfiguration actionConfiguration) { + ActionConfiguration actionConfiguration, + Map<String, Boolean> featureFlagMap) { log.debug(Thread.currentThread().getName() + ": executeCommon() called for GoogleSheets plugin."); // Initializing object for error condition @@ -185,7 +203,7 @@ public Mono<ActionExecutionResult> executeCommon( // method .flatMap(res -> { return executionMethod - .getExecutionClient(client, methodConfig) + .getExecutionClientWithFlags(client, methodConfig, featureFlagMap) .headers(headers -> headers.set( "Authorization", "Bearer " @@ -319,8 +337,11 @@ public Object substituteValueInInput( } @Override - public Mono<TriggerResultDTO> trigger( - Void connection, DatasourceConfiguration datasourceConfiguration, TriggerRequestDTO request) { + public Mono<TriggerResultDTO> triggerWithFlags( + Void connection, + DatasourceConfiguration datasourceConfiguration, + TriggerRequestDTO request, + Map<String, Boolean> featureFlagMap) { log.debug(Thread.currentThread().getName() + ": trigger() called for GoogleSheets plugin."); final TriggerMethod triggerMethod = GoogleSheetsMethodStrategy.getTriggerMethod(request, objectMapper); MethodConfig methodConfig = new MethodConfig(request); @@ -343,7 +364,7 @@ public Mono<TriggerResultDTO> trigger( validateAndGetUserAuthorizedSheetIds(datasourceConfiguration, methodConfig); return triggerMethod - .getTriggerClient(client, methodConfig) + .getTriggerClientWithFlags(client, methodConfig, featureFlagMap) .headers(headers -> headers.set( "Authorization", "Bearer " + oauth2.getAuthenticationResponse().getToken())) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/plugins/solutions/PluginTriggerSolutionCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/plugins/solutions/PluginTriggerSolutionCEImpl.java index ace596c38c93..a983e279d1eb 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/plugins/solutions/PluginTriggerSolutionCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/plugins/solutions/PluginTriggerSolutionCEImpl.java @@ -9,6 +9,7 @@ import com.appsmith.server.helpers.PluginExecutorHelper; import com.appsmith.server.repositories.PluginRepository; import com.appsmith.server.services.ConfigService; +import com.appsmith.server.services.FeatureFlagService; import com.appsmith.server.services.TenantService; import com.appsmith.server.solutions.DatasourceTriggerSolution; import org.apache.commons.lang3.StringUtils; @@ -28,18 +29,21 @@ public class PluginTriggerSolutionCEImpl implements PluginTriggerSolutionCE { private final PluginRepository pluginRepository; private final ConfigService configService; private final TenantService tenantService; + private final FeatureFlagService featureFlagService; public PluginTriggerSolutionCEImpl( DatasourceTriggerSolution datasourceTriggerSolution, PluginExecutorHelper pluginExecutorHelper, PluginRepository pluginRepository, ConfigService configService, - TenantService tenantService) { + TenantService tenantService, + FeatureFlagService featureFlagService) { this.datasourceTriggerSolution = datasourceTriggerSolution; this.pluginExecutorHelper = pluginExecutorHelper; this.pluginRepository = pluginRepository; this.configService = configService; this.tenantService = tenantService; + this.featureFlagService = featureFlagService; } /** @@ -74,6 +78,11 @@ public Mono<TriggerResultDTO> trigger( Mono<PluginExecutor> pluginExecutorMono = pluginMono.flatMap(plugin -> pluginExecutorHelper.getPluginExecutor(Mono.just(plugin))); + // TODO: Flags are needed here for google sheets integration to support shared drive behind a flag + // Once thoroughly tested, this flag can be removed + Map<String, Boolean> featureFlagMap = + featureFlagService.getCachedTenantFeatureFlags().getFeatures(); + /* * Since there is no datasource provided, we are passing the Datasource Context connection and datasourceConfiguration as null. * We will leave the execution to respective plugin executor. @@ -83,8 +92,8 @@ public Mono<TriggerResultDTO> trigger( PluginExecutor pluginExecutor = pair.getT2(); setHeadersToTriggerRequest(plugin, httpHeaders, triggerRequestDTO); return setTenantAndInstanceId(triggerRequestDTO) - .flatMap(updatedTriggerRequestDTO -> - ((PluginExecutor<Object>) pluginExecutor).trigger(null, null, updatedTriggerRequestDTO)); + .flatMap(updatedTriggerRequestDTO -> ((PluginExecutor<Object>) pluginExecutor) + .triggerWithFlags(null, null, updatedTriggerRequestDTO, featureFlagMap)); }); } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/plugins/solutions/PluginTriggerSolutionImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/plugins/solutions/PluginTriggerSolutionImpl.java index f40ff60094d9..373235b5e09d 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/plugins/solutions/PluginTriggerSolutionImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/plugins/solutions/PluginTriggerSolutionImpl.java @@ -3,6 +3,7 @@ import com.appsmith.server.helpers.PluginExecutorHelper; import com.appsmith.server.repositories.PluginRepository; import com.appsmith.server.services.ConfigService; +import com.appsmith.server.services.FeatureFlagService; import com.appsmith.server.services.TenantService; import com.appsmith.server.solutions.DatasourceTriggerSolution; import org.springframework.stereotype.Component; @@ -14,7 +15,14 @@ public PluginTriggerSolutionImpl( PluginExecutorHelper pluginExecutorHelper, PluginRepository pluginRepository, ConfigService configService, - TenantService tenantService) { - super(datasourceTriggerSolution, pluginExecutorHelper, pluginRepository, configService, tenantService); + TenantService tenantService, + FeatureFlagService featureFlagService) { + super( + datasourceTriggerSolution, + pluginExecutorHelper, + pluginRepository, + configService, + tenantService, + featureFlagService); } } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ActionExecutionSolutionImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ActionExecutionSolutionImpl.java index 1412bd1b6e70..6f3413f55d94 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ActionExecutionSolutionImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ActionExecutionSolutionImpl.java @@ -13,6 +13,7 @@ import com.appsmith.server.services.AuthenticationValidator; import com.appsmith.server.services.ConfigService; import com.appsmith.server.services.DatasourceContextService; +import com.appsmith.server.services.FeatureFlagService; import com.appsmith.server.services.SessionUserService; import com.appsmith.server.services.TenantService; import com.appsmith.server.solutions.ce.ActionExecutionSolutionCEImpl; @@ -42,7 +43,8 @@ public ActionExecutionSolutionImpl( ConfigService configService, TenantService tenantService, CommonConfig commonConfig, - ActionExecutionSolutionHelper actionExecutionSolutionHelper) { + ActionExecutionSolutionHelper actionExecutionSolutionHelper, + FeatureFlagService featureFlagService) { super( newActionService, actionPermission, @@ -63,6 +65,7 @@ public ActionExecutionSolutionImpl( configService, tenantService, commonConfig, - actionExecutionSolutionHelper); + actionExecutionSolutionHelper, + featureFlagService); } } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/DatasourceTriggerSolutionImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/DatasourceTriggerSolutionImpl.java index 3993270da9db..a892502e7ffb 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/DatasourceTriggerSolutionImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/DatasourceTriggerSolutionImpl.java @@ -7,6 +7,7 @@ import com.appsmith.server.services.AuthenticationValidator; import com.appsmith.server.services.ConfigService; import com.appsmith.server.services.DatasourceContextService; +import com.appsmith.server.services.FeatureFlagService; import com.appsmith.server.services.TenantService; import com.appsmith.server.solutions.ce.DatasourceTriggerSolutionCEImpl; import lombok.extern.slf4j.Slf4j; @@ -28,7 +29,8 @@ public DatasourceTriggerSolutionImpl( DatasourcePermission datasourcePermission, EnvironmentPermission environmentPermission, ConfigService configService, - TenantService tenantService) { + TenantService tenantService, + FeatureFlagService featureFlagService) { super( datasourceService, datasourceStorageService, @@ -40,6 +42,7 @@ public DatasourceTriggerSolutionImpl( datasourcePermission, environmentPermission, configService, - tenantService); + tenantService, + featureFlagService); } } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java index 794d24af0b98..3ced1a0a3978 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImpl.java @@ -45,6 +45,7 @@ import com.appsmith.server.services.AuthenticationValidator; import com.appsmith.server.services.ConfigService; import com.appsmith.server.services.DatasourceContextService; +import com.appsmith.server.services.FeatureFlagService; import com.appsmith.server.services.SessionUserService; import com.appsmith.server.services.TenantService; import com.appsmith.server.solutions.ActionPermission; @@ -73,6 +74,7 @@ import java.time.Duration; import java.time.Instant; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashMap; @@ -122,6 +124,7 @@ public class ActionExecutionSolutionCEImpl implements ActionExecutionSolutionCE private final TenantService tenantService; private final ActionExecutionSolutionHelper actionExecutionSolutionHelper; private final CommonConfig commonConfig; + private final FeatureFlagService featureFlagService; static final String PARAM_KEY_REGEX = "^k\\d+$"; static final String BLOB_KEY_REGEX = @@ -150,7 +153,8 @@ public ActionExecutionSolutionCEImpl( ConfigService configService, TenantService tenantService, CommonConfig commonConfig, - ActionExecutionSolutionHelper actionExecutionSolutionHelper) { + ActionExecutionSolutionHelper actionExecutionSolutionHelper, + FeatureFlagService featureFlagService) { this.newActionService = newActionService; this.actionPermission = actionPermission; this.observationRegistry = observationRegistry; @@ -171,6 +175,7 @@ public ActionExecutionSolutionCEImpl( this.tenantService = tenantService; this.commonConfig = commonConfig; this.actionExecutionSolutionHelper = actionExecutionSolutionHelper; + this.featureFlagService = featureFlagService; this.patternList.add(Pattern.compile(PARAM_KEY_REGEX)); this.patternList.add(Pattern.compile(BLOB_KEY_REGEX)); @@ -726,13 +731,20 @@ protected Mono<ActionExecutionResult> verifyDatasourceAndMakeRequest( // Now that we have the context (connection details), execute the action. Instant requestedAt = Instant.now(); + Map<String, Boolean> features = featureFlagService.getCachedTenantFeatureFlags() != null + ? featureFlagService.getCachedTenantFeatureFlags().getFeatures() + : Collections.emptyMap(); + + // TODO: Flags are needed here for google sheets integration to support shared drive behind a flag + // Once thoroughly tested, this flag can be removed return ((PluginExecutor<Object>) pluginExecutor) - .executeParameterizedWithMetrics( + .executeParameterizedWithMetricsAndFlags( resourceContext.getConnection(), executeActionDTO, datasourceStorage1.getDatasourceConfiguration(), actionDTO.getActionConfiguration(), - observationRegistry) + observationRegistry, + features) .map(actionExecutionResult -> { ActionExecutionRequest actionExecutionRequest = actionExecutionResult.getRequest(); if (actionExecutionRequest == null) { diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/DatasourceTriggerSolutionCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/DatasourceTriggerSolutionCEImpl.java index 374264fdaf8d..c4a571037d27 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/DatasourceTriggerSolutionCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/DatasourceTriggerSolutionCEImpl.java @@ -17,6 +17,7 @@ import com.appsmith.server.services.AuthenticationValidator; import com.appsmith.server.services.ConfigService; import com.appsmith.server.services.DatasourceContextService; +import com.appsmith.server.services.FeatureFlagService; import com.appsmith.server.services.TenantService; import com.appsmith.server.solutions.DatasourcePermission; import com.appsmith.server.solutions.DatasourceStructureSolution; @@ -27,6 +28,7 @@ import reactor.util.function.Tuple2; import java.util.ArrayList; +import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; @@ -53,6 +55,7 @@ public class DatasourceTriggerSolutionCEImpl implements DatasourceTriggerSolutio private final EnvironmentPermission environmentPermission; private final ConfigService configService; private final TenantService tenantService; + private final FeatureFlagService featureFlagService; public Mono<TriggerResultDTO> trigger( String datasourceId, String environmentId, TriggerRequestDTO triggerRequestDTO) { @@ -104,6 +107,12 @@ public Mono<TriggerResultDTO> trigger( final Plugin plugin = tuple.getT2(); final PluginExecutor pluginExecutor = tuple.getT3(); + // TODO: Flags are needed here for google sheets integration to support shared drive behind a flag + // Once thoroughly tested, this flag can be removed + Map<String, Boolean> featureFlagMap = featureFlagService.getCachedTenantFeatureFlags() != null + ? featureFlagService.getCachedTenantFeatureFlags().getFeatures() + : Collections.emptyMap(); + return datasourceContextService .getDatasourceContext(datasourceStorage, plugin) // Now that we have the context (connection details), execute the action. @@ -111,10 +120,11 @@ public Mono<TriggerResultDTO> trigger( // However the context comes from evaluated datasource. .flatMap(resourceContext -> setTenantAndInstanceId(triggerRequestDTO) .flatMap(updatedTriggerRequestDTO -> ((PluginExecutor<Object>) pluginExecutor) - .trigger( + .triggerWithFlags( resourceContext.getConnection(), datasourceStorage.getDatasourceConfiguration(), - updatedTriggerRequestDTO))); + updatedTriggerRequestDTO, + featureFlagMap))); }); // If the plugin hasn't implemented the trigger function, go for the default implementation diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImplTest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImplTest.java index 603142af9435..ff664b5ee37c 100644 --- a/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImplTest.java +++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCEImplTest.java @@ -24,6 +24,7 @@ import com.appsmith.server.services.AuthenticationValidator; import com.appsmith.server.services.ConfigService; import com.appsmith.server.services.DatasourceContextService; +import com.appsmith.server.services.FeatureFlagService; import com.appsmith.server.services.SessionUserService; import com.appsmith.server.services.TenantService; import com.appsmith.server.solutions.ActionPermission; @@ -136,6 +137,9 @@ class ActionExecutionSolutionCEImplTest { @SpyBean ActionExecutionSolutionHelper actionExecutionSolutionHelper; + @SpyBean + FeatureFlagService featureFlagService; + @Autowired EnvironmentPermission environmentPermission; @@ -167,7 +171,8 @@ public void beforeEach() { configService, tenantService, commonConfig, - actionExecutionSolutionHelper); + actionExecutionSolutionHelper, + featureFlagService); ObservationRegistry.ObservationConfig mockObservationConfig = Mockito.mock(ObservationRegistry.ObservationConfig.class); diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCETest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCETest.java index cd2fe3a498aa..306012b752bc 100644 --- a/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCETest.java +++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/ce/ActionExecutionSolutionCETest.java @@ -327,6 +327,8 @@ private Mono<ActionExecutionResult> executeAction( Mockito.when(pluginExecutorHelper.getPluginExecutor(any())).thenReturn(Mono.just(pluginExecutor)); Mockito.when(pluginExecutor.executeParameterizedWithMetrics(any(), any(), any(), any(), any())) .thenReturn(Mono.just(mockResult)); + Mockito.when(pluginExecutor.executeParameterizedWithMetricsAndFlags(any(), any(), any(), any(), any(), any())) + .thenReturn(Mono.just(mockResult)); Mockito.when(pluginExecutor.datasourceCreate(any())).thenReturn(Mono.empty()); Mockito.doReturn(Mono.just(false)) .when(spyDatasourceService) @@ -527,6 +529,8 @@ public void testActionExecuteErrorResponse() { Mockito.when(pluginExecutorHelper.getPluginExecutor(any())).thenReturn(Mono.just(pluginExecutor)); Mockito.when(pluginExecutor.executeParameterizedWithMetrics(any(), any(), any(), any(), any())) .thenReturn(Mono.error(pluginException)); + Mockito.when(pluginExecutor.executeParameterizedWithMetricsAndFlags(any(), any(), any(), any(), any(), any())) + .thenReturn(Mono.error(pluginException)); Mockito.when(pluginExecutor.datasourceCreate(any())).thenReturn(Mono.empty()); Mockito.doReturn(Mono.just(false)) .when(spyDatasourceService) @@ -584,6 +588,8 @@ public void testActionExecuteNullPaginationParameters() { Mockito.when(pluginExecutorHelper.getPluginExecutor(any())).thenReturn(Mono.just(pluginExecutor)); Mockito.when(pluginExecutor.executeParameterizedWithMetrics(any(), any(), any(), any(), any())) .thenReturn(Mono.error(pluginException)); + Mockito.when(pluginExecutor.executeParameterizedWithMetricsAndFlags(any(), any(), any(), any(), any(), any())) + .thenReturn(Mono.error(pluginException)); Mockito.when(pluginExecutor.datasourceCreate(any())).thenReturn(Mono.empty()); Mockito.doReturn(Mono.just(false)) .when(spyDatasourceService) @@ -635,6 +641,9 @@ public void testActionExecuteSecondaryStaleConnection() { Mockito.when(pluginExecutor.executeParameterizedWithMetrics(any(), any(), any(), any(), any())) .thenReturn(Mono.error(new StaleConnectionException())) .thenReturn(Mono.error(new StaleConnectionException())); + Mockito.when(pluginExecutor.executeParameterizedWithMetricsAndFlags(any(), any(), any(), any(), any(), any())) + .thenReturn(Mono.error(new StaleConnectionException())) + .thenReturn(Mono.error(new StaleConnectionException())); Mockito.when(pluginExecutor.datasourceCreate(any())).thenReturn(Mono.empty()); Mockito.doReturn(Mono.just(false)) .when(spyDatasourceService) @@ -686,6 +695,8 @@ public void testActionExecuteTimeout() { Mockito.when(pluginExecutorHelper.getPluginExecutor(any())).thenReturn(Mono.just(pluginExecutor)); Mockito.when(pluginExecutor.executeParameterizedWithMetrics(any(), any(), any(), any(), any())) .thenAnswer(x -> Mono.delay(Duration.ofMillis(1000)).ofType(ActionExecutionResult.class)); + Mockito.when(pluginExecutor.executeParameterizedWithMetricsAndFlags(any(), any(), any(), any(), any(), any())) + .thenAnswer(x -> Mono.delay(Duration.ofMillis(1000)).ofType(ActionExecutionResult.class)); Mockito.when(pluginExecutor.datasourceCreate(any())).thenReturn(Mono.empty()); Mockito.doReturn(Mono.just(false)) .when(spyDatasourceService) @@ -716,8 +727,9 @@ public void checkRecoveryFromStaleConnections() { Mockito.when(pluginExecutorHelper.getPluginExecutor(any())).thenReturn(Mono.just(pluginExecutor)); Mockito.when(pluginExecutor.executeParameterizedWithMetrics(any(), any(), any(), any(), any())) - .thenThrow(new StaleConnectionException()) - .thenReturn(Mono.just(mockResult)); + .thenThrow(new StaleConnectionException()); + Mockito.when(pluginExecutor.executeParameterizedWithMetricsAndFlags(any(), any(), any(), any(), any(), any())) + .thenThrow(new StaleConnectionException()); Mockito.when(pluginExecutor.datasourceCreate(any())).thenReturn(Mono.empty()); Mockito.when(pluginExecutor.getHintMessages(any(), any())) .thenReturn(Mono.zip(Mono.just(new HashSet<>()), Mono.just(new HashSet<>())));
react-bootstrap
https://github.com/react-bootstrap/react-bootstrap
9004b007430f924cb876da4b932ce273d4688c22
bpas247
2019-08-26 02:59:10
chore(image): revert changes to classnames implementation
There's really no point in memoizing this, since it's not an expensive computation.
chore(image): revert changes to classnames implementation There's really no point in memoizing this, since it's not an expensive computation.
diff --git a/src/Image.js b/src/Image.js index 3751f42235..ce9b142ce7 100644 --- a/src/Image.js +++ b/src/Image.js @@ -1,5 +1,5 @@ import classNames from 'classnames'; -import React, { useMemo } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import { useBootstrapPrefix } from './ThemeProvider'; @@ -44,15 +44,11 @@ const Image = React.forwardRef( ) => { bsPrefix = useBootstrapPrefix(bsPrefix, 'img'); - const classes = useMemo( - () => - classNames( - fluid && `${bsPrefix}-fluid`, - rounded && `rounded`, - roundedCircle && `rounded-circle`, - thumbnail && `${bsPrefix}-thumbnail`, - ), - [fluid, rounded, roundedCircle, thumbnail, bsPrefix], + const classes = classNames( + fluid && `${bsPrefix}-fluid`, + rounded && `rounded`, + roundedCircle && `rounded-circle`, + thumbnail && `${bsPrefix}-thumbnail`, ); return (
deno
https://github.com/denoland/deno
f150a9c2d92f99e80bd083ff05ea2b8941665177
Bartek Iwańczuk
2024-08-07 17:29:12
feat(upgrade): refresh output (#24911)
This commit updates the output of "deno upgrade" subcommand.
feat(upgrade): refresh output (#24911) This commit updates the output of "deno upgrade" subcommand.
diff --git a/cli/tools/upgrade.rs b/cli/tools/upgrade.rs index 1b9cf5f28916e5..3fad036ef4e0f5 100644 --- a/cli/tools/upgrade.rs +++ b/cli/tools/upgrade.rs @@ -238,14 +238,18 @@ fn get_minor_version(version: &str) -> &str { fn print_release_notes(current_version: &str, new_version: &str) { if get_minor_version(current_version) != get_minor_version(new_version) { log::info!( - "{}{}", - "Release notes: https://github.com/denoland/deno/releases/tag/v", - &new_version, + "Release notes:\n\n {}\n", + colors::bold(format!( + "https://github.com/denoland/deno/releases/tag/v{}", + &new_version, + )) ); log::info!( - "{}{}", - "Blog post: https://deno.com/blog/v", - get_minor_version(new_version) + "Blog post:\n\n {}\n", + colors::bold(format!( + "https://deno.com/blog/v{}", + get_minor_version(new_version) + )) ); } } @@ -479,10 +483,10 @@ pub async fn upgrade( } None => { let release_channel = if upgrade_flags.canary { - log::info!("Looking up latest canary version"); + log::info!("{}", colors::gray("Looking up latest canary version")); ReleaseChannel::Canary } else { - log::info!("Looking up latest version"); + log::info!("{}", colors::gray("Looking up latest version")); ReleaseChannel::Stable }; @@ -509,16 +513,22 @@ pub async fn upgrade( && current_is_most_recent { log::info!( - "Local deno version {} is the most recent release", - if upgrade_flags.canary { - crate::version::GIT_COMMIT_HASH - } else { - crate::version::deno() - } + "{}", + colors::green(format!( + "\nLocal deno version {} is the most recent release\n", + if upgrade_flags.canary { + crate::version::GIT_COMMIT_HASH + } else { + crate::version::deno() + } + )) ); return Ok(()); } else { - log::info!("Found latest version {}", latest_version); + log::info!( + "{}", + colors::bold(format!("\nFound latest version {}\n", latest_version)) + ); latest_version } } @@ -540,7 +550,10 @@ pub async fn upgrade( .await .with_context(|| format!("Failed downloading {download_url}. The version you requested may not have been built for the current architecture."))?; - log::info!("Deno is upgrading to version {}", &install_version); + log::info!( + "{}", + colors::gray(format!("Deno is upgrading to version {}", &install_version)) + ); let temp_dir = tempfile::TempDir::new()?; let new_exe_path = unpack_into_dir( @@ -589,7 +602,13 @@ pub async fn upgrade( return Err(err.into()); } } - log::info!("Upgraded successfully"); + log::info!( + "{}", + colors::green(format!( + "\nUpgraded successfully to Deno v{}\n", + install_version + )) + ); if !upgrade_flags.canary { print_release_notes(version::deno(), &install_version); } @@ -670,7 +689,7 @@ async fn download_package( client: &HttpClient, download_url: &str, ) -> Result<Vec<u8>, AnyError> { - log::info!("Downloading {}", &download_url); + log::info!("{}", colors::gray(format!("Downloading {}", &download_url))); let maybe_bytes = { let progress_bar = ProgressBar::new(ProgressBarStyle::DownloadBars); // provide an empty string here in order to prefer the downloading
angular
https://github.com/angular/angular
811cacc80c01ab8af875f14a9e98ea3b7a5a2072
Keen Yee Liau
2021-01-09 03:15:47
fix(language-service): reinstate overridden compiler option after change (#40364)
Currently the language service has to force `compileNonExportedClasses` to `true` to handle inline NgModules in tests, regardless of the value in user's tsconfig.json. However, the override is not reinstated after the compiler option changes (triggered by a change in tsconfig.json). This commit fixes the bug. PR Close #40364
fix(language-service): reinstate overridden compiler option after change (#40364) Currently the language service has to force `compileNonExportedClasses` to `true` to handle inline NgModules in tests, regardless of the value in user's tsconfig.json. However, the override is not reinstated after the compiler option changes (triggered by a change in tsconfig.json). This commit fixes the bug. PR Close #40364
diff --git a/packages/language-service/ivy/language_service.ts b/packages/language-service/ivy/language_service.ts index d6945cc75b391..82e3b75d9ff83 100644 --- a/packages/language-service/ivy/language_service.ts +++ b/packages/language-service/ivy/language_service.ts @@ -32,18 +32,6 @@ export class LanguageService { constructor(project: ts.server.Project, private readonly tsLS: ts.LanguageService) { this.parseConfigHost = new LSParseConfigHost(project.projectService.host); this.options = parseNgCompilerOptions(project, this.parseConfigHost); - - // Projects loaded into the Language Service often include test files which are not part of the - // app's main compilation unit, and these test files often include inline NgModules that declare - // components from the app. These declarations conflict with the main declarations of such - // components in the app's NgModules. This conflict is not normally present during regular - // compilation because the app and the tests are part of separate compilation units. - // - // As a temporary mitigation of this problem, we instruct the compiler to ignore classes which - // are not exported. In many cases, this ensures the test NgModules are ignored by the compiler - // and only the real component declaration is used. - this.options.compileNonExportedClasses = false; - this.strategy = createTypeCheckingProgramStrategy(project); this.adapter = new LanguageServiceAdapter(project); this.compilerFactory = new CompilerFactory(this.adapter, this.strategy, this.options); @@ -213,6 +201,17 @@ function parseNgCompilerOptions( project.setProjectErrors(errors); } + // Projects loaded into the Language Service often include test files which are not part of the + // app's main compilation unit, and these test files often include inline NgModules that declare + // components from the app. These declarations conflict with the main declarations of such + // components in the app's NgModules. This conflict is not normally present during regular + // compilation because the app and the tests are part of separate compilation units. + // + // As a temporary mitigation of this problem, we instruct the compiler to ignore classes which + // are not exported. In many cases, this ensures the test NgModules are ignored by the compiler + // and only the real component declaration is used. + options.compileNonExportedClasses = false; + return options; }
metersphere
https://github.com/metersphere/metersphere
a2254a9c44d4e72f2327f534ad88e8257d693070
wxg0103
2024-03-06 17:02:45
refactor(系统设置): 无编辑用户组权限的不显示恢复默认区域
--bug=1035445 --user=王孝刚 【系统设置】系统-无系统成员用户组编辑权限-用户查看系统-用户组显示恢复默认操作
refactor(系统设置): 无编辑用户组权限的不显示恢复默认区域 --bug=1035445 --user=王孝刚 【系统设置】系统-无系统成员用户组编辑权限-用户查看系统-用户组显示恢复默认操作 https://www.tapd.cn/55049933/s/1470689
diff --git a/frontend/src/components/business/ms-user-group-comp/authTable.vue b/frontend/src/components/business/ms-user-group-comp/authTable.vue index 176700529cc6..01266642c5c7 100644 --- a/frontend/src/components/business/ms-user-group-comp/authTable.vue +++ b/frontend/src/components/business/ms-user-group-comp/authTable.vue @@ -55,6 +55,7 @@ </div> <div v-if="props.showBottom" + v-permission="props.savePermission || []" class="fixed bottom-[16px] right-[16px] z-[999] flex justify-between bg-white p-[24px] shadow-[0_-1px_4px_rgba(2,2,2,0.1)]" :style="{ width: props.width }" >
mbedtls
https://github.com/Mbed-TLS/mbedtls
40323c5d51337c5b4f61d9dd99fa86e64d608e0b
Valerio Setti
2022-11-22 23:22:17
test: psa_pake: improved ecjpake_do_round() test function
Now it's possible to inject an error in every single step of the key exchange process.
test: psa_pake: improved ecjpake_do_round() test function Now it's possible to inject an error in every single step of the key exchange process. Signed-off-by: Valerio Setti <[email protected]>
diff --git a/tests/suites/test_suite_psa_crypto_pake.data b/tests/suites/test_suite_psa_crypto_pake.data index 3a477cd39b14..88a634ff26fa 100644 --- a/tests/suites/test_suite_psa_crypto_pake.data +++ b/tests/suites/test_suite_psa_crypto_pake.data @@ -101,61 +101,105 @@ PSA PAKE: valid output operation after a failure depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 ecjpake_setup:PSA_ALG_JPAKE:PSA_KEY_TYPE_PASSWORD:PSA_KEY_USAGE_DERIVE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:PSA_PAKE_ROLE_SERVER:0:"abcd":ERR_INJECT_VALID_OPERATION_AFTER_FAILURE:PSA_ERROR_BAD_STATE -PSA PAKE: ecjpake rounds +PSA PAKE: check rounds w/o forced errors depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256:PSA_WANT_ALG_TLS12_PSK_TO_MS ecjpake_rounds:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:PSA_ALG_TLS12_PSK_TO_MS(PSA_ALG_SHA_256):"abcdef":0:ERR_NONE -PSA PAKE: ecjpake rounds, client input first +PSA PAKE: check rounds w/o forced errors, TLS12_PRF +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256:PSA_WANT_ALG_TLS12_PSK_TO_MS +ecjpake_rounds:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:PSA_ALG_TLS12_PRF(PSA_ALG_SHA_256):"abcdef":0:ERR_NONE + +PSA PAKE: check rounds w/o forced errors, client input first depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256:PSA_WANT_ALG_TLS12_PSK_TO_MS ecjpake_rounds:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:PSA_ALG_TLS12_PSK_TO_MS(PSA_ALG_SHA_256):"abcdef":1:ERR_NONE -PSA PAKE: ecjpake rounds, early key derivation 1 +PSA PAKE: force early key derivation 1 depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256:PSA_WANT_ALG_TLS12_PSK_TO_MS ecjpake_rounds:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:PSA_ALG_TLS12_PSK_TO_MS(PSA_ALG_SHA_256):"abcdef":0:ERR_INJECT_ANTICIPATE_KEY_DERIVATION_1 -PSA PAKE: ecjpake rounds, early key derivation 2 +PSA PAKE: force early key derivation 2 depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256:PSA_WANT_ALG_TLS12_PSK_TO_MS ecjpake_rounds:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:PSA_ALG_TLS12_PSK_TO_MS(PSA_ALG_SHA_256):"abcdef":0:ERR_INJECT_ANTICIPATE_KEY_DERIVATION_2 -PSA PAKE: ecjpake no input errors +PSA PAKE: no injected errors +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_NONE:PSA_SUCCESS + +PSA PAKE: no injected errors, client input first +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:1:"abcdef":ERR_NONE:PSA_SUCCESS + +PSA PAKE: inject ERR_INJECT_ROUND1_CLIENT_KEY_SHARE_PART1 +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND1_CLIENT_KEY_SHARE_PART1:PSA_ERROR_DATA_INVALID + +PSA PAKE: inject ERR_INJECT_ROUND1_CLIENT_ZK_PUBLIC_PART1 +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND1_CLIENT_ZK_PUBLIC_PART1:PSA_ERROR_DATA_INVALID + +PSA PAKE: inject ERR_INJECT_ROUND1_CLIENT_ZK_PROOF_PART1 +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND1_CLIENT_ZK_PROOF_PART1:PSA_ERROR_DATA_INVALID + +PSA PAKE: inject ERR_INJECT_ROUND1_CLIENT_KEY_SHARE_PART2 +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND1_CLIENT_KEY_SHARE_PART2:PSA_ERROR_DATA_INVALID + +PSA PAKE: inject ERR_INJECT_ROUND1_CLIENT_ZK_PUBLIC_PART2 +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND1_CLIENT_ZK_PUBLIC_PART2:PSA_ERROR_DATA_INVALID + +PSA PAKE: inject ERR_INJECT_ROUND1_CLIENT_ZK_PROOF_PART2 +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND1_CLIENT_ZK_PROOF_PART2:PSA_ERROR_DATA_INVALID + +PSA PAKE: inject ERR_INJECT_ROUND1_SERVER_KEY_SHARE_PART1 +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND1_SERVER_KEY_SHARE_PART1:PSA_ERROR_DATA_INVALID + +PSA PAKE: inject ERR_INJECT_ROUND1_SERVER_ZK_PUBLIC_PART1 +depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND1_SERVER_ZK_PUBLIC_PART1:PSA_ERROR_DATA_INVALID + +PSA PAKE: inject ERR_INJECT_ROUND1_SERVER_ZK_PROOF_PART1 depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 -ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:0:"abcdef" +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND1_SERVER_ZK_PROOF_PART1:PSA_ERROR_DATA_INVALID -PSA PAKE: ecjpake no input errors, client input first +PSA PAKE: inject ERR_INJECT_ROUND1_SERVER_KEY_SHARE_PART2 depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 -ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:0:"abcdef" +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND1_SERVER_KEY_SHARE_PART2:PSA_ERROR_DATA_INVALID -PSA PAKE: ecjpake inject input errors, first round client +PSA PAKE: inject ERR_INJECT_ROUND1_SERVER_ZK_PUBLIC_PART2 depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 -ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:1:"abcdef" +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND1_SERVER_ZK_PUBLIC_PART2:PSA_ERROR_DATA_INVALID -PSA PAKE: ecjpake inject input errors, first round client, client input first +PSA PAKE: inject ERR_INJECT_ROUND1_SERVER_ZK_PROOF_PART2 depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 -ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:1:1:"abcdef" +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND1_SERVER_ZK_PROOF_PART2:PSA_ERROR_DATA_INVALID -PSA PAKE: ecjpake inject input errors, first round server +PSA PAKE: inject ERR_INJECT_ROUND2_CLIENT_KEY_SHARE depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 -ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:2:"abcdef" +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND2_CLIENT_KEY_SHARE:PSA_ERROR_DATA_INVALID -PSA PAKE: ecjpake inject input errors, first round server, client input first +PSA PAKE: inject ERR_INJECT_ROUND2_CLIENT_ZK_PUBLIC depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 -ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:1:2:"abcdef" +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND2_CLIENT_ZK_PUBLIC:PSA_ERROR_DATA_INVALID -PSA PAKE: ecjpake inject input errors, second round client +PSA PAKE: inject ERR_INJECT_ROUND2_CLIENT_ZK_PROOF depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 -ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:3:"abcdef" +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND2_CLIENT_ZK_PROOF:PSA_ERROR_DATA_INVALID -PSA PAKE: ecjpake inject input errors, second round client, client input first +PSA PAKE: inject ERR_INJECT_ROUND2_CLIENT_KEY_SHARE depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 -ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:1:3:"abcdef" +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND2_CLIENT_KEY_SHARE:PSA_ERROR_DATA_INVALID -PSA PAKE: ecjpake inject input errors, second round server +PSA PAKE: inject ERR_INJECT_ROUND2_CLIENT_ZK_PUBLIC depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 -ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:4:"abcdef" +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND2_CLIENT_ZK_PUBLIC:PSA_ERROR_DATA_INVALID -PSA PAKE: ecjpake inject input errors, second round server, client input first +PSA PAKE: inject ERR_INJECT_ROUND2_CLIENT_ZK_PROOF depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256:PSA_WANT_ALG_SHA_256 -ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:1:4:"abcdef" +ecjpake_rounds_inject:PSA_ALG_JPAKE:PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, PSA_ECC_FAMILY_SECP_R1, 256):PSA_ALG_SHA_256:0:"abcdef":ERR_INJECT_ROUND2_CLIENT_ZK_PROOF:PSA_ERROR_DATA_INVALID PSA PAKE: ecjpake size macros depends_on:PSA_WANT_KEY_TYPE_ECC_KEY_PAIR:PSA_WANT_ECC_SECP_R1_256 diff --git a/tests/suites/test_suite_psa_crypto_pake.function b/tests/suites/test_suite_psa_crypto_pake.function index 845b38f70316..8d83019b5ed5 100644 --- a/tests/suites/test_suite_psa_crypto_pake.function +++ b/tests/suites/test_suite_psa_crypto_pake.function @@ -3,12 +3,88 @@ #include "psa/crypto.h" +typedef enum +{ + ERR_NONE = 0, + /* errors forced internally in the code */ + ERR_INJECT_UNINITIALIZED_ACCESS, + ERR_INJECT_DUPLICATE_SETUP, + ERR_INJECT_INVALID_USER, + ERR_INJECT_INVALID_PEER, + ERR_INJECT_SET_USER, + ERR_INJECT_SET_PEER, + ERR_INJECT_EMPTY_IO_BUFFER, + ERR_INJECT_UNKNOWN_STEP, + ERR_INJECT_INVALID_FIRST_STEP, + ERR_INJECT_WRONG_BUFFER_SIZE, + ERR_INJECT_VALID_OPERATION_AFTER_FAILURE, + ERR_INJECT_ANTICIPATE_KEY_DERIVATION_1, + ERR_INJECT_ANTICIPATE_KEY_DERIVATION_2, + ERR_INJECT_ROUND1_CLIENT_KEY_SHARE_PART1, + ERR_INJECT_ROUND1_CLIENT_ZK_PUBLIC_PART1, + ERR_INJECT_ROUND1_CLIENT_ZK_PROOF_PART1, + ERR_INJECT_ROUND1_CLIENT_KEY_SHARE_PART2, + ERR_INJECT_ROUND1_CLIENT_ZK_PUBLIC_PART2, + ERR_INJECT_ROUND1_CLIENT_ZK_PROOF_PART2, + ERR_INJECT_ROUND2_CLIENT_KEY_SHARE, + ERR_INJECT_ROUND2_CLIENT_ZK_PUBLIC, + ERR_INJECT_ROUND2_CLIENT_ZK_PROOF, + ERR_INJECT_ROUND1_SERVER_KEY_SHARE_PART1, + ERR_INJECT_ROUND1_SERVER_ZK_PUBLIC_PART1, + ERR_INJECT_ROUND1_SERVER_ZK_PROOF_PART1, + ERR_INJECT_ROUND1_SERVER_KEY_SHARE_PART2, + ERR_INJECT_ROUND1_SERVER_ZK_PUBLIC_PART2, + ERR_INJECT_ROUND1_SERVER_ZK_PROOF_PART2, + ERR_INJECT_ROUND2_SERVER_KEY_SHARE, + ERR_INJECT_ROUND2_SERVER_ZK_PUBLIC, + ERR_INJECT_ROUND2_SERVER_ZK_PROOF, + /* erros issued from the .data file */ + ERR_IN_SETUP, + ERR_IN_SET_ROLE, + ERR_IN_SET_PASSWORD_KEY, + ERR_IN_INPUT, + ERR_IN_OUTPUT, +} ecjpake_error_stage_t; + +typedef enum +{ + PAKE_ROUND_ONE, + PAKE_ROUND_TWO +} pake_round_t; + +/* Inject an error on the specified buffer ONLY it this is the correct stage */ +#define DO_ROUND_CONDITIONAL_INJECT( this_stage, buf ) \ + if ( this_stage == err_stage ) \ + { \ + *( buf + 7) ^= 1; \ + *( buf + 8 ) ^= 1; \ + } + +#define DO_ROUND_UPDATE_OFFSETS( main_buf_offset, step_offset, step_size ) \ + { \ + step_offset = main_buf_offset; \ + main_buf_offset += step_size; \ + } + +#define DO_ROUND_CHECK_FAILURE( ) \ + if( err_stage != ERR_NONE && status != PSA_SUCCESS ) \ + { \ + TEST_EQUAL( status, expected_error_arg ); \ + break; \ + } \ + else \ + { \ + TEST_EQUAL( status, PSA_SUCCESS ); \ + } + #if defined(PSA_WANT_ALG_JPAKE) static void ecjpake_do_round( psa_algorithm_t alg, unsigned int primitive, psa_pake_operation_t *server, psa_pake_operation_t *client, int client_input_first, - int round, int inject_error ) + pake_round_t round, + ecjpake_error_stage_t err_stage, + int expected_error_arg ) { unsigned char *buffer0 = NULL, *buffer1 = NULL; size_t buffer_length = ( @@ -38,7 +114,6 @@ static void ecjpake_do_round( psa_algorithm_t alg, unsigned int primitive, size_t c_x1_pk_off, c_x2_pk_off, c_x2s_pk_off; size_t c_x1_pr_len, c_x2_pr_len, c_x2s_pr_len; size_t c_x1_pr_off, c_x2_pr_off, c_x2s_pr_off; - psa_status_t expected_status = PSA_SUCCESS; psa_status_t status; ASSERT_ALLOC( buffer0, buffer_length ); @@ -46,51 +121,61 @@ static void ecjpake_do_round( psa_algorithm_t alg, unsigned int primitive, switch( round ) { - case 1: + case PAKE_ROUND_ONE: /* Server first round Output */ PSA_ASSERT( psa_pake_output( server, PSA_PAKE_STEP_KEY_SHARE, buffer0 + buffer0_off, 512 - buffer0_off, &s_g1_len ) ); TEST_EQUAL( s_g1_len, expected_size_key_share ); - s_g1_off = buffer0_off; - buffer0_off += s_g1_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND1_SERVER_KEY_SHARE_PART1, + buffer0 + buffer0_off ); + DO_ROUND_UPDATE_OFFSETS( buffer0_off, s_g1_off, s_g1_len ); + PSA_ASSERT( psa_pake_output( server, PSA_PAKE_STEP_ZK_PUBLIC, buffer0 + buffer0_off, 512 - buffer0_off, &s_x1_pk_len ) ); TEST_EQUAL( s_x1_pk_len, expected_size_zk_public ); - s_x1_pk_off = buffer0_off; - buffer0_off += s_x1_pk_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND1_SERVER_ZK_PUBLIC_PART1, + buffer0 + buffer0_off ); + DO_ROUND_UPDATE_OFFSETS( buffer0_off, s_x1_pk_off, s_x1_pk_len ); + PSA_ASSERT( psa_pake_output( server, PSA_PAKE_STEP_ZK_PROOF, buffer0 + buffer0_off, 512 - buffer0_off, &s_x1_pr_len ) ); TEST_LE_U( s_x1_pr_len, max_expected_size_zk_proof ); - s_x1_pr_off = buffer0_off; - buffer0_off += s_x1_pr_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND1_SERVER_ZK_PROOF_PART1, + buffer0 + buffer0_off ); + DO_ROUND_UPDATE_OFFSETS( buffer0_off, s_x1_pr_off, s_x1_pr_len ); + PSA_ASSERT( psa_pake_output( server, PSA_PAKE_STEP_KEY_SHARE, buffer0 + buffer0_off, 512 - buffer0_off, &s_g2_len ) ); TEST_EQUAL( s_g2_len, expected_size_key_share ); - s_g2_off = buffer0_off; - buffer0_off += s_g2_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND1_SERVER_KEY_SHARE_PART2, + buffer0 + buffer0_off ); + DO_ROUND_UPDATE_OFFSETS( buffer0_off, s_g2_off, s_g2_len ); + PSA_ASSERT( psa_pake_output( server, PSA_PAKE_STEP_ZK_PUBLIC, buffer0 + buffer0_off, 512 - buffer0_off, &s_x2_pk_len ) ); TEST_EQUAL( s_x2_pk_len, expected_size_zk_public ); - s_x2_pk_off = buffer0_off; - buffer0_off += s_x2_pk_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND1_SERVER_ZK_PUBLIC_PART2, + buffer0 + buffer0_off ); + DO_ROUND_UPDATE_OFFSETS( buffer0_off, s_x2_pk_off, s_x2_pk_len ); + PSA_ASSERT( psa_pake_output( server, PSA_PAKE_STEP_ZK_PROOF, buffer0 + buffer0_off, 512 - buffer0_off, &s_x2_pr_len ) ); TEST_LE_U( s_x2_pr_len, max_expected_size_zk_proof ); - s_x2_pr_off = buffer0_off; - buffer0_off += s_x2_pr_len; - - if( inject_error == 1 ) - { - buffer0[s_x1_pr_off + 8] ^= 1; - buffer0[s_x2_pr_off + 7] ^= 1; - expected_status = PSA_ERROR_DATA_INVALID; - } + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND1_SERVER_ZK_PROOF_PART2, + buffer0 + buffer0_off ); + DO_ROUND_UPDATE_OFFSETS( buffer0_off, s_x2_pr_off, s_x2_pr_len ); /* * When injecting errors in inputs, the implementation is @@ -99,90 +184,44 @@ static void ecjpake_do_round( psa_algorithm_t alg, unsigned int primitive, * sequence, if no error appears then, this will be treated * as an error. */ - if( client_input_first == 1 ) { /* Client first round Input */ status = psa_pake_input( client, PSA_PAKE_STEP_KEY_SHARE, buffer0 + s_g1_off, s_g1_len ); - if( inject_error == 1 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( client, PSA_PAKE_STEP_ZK_PUBLIC, buffer0 + s_x1_pk_off, s_x1_pk_len ); - if( inject_error == 1 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( client, PSA_PAKE_STEP_ZK_PROOF, buffer0 + s_x1_pr_off, s_x1_pr_len ); - if( inject_error == 1 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( client, PSA_PAKE_STEP_KEY_SHARE, buffer0 + s_g2_off, s_g2_len ); - if( inject_error == 1 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( client, PSA_PAKE_STEP_ZK_PUBLIC, buffer0 + s_x2_pk_off, s_x2_pk_len ); - if( inject_error == 1 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( client, PSA_PAKE_STEP_ZK_PROOF, buffer0 + s_x2_pr_off, s_x2_pr_len ); - if( inject_error == 1 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); /* Error didn't trigger, make test fail */ - if( inject_error == 1 ) + if( ( err_stage >= ERR_INJECT_ROUND1_SERVER_KEY_SHARE_PART1 ) && + ( err_stage <= ERR_INJECT_ROUND1_SERVER_ZK_PROOF_PART2 ) ) + { TEST_ASSERT( ! "One of the last psa_pake_input() calls should have returned the expected error." ); + } } /* Client first round Output */ @@ -190,211 +229,131 @@ static void ecjpake_do_round( psa_algorithm_t alg, unsigned int primitive, buffer1 + buffer1_off, 512 - buffer1_off, &c_g1_len ) ); TEST_EQUAL( c_g1_len, expected_size_key_share ); - c_g1_off = buffer1_off; - buffer1_off += c_g1_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND1_CLIENT_KEY_SHARE_PART1, + buffer1 + buffer1_off ); + DO_ROUND_UPDATE_OFFSETS( buffer1_off, c_g1_off, c_g1_len ); + PSA_ASSERT( psa_pake_output( client, PSA_PAKE_STEP_ZK_PUBLIC, buffer1 + buffer1_off, 512 - buffer1_off, &c_x1_pk_len ) ); TEST_EQUAL( c_x1_pk_len, expected_size_zk_public ); - c_x1_pk_off = buffer1_off; - buffer1_off += c_x1_pk_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND1_CLIENT_ZK_PUBLIC_PART1, + buffer1 + buffer1_off ); + DO_ROUND_UPDATE_OFFSETS( buffer1_off, c_x1_pk_off, c_x1_pk_len ); + PSA_ASSERT( psa_pake_output( client, PSA_PAKE_STEP_ZK_PROOF, buffer1 + buffer1_off, 512 - buffer1_off, &c_x1_pr_len ) ); TEST_LE_U( c_x1_pr_len, max_expected_size_zk_proof ); - c_x1_pr_off = buffer1_off; - buffer1_off += c_x1_pr_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND1_CLIENT_ZK_PROOF_PART1, + buffer1 + buffer1_off ); + DO_ROUND_UPDATE_OFFSETS( buffer1_off, c_x1_pr_off, c_x1_pr_len ); + PSA_ASSERT( psa_pake_output( client, PSA_PAKE_STEP_KEY_SHARE, buffer1 + buffer1_off, 512 - buffer1_off, &c_g2_len ) ); TEST_EQUAL( c_g2_len, expected_size_key_share ); - c_g2_off = buffer1_off; - buffer1_off += c_g2_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND1_CLIENT_KEY_SHARE_PART2, + buffer1 + buffer1_off ); + DO_ROUND_UPDATE_OFFSETS( buffer1_off, c_g2_off, c_g2_len ); + PSA_ASSERT( psa_pake_output( client, PSA_PAKE_STEP_ZK_PUBLIC, buffer1 + buffer1_off, 512 - buffer1_off, &c_x2_pk_len ) ); TEST_EQUAL( c_x2_pk_len, expected_size_zk_public ); - c_x2_pk_off = buffer1_off; - buffer1_off += c_x2_pk_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND1_CLIENT_ZK_PUBLIC_PART2, + buffer1 + buffer1_off ); + DO_ROUND_UPDATE_OFFSETS( buffer1_off, c_x2_pk_off, c_x2_pk_len ); + PSA_ASSERT( psa_pake_output( client, PSA_PAKE_STEP_ZK_PROOF, buffer1 + buffer1_off, 512 - buffer1_off, &c_x2_pr_len ) ); TEST_LE_U( c_x2_pr_len, max_expected_size_zk_proof ); - c_x2_pr_off = buffer1_off; - buffer1_off += c_x2_pr_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND1_CLIENT_ZK_PROOF_PART2, + buffer1 + buffer1_off ); + DO_ROUND_UPDATE_OFFSETS( buffer1_off, c_x2_pr_off, buffer1_off ); if( client_input_first == 0 ) { /* Client first round Input */ status = psa_pake_input( client, PSA_PAKE_STEP_KEY_SHARE, buffer0 + s_g1_off, s_g1_len ); - if( inject_error == 1 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( client, PSA_PAKE_STEP_ZK_PUBLIC, buffer0 + s_x1_pk_off, s_x1_pk_len ); - if( inject_error == 1 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( client, PSA_PAKE_STEP_ZK_PROOF, buffer0 + s_x1_pr_off, s_x1_pr_len ); - if( inject_error == 1 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( client, PSA_PAKE_STEP_KEY_SHARE, buffer0 + s_g2_off, s_g2_len ); - if( inject_error == 1 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( client, PSA_PAKE_STEP_ZK_PUBLIC, buffer0 + s_x2_pk_off, s_x2_pk_len ); - if( inject_error == 1 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( client, PSA_PAKE_STEP_ZK_PROOF, buffer0 + s_x2_pr_off, s_x2_pr_len ); - if( inject_error == 1 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); /* Error didn't trigger, make test fail */ - if( inject_error == 1 ) + if( ( err_stage >= ERR_INJECT_ROUND1_SERVER_KEY_SHARE_PART1 ) && + ( err_stage <= ERR_INJECT_ROUND1_SERVER_ZK_PROOF_PART2 ) ) + { TEST_ASSERT( ! "One of the last psa_pake_input() calls should have returned the expected error." ); - } - - if( inject_error == 2 ) - { - buffer1[c_x1_pr_off + 12] ^= 1; - buffer1[c_x2_pr_off + 7] ^= 1; - expected_status = PSA_ERROR_DATA_INVALID; + } } /* Server first round Input */ status = psa_pake_input( server, PSA_PAKE_STEP_KEY_SHARE, buffer1 + c_g1_off, c_g1_len ); - if( inject_error == 2 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( server, PSA_PAKE_STEP_ZK_PUBLIC, buffer1 + c_x1_pk_off, c_x1_pk_len ); - if( inject_error == 2 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( server, PSA_PAKE_STEP_ZK_PROOF, buffer1 + c_x1_pr_off, c_x1_pr_len ); - if( inject_error == 2 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( server, PSA_PAKE_STEP_KEY_SHARE, buffer1 + c_g2_off, c_g2_len ); - if( inject_error == 2 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( server, PSA_PAKE_STEP_ZK_PUBLIC, buffer1 + c_x2_pk_off, c_x2_pk_len ); - if( inject_error == 2 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( server, PSA_PAKE_STEP_ZK_PROOF, buffer1 + c_x2_pr_off, c_x2_pr_len ); - if( inject_error == 2 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); /* Error didn't trigger, make test fail */ - if( inject_error == 2 ) + if( ( err_stage >= ERR_INJECT_ROUND1_CLIENT_KEY_SHARE_PART1 ) && + ( err_stage <= ERR_INJECT_ROUND1_CLIENT_ZK_PROOF_PART2 ) ) + { TEST_ASSERT( ! "One of the last psa_pake_input() calls should have returned the expected error." ); + } break; - case 2: + case PAKE_ROUND_TWO: /* Server second round Output */ buffer0_off = 0; @@ -402,71 +361,52 @@ static void ecjpake_do_round( psa_algorithm_t alg, unsigned int primitive, buffer0 + buffer0_off, 512 - buffer0_off, &s_a_len ) ); TEST_EQUAL( s_a_len, expected_size_key_share ); - s_a_off = buffer0_off; - buffer0_off += s_a_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND2_SERVER_KEY_SHARE, + buffer0 + buffer0_off ); + DO_ROUND_UPDATE_OFFSETS( buffer0_off, s_a_off, s_a_len ); + PSA_ASSERT( psa_pake_output( server, PSA_PAKE_STEP_ZK_PUBLIC, buffer0 + buffer0_off, 512 - buffer0_off, &s_x2s_pk_len ) ); TEST_EQUAL( s_x2s_pk_len, expected_size_zk_public ); - s_x2s_pk_off = buffer0_off; - buffer0_off += s_x2s_pk_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND2_SERVER_ZK_PUBLIC, + buffer0 + buffer0_off ); + DO_ROUND_UPDATE_OFFSETS( buffer0_off, s_x2s_pk_off, s_x2s_pk_len ); + PSA_ASSERT( psa_pake_output( server, PSA_PAKE_STEP_ZK_PROOF, buffer0 + buffer0_off, 512 - buffer0_off, &s_x2s_pr_len ) ); TEST_LE_U( s_x2s_pr_len, max_expected_size_zk_proof ); - s_x2s_pr_off = buffer0_off; - buffer0_off += s_x2s_pr_len; - - if( inject_error == 3 ) - { - buffer0[s_x2s_pk_off + 12] += 0x33; - expected_status = PSA_ERROR_DATA_INVALID; - } + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND2_SERVER_ZK_PROOF, + buffer0 + buffer0_off ); + DO_ROUND_UPDATE_OFFSETS( buffer0_off, s_x2s_pr_off, s_x2s_pr_len ); if( client_input_first == 1 ) { /* Client second round Input */ status = psa_pake_input( client, PSA_PAKE_STEP_KEY_SHARE, buffer0 + s_a_off, s_a_len ); - if( inject_error == 3 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( client, PSA_PAKE_STEP_ZK_PUBLIC, buffer0 + s_x2s_pk_off, s_x2s_pk_len ); - if( inject_error == 3 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( client, PSA_PAKE_STEP_ZK_PROOF, buffer0 + s_x2s_pr_off, s_x2s_pr_len ); - if( inject_error == 3 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); /* Error didn't trigger, make test fail */ - if( inject_error == 3 ) + if( ( err_stage >= ERR_INJECT_ROUND2_SERVER_KEY_SHARE ) && + ( err_stage <= ERR_INJECT_ROUND2_SERVER_ZK_PROOF ) ) + { TEST_ASSERT( ! "One of the last psa_pake_input() calls should have returned the expected error." ); + } } /* Client second round Output */ @@ -476,113 +416,73 @@ static void ecjpake_do_round( psa_algorithm_t alg, unsigned int primitive, buffer1 + buffer1_off, 512 - buffer1_off, &c_a_len ) ); TEST_EQUAL( c_a_len, expected_size_key_share ); - c_a_off = buffer1_off; - buffer1_off += c_a_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND2_CLIENT_KEY_SHARE, + buffer1 + buffer1_off ); + DO_ROUND_UPDATE_OFFSETS( buffer1_off, c_a_off, c_a_len ); + PSA_ASSERT( psa_pake_output( client, PSA_PAKE_STEP_ZK_PUBLIC, buffer1 + buffer1_off, 512 - buffer1_off, &c_x2s_pk_len ) ); TEST_EQUAL( c_x2s_pk_len, expected_size_zk_public ); - c_x2s_pk_off = buffer1_off; - buffer1_off += c_x2s_pk_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND2_CLIENT_ZK_PUBLIC, + buffer1 + buffer1_off ); + DO_ROUND_UPDATE_OFFSETS( buffer1_off, c_x2s_pk_off, c_x2s_pk_len ); + PSA_ASSERT( psa_pake_output( client, PSA_PAKE_STEP_ZK_PROOF, buffer1 + buffer1_off, 512 - buffer1_off, &c_x2s_pr_len ) ); TEST_LE_U( c_x2s_pr_len, max_expected_size_zk_proof ); - c_x2s_pr_off = buffer1_off; - buffer1_off += c_x2s_pr_len; + DO_ROUND_CONDITIONAL_INJECT( + ERR_INJECT_ROUND2_CLIENT_ZK_PROOF, + buffer1 + buffer1_off ); + DO_ROUND_UPDATE_OFFSETS( buffer1_off, c_x2s_pr_off, c_x2s_pr_len ); if( client_input_first == 0 ) { /* Client second round Input */ status = psa_pake_input( client, PSA_PAKE_STEP_KEY_SHARE, buffer0 + s_a_off, s_a_len ); - if( inject_error == 3 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( client, PSA_PAKE_STEP_ZK_PUBLIC, buffer0 + s_x2s_pk_off, s_x2s_pk_len ); - if( inject_error == 3 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( client, PSA_PAKE_STEP_ZK_PROOF, buffer0 + s_x2s_pr_off, s_x2s_pr_len ); - if( inject_error == 3 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); /* Error didn't trigger, make test fail */ - if( inject_error == 3 ) + if( ( err_stage >= ERR_INJECT_ROUND2_SERVER_KEY_SHARE ) && + ( err_stage <= ERR_INJECT_ROUND2_SERVER_ZK_PROOF ) ) + { TEST_ASSERT( ! "One of the last psa_pake_input() calls should have returned the expected error." ); - } - - if( inject_error == 4 ) - { - buffer1[c_x2s_pk_off + 7] += 0x28; - expected_status = PSA_ERROR_DATA_INVALID; + } } /* Server second round Input */ status = psa_pake_input( server, PSA_PAKE_STEP_KEY_SHARE, buffer1 + c_a_off, c_a_len ); - if( inject_error == 4 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( server, PSA_PAKE_STEP_ZK_PUBLIC, buffer1 + c_x2s_pk_off, c_x2s_pk_len ); - if( inject_error == 4 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); status = psa_pake_input( server, PSA_PAKE_STEP_ZK_PROOF, buffer1 + c_x2s_pr_off, c_x2s_pr_len ); - if( inject_error == 4 && status != PSA_SUCCESS ) - { - TEST_EQUAL( status, expected_status ); - break; - } - else - { - TEST_EQUAL( status, PSA_SUCCESS ); - } + DO_ROUND_CHECK_FAILURE( ); /* Error didn't trigger, make test fail */ - if( inject_error == 4 ) + if( ( err_stage >= ERR_INJECT_ROUND2_CLIENT_KEY_SHARE ) && + ( err_stage <= ERR_INJECT_ROUND2_CLIENT_ZK_PROOF ) ) + { TEST_ASSERT( ! "One of the last psa_pake_input() calls should have returned the expected error." ); + } break; @@ -594,31 +494,6 @@ exit: } #endif /* PSA_WANT_ALG_JPAKE */ -typedef enum -{ - ERR_NONE = 0, - /* errors forced internally in the code */ - ERR_INJECT_UNINITIALIZED_ACCESS, - ERR_INJECT_DUPLICATE_SETUP, - ERR_INJECT_INVALID_USER, - ERR_INJECT_INVALID_PEER, - ERR_INJECT_SET_USER, - ERR_INJECT_SET_PEER, - ERR_INJECT_EMPTY_IO_BUFFER, - ERR_INJECT_UNKNOWN_STEP, - ERR_INJECT_INVALID_FIRST_STEP, - ERR_INJECT_WRONG_BUFFER_SIZE, - ERR_INJECT_VALID_OPERATION_AFTER_FAILURE, - ERR_INJECT_ANTICIPATE_KEY_DERIVATION_1, - ERR_INJECT_ANTICIPATE_KEY_DERIVATION_2, - /* erros issued from the .data file */ - ERR_IN_SETUP, - ERR_IN_SET_ROLE, - ERR_IN_SET_PASSWORD_KEY, - ERR_IN_INPUT, - ERR_IN_OUTPUT, -} ecjpake_error_stage_t; - /* * This check is used for functions that might either succeed or fail depending * on the parameters that are passed in from the *.data file: @@ -723,7 +598,7 @@ void ecjpake_setup( int alg_arg, int key_type_pw_arg, int key_usage_pw_arg, TEST_EQUAL( psa_pake_output( &operation, PSA_PAKE_STEP_KEY_SHARE, NULL, 0, NULL ), expected_error ); - TEST_EQUAL( psa_pake_input( &operation, PSA_PAKE_STEP_KEY_SHARE, + TEST_EQUAL( psa_pake_input( &operation, PSA_PAKE_STEP_KEY_SHARE, NULL, 0 ), expected_error ); TEST_EQUAL( psa_pake_get_implicit_key( &operation, &key_derivation ), @@ -841,8 +716,10 @@ exit: /* BEGIN_CASE depends_on:PSA_WANT_ALG_JPAKE */ void ecjpake_rounds_inject( int alg_arg, int primitive_arg, int hash_arg, - int client_input_first, int inject_error, - data_t *pw_data ) + int client_input_first, + data_t *pw_data, + int err_stage_arg, + int expected_error_arg ) { psa_pake_cipher_suite_t cipher_suite = psa_pake_cipher_suite_init(); psa_pake_operation_t server = psa_pake_operation_init(); @@ -851,6 +728,7 @@ void ecjpake_rounds_inject( int alg_arg, int primitive_arg, int hash_arg, psa_algorithm_t hash_alg = hash_arg; mbedtls_svc_key_id_t key = MBEDTLS_SVC_KEY_ID_INIT; psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; + ecjpake_error_stage_t err_stage = err_stage_arg; PSA_INIT( ); @@ -864,7 +742,6 @@ void ecjpake_rounds_inject( int alg_arg, int primitive_arg, int hash_arg, psa_pake_cs_set_primitive( &cipher_suite, primitive_arg ); psa_pake_cs_set_hash( &cipher_suite, hash_alg ); - PSA_ASSERT( psa_pake_setup( &server, &cipher_suite ) ); PSA_ASSERT( psa_pake_setup( &client, &cipher_suite ) ); @@ -875,13 +752,15 @@ void ecjpake_rounds_inject( int alg_arg, int primitive_arg, int hash_arg, PSA_ASSERT( psa_pake_set_password_key( &client, key ) ); ecjpake_do_round( alg, primitive_arg, &server, &client, - client_input_first, 1, inject_error ); + client_input_first, PAKE_ROUND_ONE, + err_stage, expected_error_arg ); - if( inject_error == 1 || inject_error == 2 ) + if( err_stage != ERR_NONE ) goto exit; ecjpake_do_round( alg, primitive_arg, &server, &client, - client_input_first, 2, inject_error ); + client_input_first, PAKE_ROUND_TWO, + err_stage, expected_error_arg ); exit: psa_destroy_key( key ); @@ -957,7 +836,8 @@ void ecjpake_rounds( int alg_arg, int primitive_arg, int hash_arg, /* First round */ ecjpake_do_round( alg, primitive_arg, &server, &client, - client_input_first, 1, 0 ); + client_input_first, PAKE_ROUND_ONE, + ERR_NONE, PSA_SUCCESS ); if ( err_stage == ERR_INJECT_ANTICIPATE_KEY_DERIVATION_2 ) { @@ -970,7 +850,8 @@ void ecjpake_rounds( int alg_arg, int primitive_arg, int hash_arg, /* Second round */ ecjpake_do_round( alg, primitive_arg, &server, &client, - client_input_first, 2, 0 ); + client_input_first, PAKE_ROUND_TWO, + ERR_NONE, PSA_SUCCESS ); PSA_ASSERT( psa_pake_get_implicit_key( &server, &server_derive ) ); PSA_ASSERT( psa_pake_get_implicit_key( &client, &client_derive ) );
sentry
https://github.com/getsentry/sentry
8a8aa5de53d2bf00e6a681167146c5d32693fd4b
Matt Duncan
2025-01-06 22:43:18
fix(issues): Remove duplicate span in sdk_crash_monitoring (#82910)
This op is already being auto-instrumented in run_post_process_job, the duplicate span here with the same name is not helpful when looking at aggregates. This renames the op and adds another around config building - in the future I suspect we can get a very easy win by not rebuilding config for every single event - this will give us some data to back up that theory. Aggregate showing the 2x duplicate (`update_existing_attachments` is fixed in a separate PR):
fix(issues): Remove duplicate span in sdk_crash_monitoring (#82910) This op is already being auto-instrumented in run_post_process_job, the duplicate span here with the same name is not helpful when looking at aggregates. This renames the op and adds another around config building - in the future I suspect we can get a very easy win by not rebuilding config for every single event - this will give us some data to back up that theory. Aggregate showing the 2x duplicate (`update_existing_attachments` is fixed in a separate PR): https://sentry.sentry.io/traces/?groupBy=span.op&mode=aggregate&project=1&query=span.op%3Atasks.post_process_group.%2A&statsPeriod=24h&visualize=%7B%22chartType%22%3A1%2C%22yAxes%22%3A%5B%22count%28span.duration%29%22%5D%7D See also: #82911
diff --git a/src/sentry/tasks/post_process.py b/src/sentry/tasks/post_process.py index 6f080459584ca2..f246045a229d04 100644 --- a/src/sentry/tasks/post_process.py +++ b/src/sentry/tasks/post_process.py @@ -1290,15 +1290,13 @@ def sdk_crash_monitoring(job: PostProcessJob): if not features.has("organizations:sdk-crash-detection", event.project.organization): return - configs = build_sdk_crash_detection_configs() - if not configs or len(configs) == 0: - return None + with sentry_sdk.start_span(op="post_process.build_sdk_crash_config"): + configs = build_sdk_crash_detection_configs() + if not configs or len(configs) == 0: + return None - with sentry_sdk.start_span(op="tasks.post_process_group.sdk_crash_monitoring"): - sdk_crash_detection.detect_sdk_crash( - event=event, - configs=configs, - ) + with sentry_sdk.start_span(op="post_process.detect_sdk_crash"): + sdk_crash_detection.detect_sdk_crash(event=event, configs=configs) def plugin_post_process_group(plugin_slug, event, **kwargs):
zulip
https://github.com/zulip/zulip
a7fd994cbd00cdc905801c6394e198f81a4a4c32
Lauryn Menard
2023-01-10 22:20:00
docs: Link to management commands documentation in user facing docs.
Adds links to the documentation about management commands in the API documentation for creating users, as well as the `/devtools` documentation, the GDPR compliance article and the incoming webhooks tutorial.
docs: Link to management commands documentation in user facing docs. Adds links to the documentation about management commands in the API documentation for creating users, as well as the `/devtools` documentation, the GDPR compliance article and the incoming webhooks tutorial.
diff --git a/templates/zerver/api/incoming-webhooks-walkthrough.md b/templates/zerver/api/incoming-webhooks-walkthrough.md index 6a3719017835d..353b2fea581dc 100644 --- a/templates/zerver/api/incoming-webhooks-walkthrough.md +++ b/templates/zerver/api/incoming-webhooks-walkthrough.md @@ -280,6 +280,11 @@ The format is a JSON dictionary, so make sure that the header names do not contain any spaces in them and that you use the precise quoting approach shown above. +For more information about `manage.py` command-line tools in Zulip, see +the [management commands][management-commands] documentation. + +[management-commands]: https://zulip.readthedocs.io/en/latest/production/management-commands.html + ### Integrations Dev Panel This is the GUI tool. diff --git a/templates/zerver/development/dev_tools.html b/templates/zerver/development/dev_tools.html index 5926150d374b0..7b53485d960e8 100644 --- a/templates/zerver/development/dev_tools.html +++ b/templates/zerver/development/dev_tools.html @@ -85,7 +85,7 @@ <h1>Useful development URLs</h1> </tbody> </table> <h2>Useful management commands</h2> - <p>Development-specific management commands live in <code>zilencer/management/commands</code>. Highlights include: + <p>Development-specific <a href="https://zulip.readthedocs.io/en/latest/production/management-commands.html">management commands</a> live in <code>zilencer/management/commands</code>. Highlights include: <ul> <li><code>./manage.py populate_db</code>: Rebuilds database. Has options to e.g. create 3K users for testing.</li> <li><code>./manage.py mark_all_messages_unread</code>: Useful for testing reading messages.</li> diff --git a/templates/zerver/help/gdpr-compliance.md b/templates/zerver/help/gdpr-compliance.md index 4a94073745b4e..4cfa48b217876 100644 --- a/templates/zerver/help/gdpr-compliance.md +++ b/templates/zerver/help/gdpr-compliance.md @@ -128,12 +128,11 @@ In addition to the features described above that are available in Zulip Cloud (which are also available on-premises), the following tools may be useful: -* The Zulip server comes with a command-line tool, `manage.py export_single_user`, - which is a variant of the main server - [export tool](https://zulip.readthedocs.io/en/latest/production/export-and-import.html), - that exports a single Zulip user's account details, - preferences, stream subscriptions, and message history in a - structured JSON format. +* The Zulip server comes with a [command-line tool][management-commands], + `manage.py export_single_user`, which is a variant of the main server + [export tool][export-and-import-tool], that exports a single Zulip + user's account details, preferences, stream subscriptions, and message + history in a structured JSON format. * The Django management shell (`manage.py shell`) and database shell (`manage.py dbshell`) allows you to query, access, edit, and delete data directly. @@ -143,3 +142,6 @@ your server infrastructure responsibly, internal policies around access, logging, and backups, etc. If you need detailed guidance, we recommend contacting [email protected]; our paid support contracts include assistance with understanding GDPR compliance with Zulip. + +[management-commands]: https://zulip.readthedocs.io/en/latest/production/management-commands.html +[export-and-import-tool]: https://zulip.readthedocs.io/en/latest/production/export-and-import.html diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml index 31070289fb4f3..79bb76f561a3b 100644 --- a/zerver/openapi/zulip.yaml +++ b/zerver/openapi/zulip.yaml @@ -6880,12 +6880,13 @@ paths: permission for a bot by contacting [Zulip Cloud support][support] with an explanation for why it is needed. Self-hosted installations can toggle `can_create_users` on an account using the `manage.py - change_user_role` command. + change_user_role` [management command][management-commands]. **Changes**: Before Zulip 4.0 (feature level 36), this endpoint was available to all organization administrators. [support]: /help/contact-support + [management-commands]: https://zulip.readthedocs.io/en/latest/production/management-commands.html x-requires-administrator: true parameters: - name: email
olive
https://github.com/olive-editor/olive
b04d16c95ba62dca921e8100ec41e4c92812c460
Simran Spiller
2023-09-11 15:41:33
CI: Downgrade checkout action to v3 for Linux container
actions/checkout@v4 uses Node.js 20, requiring GLIBC 2.28, GLIBCXX 3.4.21 and CXXABI 1.3.9 which CentOS 7 doesn't have
CI: Downgrade checkout action to v3 for Linux container actions/checkout@v4 uses Node.js 20, requiring GLIBC 2.28, GLIBCXX 3.4.21 and CXXABI 1.3.9 which CentOS 7 doesn't have
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49faec1f4d..7933a79f4e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,10 +53,9 @@ jobs: steps: - name: Checkout Source Code - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: submodules: true - show-progress: false - name: Generate Patreon List env:
angular
https://github.com/angular/angular
f92d644c955b186387da069200758a6a8bf8a541
Marc Laval
2017-03-16 21:43:07
ci: disable Android 4.1, 4.2 and 4.3 in SauceLabs (#14461)
These browsers are not supported anymore: https://wiki.saucelabs.com/pages/viewpage.action?pageId=67012495 Tried to switch them to BrowserStack, but the emulators are too slow to run the full campaign (time out in tests, and disconnect eventually).
ci: disable Android 4.1, 4.2 and 4.3 in SauceLabs (#14461) These browsers are not supported anymore: https://wiki.saucelabs.com/pages/viewpage.action?pageId=67012495 Tried to switch them to BrowserStack, but the emulators are too slow to run the full campaign (time out in tests, and disconnect eventually).
diff --git a/browser-providers.conf.js b/browser-providers.conf.js index 6dfff9831f7783..05e813ed26c6a7 100644 --- a/browser-providers.conf.js +++ b/browser-providers.conf.js @@ -24,9 +24,6 @@ var CIconfiguration = { 'IE10': {unitTest: {target: 'SL', required: true}, e2e: {target: null, required: true}}, 'IE11': {unitTest: {target: 'SL', required: true}, e2e: {target: null, required: true}}, 'Edge': {unitTest: {target: 'BS', required: false}, e2e: {target: null, required: true}}, - 'Android4.1': {unitTest: {target: 'SL', required: false}, e2e: {target: null, required: true}}, - 'Android4.2': {unitTest: {target: 'SL', required: false}, e2e: {target: null, required: true}}, - 'Android4.3': {unitTest: {target: 'SL', required: false}, e2e: {target: null, required: true}}, 'Android4.4': {unitTest: {target: 'SL', required: false}, e2e: {target: null, required: true}}, 'Android5': {unitTest: {target: 'SL', required: false}, e2e: {target: null, required: true}}, 'Safari7': {unitTest: {target: 'BS', required: false}, e2e: {target: null, required: true}},
superset
https://github.com/apache/superset
bd2c087f78941ed443834e2d191b34f0160874a7
Ville Brofeldt
2021-05-27 10:23:52
fix(native-filters): remove indicators outside scope (#14838)
* fix(native-filters): remove indicators outside scope * lint
fix(native-filters): remove indicators outside scope (#14838) * fix(native-filters): remove indicators outside scope * lint
diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/selectors.ts b/superset-frontend/src/dashboard/components/FiltersBadge/selectors.ts index 7560f858f58a2..e20cecc0de58b 100644 --- a/superset-frontend/src/dashboard/components/FiltersBadge/selectors.ts +++ b/superset-frontend/src/dashboard/components/FiltersBadge/selectors.ts @@ -192,20 +192,15 @@ export const selectNativeIndicatorsForChart = ( const getStatus = ({ value, - isAffectedByScope, column, type = DataMaskType.NativeFilters, }: { value: any; - isAffectedByScope: boolean; column?: string; type?: DataMaskType; }): IndicatorStatus => { // a filter is only considered unset if it's value is null const hasValue = value !== null; - if (!isAffectedByScope) { - return IndicatorStatus.Unset; - } if (type === DataMaskType.CrossFilters && hasValue) { return IndicatorStatus.CrossFilterApplied; } @@ -223,14 +218,13 @@ export const selectNativeIndicatorsForChart = ( let nativeFilterIndicators: any = []; if (isFeatureEnabled(FeatureFlag.DASHBOARD_NATIVE_FILTERS)) { - nativeFilterIndicators = Object.values(nativeFilters.filters).map( - nativeFilter => { - const isAffectedByScope = getTreeCheckedItems( - nativeFilter.scope, - dashboardLayout, - ).some( + nativeFilterIndicators = Object.values(nativeFilters.filters) + .filter(nativeFilter => + getTreeCheckedItems(nativeFilter.scope, dashboardLayout).some( layoutItem => dashboardLayout[layoutItem]?.meta?.chartId === chartId, - ); + ), + ) + .map(nativeFilter => { const column = nativeFilter.targets[0]?.column?.name; let value = dataMask[nativeFilter.id]?.filterState?.value ?? null; if (!Array.isArray(value) && value !== null) { @@ -240,25 +234,24 @@ export const selectNativeIndicatorsForChart = ( column, name: nativeFilter.name, path: [nativeFilter.id], - status: getStatus({ value, isAffectedByScope, column }), + status: getStatus({ value, column }), value, }; - }, - ); + }); } let crossFilterIndicators: any = []; if (isFeatureEnabled(FeatureFlag.DASHBOARD_CROSS_FILTERS)) { crossFilterIndicators = Object.values(chartConfiguration) - .map(chartConfig => { - const scope = chartConfig?.crossFilters?.scope; - const isAffectedByScope = getTreeCheckedItems( - scope, + .filter(chartConfig => + getTreeCheckedItems( + chartConfig?.crossFilters?.scope, dashboardLayout, ).some( layoutItem => dashboardLayout[layoutItem]?.meta?.chartId === chartId, - ); - + ), + ) + .map(chartConfig => { let value = dataMask[chartConfig.id]?.filterState?.value ?? null; if (!Array.isArray(value) && value !== null) { value = [value]; @@ -270,7 +263,6 @@ export const selectNativeIndicatorsForChart = ( path: [`${chartConfig.id}`], status: getStatus({ value, - isAffectedByScope, type: DataMaskType.CrossFilters, }), value,
KaTeX
https://github.com/KaTeX/KaTeX
0854e68740810e3fb2a582a0fb835ba48042433b
KaTeX bot
2022-06-06 21:43:28
chore(release): 0.16.0 [ci skip]
# [0.16.0](https://github.com/KaTeX/KaTeX/compare/v0.15.6...v0.16.0) (2022-06-06) ### Bug Fixes * **copy-tex:** Use JS (instead of CSS) to select full equation, solving display glitches ([#3586](https://github.com/KaTeX/KaTeX/issues/3586)) ([8c2d852](https://github.com/KaTeX/KaTeX/commit/8c2d852c4af213ba4e2f4a3b875498c367e9a119)) ### BREAKING CHANGES * **copy-tex:** copy-tex extension no longer has (or requires) a CSS file. * Code cleanup, lint fixes, port to Flow * Rewrite to extend both start and end of range * Remove contrib/**/*.css linting
chore(release): 0.16.0 [ci skip] # [0.16.0](https://github.com/KaTeX/KaTeX/compare/v0.15.6...v0.16.0) (2022-06-06) ### Bug Fixes * **copy-tex:** Use JS (instead of CSS) to select full equation, solving display glitches ([#3586](https://github.com/KaTeX/KaTeX/issues/3586)) ([8c2d852](https://github.com/KaTeX/KaTeX/commit/8c2d852c4af213ba4e2f4a3b875498c367e9a119)) ### BREAKING CHANGES * **copy-tex:** copy-tex extension no longer has (or requires) a CSS file. * Code cleanup, lint fixes, port to Flow * Rewrite to extend both start and end of range * Remove contrib/**/*.css linting Co-authored-by: Erik Demaine <[email protected]>
diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b5c480c24..9abd6394ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,26 @@ # Changelog All notable changes to this project will be documented in this file. This CHANGELOG roughly follows the guidelines from [www.keepachangelog.com](https://keepachangelog.com/en/1.0.0/). +# [0.16.0](https://github.com/KaTeX/KaTeX/compare/v0.15.6...v0.16.0) (2022-06-06) + + +### Bug Fixes + +* **copy-tex:** Use JS (instead of CSS) to select full equation, solving display glitches ([#3586](https://github.com/KaTeX/KaTeX/issues/3586)) ([8c2d852](https://github.com/KaTeX/KaTeX/commit/8c2d852c4af213ba4e2f4a3b875498c367e9a119)) + + +### BREAKING CHANGES + +* **copy-tex:** copy-tex extension no longer has (or requires) a CSS file. + +* Code cleanup, lint fixes, port to Flow + +* Rewrite to extend both start and end of range + +* Remove contrib/**/*.css linting + +Co-authored-by: Erik Demaine <[email protected]> + ## [0.15.6](https://github.com/KaTeX/KaTeX/compare/v0.15.5...v0.15.6) (2022-05-20) diff --git a/README.md b/README.md index 6e1da47ff4..265dbfde18 100644 --- a/README.md +++ b/README.md @@ -31,13 +31,13 @@ Try out KaTeX [on the demo page](https://katex.org/#demo)! <!-- KaTeX requires the use of the HTML5 doctype. Without it, KaTeX may not render properly --> <html> <head> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-ZPe7yZ91iWxYumsBEOn7ieg8q/o+qh/hQpSaPow8T6BwALcXSCS6C6fSRPIAnTQs" crossorigin="anonymous"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous"> <!-- The loading of KaTeX is deferred to speed up page rendering --> - <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-ljao5I1l+8KYFXG7LNEA7DyaFvuvSCmedUf6Y6JI7LJqiu8q5dEivP2nDdFH31V4" crossorigin="anonymous"></script> + <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script> <!-- To automatically render math in text elements, include the auto-render extension: --> - <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous" + <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script> </head> ... diff --git a/contrib/copy-tex/README.md b/contrib/copy-tex/README.md index dd1c28c003..a92b9984a4 100644 --- a/contrib/copy-tex/README.md +++ b/contrib/copy-tex/README.md @@ -18,7 +18,7 @@ This extension isn't part of KaTeX proper, so the script should be separately included in the page. ```html -<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/copy-tex.min.js" integrity="sha384-Ep9Es0VCjVn9dFeaN2uQxgGcGmG+pfZ4eBaHxUpxXDORrrVACZVOpywyzvFRGbmv" crossorigin="anonymous"></script> +<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/copy-tex.min.js" integrity="sha384-ww/583aHhxWkz5DEVn6OKtNiIaLi2iBRNZXfJRiY1Ai7tnJ9UXpEsyvOITVpTl4A" crossorigin="anonymous"></script> ``` (Note that, as of KaTeX 0.16.0, there is no longer a corresponding CSS file.) @@ -35,5 +35,5 @@ statement with `require('katex/contrib/copy-tex/katex2tex.js')`. ECMAScript module is also available: ```html -<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/copy-tex.mjs" integrity="sha384-+gSYJ3yzY30+a6FGYJXOx9swmWs5oPKEi1AeCsAxsLexABlUXgHXkOkEZCj0Lz8U" crossorigin="anonymous"></script> +<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/copy-tex.mjs" integrity="sha384-bVEnwt0PtX+1EuJoOEcm4rgTUWvb2ILTdjHfI1gUe/r5fdqrTcQaUuRdHG2DciuQ" crossorigin="anonymous"></script> ``` diff --git a/contrib/mathtex-script-type/README.md b/contrib/mathtex-script-type/README.md index d0efbbac56..2e09a21bdc 100644 --- a/contrib/mathtex-script-type/README.md +++ b/contrib/mathtex-script-type/README.md @@ -11,7 +11,7 @@ included in the page, in addition to KaTeX. Load the extension by adding the following line to your HTML file. ```html -<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/mathtex-script-type.min.js" integrity="sha384-jiBVvJ8NGGj5n7kJaiWwWp9AjC+Yh8rhZY3GtAX8yU28azcLgoRo4oukO87g7zDT" crossorigin="anonymous"></script> +<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/mathtex-script-type.min.js" integrity="sha384-jiBVvJ8NGGj5n7kJaiWwWp9AjC+Yh8rhZY3GtAX8yU28azcLgoRo4oukO87g7zDT" crossorigin="anonymous"></script> ``` You can download the script and use it locally, or from a local KaTeX installation instead. @@ -23,9 +23,9 @@ Then, in the body, we use a `math/tex` script to typeset the equation `x+\sqrt{1 <!DOCTYPE html> <html> <head> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-ZPe7yZ91iWxYumsBEOn7ieg8q/o+qh/hQpSaPow8T6BwALcXSCS6C6fSRPIAnTQs" crossorigin="anonymous"> - <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-ljao5I1l+8KYFXG7LNEA7DyaFvuvSCmedUf6Y6JI7LJqiu8q5dEivP2nDdFH31V4" crossorigin="anonymous"></script> - <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/mathtex-script-type.min.js" integrity="sha384-jiBVvJ8NGGj5n7kJaiWwWp9AjC+Yh8rhZY3GtAX8yU28azcLgoRo4oukO87g7zDT" crossorigin="anonymous"></script> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous"> + <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script> + <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/mathtex-script-type.min.js" integrity="sha384-jiBVvJ8NGGj5n7kJaiWwWp9AjC+Yh8rhZY3GtAX8yU28azcLgoRo4oukO87g7zDT" crossorigin="anonymous"></script> </head> <body> <script type="math/tex">x+\sqrt{1-x^2}</script> @@ -35,4 +35,4 @@ Then, in the body, we use a `math/tex` script to typeset the equation `x+\sqrt{1 ECMAScript module is also available: ```html -<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/mathtex-script-type.mjs" integrity="sha384-4EJvC5tvqq9XJxXvdD4JutBokuFw/dCe2AB4gZ9sRpwFFXECpL3qT43tmE0PkpVg" crossorigin="anonymous"></script> +<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/mathtex-script-type.mjs" integrity="sha384-4EJvC5tvqq9XJxXvdD4JutBokuFw/dCe2AB4gZ9sRpwFFXECpL3qT43tmE0PkpVg" crossorigin="anonymous"></script> diff --git a/contrib/mhchem/README.md b/contrib/mhchem/README.md index a53e873547..aae76037bb 100644 --- a/contrib/mhchem/README.md +++ b/contrib/mhchem/README.md @@ -7,7 +7,7 @@ This extension adds to KaTeX the `\ce` and `\pu` functions from the [mhchem](htt This extension isn't part of core KaTeX, so the script should be separately included. Write the following line into the HTML page's `<head>`. Place it *after* the line that calls `katex.js`, and if you make use of the [auto-render](https://katex.org/docs/autorender.html) extension, place it *before* the line that calls `auto-render.js`. ```html -<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/mhchem.min.js" integrity="sha384-RTN08a0AXIioPBcVosEqPUfKK+rPp+h1x/izR7xMkdMyuwkcZCWdxO+RSwIFtJXN" crossorigin="anonymous"></script> +<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/mhchem.min.js" integrity="sha384-RTN08a0AXIioPBcVosEqPUfKK+rPp+h1x/izR7xMkdMyuwkcZCWdxO+RSwIFtJXN" crossorigin="anonymous"></script> ``` If you remove the `defer` attribute from this tag, then you must also remove the `defer` attribute from the `<script src="https://../katex.min.js">` tag. diff --git a/docs/autorender.md b/docs/autorender.md index c31e615a44..232020ef49 100644 --- a/docs/autorender.md +++ b/docs/autorender.md @@ -12,9 +12,9 @@ This extension isn't part of KaTeX proper, so the script needs to be included using a CDN: ```html -<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-ZPe7yZ91iWxYumsBEOn7ieg8q/o+qh/hQpSaPow8T6BwALcXSCS6C6fSRPIAnTQs" crossorigin="anonymous"> -<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-ljao5I1l+8KYFXG7LNEA7DyaFvuvSCmedUf6Y6JI7LJqiu8q5dEivP2nDdFH31V4" crossorigin="anonymous"></script> -<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous" +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous"> +<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script> +<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script> ``` @@ -31,9 +31,9 @@ want to use a `defer` or `onload` attribute. For example: ```html -<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-ZPe7yZ91iWxYumsBEOn7ieg8q/o+qh/hQpSaPow8T6BwALcXSCS6C6fSRPIAnTQs" crossorigin="anonymous"> -<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-ljao5I1l+8KYFXG7LNEA7DyaFvuvSCmedUf6Y6JI7LJqiu8q5dEivP2nDdFH31V4" crossorigin="anonymous"></script> -<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous"></script> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous"> +<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script> +<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous"></script> <script> document.addEventListener("DOMContentLoaded", function() { renderMathInElement(document.body, { @@ -54,9 +54,9 @@ For example: ECMAScript module is also available: ```html -<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-ZPe7yZ91iWxYumsBEOn7ieg8q/o+qh/hQpSaPow8T6BwALcXSCS6C6fSRPIAnTQs" crossorigin="anonymous"> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous"> <script type="module"> - import renderMathInElement from "https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.mjs"; + import renderMathInElement from "https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.mjs"; renderMathInElement(document.body); </script> ``` diff --git a/docs/browser.md b/docs/browser.md index 4be8a7cbd2..5e87f0f1f6 100644 --- a/docs/browser.md +++ b/docs/browser.md @@ -11,13 +11,13 @@ title: Browser <!-- KaTeX requires the use of the HTML5 doctype. Without it, KaTeX may not render properly --> <html> <head> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-ZPe7yZ91iWxYumsBEOn7ieg8q/o+qh/hQpSaPow8T6BwALcXSCS6C6fSRPIAnTQs" crossorigin="anonymous"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous"> <!-- The loading of KaTeX is deferred to speed up page rendering --> - <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-ljao5I1l+8KYFXG7LNEA7DyaFvuvSCmedUf6Y6JI7LJqiu8q5dEivP2nDdFH31V4" crossorigin="anonymous"></script> + <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script> <!-- To automatically render math in text elements, include the auto-render extension: --> - <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous" + <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script> </head> ... @@ -29,15 +29,15 @@ If you include the `katex.js` directly, the `katex` object will be available as a global variable. ```html -<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.css" integrity="sha384-jJFDzw6Rh7jzIumRp31oSKurBXlvFPBHbzi9KbVukp6ZNECGD4UKyhO5tJaJ1uHA" crossorigin="anonymous"> -<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.js" integrity="sha384-Xfbu6aqAjKdi+UhRmQROxVxvx/iT6irqZqIPGKTbtyjUVRkdg3aEiaxuMdfVqNyu" crossorigin="anonymous"></script> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.css" integrity="sha384-1IGr2Yb8xuHjwTG+WoGjj2+I/a/N6z0gDD5YIGCQxywPROOKc3+orbn/R7arWQxD" crossorigin="anonymous"> +<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.js" integrity="sha384-I2b1Pcl48X93GxEkGkaMo1hrd6n+IX8H2wgSsMimGbkZoGTve/87h1FjaDNvlpQi" crossorigin="anonymous"></script> ``` KaTeX also provides minified versions: ```html -<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-ZPe7yZ91iWxYumsBEOn7ieg8q/o+qh/hQpSaPow8T6BwALcXSCS6C6fSRPIAnTQs" crossorigin="anonymous"> -<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-ljao5I1l+8KYFXG7LNEA7DyaFvuvSCmedUf6Y6JI7LJqiu8q5dEivP2nDdFH31V4" crossorigin="anonymous"></script> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous"> +<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script> ``` The examples above load the script [deferred using the `defer` attribute](https://developer.mozilla.org/en/HTML/Element/script#Attributes) @@ -81,22 +81,22 @@ for more detail. ```html <script type="text/javascript"> require([ - "https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.js", + "https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.js", ], katex => { ... }); </script> -<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.css" integrity="sha384-jJFDzw6Rh7jzIumRp31oSKurBXlvFPBHbzi9KbVukp6ZNECGD4UKyhO5tJaJ1uHA" crossorigin="anonymous"> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.css" integrity="sha384-1IGr2Yb8xuHjwTG+WoGjj2+I/a/N6z0gDD5YIGCQxywPROOKc3+orbn/R7arWQxD" crossorigin="anonymous"> ``` ### ECMAScript module ```html <script type="module" type="text/javascript"> - import katex from 'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.mjs'; + import katex from 'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.mjs'; ... </script> -<script nomodule defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.js" integrity="sha384-Xfbu6aqAjKdi+UhRmQROxVxvx/iT6irqZqIPGKTbtyjUVRkdg3aEiaxuMdfVqNyu" crossorigin="anonymous"></script> -<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.css" integrity="sha384-jJFDzw6Rh7jzIumRp31oSKurBXlvFPBHbzi9KbVukp6ZNECGD4UKyhO5tJaJ1uHA" crossorigin="anonymous"> +<script nomodule defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.js" integrity="sha384-I2b1Pcl48X93GxEkGkaMo1hrd6n+IX8H2wgSsMimGbkZoGTve/87h1FjaDNvlpQi" crossorigin="anonymous"></script> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.css" integrity="sha384-1IGr2Yb8xuHjwTG+WoGjj2+I/a/N6z0gDD5YIGCQxywPROOKc3+orbn/R7arWQxD" crossorigin="anonymous"> ``` > Use [`nomodule` attribute](https://developer.mozilla.org/en/HTML/Element/script#Attributes) diff --git a/docs/support_table.md b/docs/support_table.md index 76ba71b4a9..29562362f5 100644 --- a/docs/support_table.md +++ b/docs/support_table.md @@ -6,7 +6,7 @@ This is a list of TeX functions, sorted alphabetically. This list includes funct If you know the shape of a character, but not its name, [Detexify](https://detexify.kirelabs.org/classify.html) can help. -<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-ZPe7yZ91iWxYumsBEOn7ieg8q/o+qh/hQpSaPow8T6BwALcXSCS6C6fSRPIAnTQs" crossorigin="anonymous"> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous"> <style> table tr, table td { diff --git a/docs/supported.md b/docs/supported.md index 8b77cbb146..a936a28a3c 100644 --- a/docs/supported.md +++ b/docs/supported.md @@ -6,7 +6,7 @@ This is a list of TeX functions supported by KaTeX. It is sorted into logical gr There is a similar [Support Table](support_table.md), sorted alphabetically, that lists both supported and un-supported functions. -<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-ZPe7yZ91iWxYumsBEOn7ieg8q/o+qh/hQpSaPow8T6BwALcXSCS6C6fSRPIAnTQs" crossorigin="anonymous"> +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous"> <style> p {overflow-wrap: break-word;} table tr, diff --git a/package.json b/package.json index b2ac86d6fb..09e42573b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "katex", - "version": "0.15.6", + "version": "0.16.0", "description": "Fast math typesetting for the web.", "main": "dist/katex.js", "exports": {
fuels-rs
https://github.com/FuelLabs/fuels-rs
a6f623115666447ccfd1753b9a914e269c22b900
Halil Beglerović
2022-06-21 00:40:50
feat: return error on empty function or argument name (#404)
* feat: return error on empty function or argument name * change where the error is returned * add result to test * add changes proposed by Ahmed * update error assertion
feat: return error on empty function or argument name (#404) * feat: return error on empty function or argument name * change where the error is returned * add result to test * add changes proposed by Ahmed * update error assertion Co-authored-by: John Adler <[email protected]>
diff --git a/packages/fuels-core/src/code_gen/abigen.rs b/packages/fuels-core/src/code_gen/abigen.rs index 245576765f..a949dd0010 100644 --- a/packages/fuels-core/src/code_gen/abigen.rs +++ b/packages/fuels-core/src/code_gen/abigen.rs @@ -352,7 +352,7 @@ mod tests { use super::*; #[test] - fn generates_bindings() { + fn generates_bindings() -> Result<(), Error> { let contract = r#" [ { @@ -374,11 +374,12 @@ mod tests { ] "#; - let _bindings = Abigen::new("test", contract).unwrap().generate().unwrap(); + let _bindings = Abigen::new("test", contract)?.generate()?; + Ok(()) } #[test] - fn generates_bindings_two_args() { + fn generates_bindings_two_args() -> Result<(), Error> { let contract = r#" [ { @@ -407,11 +408,12 @@ mod tests { // We are expecting a MissingData error because at the moment, the // ABIgen expects exactly 4 arguments (see `expand_function_arguments`), here // there are 5 - let _bindings = Abigen::new("test", contract).unwrap().generate().unwrap(); + let _bindings = Abigen::new("test", contract)?.generate()?; + Ok(()) } #[test] - fn custom_struct() { + fn custom_struct() -> Result<(), Error> { let contract = r#" [ { @@ -438,17 +440,18 @@ mod tests { ] "#; - let contract = Abigen::new("custom", contract).unwrap(); + let contract = Abigen::new("custom", contract)?; assert_eq!(1, contract.custom_structs.len()); assert!(contract.custom_structs.contains_key("MyStruct")); - let _bindings = contract.generate().unwrap(); + let _bindings = contract.generate()?; + Ok(()) } #[test] - fn multiple_custom_types() { + fn multiple_custom_types() -> Result<(), Error> { let contract = r#" [ { @@ -513,7 +516,7 @@ mod tests { ] "#; - let contract = Abigen::new("custom", contract).unwrap(); + let contract = Abigen::new("custom", contract)?; assert_eq!(5, contract.custom_structs.len()); @@ -528,10 +531,11 @@ mod tests { for name in expected_custom_struct_names { assert!(contract.custom_structs.contains_key(name)); } + Ok(()) } #[test] - fn single_nested_struct() { + fn single_nested_struct() -> Result<(), Error> { let contract = r#" [ { @@ -564,18 +568,19 @@ mod tests { ] "#; - let contract = Abigen::new("custom", contract).unwrap(); + let contract = Abigen::new("custom", contract)?; assert_eq!(2, contract.custom_structs.len()); assert!(contract.custom_structs.contains_key("MyNestedStruct")); assert!(contract.custom_structs.contains_key("InnerStruct")); - let _bindings = contract.generate().unwrap(); + let _bindings = contract.generate()?; + Ok(()) } #[test] - fn custom_enum() { + fn custom_enum() -> Result<(), Error> { let contract = r#" [ { @@ -602,17 +607,19 @@ mod tests { ] "#; - let contract = Abigen::new("custom", contract).unwrap(); + let contract = Abigen::new("custom", contract)?; assert_eq!(1, contract.custom_enums.len()); assert_eq!(0, contract.custom_structs.len()); assert!(contract.custom_enums.contains_key("MyEnum")); - let _bindings = contract.generate().unwrap(); + let _bindings = contract.generate()?; + Ok(()) } + #[test] - fn output_types() { + fn output_types() -> Result<(), Error> { let contract = r#" [ { @@ -662,129 +669,133 @@ mod tests { ] "#; - let contract = Abigen::new("custom", contract).unwrap(); - let _bindings = contract.generate().unwrap(); + let contract = Abigen::new("custom", contract)?; + let _bindings = contract.generate()?; + Ok(()) } + #[test] - fn test_abigen_struct_inside_enum() { + fn test_abigen_struct_inside_enum() -> Result<(), Error> { let contract = r#" -[ - { - "type": "function", - "inputs": [ - { - "name": "b", - "type": "enum Bar", - "components": [ + [ { - "name": "waiter", - "type": "struct Waiter", - "components": [ - { - "name": "name", - "type": "u8", - "components": null - }, + "type": "function", + "inputs": [ { - "name": "male", - "type": "bool", - "components": null + "name": "b", + "type": "enum Bar", + "components": [ + { + "name": "waiter", + "type": "struct Waiter", + "components": [ + { + "name": "name", + "type": "u8", + "components": null + }, + { + "name": "male", + "type": "bool", + "components": null + } + ] + }, + { + "name": "table", + "type": "u32", + "components": null + } + ] } - ] - }, - { - "name": "table", - "type": "u32", - "components": null + ], + "name": "struct_inside_enum", + "outputs": [] } ] - } - ], - "name": "struct_inside_enum", - "outputs": [] - } -] "#; - let contract = Abigen::new("custom", contract).unwrap(); + let contract = Abigen::new("custom", contract)?; assert_eq!(contract.custom_structs.len(), 1); assert_eq!(contract.custom_enums.len(), 1); + Ok(()) } #[test] - fn test_get_custom_types_nested_structs_and_enums() { + fn test_get_custom_types_nested_structs_and_enums() -> Result<(), Error> { let contract = r#" -[ - { - "type": "function", - "inputs": [ - { - "name": "c", - "type": "struct Cocktail", - "components": [ + [ { - "name": "shaker", - "type": "enum Shaker", - "components": [ + "type": "function", + "inputs": [ { - "name": "Cosmopolitan", - "type": "struct Recipe", + "name": "c", + "type": "struct Cocktail", "components": [ + { + "name": "shaker", + "type": "enum Shaker", + "components": [ { - "name": "vodka", - "type": "enum PolishAlcohol", + "name": "Cosmopolitan", + "type": "struct Recipe", "components": [ { - "name": "potatoes", - "type": "u64", - "components": null + "name": "vodka", + "type": "enum PolishAlcohol", + "components": [ + { + "name": "potatoes", + "type": "u64", + "components": null + }, + { + "name": "alcohol", + "type": "u64", + "components": null + } + ] }, { - "name": "alcohol", + "name": "cramberry", "type": "u64", "components": null } ] }, { - "name": "cramberry", - "type": "u64", + "name": "Mojito", + "type": "u32", "components": null } + ] + }, + { + "name": "glass", + "type": "u64", + "components": null + } ] - }, - { - "name": "Mojito", - "type": "u32", - "components": null } - ] - }, - { - "name": "glass", - "type": "u64", - "components": null + ], + "name": "give_and_return_enum_inside_struct", + "outputs": [] } ] - } - ], - "name": "give_and_return_enum_inside_struct", - "outputs": [] - } -] "#; - let contract = Abigen::new("custom", contract).unwrap(); + let contract = Abigen::new("custom", contract)?; assert!(contract.custom_structs.contains_key("Cocktail")); assert!(contract.custom_structs.contains_key("Recipe")); assert_eq!(contract.custom_structs.len(), 2); assert!(contract.custom_enums.contains_key("Shaker")); assert!(contract.custom_enums.contains_key("PolishAlcohol")); assert_eq!(contract.custom_enums.len(), 2); + Ok(()) } #[test] - fn struct_in_array() { + fn struct_in_array() -> Result<(), Error> { let contract = r#" [ { @@ -814,17 +825,18 @@ mod tests { ] "#; - let contract = Abigen::new("custom", contract).unwrap(); + let contract = Abigen::new("custom", contract)?; assert_eq!(1, contract.custom_structs.len()); assert!(contract.custom_structs.contains_key("Person")); - let _bindings = contract.generate().unwrap(); + let _bindings = contract.generate()?; + Ok(()) } #[test] - fn enum_in_array() { + fn enum_in_array() -> Result<(), Error> { let contract = r#" [ { @@ -842,21 +854,21 @@ mod tests { "name":"A", "type":"()", "components":[ - + ] }, { "name":"B", "type":"()", "components":[ - + ] }, { "name":"C", "type":"()", "components":[ - + ] } ] @@ -870,17 +882,18 @@ mod tests { ] "#; - let contract = Abigen::new("custom", contract).unwrap(); + let contract = Abigen::new("custom", contract)?; assert_eq!(1, contract.custom_enums.len()); assert!(contract.custom_enums.contains_key("State")); - let _bindings = contract.generate().unwrap(); + let _bindings = contract.generate()?; + Ok(()) } #[test] - fn struct_in_tuple() { + fn struct_in_tuple() -> Result<(), Error> { let contract = r#" [ { @@ -915,17 +928,18 @@ mod tests { ] "#; - let contract = Abigen::new("custom", contract).unwrap(); + let contract = Abigen::new("custom", contract)?; assert_eq!(1, contract.custom_structs.len()); assert!(contract.custom_structs.contains_key("Person")); - let _bindings = contract.generate().unwrap(); + let _bindings = contract.generate()?; + Ok(()) } #[test] - fn enum_in_tuple() { + fn enum_in_tuple() -> Result<(), Error> { let contract = r#" [ { @@ -948,21 +962,21 @@ mod tests { "name":"A", "type":"()", "components":[ - + ] }, { "name":"B", "type":"()", "components":[ - + ] }, { "name":"C", "type":"()", "components":[ - + ] } ] @@ -976,12 +990,71 @@ mod tests { ] "#; - let contract = Abigen::new("custom", contract).unwrap(); + let contract = Abigen::new("custom", contract)?; assert_eq!(1, contract.custom_enums.len()); assert!(contract.custom_enums.contains_key("State")); - let _bindings = contract.generate().unwrap(); + let _bindings = contract.generate()?; + Ok(()) + } + + #[test] + fn error_on_empty_function_name() -> Result<(), Error> { + let contract = r#" + [ + { + "type":"contract", + "inputs":[ + { + "name":"arg1", + "type":"u32" + } + ], + "name":"", + "outputs":[] + } + ] + "#; + let result_error = Abigen::new("test", contract)? + .generate() + .err() + .expect("Expected an error because the function name is empty"); + + assert_eq!( + result_error.to_string(), + "Invalid data: Function name can not be empty" + ); + Ok(()) + } + + #[test] + fn error_on_empty_argument_names() -> Result<(), Error> { + let contract = r#" + [ + { + "type":"contract", + "inputs":[ + { + "name":"", + "type":"u32" + } + ], + "name":"unused", + "outputs":[] + } + ] + "#; + let result_error = Abigen::new("test", contract)? + .generate() + .err() + .expect("Expected an error because the argument name is empty"); + + assert_eq!( + result_error.to_string(), + "Invalid data: Function arguments can not have empty names" + ); + Ok(()) } } diff --git a/packages/fuels-core/src/code_gen/custom_types_gen.rs b/packages/fuels-core/src/code_gen/custom_types_gen.rs index 0ed8c4a3b5..953421d642 100644 --- a/packages/fuels-core/src/code_gen/custom_types_gen.rs +++ b/packages/fuels-core/src/code_gen/custom_types_gen.rs @@ -379,6 +379,7 @@ mod tests { let p: Property = Default::default(); let result = extract_custom_type_name_from_abi_property(&p, Some(CustomType::Enum)); assert!(matches!(result, Err(Error::MissingData(_)))); + let p = Property { name: String::from("foo"), type_field: String::from("nowhitespacehere"), @@ -397,6 +398,7 @@ mod tests { }; let result = extract_custom_type_name_from_abi_property(&p, Some(CustomType::Struct)); assert!(matches!(result, Err(Error::InvalidType(_)))); + let p = Property { name: String::from("foo"), type_field: String::from("struct somethingelse"), @@ -407,25 +409,27 @@ mod tests { } #[test] - fn test_extract_custom_type_name_from_abi_property() { + fn test_extract_custom_type_name_from_abi_property() -> Result<(), Error> { let p = Property { name: String::from("foo"), type_field: String::from("struct bar"), components: None, }; let result = extract_custom_type_name_from_abi_property(&p, Some(CustomType::Struct)); - assert_eq!(result.unwrap(), "bar"); + assert_eq!(result?, "bar"); + let p = Property { name: String::from("foo"), type_field: String::from("enum bar"), components: None, }; let result = extract_custom_type_name_from_abi_property(&p, Some(CustomType::Enum)); - assert_eq!(result.unwrap(), "bar"); + assert_eq!(result?, "bar"); + Ok(()) } #[test] - fn test_expand_custom_enum() { + fn test_expand_custom_enum() -> Result<(), Error> { let p = Property { name: String::from("unused"), type_field: String::from("unused"), @@ -442,19 +446,19 @@ mod tests { }, ]), }; - let result = expand_custom_enum("MatchaTea", &p); + let actual = expand_custom_enum("MatchaTea", &p)?.to_string(); let expected = TokenStream::from_str( r#" # [derive (Clone , Debug , Eq , PartialEq)] pub enum MatchaTea { LongIsland (u64) , MoscowMule (bool) } impl Parameterize for MatchaTea { fn param_types () -> Vec < ParamType > { let mut types = Vec :: new () ; types . push (ParamType :: U64) ; types . push (ParamType :: Bool) ; types } } impl Tokenizable for MatchaTea { fn into_token (self) -> Token { let (dis , tok) = match self { MatchaTea :: LongIsland (value) => (0u8 , Token :: U64 (value)) , MatchaTea :: MoscowMule (value) => (1u8 , Token :: Bool (value)) , } ; let variants = EnumVariants :: new (Self :: param_types ()) . unwrap () ; let selector = (dis , tok , variants) ; Token :: Enum (Box :: new (selector)) } fn from_token (token : Token) -> Result < Self , InstantiationError > { if let Token :: Enum (enum_selector) = token { match * enum_selector { (0u8 , token , _) => Ok (MatchaTea :: LongIsland (< u64 > :: from_token (token) ?)) , (1u8 , token , _) => Ok (MatchaTea :: MoscowMule (< bool > :: from_token (token) ?)) , (_ , _ , _) => Err (InstantiationError (format ! ("Could not construct '{}'. Failed to match with discriminant selector {:?}" , "MatchaTea" , enum_selector))) } } else { Err (InstantiationError (format ! ("Could not construct '{}'. Expected a token of type Token::Enum, got {:?}" , "MatchaTea" , token))) } } } "#, - ); - let expected = expected.unwrap().to_string(); - let actual = result.unwrap().to_string(); + )?.to_string(); + assert_eq!(actual, expected); + Ok(()) } #[test] - fn test_expand_struct_inside_enum() { + fn test_expand_struct_inside_enum() -> Result<(), Error> { let inner_struct = Property { name: String::from("Infrastructure"), type_field: String::from("struct Building"), @@ -484,20 +488,19 @@ mod tests { type_field: String::from("enum CityComponent"), components: Some(enum_components), }; - let actual = expand_custom_enum("Amsterdam", &p).unwrap().to_string(); - + let actual = expand_custom_enum("Amsterdam", &p)?.to_string(); let expected = TokenStream::from_str( r#" # [derive (Clone , Debug , Eq , PartialEq)] pub enum Amsterdam { Infrastructure (Building) , Service (u32) } impl Parameterize for Amsterdam { fn param_types () -> Vec < ParamType > { let mut types = Vec :: new () ; types . push (ParamType :: Struct (Building :: param_types ())) ; types . push (ParamType :: U32) ; types } } impl Tokenizable for Amsterdam { fn into_token (self) -> Token { let (dis , tok) = match self { Amsterdam :: Infrastructure (inner_struct) => (0u8 , inner_struct . into_token ()) , Amsterdam :: Service (value) => (1u8 , Token :: U32 (value)) , } ; let variants = EnumVariants :: new (Self :: param_types ()) . unwrap () ; let selector = (dis , tok , variants) ; Token :: Enum (Box :: new (selector)) } fn from_token (token : Token) -> Result < Self , InstantiationError > { if let Token :: Enum (enum_selector) = token { match * enum_selector { (0u8 , token , _) => { let variant_content = < Building > :: from_token (token) ? ; Ok (Amsterdam :: Infrastructure (variant_content)) } (1u8 , token , _) => Ok (Amsterdam :: Service (< u32 > :: from_token (token) ?)) , (_ , _ , _) => Err (InstantiationError (format ! ("Could not construct '{}'. Failed to match with discriminant selector {:?}" , "Amsterdam" , enum_selector))) } } else { Err (InstantiationError (format ! ("Could not construct '{}'. Expected a token of type Token::Enum, got {:?}" , "Amsterdam" , token))) } } } "#, - ) - .unwrap().to_string(); + )?.to_string(); assert_eq!(actual, expected); + Ok(()) } #[test] - fn test_expand_custom_enum_with_enum() { + fn test_expand_custom_enum_with_enum() -> Result<(), Error> { let p = Property { name: String::from("unused"), type_field: String::from("unused"), @@ -515,20 +518,19 @@ mod tests { }]), }]), }; - let actual = expand_custom_enum("EnumLevel3", &p).unwrap().to_string(); - + let actual = expand_custom_enum("EnumLevel3", &p)?.to_string(); let expected = TokenStream::from_str( r#" # [derive (Clone , Debug , Eq , PartialEq)] pub enum EnumLevel3 { El2 (EnumLevel2) } impl Parameterize for EnumLevel3 { fn param_types () -> Vec < ParamType > { let mut types = Vec :: new () ; types . push (ParamType :: Enum (EnumVariants :: new (EnumLevel2 :: param_types ()) . unwrap ())) ; types } } impl Tokenizable for EnumLevel3 { fn into_token (self) -> Token { let (dis , tok) = match self { EnumLevel3 :: El2 (inner_enum) => (0u8 , inner_enum . into_token ()) , } ; let variants = EnumVariants :: new (Self :: param_types ()) . unwrap () ; let selector = (dis , tok , variants) ; Token :: Enum (Box :: new (selector)) } fn from_token (token : Token) -> Result < Self , InstantiationError > { if let Token :: Enum (enum_selector) = token { match * enum_selector { (0u8 , token , _) => { let variant_content = < EnumLevel2 > :: from_token (token) ? ; Ok (EnumLevel3 :: El2 (variant_content)) } (_ , _ , _) => Err (InstantiationError (format ! ("Could not construct '{}'. Failed to match with discriminant selector {:?}" , "EnumLevel3" , enum_selector))) } } else { Err (InstantiationError (format ! ("Could not construct '{}'. Expected a token of type Token::Enum, got {:?}" , "EnumLevel3" , token))) } } } "#, - ) - .unwrap().to_string(); + )?.to_string(); - assert_eq!(actual, expected) + assert_eq!(actual, expected); + Ok(()) } #[test] - fn test_expand_custom_struct() { + fn test_expand_custom_struct() -> Result<(), Error> { let p = Property { name: String::from("unused"), type_field: String::from("struct Cocktail"), @@ -550,19 +552,19 @@ mod tests { }, ]), }; + let actual = expand_custom_struct(&p)?.to_string(); let expected = TokenStream::from_str( r#" # [derive (Clone , Debug , Eq , PartialEq)] pub struct Cocktail { pub long_island : bool , pub cosmopolitan : u64 , pub mojito : u32 } impl Parameterize for Cocktail { fn param_types () -> Vec < ParamType > { let mut types = Vec :: new () ; types . push (ParamType :: Bool) ; types . push (ParamType :: U64) ; types . push (ParamType :: U32) ; types } } impl Tokenizable for Cocktail { fn into_token (self) -> Token { let mut tokens = Vec :: new () ; tokens . push (Token :: Bool (self . long_island)) ; tokens . push (Token :: U64 (self . cosmopolitan)) ; tokens . push (Token :: U32 (self . mojito)) ; Token :: Struct (tokens) } fn from_token (token : Token) -> Result < Self , InstantiationError > { match token { Token :: Struct (tokens) => { let mut tokens_iter = tokens . into_iter () ; let mut next_token = move || { tokens_iter . next () . ok_or_else (|| { InstantiationError (format ! ("Ran out of tokens before '{}' has finished construction!" , "Cocktail")) }) } ; Ok (Self { long_island : < bool > :: from_token (next_token () ?) ? , cosmopolitan : < u64 > :: from_token (next_token () ?) ? , mojito : < u32 > :: from_token (next_token () ?) ? }) } , other => Err (InstantiationError (format ! ("Error while constructing '{}'. Expected token of type Token::Struct, got {:?}" , "Cocktail" , other))) , } } } "#, - ).unwrap().to_string(); - - let actual = expand_custom_struct(&p).unwrap().to_string(); + )?.to_string(); assert_eq!(actual, expected); + Ok(()) } #[test] - fn test_expand_custom_struct_with_struct() { + fn test_expand_custom_struct_with_struct() -> Result<(), Error> { let p = Property { name: String::from("unused"), type_field: String::from("struct Cocktail"), @@ -590,14 +592,14 @@ mod tests { }, ]), }; + let actual = expand_custom_struct(&p)?.to_string(); let expected = TokenStream::from_str( r#" # [derive (Clone , Debug , Eq , PartialEq)] pub struct Cocktail { pub long_island : Shaker , pub mojito : u32 } impl Parameterize for Cocktail { fn param_types () -> Vec < ParamType > { let mut types = Vec :: new () ; types . push (ParamType :: Struct (Shaker :: param_types ())) ; types . push (ParamType :: U32) ; types } } impl Tokenizable for Cocktail { fn into_token (self) -> Token { let mut tokens = Vec :: new () ; tokens . push (self . long_island . into_token ()) ; tokens . push (Token :: U32 (self . mojito)) ; Token :: Struct (tokens) } fn from_token (token : Token) -> Result < Self , InstantiationError > { match token { Token :: Struct (tokens) => { let mut tokens_iter = tokens . into_iter () ; let mut next_token = move || { tokens_iter . next () . ok_or_else (|| { InstantiationError (format ! ("Ran out of tokens before '{}' has finished construction!" , "Cocktail")) }) } ; Ok (Self { long_island : Shaker :: from_token (next_token () ?) ? , mojito : < u32 > :: from_token (next_token () ?) ? }) } , other => Err (InstantiationError (format ! ("Error while constructing '{}'. Expected token of type Token::Struct, got {:?}" , "Cocktail" , other))) , } } } "#, - ).unwrap().to_string(); - - let actual = expand_custom_struct(&p).unwrap().to_string(); + )?.to_string(); assert_eq!(actual, expected); + Ok(()) } } diff --git a/packages/fuels-core/src/code_gen/functions_gen.rs b/packages/fuels-core/src/code_gen/functions_gen.rs index a338243cdc..a1840bd7fd 100644 --- a/packages/fuels-core/src/code_gen/functions_gen.rs +++ b/packages/fuels-core/src/code_gen/functions_gen.rs @@ -28,6 +28,10 @@ pub fn expand_function( custom_enums: &HashMap<String, Property>, custom_structs: &HashMap<String, Property>, ) -> Result<TokenStream, Error> { + if function.name.is_empty() { + return Err(Error::InvalidData("Function name can not be empty".into())); + } + let name = safe_ident(&function.name); let fn_signature = abi_parser.build_fn_selector(&function.name, &function.inputs)?; @@ -166,14 +170,15 @@ fn expand_function_arguments( let mut args = vec![]; let mut call_args = vec![]; - for (i, param) in fun.inputs.iter().enumerate() { + for param in &fun.inputs { // For each [`Property`] in a function input we expand: // 1. The name of the argument; // 2. The type of the argument; // Note that _any_ significant change in the way the JSON ABI is generated // could affect this function expansion. // TokenStream representing the name of the argument - let name = expand_input_name(i, &param.name); + + let name = expand_input_name(&param.name)?; let custom_property = match param.is_custom_type() { false => None, @@ -281,14 +286,14 @@ fn build_expanded_tuple_params(tuple_param: &Property) -> Result<String, Error> /// /// Note that this expands the parameter name with `safe_ident`, meaning that /// identifiers that are reserved keywords get `_` appended to them. -pub fn expand_input_name(index: usize, name: &str) -> TokenStream { - let name_str = match name { - "" => format!("p{}", index), - n => n.to_snake_case(), - }; - let name = safe_ident(&name_str); - - quote! { #name } +pub fn expand_input_name(name: &str) -> Result<TokenStream, Error> { + if name.is_empty() { + return Err(Error::InvalidData( + "Function arguments can not have empty names".into(), + )); + } + let name = safe_ident(&name.to_snake_case()); + Ok(quote! { #name }) } // Expands the type of an argument being passed in a function declaration. @@ -335,7 +340,7 @@ mod tests { use std::str::FromStr; #[test] - fn test_expand_function_simple() { + fn test_expand_function_simple() -> Result<(), Error> { let mut the_function = Function { type_field: "unused".to_string(), inputs: vec![], @@ -355,25 +360,28 @@ mod tests { ); let expected = TokenStream::from_str( r#" -#[doc = "Calls the contract's `HelloWorld` (0x0000000097d4de45) function"] -pub fn HelloWorld(&self, bimbam: bool) -> ContractCallHandler<()> { - Contract::method_hash( - &self.wallet.get_provider().expect("Provider not set up"), - self.contract_id, - &self.wallet, - [0, 0, 0, 0, 151, 212, 222, 69], - None, - &[bimbam.into_token() ,] - ) - .expect("method not found (this should never happen)") -} - "#, + #[doc = "Calls the contract's `HelloWorld` (0x0000000097d4de45) function"] + pub fn HelloWorld(&self, bimbam: bool) -> ContractCallHandler<()> { + Contract::method_hash( + &self.wallet.get_provider().expect("Provider not set up"), + self.contract_id, + &self.wallet, + [0, 0, 0, 0, 151, 212, 222, 69], + None, + &[bimbam.into_token() ,] + ) + .expect("method not found (this should never happen)") + } + "#, ); - let expected = expected.unwrap().to_string(); - assert_eq!(result.unwrap().to_string(), expected); + let expected = expected?.to_string(); + + assert_eq!(result?.to_string(), expected); + Ok(()) } + #[test] - fn test_expand_function_complex() { + fn test_expand_function_complex() -> Result<(), Error> { let mut the_function = Function { type_field: "function".to_string(), name: "hello_world".to_string(), @@ -442,25 +450,27 @@ pub fn HelloWorld(&self, bimbam: bool) -> ContractCallHandler<()> { // Some more editing was required because it is not rustfmt-compatible (adding/removing parentheses or commas) let expected = TokenStream::from_str( r#" -#[doc = "Calls the contract's `hello_world` (0x0000000076b25a24) function"] -pub fn hello_world( - &self, - the_only_allowed_input: SomeWeirdFrenchCuisine -) -> ContractCallHandler<EntropyCirclesEnum> { - Contract::method_hash( - &self.wallet.get_provider().expect("Provider not set up"), - self.contract_id, - &self.wallet, - [0, 0, 0, 0, 118, 178, 90, 36], - Some(ParamType::Enum(EnumVariants::new(vec![ParamType::Bool, ParamType::U64]).unwrap())), - &[the_only_allowed_input.into_token() ,] - ) - .expect("method not found (this should never happen)") -} - "#, + #[doc = "Calls the contract's `hello_world` (0x0000000076b25a24) function"] + pub fn hello_world( + &self, + the_only_allowed_input: SomeWeirdFrenchCuisine + ) -> ContractCallHandler<EntropyCirclesEnum> { + Contract::method_hash( + &self.wallet.get_provider().expect("Provider not set up"), + self.contract_id, + &self.wallet, + [0, 0, 0, 0, 118, 178, 90, 36], + Some(ParamType::Enum(EnumVariants::new(vec![ParamType::Bool, ParamType::U64]).unwrap())), + &[the_only_allowed_input.into_token() ,] + ) + .expect("method not found (this should never happen)") + } + "#, ); - let expected = expected.unwrap().to_string(); - assert_eq!(result.unwrap().to_string(), expected); + let expected = expected?.to_string(); + + assert_eq!(result?.to_string(), expected); + Ok(()) } // --- expand_selector --- @@ -468,15 +478,16 @@ pub fn hello_world( fn test_expand_selector() { let result = expand_selector(Selector::default()); assert_eq!(result.to_string(), "[0 , 0 , 0 , 0 , 0 , 0 , 0 , 0]"); + let result = expand_selector([1, 2, 3, 4, 5, 6, 7, 8]); assert_eq!(result.to_string(), "[1 , 2 , 3 , 4 , 5 , 6 , 7 , 8]"); } // --- expand_fn_outputs --- #[test] - fn test_expand_fn_outputs() { + fn test_expand_fn_outputs() -> Result<(), Error> { let result = expand_fn_outputs(&[]); - assert_eq!(result.unwrap().to_string(), "()"); + assert_eq!(result?.to_string(), "()"); // Primitive type let result = expand_fn_outputs(&[Property { @@ -484,7 +495,7 @@ pub fn hello_world( type_field: "bool".to_string(), components: None, }]); - assert_eq!(result.unwrap().to_string(), "bool"); + assert_eq!(result?.to_string(), "bool"); // Struct type let result = expand_fn_outputs(&[Property { @@ -503,7 +514,7 @@ pub fn hello_world( }, ]), }]); - assert_eq!(result.unwrap().to_string(), "streaming_services"); + assert_eq!(result?.to_string(), "streaming_services"); // Enum type let result = expand_fn_outputs(&[Property { @@ -522,11 +533,13 @@ pub fn hello_world( }, ]), }]); - assert_eq!(result.unwrap().to_string(), "StreamingServices"); + assert_eq!(result?.to_string(), "StreamingServices"); + Ok(()) } + // --- expand_function_argument --- #[test] - fn test_expand_function_arguments() { + fn test_expand_function_arguments() -> Result<(), Error> { let hm: HashMap<String, Property> = HashMap::new(); let the_argument = Property { name: "some_argument".to_string(), @@ -544,13 +557,16 @@ pub fn hello_world( the_function.inputs.push(the_argument); let result = expand_function_arguments(&the_function, &hm, &hm); - let (args, call_args) = result.unwrap(); + let (args, call_args) = result?; let result = format!("({},{})", args, call_args); let expected = "(, some_argument : u32,& [some_argument . into_token () ,])"; + assert_eq!(result, expected); + Ok(()) } + #[test] - fn test_expand_function_arguments_primitive() { + fn test_expand_function_arguments_primitive() -> Result<(), Error> { let hm: HashMap<String, Property> = HashMap::new(); let mut the_function = Function { type_field: "function".to_string(), @@ -565,18 +581,15 @@ pub fn hello_world( components: None, }); let result = expand_function_arguments(&the_function, &hm, &hm); - let (args, call_args) = result.unwrap(); + let (args, call_args) = result?; let result = format!("({},{})", args, call_args); - assert_eq!(result, "(, bim_bam : u64,& [bim_bam . into_token () ,])"); - the_function.inputs[0].name = String::from(""); - let result = expand_function_arguments(&the_function, &hm, &hm); - let (args, call_args) = result.unwrap(); - let result = format!("({},{})", args, call_args); - assert_eq!(result, "(, p0 : u64,& [p0 . into_token () ,])"); + assert_eq!(result, "(, bim_bam : u64,& [bim_bam . into_token () ,])"); + Ok(()) } + #[test] - fn test_expand_function_arguments_composite() { + fn test_expand_function_arguments_composite() -> Result<(), Error> { let mut function = Function { type_field: "zig_zag".to_string(), inputs: vec![], @@ -616,51 +629,62 @@ pub fn hello_world( ); let result = expand_function_arguments(&function, &custom_enums, &custom_structs); - let (args, call_args) = result.unwrap(); + let (args, call_args) = result?; let result = format!("({},{})", args, call_args); let expected = r#"(, bim_bam : CarMaker,& [bim_bam . into_token () ,])"#; assert_eq!(result, expected); function.inputs[0].type_field = "enum Cocktail".to_string(); let result = expand_function_arguments(&function, &custom_enums, &custom_structs); - let (args, call_args) = result.unwrap(); + let (args, call_args) = result?; let result = format!("({},{})", args, call_args); let expected = r#"(, bim_bam : Cocktail,& [bim_bam . into_token () ,])"#; assert_eq!(result, expected); + Ok(()) } - // --- expand_input_name --- #[test] - fn test_expand_input_name() { - let result = expand_input_name(0, "CamelCaseHello"); - assert_eq!(result.to_string(), "camel_case_hello"); - let result = expand_input_name(1080, ""); - assert_eq!(result.to_string(), "p1080"); - let result = expand_input_name(0, "if"); - assert_eq!(result.to_string(), "if_"); - let result = expand_input_name(0, "let"); - assert_eq!(result.to_string(), "let_"); + fn transform_name_to_snake_case() -> Result<(), Error> { + let result = expand_input_name("CamelCaseHello"); + assert_eq!(result?.to_string(), "camel_case_hello"); + Ok(()) + } + + #[test] + fn avoids_collisions_with_keywords() -> Result<(), Error> { + let result = expand_input_name("if"); + assert_eq!(result?.to_string(), "if_"); + + let result = expand_input_name("let"); + assert_eq!(result?.to_string(), "let_"); + Ok(()) } // --- expand_input_param --- #[test] - fn test_expand_input_param_primitive() { + fn test_expand_input_param_primitive() -> Result<(), Error> { let def = Function::default(); let result = expand_input_param(&def, "unused", &ParamType::Bool, &None); - assert_eq!(result.unwrap().to_string(), "bool"); + assert_eq!(result?.to_string(), "bool"); + let result = expand_input_param(&def, "unused", &ParamType::U64, &None); - assert_eq!(result.unwrap().to_string(), "u64"); + assert_eq!(result?.to_string(), "u64"); + let result = expand_input_param(&def, "unused", &ParamType::String(10), &None); - assert_eq!(result.unwrap().to_string(), "String"); + assert_eq!(result?.to_string(), "String"); + Ok(()) } + #[test] - fn test_expand_input_param_array() { + fn test_expand_input_param_array() -> Result<(), Error> { let array_type = ParamType::Array(Box::new(ParamType::U64), 10); let result = expand_input_param(&Function::default(), "unused", &array_type, &None); - assert_eq!(result.unwrap().to_string(), ":: std :: vec :: Vec < u64 >"); + assert_eq!(result?.to_string(), ":: std :: vec :: Vec < u64 >"); + Ok(()) } + #[test] - fn test_expand_input_param_custom_type() { + fn test_expand_input_param_custom_type() -> Result<(), Error> { let def = Function::default(); let struct_type = ParamType::Struct(vec![ParamType::Bool, ParamType::U64]); let struct_prop = Property { @@ -670,10 +694,9 @@ pub fn hello_world( }; let struct_name = Some(&struct_prop); let result = expand_input_param(&def, "unused", &struct_type, &struct_name); - assert_eq!(result.unwrap().to_string(), "Babies"); + assert_eq!(result?.to_string(), "Babies"); - let enum_type = - ParamType::Enum(EnumVariants::new(vec![ParamType::U8, ParamType::U32]).unwrap()); + let enum_type = ParamType::Enum(EnumVariants::new(vec![ParamType::U8, ParamType::U32])?); let enum_prop = Property { name: String::from("unused"), type_field: String::from("enum Babies"), @@ -681,8 +704,10 @@ pub fn hello_world( }; let enum_name = Some(&enum_prop); let result = expand_input_param(&def, "unused", &enum_type, &enum_name); - assert_eq!(result.unwrap().to_string(), "Babies"); + assert_eq!(result?.to_string(), "Babies"); + Ok(()) } + #[test] fn test_expand_input_param_struct_wrong_name() { let def = Function::default(); @@ -696,6 +721,7 @@ pub fn hello_world( let result = expand_input_param(&def, "unused", &struct_type, &struct_name); assert!(matches!(result, Err(Error::MissingData(_)))); } + #[test] fn test_expand_input_param_struct_with_enum_name() { let def = Function::default(); diff --git a/packages/fuels-core/src/errors.rs b/packages/fuels-core/src/errors.rs index b8028dbbbe..0877356f52 100644 --- a/packages/fuels-core/src/errors.rs +++ b/packages/fuels-core/src/errors.rs @@ -43,6 +43,8 @@ pub enum Error { ParseBoolError(#[from] std::str::ParseBoolError), #[error("Parse hex error: {0}")] ParseHexError(#[from] hex::FromHexError), + #[error("Parse token stream error: {0}")] + ParseTokenStreamError(String), #[error("Utf8 error: {0}")] Utf8Error(#[from] Utf8Error), #[error("Compilation error: {0}")] @@ -80,6 +82,12 @@ impl From<std::io::Error> for Error { } } +impl From<proc_macro2::LexError> for Error { + fn from(err: proc_macro2::LexError) -> Error { + Error::ParseTokenStreamError(err.to_string()) + } +} + #[derive(Debug)] pub struct InstantiationError(pub String);
angular
https://github.com/angular/angular
7c8159b3e21c1e761b1b84242ce4c43cae917e9b
Greg Magolan
2018-06-15 02:44:59
test(bazel): fix flakey bazel integration e2e test (#24522)
PR Close #24522
test(bazel): fix flakey bazel integration e2e test (#24522) PR Close #24522
diff --git a/integration/bazel/test/e2e/app.spec.ts b/integration/bazel/test/e2e/app.spec.ts index 79f46226d5260..69e93ccd8de47 100644 --- a/integration/bazel/test/e2e/app.spec.ts +++ b/integration/bazel/test/e2e/app.spec.ts @@ -1,5 +1,7 @@ import {browser, by, element, ExpectedConditions} from 'protractor'; +jasmine.DEFAULT_TIMEOUT_INTERVAL = 120000; + describe('angular example application', () => { it('should display: Hello World!', (done) => { browser.get('');
apitable
https://github.com/apitable/apitable
58f0a39596a791f8cd18f532401b65b98965d5f0
Zoe
2023-02-28 17:08:24
fix: space manual view save not work on embed link (#3581)
this is a bug fix for #3009
fix: space manual view save not work on embed link (#3581) this is a bug fix for #3009
diff --git a/backend-server/application/src/main/java/com/apitable/internal/controller/InternalSpaceController.java b/backend-server/application/src/main/java/com/apitable/internal/controller/InternalSpaceController.java index c0ad5e301d..efcba9f685 100644 --- a/backend-server/application/src/main/java/com/apitable/internal/controller/InternalSpaceController.java +++ b/backend-server/application/src/main/java/com/apitable/internal/controller/InternalSpaceController.java @@ -22,6 +22,7 @@ import com.apitable.internal.service.InternalSpaceService; import com.apitable.internal.vo.InternalSpaceApiUsageVo; import com.apitable.internal.vo.InternalSpaceCapacityVo; +import com.apitable.internal.vo.InternalSpaceInfoVo; import com.apitable.internal.vo.InternalSpaceSubscriptionVo; import com.apitable.internal.vo.InternalSpaceUsageVo; import com.apitable.organization.service.IMemberService; @@ -107,4 +108,14 @@ public ResponseData<InternalSpaceApiUsageVo> apiUsages( iMemberService.checkUserIfInSpace(userId, spaceId); return ResponseData.success(internalSpaceService.getSpaceEntitlementApiUsageVo(spaceId)); } + + /** + * get space info. + */ + @GetResource(path = "/space/{spaceId}", requiredPermission = false, requiredLogin = false) + @Operation(summary = "get space information") + public ResponseData<InternalSpaceInfoVo> labs(@PathVariable("spaceId") String spaceId) { + iSpaceService.checkExist(spaceId); + return ResponseData.success(internalSpaceService.getSpaceInfo(spaceId)); + } } diff --git a/backend-server/application/src/main/java/com/apitable/internal/service/InternalSpaceService.java b/backend-server/application/src/main/java/com/apitable/internal/service/InternalSpaceService.java index 431068ef3d..cd28cfa3e4 100644 --- a/backend-server/application/src/main/java/com/apitable/internal/service/InternalSpaceService.java +++ b/backend-server/application/src/main/java/com/apitable/internal/service/InternalSpaceService.java @@ -19,21 +19,37 @@ package com.apitable.internal.service; import com.apitable.internal.vo.InternalSpaceApiUsageVo; +import com.apitable.internal.vo.InternalSpaceInfoVo; import com.apitable.internal.vo.InternalSpaceSubscriptionVo; +/** + * internal space service. + */ public interface InternalSpaceService { /** - * get space entitlement view + * get space entitlement view. + * * @param spaceId space id * @return InternalSpaceSubscriptionVo */ InternalSpaceSubscriptionVo getSpaceEntitlementVo(String spaceId); /** - * get space api usage in entitlement + * get space api usage in entitlement. + * * @param spaceId space id * @return InternalSpaceApiUsageVo */ InternalSpaceApiUsageVo getSpaceEntitlementApiUsageVo(String spaceId); + + /** + * get space info. + * + * @param spaceId space id + * @return {@link InternalSpaceInfoVo} + */ + InternalSpaceInfoVo getSpaceInfo(String spaceId); + + } diff --git a/backend-server/application/src/main/java/com/apitable/internal/service/impl/InternalSpaceServiceImpl.java b/backend-server/application/src/main/java/com/apitable/internal/service/impl/InternalSpaceServiceImpl.java index 272b51ac3f..1c064c9b7f 100644 --- a/backend-server/application/src/main/java/com/apitable/internal/service/impl/InternalSpaceServiceImpl.java +++ b/backend-server/application/src/main/java/com/apitable/internal/service/impl/InternalSpaceServiceImpl.java @@ -18,19 +18,25 @@ package com.apitable.internal.service.impl; -import javax.annotation.Resource; - import com.apitable.interfaces.billing.facade.EntitlementServiceFacade; import com.apitable.interfaces.billing.model.SubscriptionFeature; import com.apitable.interfaces.billing.model.SubscriptionInfo; import com.apitable.internal.assembler.BillingAssembler; +import com.apitable.internal.service.InternalSpaceService; import com.apitable.internal.vo.InternalSpaceApiUsageVo; +import com.apitable.internal.vo.InternalSpaceInfoVo; import com.apitable.internal.vo.InternalSpaceSubscriptionVo; -import com.apitable.internal.service.InternalSpaceService; +import com.apitable.space.entity.LabsApplicantEntity; +import com.apitable.space.enums.LabsFeatureEnum; +import com.apitable.space.service.ILabsApplicantService; import com.apitable.space.service.IStaticsService; - +import java.util.Objects; +import javax.annotation.Resource; import org.springframework.stereotype.Service; +/** + * internal space service implement. + */ @Service public class InternalSpaceServiceImpl implements InternalSpaceService { @@ -40,6 +46,9 @@ public class InternalSpaceServiceImpl implements InternalSpaceService { @Resource private IStaticsService iStaticsService; + @Resource + private ILabsApplicantService iLabsApplicantService; + @Override public InternalSpaceSubscriptionVo getSpaceEntitlementVo(String spaceId) { SubscriptionInfo subscriptionInfo = entitlementServiceFacade.getSpaceSubscription(spaceId); @@ -57,4 +66,18 @@ public InternalSpaceApiUsageVo getSpaceEntitlementApiUsageVo(String spaceId) { vo.setIsAllowOverLimit(true); return vo; } + + @Override + public InternalSpaceInfoVo getSpaceInfo(String spaceId) { + InternalSpaceInfoVo spaceInfo = new InternalSpaceInfoVo(); + InternalSpaceInfoVo.SpaceLabs labs = new InternalSpaceInfoVo.SpaceLabs(); + // At present, there is only one, which directly queries a single one, and there are multiple requirements behind it. Expand it + LabsApplicantEntity applicant = + iLabsApplicantService.getApplicantByApplicantAndFeatureKey(spaceId, + LabsFeatureEnum.VIEW_MANUAL_SAVE.name()); + labs.setViewManualSave(Objects.nonNull(applicant)); + spaceInfo.setLabs(labs); + spaceInfo.setSpaceId(spaceId); + return spaceInfo; + } } diff --git a/backend-server/application/src/main/java/com/apitable/internal/vo/InternalSpaceInfoVo.java b/backend-server/application/src/main/java/com/apitable/internal/vo/InternalSpaceInfoVo.java new file mode 100644 index 0000000000..e0e9df9fd9 --- /dev/null +++ b/backend-server/application/src/main/java/com/apitable/internal/vo/InternalSpaceInfoVo.java @@ -0,0 +1,53 @@ +/* + * APITable <https://github.com/apitable/apitable> + * Copyright (C) 2022 APITable Ltd. <https://apitable.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +package com.apitable.internal.vo; + +import com.apitable.shared.support.serializer.NullBooleanSerializer; +import com.apitable.shared.support.serializer.NullObjectSerializer; +import com.apitable.shared.support.serializer.NullStringSerializer; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** + * space information. + */ +@Data +@Schema(description = "space information") +public class InternalSpaceInfoVo { + + @Schema(description = "space id", example = "spc***") + @JsonSerialize(nullsUsing = NullStringSerializer.class) + private String spaceId; + + @Schema(description = "space labs", example = "{}") + @JsonSerialize(nullsUsing = NullObjectSerializer.class) + private SpaceLabs labs; + + /** + * space labs features. + */ + @Data + public static class SpaceLabs { + @Schema(description = "view manual save", example = "false") + @JsonSerialize(nullsUsing = NullBooleanSerializer.class) + private Boolean viewManualSave; + } + +} diff --git a/packages/room-server/src/database/interfaces/space.model.ts b/packages/room-server/src/database/interfaces/space.model.ts index c185910c7d..ea8890ea52 100644 --- a/packages/room-server/src/database/interfaces/space.model.ts +++ b/packages/room-server/src/database/interfaces/space.model.ts @@ -38,3 +38,10 @@ export class InternalCreateDatasheetVo { datasheetId!: string; createdAt!: number; } + +export class InternalSpaceInfoVo { + spaceId!: string; + labs!: { + viewManualSave: boolean + }; +} diff --git a/packages/room-server/src/shared/services/rest/rest.service.ts b/packages/room-server/src/shared/services/rest/rest.service.ts index 1480436f4e..524d6c2a75 100644 --- a/packages/room-server/src/shared/services/rest/rest.service.ts +++ b/packages/room-server/src/shared/services/rest/rest.service.ts @@ -17,6 +17,7 @@ */ import { + api, IDatasheetFieldPermission, IFieldPermissionMap, IFieldPermissionRoleListData, @@ -25,12 +26,17 @@ import { ISpaceInfo, ISpacePermissionManage, IUnitValue, - IUserInfo, - api + IUserInfo } from '@apitable/core'; import { HttpService } from '@nestjs/axios'; import { Injectable } from '@nestjs/common'; -import { InternalCreateDatasheetVo, InternalSpaceSubscriptionView, InternalSpaceUsageView, WidgetMap } from 'database/interfaces'; +import { + InternalCreateDatasheetVo, + InternalSpaceInfoVo, + InternalSpaceSubscriptionView, + InternalSpaceUsageView, + WidgetMap +} from 'database/interfaces'; import { DatasheetCreateRo } from 'fusion/ros/datasheet.create.ro'; import { AssetVo } from 'fusion/vos/attachment.vo'; import { keyBy } from 'lodash'; @@ -82,6 +88,8 @@ export class RestService { private LIST_FIELD_ROLES = 'datasheet/%(dstId)s/field/%(fieldId)s/listRole'; private UNIT_LOAD_OR_SEARCH = 'internal/org/loadOrSearch'; + private SPACE_INFO = 'internal/space/%(spaceId)s'; + constructor(private readonly httpService: HttpService, @InjectLogger() private readonly logger: Logger) { // Intercept request this.httpService.axiosRef.interceptors.request.use( @@ -562,4 +570,11 @@ export class RestService { ); return response.data; } + + async getSpaceInfo(spaceId: string): Promise<InternalSpaceInfoVo> { + const response = await lastValueFrom( + this.httpService.get(sprintf(this.SPACE_INFO, { spaceId })), + ); + return response.data; + } }
backstage
https://github.com/backstage/backstage
0c7936af831d45f220a061774d7f3416f81b7a0f
dependabot[bot]
2022-02-07 15:16:30
chore(deps-dev): bump husky from 6.0.0 to 7.0.4
Bumps [husky](https://github.com/typicode/husky) from 6.0.0 to 7.0.4. - [Release notes](https://github.com/typicode/husky/releases) - [Commits](https://github.com/typicode/husky/compare/v6.0.0...v7.0.4) ---
chore(deps-dev): bump husky from 6.0.0 to 7.0.4 Bumps [husky](https://github.com/typicode/husky) from 6.0.0 to 7.0.4. - [Release notes](https://github.com/typicode/husky/releases) - [Commits](https://github.com/typicode/husky/compare/v6.0.0...v7.0.4) --- updated-dependencies: - dependency-name: husky dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
diff --git a/package.json b/package.json index 5c60cc41c6cd7..54841128a929c 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "concurrently": "^7.0.0", "eslint-plugin-notice": "^0.9.10", "fs-extra": "9.1.0", - "husky": "^6.0.0", + "husky": "^7.0.4", "lerna": "^4.0.0", "lint-staged": "^12.2.0", "minimist": "^1.2.5", diff --git a/yarn.lock b/yarn.lock index 0c8c87200b25a..386ba1955cfe9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13483,10 +13483,10 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -husky@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/husky/-/husky-6.0.0.tgz#810f11869adf51604c32ea577edbc377d7f9319e" - integrity sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ== +husky@^7.0.4: + version "7.0.4" + resolved "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535" + integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ== hyphenate-style-name@^1.0.2, hyphenate-style-name@^1.0.3: version "1.0.3"
neon
https://github.com/neondatabase/neon
5af9660b9e4ad804433335662a3c1bf79cfeb637
Alexander Bayandin
2024-06-26 21:07:04
CI(build-tools): don't install Postgres 14 (#6540)
## Problem We install Postgres 14 in `build-tools` image, but we don't need it. We use Postgres binaries, which we build ourselves. ## Summary of changes - Remove Postgresql 14 installation from `build-tools` image
CI(build-tools): don't install Postgres 14 (#6540) ## Problem We install Postgres 14 in `build-tools` image, but we don't need it. We use Postgres binaries, which we build ourselves. ## Summary of changes - Remove Postgresql 14 installation from `build-tools` image
diff --git a/Dockerfile.build-tools b/Dockerfile.build-tools index 5dd2c13c0e2b..a1483e550ec4 100644 --- a/Dockerfile.build-tools +++ b/Dockerfile.build-tools @@ -73,13 +73,6 @@ RUN curl -fsSL 'https://apt.llvm.org/llvm-snapshot.gpg.key' | apt-key add - \ && bash -c 'for f in /usr/bin/clang*-${LLVM_VERSION} /usr/bin/llvm*-${LLVM_VERSION}; do ln -s "${f}" "${f%-${LLVM_VERSION}}"; done' \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -# PostgreSQL 14 -RUN curl -fsSL 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' | apt-key add - \ - && echo 'deb http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ - && apt update \ - && apt install -y postgresql-client-14 \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - # AWS CLI RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" \ && unzip -q awscliv2.zip \ diff --git a/test_runner/fixtures/neon_fixtures.py b/test_runner/fixtures/neon_fixtures.py index d8da2a3a3e75..745363721894 100644 --- a/test_runner/fixtures/neon_fixtures.py +++ b/test_runner/fixtures/neon_fixtures.py @@ -3075,9 +3075,16 @@ def __init__( host: str = "127.0.0.1", port: int = 5432, ): - assert shutil.which(path) + search_path = None + if (d := os.getenv("POSTGRES_DISTRIB_DIR")) is not None and ( + v := os.getenv("DEFAULT_PG_VERSION") + ) is not None: + search_path = Path(d) / f"v{v}" / "bin" - self.path = path + full_path = shutil.which(path, path=search_path) + assert full_path is not None + + self.path = full_path self.database_url = f"postgres://{host}:{port}/main?options=project%3Dgeneric-project-name" async def run(self, query: Optional[str] = None) -> asyncio.subprocess.Process:
gitoxide
https://github.com/GitoxideLabs/gitoxide
d1f9c63f8a79dcb00766d94edda80ed9add724ea
Sebastian Thiel
2023-08-02 19:27:10
feat: add `fetch::Arguments::add_feature()` for unconditional additions of arguments that are supposed to be features.
This differentiation is important to support V1 and V2 correctly, which have a different notion of features with V1 special-casing them, and V2 just sees everything as arguments.
feat: add `fetch::Arguments::add_feature()` for unconditional additions of arguments that are supposed to be features. This differentiation is important to support V1 and V2 correctly, which have a different notion of features with V1 special-casing them, and V2 just sees everything as arguments.
diff --git a/gix-protocol/src/fetch/arguments/blocking_io.rs b/gix-protocol/src/fetch/arguments/blocking_io.rs index 571792148f1..c946d46e144 100644 --- a/gix-protocol/src/fetch/arguments/blocking_io.rs +++ b/gix-protocol/src/fetch/arguments/blocking_io.rs @@ -45,9 +45,7 @@ impl Arguments { } transport.invoke( Command::Fetch.as_str(), - self.features - .iter() - .filter_map(|(k, v)| v.as_ref().map(|v| (*k, Some(v.as_ref())))), + self.features.iter().filter(|(_, v)| v.is_some()).cloned(), Some(std::mem::replace(&mut self.args, retained_state).into_iter()), ) } diff --git a/gix-protocol/src/fetch/arguments/mod.rs b/gix-protocol/src/fetch/arguments/mod.rs index d887492b4a9..50145bb1504 100644 --- a/gix-protocol/src/fetch/arguments/mod.rs +++ b/gix-protocol/src/fetch/arguments/mod.rs @@ -165,20 +165,30 @@ impl Arguments { pub fn use_include_tag(&mut self) { debug_assert!(self.supports_include_tag, "'include-tag' feature required"); if self.supports_include_tag { - match self.version { - gix_transport::Protocol::V0 | gix_transport::Protocol::V1 => { - let features = self - .features_for_first_want - .as_mut() - .expect("call use_include_tag before want()"); - features.push("include-tag".into()) - } - gix_transport::Protocol::V2 => { - self.args.push("include-tag".into()); - } + self.add_feature("include-tag"); + } + } + + /// Add the given `feature`, unconditionally. + /// + /// Note that sending an unknown or unsupported feature may cause the remote to terminate + /// the connection. Use this method if you know what you are doing *and* there is no specialized + /// method for this, e.g. [`Self::use_include_tag()`]. + pub fn add_feature(&mut self, feature: &str) { + match self.version { + gix_transport::Protocol::V0 | gix_transport::Protocol::V1 => { + let features = self + .features_for_first_want + .as_mut() + .expect("call add_feature before first want()"); + features.push(feature.into()) + } + gix_transport::Protocol::V2 => { + self.args.push(feature.into()); } } } + fn prefixed(&mut self, prefix: &str, value: impl fmt::Display) { self.args.push(format!("{prefix}{value}").into()); } diff --git a/gix-protocol/src/fetch/tests.rs b/gix-protocol/src/fetch/tests.rs index 80dc752dd2d..93cf6e8db78 100644 --- a/gix-protocol/src/fetch/tests.rs +++ b/gix-protocol/src/fetch/tests.rs @@ -319,6 +319,7 @@ mod arguments { assert!(arguments.is_stateless(true), "V2 is stateless…"); assert!(arguments.is_stateless(false), "…in all cases"); + arguments.add_feature("no-progress"); arguments.deepen(1); arguments.deepen_relative(); arguments.want(id("7b333369de1221f9bfbbe03a3a13e9a09bc1c907")); @@ -329,6 +330,7 @@ mod arguments { b"0012command=fetch 0001000ethin-pack 000eofs-delta +0010no-progress 000ddeepen 1 0014deepen-relative 0032want 7b333369de1221f9bfbbe03a3a13e9a09bc1c907 @@ -347,6 +349,7 @@ mod arguments { let mut t = transport(&mut out, *is_stateful); let mut arguments = arguments_v2(Some("shallow")); + arguments.add_feature("no-progress"); arguments.deepen(1); arguments.deepen_since(12345); arguments.shallow(id("7b333369de1221f9bfbbe03a3a13e9a09bc1c9ff")); @@ -362,6 +365,7 @@ mod arguments { b"0012command=fetch 0001000ethin-pack 000eofs-delta +0010no-progress 000ddeepen 1 0017deepen-since 12345 0035shallow 7b333369de1221f9bfbbe03a3a13e9a09bc1c9ff @@ -371,6 +375,7 @@ mod arguments { 00000012command=fetch 0001000ethin-pack 000eofs-delta +0010no-progress 000ddeepen 1 0017deepen-since 12345 0035shallow 7b333369de1221f9bfbbe03a3a13e9a09bc1c9ff
sentry
https://github.com/getsentry/sentry
ecc36c67e00ccf0f35e494fd5de35f92ae5d8105
Alex Zaslavsky
2023-07-18 03:38:22
test(backup): Add final model tests (#52924)
This change adds all of the remaining model tests, save those added in
test(backup): Add final model tests (#52924) This change adds all of the remaining model tests, save those added in PR #52778. Issue: getsentry/team-ospo#156
diff --git a/tests/sentry/backup/test_models.py b/tests/sentry/backup/test_models.py index 18f2fa21a1f13e..3cf636332db5a5 100644 --- a/tests/sentry/backup/test_models.py +++ b/tests/sentry/backup/test_models.py @@ -1,13 +1,15 @@ from __future__ import annotations import tempfile -from datetime import datetime +from datetime import datetime, timedelta from pathlib import Path from typing import Type +from uuid import uuid4 from click.testing import CliRunner from django.core.management import call_command from django.utils import timezone +from sentry_relay.auth import generate_key_pair from sentry.incidents.models import ( AlertRule, @@ -16,14 +18,25 @@ AlertRuleTrigger, AlertRuleTriggerAction, AlertRuleTriggerExclusion, + PendingIncidentSnapshot, + TimeSeriesSnapshot, ) +from sentry.models.actor import ACTOR_TYPES, Actor +from sentry.models.counter import Counter from sentry.models.dashboard import Dashboard, DashboardTombstone from sentry.models.dashboard_widget import ( DashboardWidget, DashboardWidgetQuery, DashboardWidgetTypes, ) +from sentry.models.email import Email from sentry.models.environment import Environment, EnvironmentProject +from sentry.models.integrations.sentry_app import SentryApp +from sentry.models.integrations.sentry_app_component import SentryAppComponent +from sentry.models.integrations.sentry_app_installation import SentryAppInstallation +from sentry.models.notificationaction import NotificationAction, NotificationActionProject +from sentry.models.options.option import ControlOption, Option +from sentry.models.options.organization_option import OrganizationOption from sentry.models.options.project_option import ProjectOption from sentry.models.options.user_option import UserOption from sentry.models.organization import Organization @@ -31,20 +44,38 @@ from sentry.models.organizationmapping import OrganizationMapping from sentry.models.organizationmember import OrganizationMember from sentry.models.organizationmemberteam import OrganizationMemberTeam +from sentry.models.orgauthtoken import OrgAuthToken from sentry.models.project import Project from sentry.models.projectbookmark import ProjectBookmark from sentry.models.projectkey import ProjectKey from sentry.models.projectownership import ProjectOwnership from sentry.models.projectredirect import ProjectRedirect from sentry.models.projectteam import ProjectTeam +from sentry.models.recentsearch import RecentSearch +from sentry.models.relay import Relay, RelayUsage +from sentry.models.repository import Repository +from sentry.models.rule import Rule, RuleActivity, RuleActivityType +from sentry.models.rulesnooze import RuleSnooze +from sentry.models.savedsearch import SavedSearch, Visibility +from sentry.models.search_common import SearchType +from sentry.models.servicehook import ServiceHook from sentry.models.team import Team from sentry.models.user import User from sentry.models.useremail import UserEmail from sentry.models.userip import UserIP from sentry.models.userpermission import UserPermission from sentry.models.userrole import UserRole, UserRoleUser -from sentry.monitors.models import Monitor, MonitorEnvironment, MonitorType, ScheduleType +from sentry.monitors.models import ( + CheckInStatus, + Monitor, + MonitorCheckIn, + MonitorEnvironment, + MonitorLocation, + MonitorType, + ScheduleType, +) from sentry.runner.commands.backup import import_, validate +from sentry.sentry_apps.apps import SentryAppUpdater from sentry.silo import unguarded_write from sentry.snuba.models import QuerySubscription, SnubaQuery, SnubaQueryEventType from sentry.testutils import TransactionTestCase @@ -161,6 +192,17 @@ def test_alert_rule_trigger(self): self.create_alert_rule_trigger_action(alert_rule_trigger=trigger) return self.import_export_then_validate() + @targets_models(ControlOption) + def test_control_option(self): + ControlOption.objects.create(key="foo", value="bar") + return self.import_export_then_validate() + + @targets_models(Counter) + def test_counter(self): + project = self.create_project() + Counter.increment(project, 1) + return self.import_export_then_validate() + @targets_models(Dashboard) def test_dashboard(self): self.create_dashboard() @@ -184,6 +226,11 @@ def test_dashboard_widget(self): DashboardWidgetQuery.objects.create(widget=widget, order=1, name="Test Query") return self.import_export_then_validate() + @targets_models(Email) + def test_email(self): + Email.objects.create(email="[email protected]") + return self.import_export_then_validate() + @targets_models(Environment) def test_environment(self): self.create_environment() @@ -201,14 +248,46 @@ def test_monitor(self): self.create_monitor() return self.import_export_then_validate() - @targets_models(MonitorEnvironment) + @targets_models(MonitorEnvironment, MonitorLocation) def test_monitor_environment(self): monitor = self.create_monitor() env = Environment.objects.create(organization_id=monitor.organization_id, name="test_env") - MonitorEnvironment.objects.create( + mon_env = MonitorEnvironment.objects.create( monitor=monitor, environment=env, ) + location = MonitorLocation.objects.create(guid=uuid4(), name="test_location") + MonitorCheckIn.objects.create( + monitor=monitor, + monitor_environment=mon_env, + location=location, + project_id=monitor.project_id, + status=CheckInStatus.IN_PROGRESS, + ) + return self.import_export_then_validate() + + @targets_models(NotificationAction, NotificationActionProject) + def test_notification_action(self): + self.create_notification_action(organization=self.organization, projects=[self.project]) + return self.import_export_then_validate() + + @targets_models(Option) + def test_option(self): + Option.objects.create(key="foo", value="bar") + return self.import_export_then_validate() + + @targets_models(OrgAuthToken) + def test_org_auth_token(self): + user = self.create_user() + org = self.create_organization(owner=user) + OrgAuthToken.objects.create( + organization_id=org.id, + name="token 1", + token_hashed="ABCDEF", + token_last_characters="xyz1", + scope_list=["org:ci"], + date_last_used=None, + ) return self.import_export_then_validate() @targets_models(Organization, OrganizationMapping) @@ -228,6 +307,14 @@ def test_organization_membership(self): OrganizationAccessRequest.objects.create(member=member, team=team) return self.import_export_then_validate() + @targets_models(OrganizationOption) + def test_organization_option(self): + organization = self.create_organization(name="test_org", owner=self.user) + OrganizationOption.objects.create( + organization=organization, key="sentry:account-rate-limit", value=0 + ) + return self.import_export_then_validate() + @targets_models(Project, ProjectKey, ProjectOption, ProjectTeam) def test_project(self): self.create_project() @@ -260,6 +347,87 @@ def test_project_redirect(self): ProjectRedirect.record(project, "old_slug") return self.import_export_then_validate() + @targets_models(Relay, RelayUsage) + def test_relay(self): + _, public_key = generate_key_pair() + relay_id = str(uuid4()) + Relay.objects.create(relay_id=relay_id, public_key=str(public_key), is_internal=True) + RelayUsage.objects.create(relay_id=relay_id, version="0.0.1", public_key=public_key) + return self.import_export_then_validate() + + @targets_models(Repository) + def test_repository(self): + Repository.objects.create( + name="test_repo", + organization_id=self.organization.id, + integration_id=self.integration.id, + ) + return self.import_export_then_validate() + + @targets_models(Rule, RuleActivity, RuleSnooze) + def test_rule(self): + rule = self.create_project_rule(project=self.project) + RuleActivity.objects.create(rule=rule, type=RuleActivityType.CREATED.value) + self.snooze_rule(user_id=self.user.id, owner_id=self.user.id, rule=rule) + return self.import_export_then_validate() + + @targets_models(RecentSearch, SavedSearch) + def test_search(self): + RecentSearch.objects.create( + organization=self.organization, + user_id=self.user.id, + type=SearchType.ISSUE.value, + query="some query", + ) + SavedSearch.objects.create( + organization=self.organization, + name="Saved query", + query="saved query", + visibility=Visibility.ORGANIZATION, + ) + return self.import_export_then_validate() + + @targets_models(SentryApp, SentryAppComponent, SentryAppInstallation) + def test_sentry_app(self): + app = self.create_sentry_app(name="test_app", organization=self.organization) + self.create_sentry_app_installation( + slug=app.slug, organization=self.organization, user=self.user + ) + updater = SentryAppUpdater(sentry_app=app) + updater.schema = {"elements": [self.create_alert_rule_action_schema()]} + updater.run(self.user) + return self.import_export_then_validate() + + @targets_models(PendingIncidentSnapshot, TimeSeriesSnapshot) + def test_snapshot(self): + incident = self.create_incident() + PendingIncidentSnapshot.objects.create( + incident=incident, target_run_date=datetime.utcnow() + timedelta(hours=4) + ) + TimeSeriesSnapshot.objects.create( + start=datetime.utcnow() - timedelta(hours=24), + end=datetime.utcnow(), + values=[[1.0, 2.0, 3.0], [1.5, 2.5, 3.5]], + period=1, + ) + return self.import_export_then_validate() + + @targets_models(ServiceHook) + def test_service_hook(self): + app = self.create_sentry_app() + actor = Actor.objects.create(type=ACTOR_TYPES["team"]) + install = self.create_sentry_app_installation(organization=self.organization, slug=app.slug) + ServiceHook.objects.create( + application_id=app.id, + actor_id=actor.id, + project_id=self.project.id, + organization_id=self.organization.id, + events=[], + installation_id=install.id, + url="https://example.com", + ) + return self.import_export_then_validate() + @targets_models(User, UserEmail, UserOption, UserPermission) def test_user(self): user = self.create_user()
sentry
https://github.com/getsentry/sentry
83a20a816de5d3a6dd26aacae5a0c9f80a74b55f
Richard Roggenkemper
2022-10-25 03:13:24
feat(growth): more icons for sandbox (#39684)
this pr exports more icons for use in modals in the sandbox
feat(growth): more icons for sandbox (#39684) this pr exports more icons for use in modals in the sandbox
diff --git a/static/app/bootstrap/exportGlobals.tsx b/static/app/bootstrap/exportGlobals.tsx index bd90e57cd6b36b..364ca99d0f7786 100644 --- a/static/app/bootstrap/exportGlobals.tsx +++ b/static/app/bootstrap/exportGlobals.tsx @@ -47,6 +47,8 @@ const SentryApp = { getModalPortal: require('sentry/utils/getModalPortal').default, Client: require('sentry/api').Client, IconArrow: require('sentry/icons/iconArrow').IconArrow, + IconClose: require('sentry/icons/iconClose').IconClose, + IconCheckmark: require('sentry/icons/iconCheckmark').IconCheckmark, }; globals.SentryApp = SentryApp;
starship
https://github.com/starship/starship
a62012e3280238b4c794bbe484b296af3b8fb53a
JKatzwinkel
2024-07-30 01:49:56
fix(package): support alternative gradle module version syntax (#6080)
feat(package): support alternative gradle module version syntax (#6079)
fix(package): support alternative gradle module version syntax (#6080) feat(package): support alternative gradle module version syntax (#6079)
diff --git a/src/modules/package.rs b/src/modules/package.rs index f61461365a01..edc9fbe7bb63 100644 --- a/src/modules/package.rs +++ b/src/modules/package.rs @@ -110,7 +110,7 @@ fn get_gradle_version(context: &Context, config: &PackageConfig) -> Option<Strin format_version(&caps["version"], config.version_format) }).or_else(|| { let build_file_contents = context.read_file_from_pwd("build.gradle")?; - let re = Regex::new(r#"(?m)^version ['"](?P<version>[^'"]+)['"]$"#).unwrap(); /*dark magic*/ + let re = Regex::new(r#"(?m)^version( |\s*=\s*)['"](?P<version>[^'"]+)['"]$"#).unwrap(); /*dark magic*/ let caps = re.captures(&build_file_contents)?; format_version(&caps["version"], config.version_format) @@ -921,6 +921,25 @@ java { project_dir.close() } + #[test] + fn test_extract_gradle_version_setter_notation_single_quote() -> io::Result<()> { + let config_name = "build.gradle"; + let config_content = "plugins { + id 'java' + id 'test.plugin' version '0.2.0' +} +version = '0.1.0' +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +}"; + + let project_dir = create_project_dir()?; + fill_config(&project_dir, config_name, Some(config_content))?; + expect_output(&project_dir, Some("v0.1.0"), None); + project_dir.close() + } + #[test] fn test_extract_gradle_version_double_quote() -> io::Result<()> { let config_name = "build.gradle";
talos
https://github.com/siderolabs/talos
0b8778d772e946e341ac071170f3153ebb254a00
Andrew Rynhard
2019-07-25 11:11:43
feat: enable missing KSPP sysctls
These were disabled in previous versions of Talos since BPF was completely disabled. With this change, we now implement all recommended sysctls.
feat: enable missing KSPP sysctls These were disabled in previous versions of Talos since BPF was completely disabled. With this change, we now implement all recommended sysctls. Signed-off-by: Andrew Rynhard <[email protected]>
diff --git a/internal/pkg/rootfs/rootfs.go b/internal/pkg/rootfs/rootfs.go index 99001ec6852..0d276d8df14 100644 --- a/internal/pkg/rootfs/rootfs.go +++ b/internal/pkg/rootfs/rootfs.go @@ -149,8 +149,6 @@ func generatePKI(data *userdata.UserData) (err error) { return nil } -// We can ignore setting kernel.kexec_load_disabled = 1 because modules are -// disabled in the kernel config. func kernelHardening() (err error) { props := []*proc.SystemProperty{ { @@ -165,6 +163,7 @@ func kernelHardening() (err error) { Key: "kernel.perf_event_paranoid", Value: "3", }, + // We can skip this sysctl because CONFIG_KEXEC is not set. // { // Key: "kernel.kexec_load_disabled", // Value: "1", @@ -177,14 +176,14 @@ func kernelHardening() (err error) { Key: "user.max_user_namespaces", Value: "0", }, - // { - // Key: "kernel.unprivileged_bpf_disabled", - // Value: "1", - // }, - // { - // Key: "net.core.bpf_jit_harden", - // Value: "2", - // }, + { + Key: "kernel.unprivileged_bpf_disabled", + Value: "1", + }, + { + Key: "net.core.bpf_jit_harden", + Value: "2", + }, } for _, prop := range props {
kratos
https://github.com/ory/kratos
c9490c8927209b686aafe54b8a16207a8ef47ebe
Fabian Meyer
2022-01-04 16:32:22
fix: send 404 instead of null response for unknown verification flows (#2102)
Fixes the verification handler to write the error, instead of nil object, when the flow does not exist. Adds tests for every handler to check proper behavior in that regard.
fix: send 404 instead of null response for unknown verification flows (#2102) Fixes the verification handler to write the error, instead of nil object, when the flow does not exist. Adds tests for every handler to check proper behavior in that regard. Closes #2099
diff --git a/selfservice/flow/login/handler_test.go b/selfservice/flow/login/handler_test.go index 02de9b64c17b..d19c7844b22d 100644 --- a/selfservice/flow/login/handler_test.go +++ b/selfservice/flow/login/handler_test.go @@ -557,4 +557,12 @@ func TestGetFlow(t *testing.T) { require.NoError(t, err) assert.Equal(t, public.URL+login.RouteInitBrowserFlow+"?return_to=https://www.ory.sh", f.RequestURL) }) + + t.Run("case=not found", func(t *testing.T) { + client := testhelpers.NewClientWithCookies(t) + setupLoginUI(t, client) + + res, _ := x.EasyGet(t, client, public.URL+login.RouteGetFlow+"?id="+x.NewUUID().String()) + assert.EqualValues(t, http.StatusNotFound, res.StatusCode) + }) } diff --git a/selfservice/flow/recovery/handler_test.go b/selfservice/flow/recovery/handler_test.go index 5dae11ac3657..a2d6091f2bf5 100644 --- a/selfservice/flow/recovery/handler_test.go +++ b/selfservice/flow/recovery/handler_test.go @@ -249,4 +249,12 @@ func TestGetFlow(t *testing.T) { require.NoError(t, err) assert.Equal(t, public.URL+recovery.RouteInitBrowserFlow+"?return_to=https://www.ory.sh", f.RequestURL) }) + + t.Run("case=not found", func(t *testing.T) { + client := testhelpers.NewClientWithCookies(t) + setupRecoveryTS(t, client) + + res, _ := x.EasyGet(t, client, public.URL+recovery.RouteGetFlow+"?id="+x.NewUUID().String()) + assert.EqualValues(t, http.StatusNotFound, res.StatusCode) + }) } diff --git a/selfservice/flow/registration/handler_test.go b/selfservice/flow/registration/handler_test.go index 27d0a23611f3..ed3fefe398b4 100644 --- a/selfservice/flow/registration/handler_test.go +++ b/selfservice/flow/registration/handler_test.go @@ -307,4 +307,12 @@ func TestGetFlow(t *testing.T) { require.NoError(t, err) assert.Equal(t, public.URL+registration.RouteInitBrowserFlow+"?return_to=https://www.ory.sh", f.RequestURL) }) + + t.Run("case=not found", func(t *testing.T) { + client := testhelpers.NewClientWithCookies(t) + setupRegistrationUI(t, client) + + res, _ := x.EasyGet(t, client, public.URL+registration.RouteGetFlow+"?id="+x.NewUUID().String()) + assert.EqualValues(t, http.StatusNotFound, res.StatusCode) + }) } diff --git a/selfservice/flow/settings/handler_test.go b/selfservice/flow/settings/handler_test.go index 1c5e6fdcea2b..dd89846df845 100644 --- a/selfservice/flow/settings/handler_test.go +++ b/selfservice/flow/settings/handler_test.go @@ -186,7 +186,7 @@ func TestHandler(t *testing.T) { }) t.Run("endpoint=fetch", func(t *testing.T) { - t.Run("description=fetching a non-existent flow should return a 403 error", func(t *testing.T) { + t.Run("description=fetching a non-existent flow should return a 404 error", func(t *testing.T) { _, _, err := testhelpers.NewSDKCustomClient(publicTS, otherUser).V0alpha2Api.GetSelfServiceSettingsFlow(context.Background()).Id("i-do-not-exist").Execute() require.Error(t, err) diff --git a/selfservice/flow/verification/handler.go b/selfservice/flow/verification/handler.go index 3585f109daf8..8465f0589a09 100644 --- a/selfservice/flow/verification/handler.go +++ b/selfservice/flow/verification/handler.go @@ -234,7 +234,7 @@ func (h *Handler) fetch(w http.ResponseWriter, r *http.Request, _ httprouter.Par rid := x.ParseUUID(r.URL.Query().Get("id")) req, err := h.d.VerificationFlowPersister().GetVerificationFlow(r.Context(), rid) if err != nil { - h.d.Writer().Write(w, r, req) + h.d.Writer().WriteError(w, r, err) return } diff --git a/selfservice/flow/verification/handler_test.go b/selfservice/flow/verification/handler_test.go index 49c6d55dc1f3..71333777bc73 100644 --- a/selfservice/flow/verification/handler_test.go +++ b/selfservice/flow/verification/handler_test.go @@ -132,6 +132,7 @@ func TestGetFlow(t *testing.T) { require.NoError(t, err) assert.Equal(t, public.URL+verification.RouteInitBrowserFlow+"?return_to=https://www.ory.sh", f.RequestURL) }) + t.Run("case=relative redirect when self-service verification ui is a relative URL", func(t *testing.T) { router := x.NewRouterPublic() ts, _ := testhelpers.NewKratosServerWithRouters(t, reg, router, x.NewRouterAdmin()) @@ -142,4 +143,12 @@ func TestGetFlow(t *testing.T) { testhelpers.GetSelfServiceRedirectLocation(t, ts.URL+verification.RouteInitBrowserFlow), ) }) + + t.Run("case=not found", func(t *testing.T) { + client := testhelpers.NewClientWithCookies(t) + _ = setupVerificationUI(t, client) + + res, _ := x.EasyGet(t, client, public.URL+verification.RouteGetFlow+"?id="+x.NewUUID().String()) + assert.EqualValues(t, http.StatusNotFound, res.StatusCode) + }) }
talos
https://github.com/siderolabs/talos
ce795f1cea9d78c26edbcd4a40bb5d3637fde629
Andrey Smirnov
2021-03-22 14:41:06
fix: command `etcd remove-member` shouldn't remove etcd data directory
There are two APIs and `talosctl` commands: * `etcd leave` removes the member from the cluster and removes etcd data directory for the called node * `etcd remove-member <node>` removes some other node from the etcd cluster, but it doesn't affect called node state This fixes confusing naming of the methods vs. what they're doing.
fix: command `etcd remove-member` shouldn't remove etcd data directory There are two APIs and `talosctl` commands: * `etcd leave` removes the member from the cluster and removes etcd data directory for the called node * `etcd remove-member <node>` removes some other node from the etcd cluster, but it doesn't affect called node state This fixes confusing naming of the methods vs. what they're doing. Fixes #3340 Signed-off-by: Andrey Smirnov <[email protected]>
diff --git a/internal/pkg/etcd/etcd.go b/internal/pkg/etcd/etcd.go index 36dde628f33..df3b02ec34c 100644 --- a/internal/pkg/etcd/etcd.go +++ b/internal/pkg/etcd/etcd.go @@ -151,14 +151,27 @@ func validateMemberHealth(ctx context.Context, memberURIs []string) (err error) return c.ValidateQuorum(ctx) } -// LeaveCluster removes the current member from the etcd cluster. +// LeaveCluster removes the current member from the etcd cluster and nukes etcd data directory. func (c *Client) LeaveCluster(ctx context.Context) error { hostname, err := os.Hostname() if err != nil { return err } - return c.RemoveMember(ctx, hostname) + if err = c.RemoveMember(ctx, hostname); err != nil { + return err + } + + if err = system.Services(nil).Stop(ctx, "etcd"); err != nil { + return fmt.Errorf("failed to stop etcd: %w", err) + } + + // Once the member is removed, the data is no longer valid. + if err = os.RemoveAll(constants.EtcdDataPath); err != nil { + return fmt.Errorf("failed to remove %s: %w", constants.EtcdDataPath, err) + } + + return nil } // RemoveMember removes the member from the etcd cluster. @@ -188,15 +201,6 @@ func (c *Client) RemoveMember(ctx context.Context, hostname string) error { return fmt.Errorf("failed to remove member %d: %w", *id, err) } - if err = system.Services(nil).Stop(ctx, "etcd"); err != nil { - return fmt.Errorf("failed to stop etcd: %w", err) - } - - // Once the member is removed, the data is no longer valid. - if err = os.RemoveAll(constants.EtcdDataPath); err != nil { - return fmt.Errorf("failed to remove %s: %w", constants.EtcdDataPath, err) - } - return nil }
tabby
https://github.com/TabbyML/tabby
732d83feefbec8432021071f84183b433c727f93
Zhiming Ma
2023-08-17 19:58:41
feat(agent): monitor completion response time. (#359)
* feat(agent): monitor completion response time. * fix(agent): improve help message for running large model on cpu. * fix: notification spacing.
feat(agent): monitor completion response time. (#359) * feat(agent): monitor completion response time. * fix(agent): improve help message for running large model on cpu. * fix: notification spacing.
diff --git a/clients/tabby-agent/openapi/tabby.json b/clients/tabby-agent/openapi/tabby.json index a1a83d433d00..86fbb29c2953 100644 --- a/clients/tabby-agent/openapi/tabby.json +++ b/clients/tabby-agent/openapi/tabby.json @@ -37,17 +37,9 @@ "responses": { "200": { "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CompletionResponse" - } - } - } + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompletionResponse" } } } }, - "400": { - "description": "Bad Request" - } + "400": { "description": "Bad Request" } } } }, @@ -56,23 +48,10 @@ "tags": ["v1"], "operationId": "event", "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LogEventRequest" - } - } - }, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogEventRequest" } } }, "required": true }, - "responses": { - "200": { - "description": "Success" - }, - "400": { - "description": "Bad Request" - } - } + "responses": { "200": { "description": "Success" }, "400": { "description": "Bad Request" } } } }, "/v1/health": { @@ -82,13 +61,7 @@ "responses": { "200": { "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HealthState" - } - } - } + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthState" } } } } } } @@ -100,108 +73,62 @@ "type": "object", "required": ["index", "text"], "properties": { - "index": { - "type": "integer", - "format": "int32", - "minimum": 0 - }, - "text": { - "type": "string" - } + "index": { "type": "integer", "format": "int32", "minimum": 0.0 }, + "text": { "type": "string" } } }, "CompletionRequest": { "type": "object", "properties": { - "prompt": { - "type": "string", - "example": "def fib(n):", - "nullable": true - }, + "prompt": { "type": "string", "example": "def fib(n):", "nullable": true }, "language": { "type": "string", "description": "Language identifier, full list is maintained at\nhttps://code.visualstudio.com/docs/languages/identifiers", "example": "python", "nullable": true }, - "segments": { - "allOf": [ - { - "$ref": "#/components/schemas/Segments" - } - ], - "nullable": true - }, - "user": { - "type": "string", - "nullable": true - } + "segments": { "allOf": [{ "$ref": "#/components/schemas/Segments" }], "nullable": true }, + "user": { "type": "string", "nullable": true } }, "example": { "language": "python", - "segments": { - "prefix": "def fib(n):\n ", - "suffix": "\n return fib(n - 1) + fib(n - 2)" - } + "segments": { "prefix": "def fib(n):\n ", "suffix": "\n return fib(n - 1) + fib(n - 2)" } } }, "CompletionResponse": { "type": "object", "required": ["id", "choices"], "properties": { - "id": { - "type": "string" - }, - "choices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Choice" - } - } + "id": { "type": "string" }, + "choices": { "type": "array", "items": { "$ref": "#/components/schemas/Choice" } } } }, "HealthState": { "type": "object", - "required": ["model", "device", "compute_type"], + "required": ["model", "device", "compute_type", "arch", "cpu_info", "cpu_count"], "properties": { - "model": { - "type": "string" - }, - "device": { - "type": "string" - }, - "compute_type": { - "type": "string" - } + "model": { "type": "string" }, + "device": { "type": "string" }, + "compute_type": { "type": "string" }, + "arch": { "type": "string" }, + "cpu_info": { "type": "string" }, + "cpu_count": { "type": "integer", "minimum": 0.0 } } }, "LogEventRequest": { "type": "object", "required": ["type", "completion_id", "choice_index"], "properties": { - "type": { - "type": "string", - "description": "Event type, should be `view` or `select`.", - "example": "view" - }, - "completion_id": { - "type": "string" - }, - "choice_index": { - "type": "integer", - "format": "int32", - "minimum": 0 - } + "type": { "type": "string", "description": "Event type, should be `view` or `select`.", "example": "view" }, + "completion_id": { "type": "string" }, + "choice_index": { "type": "integer", "format": "int32", "minimum": 0.0 } } }, "Segments": { "type": "object", "required": ["prefix"], "properties": { - "prefix": { - "type": "string", - "description": "Content that appears before the cursor in the editor window." - }, + "prefix": { "type": "string", "description": "Content that appears before the cursor in the editor window." }, "suffix": { "type": "string", "description": "Content that appears after the cursor in the editor window.", diff --git a/clients/tabby-agent/src/Agent.ts b/clients/tabby-agent/src/Agent.ts index 3a13ab72c226..ed3deb816b5c 100644 --- a/clients/tabby-agent/src/Agent.ts +++ b/clients/tabby-agent/src/Agent.ts @@ -2,6 +2,7 @@ import { CancelablePromise, LogEventRequest as ApiLogEventRequest, CompletionResponse as ApiCompletionResponse, + HealthState, } from "./generated"; import { AgentConfig, PartialAgentConfig } from "./AgentConfig"; @@ -11,11 +12,14 @@ export type AgentInitOptions = Partial<{ client: string; }>; +export type ServerHealthState = HealthState; + export type CompletionRequest = { filepath: string; language: string; text: string; position: number; + manually?: boolean; maxPrefixLines?: number; maxSuffixLines?: number; }; @@ -24,16 +28,31 @@ export type CompletionResponse = ApiCompletionResponse; export type LogEventRequest = ApiLogEventRequest; +export type SlowCompletionResponseTimeIssue = { + name: "slowCompletionResponseTime"; + completionResponseStats: Record<string, number>; +}; +export type HighCompletionTimeoutRateIssue = { + name: "highCompletionTimeoutRate"; + completionResponseStats: Record<string, number>; +}; +export type AgentIssue = SlowCompletionResponseTimeIssue | HighCompletionTimeoutRateIssue; + /** - * `notInitialized`: When the agent is not initialized. - * `ready`: When the agent get a valid response from the server, and is ready to use. - * `disconnected`: When the agent failed to connect to the server. - * `unauthorized`: When the server is set to a Tabby Cloud endpoint that requires auth, + * Represents the status of the agent. + * @enum + * @property {string} notInitialized - When the agent is not initialized. + * @property {string} ready - When the agent gets a valid response from the server. + * @property {string} disconnected - When the agent fails to connect to the server. + * @property {string} unauthorized - When the server is set to a Tabby Cloud endpoint that requires auth, * and no `Authorization` request header is provided in the agent config, - * and user has not completed the auth flow or the auth token is expired. + * and the user has not completed the auth flow or the auth token is expired. * See also `requestAuthUrl` and `waitForAuthToken`. + * @property {string} issuesExist - When the agent gets a valid response from the server, but still + * has some non-blocking issues, e.g. the average completion response time is too slow, + * or the timeout rate is too high. */ -export type AgentStatus = "notInitialized" | "ready" | "disconnected" | "unauthorized"; +export type AgentStatus = "notInitialized" | "ready" | "disconnected" | "unauthorized" | "issuesExist"; export interface AgentFunction { /** @@ -70,6 +89,16 @@ export interface AgentFunction { */ getStatus(): AgentStatus; + /** + * @returns the current issues if AgentStatus is `issuesExist`, otherwise returns empty array + */ + getIssues(): AgentIssue[]; + + /** + * @returns server info returned from latest server health check, returns null if not available + */ + getServerHealthState(): ServerHealthState | null; + /** * Request auth url for Tabby Cloud endpoint. Only return value when the `AgentStatus` is `unauthorized`. * Otherwise, return null. See also `AgentStatus`. @@ -117,9 +146,13 @@ export type AuthRequiredEvent = { event: "authRequired"; server: AgentConfig["server"]; }; +export type NewIssueEvent = { + event: "newIssue"; + issue: AgentIssue; +}; -export type AgentEvent = StatusChangedEvent | ConfigUpdatedEvent | AuthRequiredEvent; -export const agentEventNames: AgentEvent["event"][] = ["statusChanged", "configUpdated", "authRequired"]; +export type AgentEvent = StatusChangedEvent | ConfigUpdatedEvent | AuthRequiredEvent | NewIssueEvent; +export const agentEventNames: AgentEvent["event"][] = ["statusChanged", "configUpdated", "authRequired", "newIssue"]; export interface AgentEventEmitter { on<T extends AgentEvent>(eventName: T["event"], callback: (event: T) => void): this; diff --git a/clients/tabby-agent/src/AgentConfig.ts b/clients/tabby-agent/src/AgentConfig.ts index 70d8d8515c05..67404ca81ae7 100644 --- a/clients/tabby-agent/src/AgentConfig.ts +++ b/clients/tabby-agent/src/AgentConfig.ts @@ -4,8 +4,13 @@ export type AgentConfig = { server: { endpoint: string; requestHeaders: Record<string, string>; + requestTimeout: number; }; completion: { + timeout: { + auto: number; + manually: number; + }; maxPrefixLines: number; maxSuffixLines: number; }; @@ -31,8 +36,13 @@ export const defaultAgentConfig: AgentConfig = { server: { endpoint: "http://localhost:8080", requestHeaders: {}, + requestTimeout: 30000, // 30s }, completion: { + timeout: { + auto: 5000, // 5s + manually: 30000, // 30s + }, maxPrefixLines: 20, maxSuffixLines: 20, }, diff --git a/clients/tabby-agent/src/ResponseStats.ts b/clients/tabby-agent/src/ResponseStats.ts new file mode 100644 index 000000000000..f4ebb735895c --- /dev/null +++ b/clients/tabby-agent/src/ResponseStats.ts @@ -0,0 +1,109 @@ +import { EventEmitter } from "events"; +import { rootLogger } from "./logger"; + +export type ResponseStatsEntry = { + name: string; + status: number; + responseTime: number; + error?: any; +}; + +export type ResponseStatsStrategy = { + maxSize: number; + stats: Record<string, (entries: ResponseStatsEntry[]) => number>; + checks: { + name: string; + check: (entries: ResponseStatsEntry[], stats: Record<string, number>) => boolean; + }[]; +}; + +export const completionResponseTimeStatsStrategy = { + maxSize: 50, + stats: { + total: (entries: ResponseStatsEntry[]) => entries.length, + responses: (entries: ResponseStatsEntry[]) => entries.filter((entry) => entry.status === 200).length, + timeouts: (entries: ResponseStatsEntry[]) => entries.filter((entry) => entry.error?.isTimeoutError).length, + averageResponseTime: (entries: ResponseStatsEntry[]) => + entries.filter((entry) => entry.status === 200).reduce((acc, entry) => acc + entry.responseTime, 0) / + entries.length, + }, + checks: [ + // check in order and emit the first event that matches + // if all the last 5 entries have status 200 and response time less than 3s + { + name: "healthy", + check: (entries: ResponseStatsEntry[], stats) => { + const recentEntries = entries.slice(-5); + return recentEntries.every((entry) => entry.status === 200 && entry.responseTime < 3000); + }, + }, + // if TimeoutError percentage is more than 50%, at least 3 requests + { + name: "highTimeoutRate", + check: (entries: ResponseStatsEntry[], stats) => { + if (stats.total < 3) { + return false; + } + return stats.timeouts / stats.total > 0.5; + }, + }, + // if average response time is more than 4s, at least 5 requests + { + name: "slowResponseTime", + check: (entries: ResponseStatsEntry[], stats) => { + if (stats.responses < 5) { + return false; + } + return stats.averageResponseTime > 4000; + }, + }, + ], +}; + +export class ResponseStats extends EventEmitter { + private readonly logger = rootLogger.child({ component: "ResponseStats" }); + private strategy: ResponseStatsStrategy = { + maxSize: 0, + stats: {}, + checks: [], + }; + + private entries: ResponseStatsEntry[] = []; + + constructor(strategy: ResponseStatsStrategy) { + super(); + this.strategy = strategy; + } + + push(entry: ResponseStatsEntry): void { + this.entries.push(entry); + if (this.entries.length > this.strategy.maxSize) { + this.entries.shift(); + } + const stats = this.stats(); + for (const check of this.strategy.checks) { + if (check.check(this.entries, stats)) { + this.logger.debug({ check: check.name, stats }, "Check condition met"); + this.emit(check.name, stats); + } + } + } + + stats(): Record<string, number> { + const result: Record<string, number> = {}; + for (const [name, stats] of Object.entries(this.strategy.stats)) { + result[name] = stats(this.entries); + } + return result; + } + + check(): string | null { + const stats = this.stats(); + for (const check of this.strategy.checks) { + if (check.check(this.entries, stats)) { + return check.name; + } + } + return null; + } +} diff --git a/clients/tabby-agent/src/TabbyAgent.ts b/clients/tabby-agent/src/TabbyAgent.ts index c354acb87726..d43982e99465 100644 --- a/clients/tabby-agent/src/TabbyAgent.ts +++ b/clients/tabby-agent/src/TabbyAgent.ts @@ -8,8 +8,10 @@ import { cancelable, splitLines, isBlank } from "./utils"; import { Agent, AgentStatus, + AgentIssue, AgentEvent, AgentInitOptions, + ServerHealthState, CompletionRequest, CompletionResponse, LogEventRequest, @@ -21,6 +23,7 @@ import { DataStore } from "./dataStore"; import { postprocess, preCacheProcess } from "./postprocess"; import { rootLogger, allLoggers } from "./logger"; import { AnonymousUsageLogger } from "./AnonymousUsageLogger"; +import { ResponseStats, completionResponseTimeStatsStrategy } from "./ResponseStats"; /** * Different from AgentInitOptions or AgentConfig, this may contain non-serializable objects, @@ -37,12 +40,15 @@ export class TabbyAgent extends EventEmitter implements Agent { private userConfig: PartialAgentConfig = {}; // config from `~/.tabby/agent/config.toml` private clientConfig: PartialAgentConfig = {}; // config from `initialize` and `updateConfig` method private status: AgentStatus = "notInitialized"; + private issues: AgentIssue["name"][] = []; + private serverHealthState: ServerHealthState | null = null; private api: TabbyApi; private auth: Auth; private dataStore: DataStore | null = null; private completionCache: CompletionCache = new CompletionCache(); static readonly tryConnectInterval = 1000 * 30; // 30s private tryingConnectTimer: ReturnType<typeof setInterval> | null = null; + private completionResponseStats: ResponseStats = new ResponseStats(completionResponseTimeStatsStrategy); private constructor() { super(); @@ -53,6 +59,23 @@ export class TabbyAgent extends EventEmitter implements Agent { await this.healthCheck(); } }, TabbyAgent.tryConnectInterval); + + this.completionResponseStats.on("healthy", () => { + this.popIssue("slowCompletionResponseTime"); + this.popIssue("highCompletionTimeoutRate"); + }); + this.completionResponseStats.on("highTimeoutRate", () => { + if (this.status === "ready" || this.status === "issuesExist") { + this.popIssue("slowCompletionResponseTime"); + this.pushIssue("highCompletionTimeoutRate"); + } + }); + this.completionResponseStats.on("slowResponseTime", () => { + if (this.status === "ready" || this.status === "issuesExist") { + this.popIssue("highCompletionTimeoutRate"); + this.pushIssue("slowCompletionResponseTime"); + } + }); } static async create(options?: TabbyAgentOptions): Promise<TabbyAgent> { @@ -101,6 +124,38 @@ export class TabbyAgent extends EventEmitter implements Agent { } } + private issueWithDetails(issue: AgentIssue["name"]): AgentIssue { + switch (issue) { + case "highCompletionTimeoutRate": + return { + name: "highCompletionTimeoutRate", + completionResponseStats: this.completionResponseStats.stats(), + }; + case "slowCompletionResponseTime": + return { + name: "slowCompletionResponseTime", + completionResponseStats: this.completionResponseStats.stats(), + }; + } + } + + private pushIssue(issue: AgentIssue["name"]) { + if (this.issues.indexOf(issue) === -1) { + this.issues.push(issue); + this.changeStatus("issuesExist"); + const event: AgentEvent = { event: "newIssue", issue: this.issueWithDetails(issue) }; + this.logger.debug({ event }, "New issue"); + super.emit("newIssue", event); + } + } + + private popIssue(issue: AgentIssue["name"]) { + this.issues = this.issues.filter((i) => i !== issue); + if (this.issues.length === 0 && this.status === "issuesExist") { + this.changeStatus("ready"); + } + } + private emitAuthRequired() { const event: AgentEvent = { event: "authRequired", server: this.config.server }; super.emit("authRequired", event); @@ -109,44 +164,99 @@ export class TabbyAgent extends EventEmitter implements Agent { private callApi<Request, Response>( api: (request: Request) => CancelablePromise<Response>, request: Request, + options: { timeout?: number } = { timeout: this.config.server.requestTimeout }, ): CancelablePromise<Response> { - this.logger.debug({ api: api.name, request }, "API request"); - const promise = api.call(this.api.v1, request); - return cancelable( - promise + return new CancelablePromise((resolve, reject, onCancel) => { + const requestId = uuid(); + this.logger.debug({ requestId, api: api.name, request }, "API request"); + let timeout: ReturnType<typeof setTimeout> | null = null; + let timeoutCancelled = false; + const apiRequest = api.call(this.api.v1, request); + const requestStartedAt = performance.now(); + apiRequest .then((response: Response) => { - this.logger.debug({ api: api.name, response }, "API response"); - this.changeStatus("ready"); - return response; + this.logger.debug({ requestId, api: api.name, response }, "API response"); + if (this.status !== "issuesExist") { + this.changeStatus("ready"); + } + if (api.name === "completion") { + this.completionResponseStats.push({ + name: api.name, + status: 200, + responseTime: performance.now() - requestStartedAt, + }); + } + if (timeout) { + clearTimeout(timeout); + } + resolve(response); }) .catch((error) => { - if (!!error.isCancelled) { - this.logger.debug({ api: api.name, error }, "API request canceled"); + if ( + (!!error.isCancelled && timeoutCancelled) || + (!error.isCancelled && error.code === "ECONNABORTED") || + (error.name === "ApiError" && [408, 499].indexOf(error.status) !== -1) + ) { + error.isTimeoutError = true; + this.logger.debug({ requestId, api: api.name, error }, "API request timeout"); + } else if (!!error.isCancelled) { + this.logger.debug({ requestId, api: api.name, error }, "API request cancelled"); } else if ( error.name === "ApiError" && [401, 403, 405].indexOf(error.status) !== -1 && new URL(this.config.server.endpoint).hostname.endsWith("app.tabbyml.com") && this.config.server.requestHeaders["Authorization"] === undefined ) { - this.logger.debug({ api: api.name, error }, "API unauthorized"); + this.logger.debug({ requestId, api: api.name, error }, "API unauthorized"); this.changeStatus("unauthorized"); } else if (error.name === "ApiError") { - this.logger.error({ api: api.name, error }, "API error"); + this.logger.error({ requestId, api: api.name, error }, "API error"); this.changeStatus("disconnected"); } else { - this.logger.error({ api: api.name, error }, "API request failed with unknown error"); + this.logger.error({ requestId, api: api.name, error }, "API request failed with unknown error"); this.changeStatus("disconnected"); } - throw error; - }), - () => { - promise.cancel(); - }, - ); + // don't record cancelled request in stats + if (api.name === "completion" && (error.isTimeoutError || !error.isCancelled)) { + this.completionResponseStats.push({ + name: api.name, + status: error.status, + responseTime: performance.now() - requestStartedAt, + error, + }); + } + if (timeout) { + clearTimeout(timeout); + } + reject(error); + }); + // It seems that openapi-typescript-codegen does not provide timeout options passing to axios, + // Just use setTimeout to cancel the request manually. + if (options.timeout && options.timeout > 0) { + timeout = setTimeout( + () => { + this.logger.debug({ api: api.name, timeout: options.timeout }, "Cancel API request due to timeout"); + timeoutCancelled = true; + apiRequest.cancel(); + }, + Math.min(options.timeout, 0x7fffffff), + ); + } + onCancel(() => { + if (timeout) { + clearTimeout(timeout); + } + apiRequest.cancel(); + }); + }); } private healthCheck(): Promise<any> { - return this.callApi(this.api.v1.health, {}).catch(() => {}); + return this.callApi(this.api.v1.health, {}) + .then((healthState) => { + this.serverHealthState = healthState; + }) + .catch(() => {}); } private createSegments(request: CompletionRequest): { prefix: string; suffix: string } { @@ -198,6 +308,10 @@ export class TabbyAgent extends EventEmitter implements Agent { } const prevStatus = this.status; await this.applyConfig(); + // If server config changed, clear server health state + if (key.startsWith("server")) { + this.serverHealthState = null; + } // If status unchanged, `authRequired` will not be emitted when `applyConfig`, // so we need to emit it manually. if (key.startsWith("server") && prevStatus === "unauthorized" && this.status === "unauthorized") { @@ -222,6 +336,14 @@ export class TabbyAgent extends EventEmitter implements Agent { return this.status; } + public getIssues(): AgentIssue[] { + return this.issues.map((issue) => this.issueWithDetails(issue)); + } + + public getServerHealthState(): ServerHealthState | null { + return this.serverHealthState; + } + public requestAuthUrl(): CancelablePromise<{ authUrl: string; code: string } | null> { if (this.status === "notInitialized") { return cancelable(Promise.reject("Agent is not initialized"), () => {}); @@ -283,11 +405,17 @@ export class TabbyAgent extends EventEmitter implements Agent { choices: [], }; } - const apiRequest = this.callApi(this.api.v1.completion, { - language: request.language, - segments, - user: this.auth?.user, - }); + const apiRequest = this.callApi( + this.api.v1.completion, + { + language: request.language, + segments, + user: this.auth?.user, + }, + { + timeout: request.manually ? this.config.completion.timeout.manually : this.config.completion.timeout.auto, + }, + ); cancelableList.push(apiRequest); return apiRequest .then((response) => { diff --git a/clients/vscode/src/TabbyCompletionProvider.ts b/clients/vscode/src/TabbyCompletionProvider.ts index 30bd8d6033df..852941adf1ad 100644 --- a/clients/vscode/src/TabbyCompletionProvider.ts +++ b/clients/vscode/src/TabbyCompletionProvider.ts @@ -4,6 +4,7 @@ import { InlineCompletionItem, InlineCompletionItemProvider, InlineCompletionList, + InlineCompletionTriggerKind, Position, ProviderResult, Range, @@ -65,6 +66,7 @@ export class TabbyCompletionProvider implements InlineCompletionItemProvider { language: document.languageId, // https://code.visualstudio.com/docs/languages/identifiers text: document.getText(), position: document.offsetAt(position), + manually: context.triggerKind === InlineCompletionTriggerKind.Invoke, maxPrefixLines: this.maxPrefixLines, maxSuffixLines: this.maxSuffixLines, }; diff --git a/clients/vscode/src/commands.ts b/clients/vscode/src/commands.ts index 4b38d04b2a39..c8f25602cacc 100644 --- a/clients/vscode/src/commands.ts +++ b/clients/vscode/src/commands.ts @@ -174,6 +174,16 @@ const statusBarItemClicked: Command = { case "unauthorized": notifications.showInformationStartAuth(); break; + case "issuesExist": + switch (agent().getIssues()[0]?.name) { + case "slowCompletionResponseTime": + notifications.showInformationWhenSlowCompletionResponseTime(); + break; + case "highCompletionTimeoutRate": + notifications.showInformationWhenHighCompletionTimeoutRate(); + break; + } + break; case "disabled": const enabled = workspace.getConfiguration("tabby").get("codeCompletion", true); const inlineSuggestEnabled = workspace.getConfiguration("editor").get("inlineSuggest.enabled", true); diff --git a/clients/vscode/src/notifications.ts b/clients/vscode/src/notifications.ts index 3af5e4c4dc90..1111221866e2 100644 --- a/clients/vscode/src/notifications.ts +++ b/clients/vscode/src/notifications.ts @@ -1,4 +1,5 @@ -import { commands, window, workspace, ConfigurationTarget } from "vscode"; +import { commands, window, workspace, env, ConfigurationTarget, Uri } from "vscode"; +import { agent } from "./agent"; function showInformationWhenLoading() { window.showInformationMessage("Tabby is initializing.", "Settings").then((selection) => { @@ -109,6 +110,113 @@ function showInformationWhenInlineSuggestDisabled() { }); } +function getHelpMessageForCompletionResponseTimeIssue() { + let helpMessageForRunningLargeModelOnCPU = ""; + const serverHealthState = agent().getServerHealthState(); + if (serverHealthState?.device === "cpu" && serverHealthState?.model?.match(/[0-9\.]+B$/)) { + helpMessageForRunningLargeModelOnCPU += + `Your Tabby server is running model ${serverHealthState?.model} on CPU. ` + + "This model is too large to run on CPU, please try a smaller model or switch to GPU. " + + "You can find supported model list by search TabbyML on HuggingFace. \n"; + } + let message = ""; + if (helpMessageForRunningLargeModelOnCPU.length > 0) { + message += helpMessageForRunningLargeModelOnCPU + "\n"; + message += "Other possible causes of this issue are: \n"; + } else { + message += "Possible causes of this issue are: \n"; + } + message += " - A poor network connection. Please check your network and proxy settings.\n"; + message += " - Server overload. Please contact your Tabby server administrator for assistance.\n"; + if (helpMessageForRunningLargeModelOnCPU.length == 0) { + message += ` - The running model ${serverHealthState?.model ?? ""} is too large to run on your Tabby server. `; + message += "Please try a smaller model. You can find supported model list by search TabbyML on HuggingFace.\n"; + } + return message; +} + +function showInformationWhenSlowCompletionResponseTime(modal: boolean = false) { + if (modal) { + const stats = agent() + .getIssues() + .find((issue) => issue.name === "slowCompletionResponseTime")?.completionResponseStats; + let statsMessage = ""; + if (stats && stats["responses"] && stats["averageResponseTime"]) { + statsMessage = `The average response time of recent ${stats["responses"]} completion requests is ${Number( + stats["averageResponseTime"], + ).toFixed(0)}ms.\n\n`; + } + window + .showWarningMessage( + "Completion requests appear to take too much time.", + { + modal: true, + detail: statsMessage + getHelpMessageForCompletionResponseTimeIssue(), + }, + "Supported Models", + ) + .then((selection) => { + switch (selection) { + case "Supported Models": + env.openExternal(Uri.parse("https://huggingface.co/models?search=tabbyml")); + break; + } + }); + } else { + window + .showWarningMessage("Completion requests appear to take too much time.", "Detail", "Settings") + .then((selection) => { + switch (selection) { + case "Detail": + showInformationWhenSlowCompletionResponseTime(true); + break; + case "Settings": + commands.executeCommand("tabby.openSettings"); + break; + } + }); + } +} + +function showInformationWhenHighCompletionTimeoutRate(modal: boolean = false) { + if (modal) { + const stats = agent() + .getIssues() + .find((issue) => issue.name === "highCompletionTimeoutRate")?.completionResponseStats; + let statsMessage = ""; + if (stats && stats["total"] && stats["timeouts"]) { + statsMessage = `${stats["timeouts"]} of ${stats["total"]} completion requests timed out.\n\n`; + } + window + .showWarningMessage( + "Most completion requests timed out.", + { + modal: true, + detail: statsMessage + getHelpMessageForCompletionResponseTimeIssue(), + }, + "Supported Models", + ) + .then((selection) => { + switch (selection) { + case "Supported Models": + env.openExternal(Uri.parse("https://huggingface.co/models?search=tabbyml")); + break; + } + }); + } else { + window.showWarningMessage("Most completion requests timed out.", "Detail", "Settings").then((selection) => { + switch (selection) { + case "Detail": + showInformationWhenHighCompletionTimeoutRate(true); + break; + case "Settings": + commands.executeCommand("tabby.openSettings"); + break; + } + }); + } +} + export const notifications = { showInformationWhenLoading, showInformationWhenDisabled, @@ -119,4 +227,6 @@ export const notifications = { showInformationWhenStartAuthButAlreadyAuthorized, showInformationWhenAuthFailed, showInformationWhenInlineSuggestDisabled, + showInformationWhenSlowCompletionResponseTime, + showInformationWhenHighCompletionTimeoutRate, }; diff --git a/clients/vscode/src/statusBarItem.ts b/clients/vscode/src/statusBarItem.ts index 6d8c389b81f0..0418cea3fd8d 100644 --- a/clients/vscode/src/statusBarItem.ts +++ b/clients/vscode/src/statusBarItem.ts @@ -8,6 +8,7 @@ const iconLoading = "$(loading~spin)"; const iconReady = "$(check)"; const iconDisconnected = "$(plug)"; const iconUnauthorized = "$(key)"; +const iconIssueExist = "$(warning)"; const iconDisabled = "$(x)"; const colorNormal = new ThemeColor("statusBar.foreground"); const colorWarning = new ThemeColor("statusBarItem.warningForeground"); @@ -20,15 +21,33 @@ const fsm = createMachine({ initial: "loading", states: { loading: { - on: { ready: "ready", disconnected: "disconnected", unauthorized: "unauthorized", disabled: "disabled" }, + on: { + ready: "ready", + disconnected: "disconnected", + unauthorized: "unauthorized", + issuesExist: "issuesExist", + disabled: "disabled", + }, entry: () => toLoading(), }, ready: { - on: { disconnected: "disconnected", unauthorized: "unauthorized", disabled: "disabled" }, + on: { + loading: "loading", + disconnected: "disconnected", + unauthorized: "unauthorized", + issuesExist: "issuesExist", + disabled: "disabled", + }, entry: () => toReady(), }, disconnected: { - on: { ready: "ready", unauthorized: "unauthorized", disabled: "disabled" }, + on: { + loading: "loading", + ready: "ready", + unauthorized: "unauthorized", + issuesExist: "issuesExist", + disabled: "disabled", + }, entry: () => toDisconnected(), }, unauthorized: { @@ -36,17 +55,39 @@ const fsm = createMachine({ ready: "ready", disconnected: "disconnected", disabled: "disabled", + issuesExist: "issuesExist", authStart: "unauthorizedAndAuthInProgress", }, entry: () => toUnauthorized(), }, unauthorizedAndAuthInProgress: { - // if auth succeeds, we will get `ready` before `authEnd` event - on: { ready: "ready", disconnected: "disconnected", disabled: "disabled", authEnd: "unauthorized" }, + on: { + ready: "ready", + disconnected: "disconnected", + issuesExist: "issuesExist", + disabled: "disabled", + authEnd: "unauthorized", // if auth succeeds, we will get `ready` before `authEnd` event + }, entry: () => toUnauthorizedAndAuthInProgress(), }, + issuesExist: { + on: { + loading: "loading", + ready: "ready", + disconnected: "disconnected", + unauthorized: "unauthorized", + disabled: "disabled", + }, + entry: () => toIssuesExist(), + }, disabled: { - on: { loading: "loading", ready: "ready", disconnected: "disconnected", unauthorized: "unauthorized" }, + on: { + loading: "loading", + ready: "ready", + disconnected: "disconnected", + unauthorized: "unauthorized", + issuesExist: "issuesExist", + }, entry: () => toDisabled(), }, }, @@ -93,6 +134,24 @@ function toUnauthorizedAndAuthInProgress() { item.command = undefined; } +function toIssuesExist() { + item.color = colorWarning; + item.backgroundColor = backgroundColorWarning; + item.text = `${iconIssueExist} ${label}`; + switch (agent().getIssues()[0]?.name) { + case "slowCompletionResponseTime": + item.tooltip = "Completion requests appear to take too much time."; + break; + case "highCompletionTimeoutRate": + item.tooltip = "Most completion requests timed out."; + break; + default: + item.tooltip = ""; + break; + } + item.command = { title: "", command: "tabby.statusBarItemClicked", arguments: ["issuesExist"] }; +} + function toDisabled() { item.color = colorWarning; item.backgroundColor = backgroundColorWarning; @@ -115,6 +174,7 @@ function updateStatusBarItem() { case "ready": case "disconnected": case "unauthorized": + case "issuesExist": fsmService.send(status); break; } @@ -143,6 +203,14 @@ export const tabbyStatusBarItem = () => { }); }); + agent().on("newIssue", (event) => { + if (event.issue.name === "slowCompletionResponseTime") { + notifications.showInformationWhenSlowCompletionResponseTime(); + } else if (event.issue.name === "highCompletionTimeoutRate") { + notifications.showInformationWhenHighCompletionTimeoutRate(); + } + }); + item.show(); return item; };
docusaurus
https://github.com/facebook/docusaurus
2bc54a80fcf82d89891255397ccd71c3bf5a03fe
Fanny
2020-04-21 17:24:12
feat(v2): bootstrap layout footer (#2635)
* feat(v2): add minor adjustements and footer component * fix(v2): margin and spacing of footer * fix(v2): spacings * fix(v2): remove unrelated links of the bootstrap template * fix(v2): remove unrelated links of the bootstrap template
feat(v2): bootstrap layout footer (#2635) * feat(v2): add minor adjustements and footer component * fix(v2): margin and spacing of footer * fix(v2): spacings * fix(v2): remove unrelated links of the bootstrap template * fix(v2): remove unrelated links of the bootstrap template
diff --git a/packages/docusaurus-theme-bootstrap/src/theme/BlogListPage/index.js b/packages/docusaurus-theme-bootstrap/src/theme/BlogListPage/index.js index 04490b8bf393..71c72864047b 100644 --- a/packages/docusaurus-theme-bootstrap/src/theme/BlogListPage/index.js +++ b/packages/docusaurus-theme-bootstrap/src/theme/BlogListPage/index.js @@ -7,12 +7,13 @@ import React from 'react'; import BlogPostCard from '@theme/BlogPostItem'; +import Footer from '@theme/Footer'; function BlogListPage(props) { const {items} = props; return ( - <div className="container-fluid my-5"> + <div className="container-fluid mt-5"> <div className="row row-cols-1 row-cols-sm-1"> {items.map(({content: BlogPostContent}) => ( <div @@ -26,6 +27,7 @@ function BlogListPage(props) { </BlogPostCard> </div> ))} + <Footer /> </div> </div> ); diff --git a/packages/docusaurus-theme-bootstrap/src/theme/BlogPostItem/index.js b/packages/docusaurus-theme-bootstrap/src/theme/BlogPostItem/index.js index 535a62dea33c..a7f81cdba890 100644 --- a/packages/docusaurus-theme-bootstrap/src/theme/BlogPostItem/index.js +++ b/packages/docusaurus-theme-bootstrap/src/theme/BlogPostItem/index.js @@ -49,7 +49,7 @@ function BlogPostItem(props) { const day = parseInt(match[2], 10); return ( - <article className="card h-100"> + <article className="card h-100 shadow"> <div className="row no-gutters rows-col-2 m-3"> <div className="col-xs mr-3"> {authorImageURL && ( diff --git a/packages/docusaurus-theme-bootstrap/src/theme/BlogTagsListPage/index.js b/packages/docusaurus-theme-bootstrap/src/theme/BlogTagsListPage/index.js index a196ddbd200b..689a6bb47ac5 100644 --- a/packages/docusaurus-theme-bootstrap/src/theme/BlogTagsListPage/index.js +++ b/packages/docusaurus-theme-bootstrap/src/theme/BlogTagsListPage/index.js @@ -15,7 +15,7 @@ function BlogTagsListPage(props) { <Link href={tags[tag].permalink} key={tag} - className="btn btn-primary m-2"> + className="btn btn-primary list-inline-item my-2"> {tags[tag].name}{' '} <span className="badge badge-light">{tags[tag].count}</span> </Link> @@ -26,7 +26,7 @@ function BlogTagsListPage(props) { return ( <div className="container my-3 justify-content-center"> <h1 className="text-primary">Tags</h1> - <ul className="my-xl-4">{renderAllTags()}</ul> + <ul className="my-xl-4 list-inline">{renderAllTags()}</ul> </div> ); } diff --git a/packages/docusaurus-theme-bootstrap/src/theme/Footer/index.js b/packages/docusaurus-theme-bootstrap/src/theme/Footer/index.js new file mode 100644 index 000000000000..41d9f0db8f72 --- /dev/null +++ b/packages/docusaurus-theme-bootstrap/src/theme/Footer/index.js @@ -0,0 +1,75 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import React from 'react'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import Link from '@docusaurus/Link'; +import useBaseUrl from '@docusaurus/useBaseUrl'; + +function FooterLink({to, href, label, ...props}) { + const toUrl = useBaseUrl(to); + + return ( + <Link + {...(href + ? { + target: '_blank', + rel: 'noopener noreferrer', + href, + } + : { + to: toUrl, + })} + {...props}> + {label} + </Link> + ); +} + +function Footer() { + const context = useDocusaurusContext(); + const {siteConfig = {}} = context; + const {themeConfig = {}} = siteConfig; + const {footer} = themeConfig; + + const {links} = footer || {}; + + return ( + <footer className="container p-0 m-0"> + <div className="row bg-light no-gutters justify-content-center"> + {links && links.length > 0 && ( + <> + {links.map((linkItem, i) => ( + <div className="col col-xs-1 col-xl-1 mx-4 my-4" key={i}> + {linkItem.title != null && <h5>{linkItem.title}</h5>} + <ul className="list-unstyled"> + {linkItem.items.map((item, key) => + item.html ? ( + <li + key={key} + className="mb-2" + dangerouslySetInnerHTML={{ + __html: item.html, + }} + /> + ) : ( + <li className="mb-1" key={item.href || item.to}> + <FooterLink {...item} /> + </li> + ), + )} + </ul> + </div> + ))} + </> + )} + </div> + </footer> + ); +} + +export default Footer;
superset
https://github.com/apache/superset
6d5771af346e1ae821b1ac0598751508265481a6
Geido
2022-04-07 19:47:50
chore: Remove FilterBox.less (#19462)
* Remove FilterBox less * Fix test * Add theme top level * Use styledMount
chore: Remove FilterBox.less (#19462) * Remove FilterBox less * Fix test * Add theme top level * Use styledMount
diff --git a/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx b/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx index 8f5796644f1af..d734cf943dc67 100644 --- a/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx +++ b/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx @@ -22,7 +22,15 @@ import { debounce } from 'lodash'; import { max as d3Max } from 'd3-array'; import { AsyncCreatableSelect, CreatableSelect } from 'src/components/Select'; import Button from 'src/components/Button'; -import { t, SupersetClient, ensureIsArray } from '@superset-ui/core'; +import { + css, + styled, + t, + SupersetClient, + ensureIsArray, + withTheme, +} from '@superset-ui/core'; +import { Global } from '@emotion/react'; import { BOOL_FALSE_DISPLAY, @@ -43,8 +51,6 @@ import { TIME_FILTER_MAP, } from 'src/explore/constants'; -import './FilterBox.less'; - // a shortcut to a map key, used by many components export const TIME_RANGE = TIME_FILTER_MAP.time_range; @@ -91,6 +97,32 @@ const defaultProps = { instantFiltering: false, }; +const StyledFilterContainer = styled.div` + ${({ theme }) => ` + display: flex; + flex-direction: column; + margin-bottom: ${theme.gridUnit * 2 + 2}px; + + &:last-child { + margin-bottom: 0; + } + + label { + display: flex; + font-weight: ${theme.typography.weights.bold}; + } + + .filter-badge-container { + width: 30px; + padding-right: ${theme.gridUnit * 2 + 2}px; + } + + .filter-badge-container + div { + width: 100%; + } + `} +`; + class FilterBox extends React.PureComponent { constructor(props) { super(props); @@ -409,32 +441,51 @@ class FilterBox extends React.PureComponent { return filtersFields.map(filterConfig => { const { label, key } = filterConfig; return ( - <div key={key} className="m-b-5 filter-container"> + <StyledFilterContainer key={key} className="filter-container"> <FormLabel htmlFor={`LABEL-${key}`}>{label}</FormLabel> {this.renderSelect(filterConfig)} - </div> + </StyledFilterContainer> ); }); } render() { const { instantFiltering, width, height } = this.props; + const { zIndex, gridUnit } = this.props.theme; return ( - <div style={{ width, height, overflow: 'auto' }}> - {this.renderDateFilter()} - {this.renderDatasourceFilters()} - {this.renderFilters()} - {!instantFiltering && ( - <Button - buttonSize="small" - buttonStyle="primary" - onClick={this.clickApply.bind(this)} - disabled={!this.state.hasChanged} - > - {t('Apply')} - </Button> - )} - </div> + <> + <Global + styles={css` + .dashboard .filter_box .slice_container > div:not(.alert) { + padding-top: 0; + } + + .filter_box { + padding: ${gridUnit * 2 + 2}px 0; + overflow: visible !important; + + &:hover { + z-index: ${zIndex.max}; + } + } + `} + /> + <div style={{ width, height, overflow: 'auto' }}> + {this.renderDateFilter()} + {this.renderDatasourceFilters()} + {this.renderFilters()} + {!instantFiltering && ( + <Button + buttonSize="small" + buttonStyle="primary" + onClick={this.clickApply.bind(this)} + disabled={!this.state.hasChanged} + > + {t('Apply')} + </Button> + )} + </div> + </> ); } } @@ -442,4 +493,4 @@ class FilterBox extends React.PureComponent { FilterBox.propTypes = propTypes; FilterBox.defaultProps = defaultProps; -export default FilterBox; +export default withTheme(FilterBox); diff --git a/superset-frontend/src/visualizations/FilterBox/FilterBox.less b/superset-frontend/src/visualizations/FilterBox/FilterBox.less deleted file mode 100644 index 5a8f0953694f8..0000000000000 --- a/superset-frontend/src/visualizations/FilterBox/FilterBox.less +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -@import '../../assets/stylesheets/less/variables.less'; - -.dashboard .filter_box .slice_container > div:not(.alert) { - padding-top: 0; -} - -.filter_box { - padding: 10px 0; - overflow: visible !important; - - &:hover { - z-index: @z-index-max; - } -} - -.m-b-5 { - margin-bottom: 5px; -} - -.input-inline { - float: left; - padding-right: 3px; - - .dropdown { - display: flex; - button { - padding-right: 20px; - .caret { - width: auto; - position: absolute; - right: 5px; - top: 6px; - } - } - } -} - -.filter-container { - display: flex; - flex-direction: column; - margin-bottom: 10px; - - &:last-child { - margin-bottom: 0; - } - - label { - display: flex; - font-weight: @font-weight-bold; - } - - .filter-badge-container { - width: 30px; - padding-right: 10px; - } - - .filter-badge-container + div { - width: 100%; - } -} diff --git a/superset-frontend/src/visualizations/FilterBox/FilterBox.test.jsx b/superset-frontend/src/visualizations/FilterBox/FilterBox.test.jsx index 66597fc69152f..e37a4bf1c69d7 100644 --- a/superset-frontend/src/visualizations/FilterBox/FilterBox.test.jsx +++ b/superset-frontend/src/visualizations/FilterBox/FilterBox.test.jsx @@ -17,14 +17,13 @@ * under the License. */ import React from 'react'; -import { shallow } from 'enzyme'; import { styledMount as mount } from 'spec/helpers/theming'; import FilterBox from 'src/visualizations/FilterBox/FilterBox'; import SelectControl from 'src/explore/components/controls/SelectControl'; describe('FilterBox', () => { it('should only add defined non-predefined options to filtersChoices', () => { - const wrapper = shallow( + const wrapper = mount( <FilterBox chartId={1001} datasource={{ id: 1 }} @@ -48,7 +47,7 @@ describe('FilterBox', () => { origSelectedValues={{}} />, ); - const inst = wrapper.instance(); + const inst = wrapper.find('FilterBox').instance(); // choose a predefined value inst.setState({ selectedValues: { name: ['John'] } }); expect(inst.props.filtersChoices.name.length).toEqual(2);
tachyon
https://github.com/kroma-network/tachyon
02521d349dc994a50891526c1df16fafc05cdc1a
Ryan Kim
2023-11-01 13:19:23
fix(math): fix computing degree and size
- n = DegreeToSize(d) = d + 1 - d = SizeToDegree(n) = n - 1
fix(math): fix computing degree and size - n = DegreeToSize(d) = d + 1 - d = SizeToDegree(n) = n - 1
diff --git a/tachyon/math/polynomials/univariate/mixed_radix_evaluation_domain.h b/tachyon/math/polynomials/univariate/mixed_radix_evaluation_domain.h index 7807705a7..cd1bdc780 100644 --- a/tachyon/math/polynomials/univariate/mixed_radix_evaluation_domain.h +++ b/tachyon/math/polynomials/univariate/mixed_radix_evaluation_domain.h @@ -40,7 +40,7 @@ constexpr size_t MaxDegreeForMixedRadixEvaluationDomain() { for (size_t i = 0; i <= F::Config::kSmallSubgroupAdicity; ++i) { i *= F::Config::kSmallSubgroupBase; } - return i * (size_t{1} << F::Config::kTwoAdicity); + return i * (size_t{1} << F::Config::kTwoAdicity) - 1; } // Defines a domain over which finite field (I)FFTs can be performed. Works only @@ -124,7 +124,7 @@ class MixedRadixEvaluationDomain PrimeFieldFactors* factors) { base::CheckedNumeric<size_t> checked_size = BestMixedDomainSize(num_coeffs); size_t size = checked_size.ValueOrDie(); - if (size > MaxDegree) return false; + if (size > MaxDegree + 1) return false; *size_out = size; return F::Decompose(size, factors); } diff --git a/tachyon/math/polynomials/univariate/radix2_evaluation_domain.h b/tachyon/math/polynomials/univariate/radix2_evaluation_domain.h index 5482b5d8c..f19e79174 100644 --- a/tachyon/math/polynomials/univariate/radix2_evaluation_domain.h +++ b/tachyon/math/polynomials/univariate/radix2_evaluation_domain.h @@ -35,7 +35,8 @@ namespace tachyon::math { // Defines a domain over which finite field (I)FFTs can be performed. Works // only for fields that have a large multiplicative subgroup of size that is a // power-of-2. -template <typename F, size_t MaxDegree = size_t{1} << F::Config::kTwoAdicity> +template <typename F, + size_t MaxDegree = (size_t{1} << F::Config::kTwoAdicity) - 1> class Radix2EvaluationDomain : public UnivariateEvaluationDomain<F, MaxDegree> { public: using Field = F; diff --git a/tachyon/math/polynomials/univariate/univariate_evaluation_domain_factory.h b/tachyon/math/polynomials/univariate/univariate_evaluation_domain_factory.h index 031125a54..2d9b9fd13 100644 --- a/tachyon/math/polynomials/univariate/univariate_evaluation_domain_factory.h +++ b/tachyon/math/polynomials/univariate/univariate_evaluation_domain_factory.h @@ -21,7 +21,7 @@ constexpr size_t MaxDegreeForEvaluationDomainFactory() { i *= F::Config::kSmallSubgroupBase; } } - return i * (size_t{1} << F::Config::kTwoAdicity); + return i * (size_t{1} << F::Config::kTwoAdicity) - 1; } template <typename F,
verdaccio
https://github.com/verdaccio/verdaccio
b7b817533bbe22b6e1091a4718edc46d1f13378d
Juan Picado @jotadeveloper
2019-01-13 17:26:50
chore: add new detail page under development
chore: add new detail page under development update [email protected] update [email protected]
diff --git a/package.json b/package.json index b480472f50a1..6ae43b0c6fff 100644 --- a/package.json +++ b/package.json @@ -130,9 +130,9 @@ "prettier": "1.14.3", "prop-types": "15.6.2", "puppeteer": "1.8.0", - "react": "16.4.2", + "react": "16.7.0", "react-autosuggest": "9.4.2", - "react-dom": "16.4.2", + "react-dom": "16.7.0", "react-emotion": "9.2.12", "react-hot-loader": "4.2.0", "react-router": "4.3.1", diff --git a/src/webui/pages/version/index.js b/src/webui/pages/version/index.js new file mode 100644 index 000000000000..c074585fb633 --- /dev/null +++ b/src/webui/pages/version/index.js @@ -0,0 +1,52 @@ +import React, { Component } from 'react'; +import API from '../../utils/api'; +import Loading from '../../components/Loading'; + +class VersionPage extends Component<any, any> { + + state = { + readMe: '', + packageMeta: null, + isLoading: true, + notFound: false, + }; + + async componentDidMount() { + await this.loadPackageInfo(); + } + + async loadPackageInfo() { + const { match } = this.props; + const packageName = match.params.package; + + this.setState({ + readMe: '', + }); + + try { + const readMe = await API.request(`package/readme/${packageName}`, 'GET'); + const packageMeta = await API.request(`sidebar/${packageName}`, 'GET'); + this.setState({ + readMe, + packageMeta, + notFound: false, + isLoading: false, + }); + } catch (err) { + this.setState({ + notFound: true, + isLoading: false, + }); + } + } + + render() { + const {isLoading} = this.state; + + return ( + <div>{isLoading && <Loading />}</div> + ); + } +} + +export default VersionPage; diff --git a/src/webui/pages/version/styles.js b/src/webui/pages/version/styles.js new file mode 100644 index 000000000000..e64ae85fad9f --- /dev/null +++ b/src/webui/pages/version/styles.js @@ -0,0 +1,17 @@ +/** + * @prettier + * @flow + */ + +import styled from 'react-emotion'; +import DialogTitle from '@material-ui/core/DialogTitle/index'; +import colors from '../../utils/styles/colors'; +import { fontSize } from '../../utils/styles/sizes'; + +export const Title = styled(DialogTitle)` + && { + background-color: ${colors.primary}; + color: ${colors.white}; + font-size: ${fontSize.lg}; + } +`; diff --git a/src/webui/pages/version/types.js b/src/webui/pages/version/types.js new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/src/webui/router.js b/src/webui/router.js index 1c0799e7e4cf..2943c95438ff 100644 --- a/src/webui/router.js +++ b/src/webui/router.js @@ -9,6 +9,7 @@ import { HashRouter as Router, Route, Switch } from 'react-router-dom'; import { asyncComponent } from './utils/asyncComponent'; const DetailPackage = asyncComponent(() => import('./pages/detail')); +const VersionPackage = asyncComponent(() => import('./pages/version')); const HomePage = asyncComponent(() => import('./pages/home')); interface IProps { @@ -26,6 +27,8 @@ class RouterApp extends Component<IProps, IState> { <Route exact={true} path={'/'} render={this.renderHomePage} /> <Route exact={true} path={'/detail/@:scope/:package'} render={this.renderDetailPage} /> <Route exact={true} path={'/detail/:package'} render={this.renderDetailPage} /> + <Route exact={true} path={'/version/@:scope/:package'} render={this.renderVersionPage} /> + <Route exact={true} path={'/version/:package'} render={this.renderVersionPage} /> </Switch> </Router> ); @@ -42,6 +45,12 @@ class RouterApp extends Component<IProps, IState> { return <DetailPackage {...routerProps} isUserLoggedIn={isUserLoggedIn} />; }; + + renderVersionPage = (routerProps: any) => { + const { isUserLoggedIn } = this.props; + + return <VersionPackage {...routerProps} isUserLoggedIn={isUserLoggedIn} />; + }; } export default RouterApp; diff --git a/yarn.lock b/yarn.lock index f86309fb779a..5f8a307945d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5048,7 +5048,7 @@ fb-watchman@^2.0.0: dependencies: bser "^2.0.0" -fbjs@^0.8.1, fbjs@^0.8.16: +fbjs@^0.8.1: version "0.8.17" resolved "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" integrity sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90= @@ -10568,15 +10568,15 @@ react-autowhatever@^10.1.2: react-themeable "^1.1.0" section-iterator "^2.0.0" [email protected]: - version "16.4.2" - resolved "https://registry.npmjs.org/react-dom/-/react-dom-16.4.2.tgz#4afed569689f2c561d2b8da0b819669c38a0bda4" - integrity sha512-Usl73nQqzvmJN+89r97zmeUpQDKDlh58eX6Hbs/ERdDHzeBzWy+ENk7fsGQ+5KxArV1iOFPT46/VneklK9zoWw== [email protected]: + version "16.7.0" + resolved "https://registry.npmjs.org/react-dom/-/react-dom-16.7.0.tgz#a17b2a7ca89ee7390bc1ed5eb81783c7461748b8" + integrity sha512-D0Ufv1ExCAmF38P2Uh1lwpminZFRXEINJe53zRAbm4KPwSyd6DY/uDoS0Blj9jvPpn1+wivKpZYc8aAAN/nAkg== dependencies: - fbjs "^0.8.16" loose-envify "^1.1.0" object-assign "^4.1.1" - prop-types "^15.6.0" + prop-types "^15.6.2" + scheduler "^0.12.0" [email protected]: version "9.2.12" @@ -10680,15 +10680,15 @@ react-transition-group@^2.2.1: prop-types "^15.6.2" react-lifecycles-compat "^3.0.4" [email protected]: - version "16.4.2" - resolved "https://registry.npmjs.org/react/-/react-16.4.2.tgz#2cd90154e3a9d9dd8da2991149fdca3c260e129f" - integrity sha512-dMv7YrbxO4y2aqnvA7f/ik9ibeLSHQJTI6TrYAenPSaQ6OXfb+Oti+oJiy8WBxgRzlKatYqtCjphTgDSCEiWFg== [email protected]: + version "16.7.0" + resolved "https://registry.npmjs.org/react/-/react-16.7.0.tgz#b674ec396b0a5715873b350446f7ea0802ab6381" + integrity sha512-StCz3QY8lxTb5cl2HJxjwLFOXPIFQp+p+hxQfc8WE0QiLfCtIlKj8/+5tjjKm8uSTlAW+fCPaavGFS06V9Ar3A== dependencies: - fbjs "^0.8.16" loose-envify "^1.1.0" object-assign "^4.1.1" - prop-types "^15.6.0" + prop-types "^15.6.2" + scheduler "^0.12.0" read-pkg-up@^1.0.1: version "1.0.1"
ant-design
https://github.com/ant-design/ant-design
369cb69e7faab2857c138afb40b064c198943d83
zombieJ
2019-04-08 17:54:49
feat: TreeSelect support `showSearch` in multiple mode (#15933)
* update rc-tree-select * typo * update desc & snapshot * update desc & snapshot * check default showSearch
feat: TreeSelect support `showSearch` in multiple mode (#15933) * update rc-tree-select * typo * update desc & snapshot * update desc & snapshot * check default showSearch
diff --git a/components/tree-select/__tests__/index.test.js b/components/tree-select/__tests__/index.test.js index ca6174a1e32f..5dcf8ef9f2a8 100644 --- a/components/tree-select/__tests__/index.test.js +++ b/components/tree-select/__tests__/index.test.js @@ -1,6 +1,18 @@ +import React from 'react'; +import { mount } from 'enzyme'; import TreeSelect from '..'; import focusTest from '../../../tests/shared/focusTest'; describe('TreeSelect', () => { focusTest(TreeSelect); + + describe('showSearch', () => { + it('keep default logic', () => { + const single = mount(<TreeSelect open />); + expect(single.find('.ant-select-search__field').length).toBeFalsy(); + + const multiple = mount(<TreeSelect multiple open />); + expect(multiple.find('.ant-select-search__field').length).toBeTruthy(); + }); + }); }); diff --git a/components/tree-select/index.en-US.md b/components/tree-select/index.en-US.md index 71f0a0c42d1f..f2f7defab68a 100644 --- a/components/tree-select/index.en-US.md +++ b/components/tree-select/index.en-US.md @@ -36,7 +36,7 @@ Any data whose entries are defined in a hierarchical manner is fit to use this c | searchValue | work with `onSearch` to make search value controlled. | string | - | | treeIcon | Shows the icon before a TreeNode's title. There is no default style; you must set a custom style for it if set to `true` | boolean | false | | showCheckedStrategy | The way show selected item in box. **Default:** just show child nodes. **`TreeSelect.SHOW_ALL`:** show all checked treeNodes (include parent treeNode). **`TreeSelect.SHOW_PARENT`:** show checked treeNodes (just show parent treeNode). | enum { TreeSelect.SHOW_ALL, TreeSelect.SHOW_PARENT, TreeSelect.SHOW_CHILD } | TreeSelect.SHOW_CHILD | -| showSearch | Whether to display a search input in the dropdown menu(valid only in the single mode) | boolean | false | +| showSearch | Support search or not | boolean | single: `false` \| multiple: `true` | | size | To set the size of the select input, options: `large` `small` | string | 'default' | | suffixIcon | The custom suffix icon | ReactNode | - | | treeCheckable | Whether to show checkbox on the treeNodes | boolean | false | diff --git a/components/tree-select/index.tsx b/components/tree-select/index.tsx index 92b508eed903..0f922917ad0a 100644 --- a/components/tree-select/index.tsx +++ b/components/tree-select/index.tsx @@ -19,7 +19,6 @@ export default class TreeSelect extends React.Component<TreeSelectProps, any> { static defaultProps = { transitionName: 'slide-up', choiceTransitionName: 'zoom', - showSearch: false, }; private rcTreeSelect: any; @@ -83,6 +82,12 @@ export default class TreeSelect extends React.Component<TreeSelectProps, any> { className, ); + // showSearch: single - false, multiple - true + let { showSearch } = restProps; + if (!('showSearch' in restProps)) { + showSearch = !!(restProps.multiple || restProps.treeCheckable); + } + let checkable = rest.treeCheckable; if (checkable) { checkable = <span className={`${prefixCls}-tree-checkbox-inner`} />; @@ -108,6 +113,7 @@ export default class TreeSelect extends React.Component<TreeSelectProps, any> { removeIcon={removeIcon} clearIcon={clearIcon} {...rest} + showSearch={showSearch} getPopupContainer={getPopupContainer || getContextPopupContainer} dropdownClassName={classNames(dropdownClassName, `${prefixCls}-tree-dropdown`)} prefixCls={prefixCls} diff --git a/components/tree-select/index.zh-CN.md b/components/tree-select/index.zh-CN.md index 6b6f8e7e1723..eda1213b93b6 100644 --- a/components/tree-select/index.zh-CN.md +++ b/components/tree-select/index.zh-CN.md @@ -36,7 +36,7 @@ title: TreeSelect | searchValue | 搜索框的值,可以通过 `onSearch` 获取用户输入 | string | - | | treeIcon | 是否展示 TreeNode title 前的图标,没有默认样式,如设置为 true,需要自行定义图标相关样式 | boolean | false | | showCheckedStrategy | 定义选中项回填的方式。`TreeSelect.SHOW_ALL`: 显示所有选中节点(包括父节点). `TreeSelect.SHOW_PARENT`: 只显示父节点(当父节点下所有子节点都选中时). 默认只显示子节点. | enum{TreeSelect.SHOW_ALL, TreeSelect.SHOW_PARENT, TreeSelect.SHOW_CHILD } | TreeSelect.SHOW_CHILD | -| showSearch | 在下拉中显示搜索框(仅在单选模式下生效) | boolean | false | +| showSearch | 是否支持搜索框 | boolean | 单选:`false` \| 多选:`true` | | size | 选择框大小,可选 `large` `small` | string | 'default' | | suffixIcon | 自定义的选择框后缀图标 | ReactNode | - | | treeCheckable | 显示 checkbox | boolean | false | diff --git a/package.json b/package.json index b2369b9c60c5..95930fdd9363 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "rc-time-picker": "~3.6.1", "rc-tooltip": "~3.7.3", "rc-tree": "~1.15.2", - "rc-tree-select": "~2.6.0", + "rc-tree-select": "~2.7.0", "rc-trigger": "^2.6.2", "rc-upload": "~2.6.0", "rc-util": "^4.5.1",
MaaAssistantArknights
https://github.com/MaaAssistantArknights/MaaAssistantArknights
ffab1a3c2ccb197c1071ed0479da5c67fd4be568
zzyyyl
2023-10-17 21:09:11
chore: 优化 changelog_generator
- 增加 co-author 处理 - 忽略不带信息的 merge commit
chore: 优化 changelog_generator - 增加 co-author 处理 - 忽略不带信息的 merge commit
diff --git a/tools/ChangelogGenerator/changelog_generator.py b/tools/ChangelogGenerator/changelog_generator.py index a2f15bdd87b..761432e4e1d 100644 --- a/tools/ChangelogGenerator/changelog_generator.py +++ b/tools/ChangelogGenerator/changelog_generator.py @@ -43,7 +43,7 @@ def individual_commits(commits: dict, indent: str = "") -> (str, list): commit_message = commit_info["message"] if not with_commitizen: - commitizens = r"(?:build|chore|ci|docs?|feat|fix|perf|refactor|rft|style|test)" + commitizens = r"(?:build|chore|ci|docs?|feat|fix|perf|refactor|rft|style|test|debug|i18n)" commit_message = re.sub(rf"^(?:{commitizens}, *)*{commitizens} *(?:\([^\)]*\))*: *", "", commit_message) ret_message += indent + "- " + commit_message @@ -53,6 +53,8 @@ def individual_commits(commits: dict, indent: str = "") -> (str, list): if not ignore_merge_author or not commit_info["branch"]: author = commit_info["author"] if author not in ctrs: ctrs.append(author) + for coauthor in commit_info.get("coauthors", []): + if coauthor not in ctrs: ctrs.append(coauthor) if committer_is_author: committer = commit_info["committer"] if committer not in ctrs: ctrs.append(committer) @@ -116,6 +118,7 @@ def build_commits_tree(commit_hash: str): "hash": str, "author": str, "committer": str, + "coauthors": [str, ...], "message": str, "branch": {} # 当当前为 merge commit 时非空,为被合并分支对应的 commits 信息 }, @@ -129,12 +132,12 @@ def build_commits_tree(commit_hash: str): return {} raw_commit_info.update({"visited": True}) # 防止一个 commit 被多个分支遍历 - commit_hash = raw_commit_info["hash"] res = { commit_hash: { - "hash": commit_hash, + "hash": raw_commit_info["hash"], "author": raw_commit_info["author"], "committer": raw_commit_info["committer"], + "coauthors": raw_commit_info.get("coauthors", []), "message": raw_commit_info["message"], "branch": {} } @@ -144,14 +147,13 @@ def build_commits_tree(commit_hash: str): # 第二个 parent 为 Merge commit 的被合并分支 if len(raw_commit_info["parent"]) == 2: - if (raw_commit_info["message"].startswith("Release") or - re.match(r"Merge pull request #\d+ from MaaAssistantArknights/dev", raw_commit_info["message"])): + if (raw_commit_info["message"].startswith("Release") or raw_commit_info["message"].startswith("Merge")): # 避免合并之后只有一个 Release 主 commit - # 忽略从 dev 合并的 Merge commit + # 忽略不带信息的 Merge commit (eg. Merge remote-tracking branch; Merge branch 'dev' of xxx into dev) res.update(build_commits_tree(raw_commit_info["parent"][1])) else: res[commit_hash]["branch"].update(build_commits_tree(raw_commit_info["parent"][1])) - if raw_commit_info["message"].startswith("Merge branch") and not res[commit_hash]["branch"]: + if raw_commit_info["message"].startswith("Merge") and not res[commit_hash]["branch"]: res.pop(commit_hash) return res @@ -197,6 +199,12 @@ def convert_contributors_name(name: str, commit_hash: str, name_type: str): else: return contributors[name] +def call_command(command: str): + with os.popen(command) as fp: bf = fp._stream.buffer.read() + try: command_ret = bf.decode().strip() + except: command_ret = bf.decode("gbk").strip() + return command_ret + def main(tag_name=None, latest=None): global contributors, raw_commits_info try: @@ -219,10 +227,7 @@ def main(tag_name=None, latest=None): # 获取详细的 git log 信息 # git_command = rf'git log {latest}..HEAD --pretty=format:"\"%H\":{{\"hash\":\"%h\",\"author\":\"%aN\",\"committer\":\"%cN\",\"message\":\"%s\",\"parent\":\"%P\"}},"' git_command = rf'git log {latest}..HEAD --pretty=format:"%H%n%aN%n%cN%n%s%n%P%n"' - - with os.popen(git_command) as fp: bf = fp._stream.buffer.read() - try: raw_gitlogs = bf.decode().strip() - except: raw_gitlogs = bf.decode("gbk").strip() + raw_gitlogs = call_command(git_command) raw_commits_info = {} for raw_commit_info in raw_gitlogs.split('\n\n'): @@ -238,6 +243,23 @@ def main(tag_name=None, latest=None): "message": message, "parent": parent.split() } + + git_coauthor_command = rf'git log {latest}..HEAD --pretty=format:"%H%n" --grep="Co-authored-by"' + raw_gitlogs = call_command(git_coauthor_command) + + for commit_hash in raw_gitlogs.split('\n'): + if commit_hash not in raw_commits_info: + continue + git_addition_command = rf'git log {commit_hash} --no-walk --pretty=format:"%b"' + addition = call_command(git_addition_command) + coauthors = [] + for coauthor in re.findall(r"Co-authored-by: (.*) <(?:.*)>", addition): + if coauthor in contributors: + coauthors.append(contributors[coauthor]) + else: + print(f"Cannot get coauthor: {coauthor}.") + raw_commits_info[commit_hash]["coauthors"] = coauthors + # print(json.dumps(raw_commits_info, ensure_ascii=False, indent=2)) res = print_commits(build_commits_tree([x for x in raw_commits_info.keys()][0]))
components
https://github.com/angular/components
ee4e3a346a8bcfd2a423d90a426be96ad33de79b
Kristiyan Kostadinov
2024-11-04 18:42:36
fix: remove ComponentFactoryResolver usage from scenes
`ComponentFactoryResolver` isn't necessary anymore so it can be removed.
fix: remove ComponentFactoryResolver usage from scenes `ComponentFactoryResolver` isn't necessary anymore so it can be removed.
diff --git a/material.angular.io/scenes/src/app/scene-viewer/scene-viewer.ts b/material.angular.io/scenes/src/app/scene-viewer/scene-viewer.ts index 1a591cfc1956..0044f3a0f20d 100644 --- a/material.angular.io/scenes/src/app/scene-viewer/scene-viewer.ts +++ b/material.angular.io/scenes/src/app/scene-viewer/scene-viewer.ts @@ -1,6 +1,5 @@ import { Component, - ComponentFactoryResolver, HostBinding, Input, OnInit, @@ -46,8 +45,7 @@ export class SceneViewer implements OnInit { readonly scene = viewChild.required('scene', { read: ViewContainerRef }); - constructor(private readonly componentFactoryResolver: ComponentFactoryResolver, - private route: ActivatedRoute, + constructor(private route: ActivatedRoute, private sanitizer: DomSanitizer) { this.hueRotation = this.route.snapshot.data['hueRotate']; this.component = this.route.snapshot.data['scene']; @@ -55,8 +53,7 @@ export class SceneViewer implements OnInit { } ngOnInit() { - const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.component); - this.scene().createComponent(componentFactory); + this.scene().createComponent(this.component); const container = document.querySelector('#scene-content-container') as HTMLElement; container.style.transform = `scale(${this.scale})`; container.style.transformOrigin = 'center';
argo-workflows
https://github.com/argoproj/argo-workflows
9004f5e263a4ead8a5be4a4a09db03064eb1d453
dependabot[bot]
2022-09-03 15:17:32
chore(deps): bump google.golang.org/api from 0.93.0 to 0.94.0 (#9505)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.93.0 to 0.94.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.93.0...v0.94.0) ---
chore(deps): bump google.golang.org/api from 0.93.0 to 0.94.0 (#9505) Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.93.0 to 0.94.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.93.0...v0.94.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
diff --git a/go.mod b/go.mod index 4a3f3dbaeae4..ec0471290df3 100644 --- a/go.mod +++ b/go.mod @@ -56,7 +56,7 @@ require ( golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 - google.golang.org/api v0.93.0 + google.golang.org/api v0.94.0 google.golang.org/genproto v0.0.0-20220720214146-176da50484ac google.golang.org/grpc v1.48.0 gopkg.in/go-playground/webhooks.v5 v5.17.0 diff --git a/go.sum b/go.sum index c0c1196339c6..3ac38673d816 100644 --- a/go.sum +++ b/go.sum @@ -1702,7 +1702,6 @@ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 h1:2o1E+E8TpNLklK9nHiPiK1uzIYrIHt+cQx3ynCwq9V8= golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2038,8 +2037,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.93.0 h1:T2xt9gi0gHdxdnRkVQhT8mIvPaXKNsDNWz+L696M66M= -google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.94.0 h1:KtKM9ru3nzQioV1HLlUf1cR7vMYJIpgls5VhAYQXIwA= +google.golang.org/api v0.94.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
turborepo
https://github.com/vercel/turborepo
6f48f2a9bc70891f69cf957351b524f9938a5a85
Mitch (a.k.a Voz)
2024-03-01 23:31:08
fix: login success page redirect (#7558)
### Description Success page url was wrong and re-prompting with the same authorize page, even though it did nothing. String formatting is hard sometimes. ### Testing Instructions 1. `turbo logout` -> ensure you have no tokens that'll prompt the "Existing token found!" check 2. `turbo login` -> get the login page 3. Ensure that when you click `Authorize`, and it works, that the second page is the success page. Closes TURBO-2488
fix: login success page redirect (#7558) ### Description Success page url was wrong and re-prompting with the same authorize page, even though it did nothing. String formatting is hard sometimes. ### Testing Instructions 1. `turbo logout` -> ensure you have no tokens that'll prompt the "Existing token found!" check 2. `turbo login` -> get the login page 3. Ensure that when you click `Authorize`, and it works, that the second page is the success page. Closes TURBO-2488
diff --git a/crates/turborepo-auth/src/auth/login.rs b/crates/turborepo-auth/src/auth/login.rs index 9622b2583ad2f..fed11be09c69b 100644 --- a/crates/turborepo-auth/src/auth/login.rs +++ b/crates/turborepo-auth/src/auth/login.rs @@ -79,7 +79,15 @@ pub async fn login<T: Client + TokenClient + CacheClient>( let redirect_url = format!("http://{DEFAULT_HOST_NAME}:{DEFAULT_PORT}"); let mut login_url = Url::parse(login_url_configuration)?; + let mut success_url = login_url.clone(); + success_url + .path_segments_mut() + .map_err(|_: ()| Error::LoginUrlCannotBeABase { + value: login_url_configuration.to_string(), + })? + .extend(["turborepo", "success"]); + // Create the full login URL. login_url .path_segments_mut() .map_err(|_: ()| Error::LoginUrlCannotBeABase { @@ -105,7 +113,7 @@ pub async fn login<T: Client + TokenClient + CacheClient>( .run( DEFAULT_PORT, crate::LoginType::Basic { - login_url_configuration: login_url.to_string(), + success_redirect: success_url.to_string(), }, token_cell.clone(), ) diff --git a/crates/turborepo-auth/src/login_server.rs b/crates/turborepo-auth/src/login_server.rs index fbdd9af47d717..0ef4ebd8a0952 100644 --- a/crates/turborepo-auth/src/login_server.rs +++ b/crates/turborepo-auth/src/login_server.rs @@ -10,7 +10,7 @@ use url::Url; use crate::Error; pub enum LoginType { - Basic { login_url_configuration: String }, + Basic { success_redirect: String }, SSO, } @@ -57,15 +57,13 @@ impl LoginServer for DefaultLoginServer { let route_handle = handle.clone(); let addr = SocketAddr::from(([127, 0, 0, 1], port)); match login_type { - LoginType::Basic { - login_url_configuration, - } => { + LoginType::Basic { success_redirect } => { let app = Router::new().route( "/", get(|login_payload: Query<LoginPayload>| async move { let _ = login_token.set(login_payload.0.token); route_handle.shutdown(); - Redirect::to(&format!("{login_url_configuration}/turborepo/success")) + Redirect::to(&success_redirect) }), );
jitsi-videobridge
https://github.com/jitsi/jitsi-videobridge
1f31450cf99e585ed98c1e36d26e5a7e68a48fe7
paweldomas
2016-12-06 01:03:04
feat: log SCTP events on INFO
This change is to be reverted once we learn why SCTP connections are dropped.
feat: log SCTP events on INFO This change is to be reverted once we learn why SCTP connections are dropped.
diff --git a/src/main/java/org/jitsi/videobridge/SctpConnection.java b/src/main/java/org/jitsi/videobridge/SctpConnection.java index bdd1485131..0838e60de5 100644 --- a/src/main/java/org/jitsi/videobridge/SctpConnection.java +++ b/src/main/java/org/jitsi/videobridge/SctpConnection.java @@ -722,10 +722,20 @@ public void onSctpNotification(SctpSocket socket, { synchronized (syncRoot) { - if (logger.isDebugEnabled()) + //if (logger.isDebugEnabled()) + //{ + // FIXME restore back to debug + // once we fix the problem with SCTP connection being dropped + Endpoint endpoint = getEndpoint(); + String endpointId = endpoint != null ? endpoint.getID() : "?"; + // SCTP_SENDER_DRY_EVENT is logged too often. It means that the data + // queue is now empty and we don't care. + if (SctpNotification.SCTP_SENDER_DRY_EVENT != notification.sn_type) { - logger.debug( - "socket=" + socket + "; notification=" + notification); + logger.info( + "SCTP[ID=" + getID() + + ", endpoint=" + endpointId + + "; notification=" + notification); } switch (notification.sn_type)
pytorch-lightning
https://github.com/Lightning-AI/pytorch-lightning
42dc5d2af1ef00fe9725f27033549652a2ab4faa
Kaushik B
2021-02-13 13:06:22
Fix: Repeated .fit() calls ignore max_steps iteration bound (#5936)
* fix repeated fit calls ignoring max_steps * fix fast dev progress bar
Fix: Repeated .fit() calls ignore max_steps iteration bound (#5936) * fix repeated fit calls ignoring max_steps * fix fast dev progress bar
diff --git a/pytorch_lightning/trainer/training_loop.py b/pytorch_lightning/trainer/training_loop.py index 03a72eb71ab84..f727a15310a84 100644 --- a/pytorch_lightning/trainer/training_loop.py +++ b/pytorch_lightning/trainer/training_loop.py @@ -75,7 +75,7 @@ def on_trainer_init( # If neither max_epochs or max_steps is set, then use existing default of max_epochs = 1000 self.trainer.max_epochs = 1000 if (max_epochs is None and max_steps is None) else max_epochs - # If neither max_epochs or max_steps is set, then use existing default of min_epochs = 1 + # If neither min_epochs or min_steps is set, then use existing default of min_epochs = 1 self.trainer.min_epochs = 1 if (min_epochs is None and min_steps is None) else min_epochs self.trainer.max_steps = max_steps self.trainer.min_steps = min_steps @@ -97,8 +97,9 @@ def num_optimizers(self): return num_optimizers def should_skip_training(self): + should_by_max_steps = self.trainer.max_steps is not None and self.trainer.global_step >= self.trainer.max_steps should_by_epoch = self.trainer.max_epochs is not None and self.trainer.current_epoch >= self.trainer.max_epochs - return should_by_epoch or self.trainer.num_training_batches == 0 + return should_by_max_steps or should_by_epoch or self.trainer.num_training_batches == 0 def on_train_start(self): # hook diff --git a/tests/callbacks/test_progress_bar.py b/tests/callbacks/test_progress_bar.py index 5f861d7a2cce9..802b43bbd034d 100644 --- a/tests/callbacks/test_progress_bar.py +++ b/tests/callbacks/test_progress_bar.py @@ -146,8 +146,6 @@ def test_progress_bar_fast_dev_run(tmpdir): assert 1 == progress_bar.total_train_batches # total val batches are known only after val dataloaders have reloaded - trainer.fit(model) - assert 1 == progress_bar.total_val_batches assert 1 == progress_bar.train_batch_idx assert 1 == progress_bar.val_batch_idx diff --git a/tests/trainer/test_trainer.py b/tests/trainer/test_trainer.py index 9814e5e87f87c..4e85a5695b9f2 100644 --- a/tests/trainer/test_trainer.py +++ b/tests/trainer/test_trainer.py @@ -1741,6 +1741,32 @@ def training_epoch_end(self, *args, **kwargs): assert model.training_epoch_end_invoked == should_train, f"`training_epoch_end` {error_string}" [email protected](["max_steps", "max_epochs", "global_step"], [(10, 5, 10), (20, None, 20)]) +def test_repeated_fit_calls_with_max_epochs_and_steps(tmpdir, max_steps, max_epochs, global_step): + """ + Ensure that the training loop is bound by `max_steps` and + `max_epochs` for repeated calls of `trainer.fit`, and + disabled if the limit is reached + """ + + dataset_len = 200 + batch_size = 10 + + train_data = DataLoader(RandomDataset(32, dataset_len), batch_size=batch_size) + + model = BoringModel() + + trainer = Trainer( + default_root_dir=tmpdir, + max_steps=max_steps, + max_epochs=max_epochs, + ) + trainer.fit(model, train_data) + assert trainer.global_step == global_step + trainer.fit(model, train_data) + assert trainer.global_step == global_step + + def test_trainer_access_in_configure_optimizers(tmpdir): """ Verify that the configure optimizer function can reference the trainer.
quivr
https://github.com/QuivrHQ/quivr
b5c01efb780b122dc4cf2f25bb2bd279c6058259
Stan Girard
2023-10-07 00:02:23
fix(question): fixed with user_settings (#1349)
# Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
fix(question): fixed with user_settings (#1349) # Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
diff --git a/backend/routes/chat_routes.py b/backend/routes/chat_routes.py index 7430422ec7d6..4f2970a5a960 100644 --- a/backend/routes/chat_routes.py +++ b/backend/routes/chat_routes.py @@ -209,7 +209,7 @@ async def create_question_handler( openai_api_key=current_user.openai_api_key, ) userSettings = userDailyUsage.get_user_settings() - is_model_ok = (brain_details or chat_question).model in userSettings.models # type: ignore + is_model_ok = (brain_details or chat_question).model in userSettings.get("models", ["gpt-3.5-turbo"]) # type: ignore if not current_user.openai_api_key and brain_id: brain_details = get_brain_details(brain_id)
auto-dev
https://github.com/unit-mesh/auto-dev
428f9408abe5975f870210c7f10bfe4a570ce696
Phodal Huang
2025-02-16 21:34:12
refactor(parser): optimize code fence parsing logic
- Replace `IntRange.length` with a local extension function for better clarity and maintainability. - Remove redundant imports and optimize language resolution in code parsing. - Simplify language finding logic in `FileEditorPreviewSketch`.
refactor(parser): optimize code fence parsing logic - Replace `IntRange.length` with a local extension function for better clarity and maintainability. - Remove redundant imports and optimize language resolution in code parsing. - Simplify language finding logic in `FileEditorPreviewSketch`.
diff --git a/core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/FileEditorPreviewSketch.kt b/core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/FileEditorPreviewSketch.kt index 32542f603..5474777e5 100644 --- a/core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/FileEditorPreviewSketch.kt +++ b/core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/FileEditorPreviewSketch.kt @@ -60,8 +60,8 @@ abstract class FileEditorPreviewSketch( } } - val language = CodeFence.Companion.findLanguageByExt(file.extension ?: "") - ?: CodeFence.Companion.findLanguage("txt") + val language = CodeFence.findLanguageByExt(file.extension ?: "") + ?: CodeFence.findLanguage("txt") return object : CodeHighlightSketch(project, content, language), ExtensionLangSketch { override fun getExtensionName(): String = sketchName diff --git a/core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/code/CodeHighlightSketch.kt b/core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/code/CodeHighlightSketch.kt index 3bfef45bb..2de2ff2ee 100644 --- a/core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/code/CodeHighlightSketch.kt +++ b/core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/code/CodeHighlightSketch.kt @@ -34,7 +34,6 @@ import com.intellij.ide.scratch.ScratchRootType import com.intellij.openapi.fileEditor.FileEditor import com.intellij.openapi.fileEditor.FileEditorProvider import com.intellij.openapi.fileEditor.TextEditorWithPreview -import com.intellij.openapi.fileEditor.impl.text.TextEditorProvider import com.intellij.openapi.util.text.StringUtil import com.intellij.psi.PsiManager import com.intellij.temporary.gui.block.whenDisposed diff --git a/core/src/main/kotlin/cc/unitmesh/devti/util/parser/CodeFence.kt b/core/src/main/kotlin/cc/unitmesh/devti/util/parser/CodeFence.kt index 85634818a..58c115dfd 100644 --- a/core/src/main/kotlin/cc/unitmesh/devti/util/parser/CodeFence.kt +++ b/core/src/main/kotlin/cc/unitmesh/devti/util/parser/CodeFence.kt @@ -1,6 +1,5 @@ package cc.unitmesh.devti.util.parser -import ai.grazie.nlp.utils.length import com.intellij.lang.Language import com.intellij.openapi.fileTypes.PlainTextLanguage @@ -91,9 +90,9 @@ class CodeFence( val isComplete = endMatch != null val devinContent = if (isComplete) { - searchRegion.substring(startMatch.range.length, endMatch!!.range.first).trim() + searchRegion.substring(startMatch.range.length(), endMatch!!.range.first).trim() } else { - searchRegion.substring(startMatch.range.length).trim() + searchRegion.substring(startMatch.range.length()).trim() } codeFences.add(CodeFence(findLanguage("DevIn"), devinContent, isComplete, "devin", "DevIn")) @@ -135,7 +134,6 @@ class CodeFence( return currentContent } - val markdownLanguage = findLanguage("markdown") private fun parseMarkdownContent(content: String, codeFences: MutableList<CodeFence>) { val languageRegex = Regex("```([\\w#+ ]*)") val lines = content.lines() @@ -151,7 +149,7 @@ class CodeFence( if (matchResult != null) { if (textBuilder.isNotEmpty()) { val textBlock = CodeFence( - markdownLanguage, textBuilder.trim().toString(), true, "md" + findLanguage("markdown"), textBuilder.trim().toString(), true, "md" ) lastTxtBlock = textBlock codeFences.add(textBlock) @@ -185,7 +183,7 @@ class CodeFence( } if (textBuilder.isNotEmpty()) { - val textBlock = CodeFence(markdownLanguage, textBuilder.trim().toString(), true, "md") + val textBlock = CodeFence(findLanguage("markdown"), textBuilder.trim().toString(), true, "md") codeFences.add(textBlock) } @@ -294,4 +292,8 @@ class CodeFence( } } } -} \ No newline at end of file +} + +private fun IntRange.length(): Int { + return (this.endInclusive - this.start) + 1 +}
angular
https://github.com/angular/angular
737f71e3aa763980e4bdc6f0d3f13e2c712b12d9
Doug Parker
2021-10-19 22:36:55
refactor(compiler-cli): throw an error when compiling with View Engine. (#43862)
The View Engine compiler now throws when constructed and will be removed shortly. Direct users should switch to `NgtscProgram` to build with [Ivy](https://angular.io/guide/ivy). The View Engine compiler is being removed, so this makes it throw an error to ensure no one accidentally depends on code being removed. PR Close #43862
refactor(compiler-cli): throw an error when compiling with View Engine. (#43862) The View Engine compiler now throws when constructed and will be removed shortly. Direct users should switch to `NgtscProgram` to build with [Ivy](https://angular.io/guide/ivy). The View Engine compiler is being removed, so this makes it throw an error to ensure no one accidentally depends on code being removed. PR Close #43862
diff --git a/packages/compiler-cli/src/transformers/program.ts b/packages/compiler-cli/src/transformers/program.ts index 6e17ff476f0fdb..73d78fd820dfb8 100644 --- a/packages/compiler-cli/src/transformers/program.ts +++ b/packages/compiler-cli/src/transformers/program.ts @@ -38,6 +38,12 @@ import {createMessageDiagnostic, DTS, GENERATED_FILES, isInRootDir, ngToTsDiagno */ const MAX_FILE_COUNT_FOR_SINGLE_FILE_EMIT = 20; +/** Error message to show when attempting to build View Engine. */ +const VE_DISABLED_MESSAGE = ` +This compilation is using the View Engine compiler which is no longer supported by the Angular team +and is being removed. Please upgrade to the Ivy compiler by switching to \`NgtscProgram\`. See +https://angular.io/guide/ivy for more information. +`.trim().split('\n').join(' '); /** * Fields to lower within metadata in render2 mode. @@ -110,6 +116,10 @@ class AngularCompilerProgram implements Program { constructor( rootNames: ReadonlyArray<string>, private options: CompilerOptions, private host: CompilerHost, oldProgram?: Program) { + if (true as boolean) { + throw new Error(VE_DISABLED_MESSAGE); + } + this.rootNames = [...rootNames]; if (!options.disableTypeScriptVersionCheck) {
MinerU
https://github.com/opendatalab/MinerU
b7e9d454e9e9f818883e249a8d50200675bf9752
myhloli
2024-10-30 15:51:38
fix(ocr): improve image and table content extraction
- Update image content extraction to iterate through all spans in a block - Add support for extracting table content from spans within a block - Handle multiple content types within table spans (latex, html, image) - Refactor code to be more modular and easier to maintain
fix(ocr): improve image and table content extraction - Update image content extraction to iterate through all spans in a block - Add support for extracting table content from spans within a block - Handle multiple content types within table spans (latex, html, image) - Refactor code to be more modular and easier to maintain
diff --git a/magic_pdf/dict2md/ocr_mkcontent.py b/magic_pdf/dict2md/ocr_mkcontent.py index 91f8faf4..5c189a18 100644 --- a/magic_pdf/dict2md/ocr_mkcontent.py +++ b/magic_pdf/dict2md/ocr_mkcontent.py @@ -183,9 +183,10 @@ def para_to_standard_format_v2(para_block, img_buket_path, page_idx, drop_reason para_content = {'type': 'image', 'img_caption': [], 'img_footnote': []} for block in para_block['blocks']: if block['type'] == BlockType.ImageBody: - para_content['img_path'] = join_path( - img_buket_path, - block['lines'][0]['spans'][0]['image_path']) + for line in block['lines']: + for span in line['spans']: + if span['type'] == ContentType.Image: + para_content['img_path'] = join_path(img_buket_path, span['image_path']) if block['type'] == BlockType.ImageCaption: para_content['img_caption'].append(merge_para_with_text(block)) if block['type'] == BlockType.ImageFootnote: @@ -194,11 +195,21 @@ def para_to_standard_format_v2(para_block, img_buket_path, page_idx, drop_reason para_content = {'type': 'table', 'table_caption': [], 'table_footnote': []} for block in para_block['blocks']: if block['type'] == BlockType.TableBody: + for line in block['lines']: + for span in line['spans']: + if span['type'] == ContentType.Table: + + if span.get('latex', ''): + para_content['table_body'] = f"\n\n$\n {span['latex']}\n$\n\n" + elif span.get('html', ''): + para_content['table_body'] = f"\n\n{span['html']}\n\n" + + if span.get('image_path', ''): + para_content['img_path'] = join_path(img_buket_path, span['image_path']) if block["lines"][0]["spans"][0].get('latex', ''): para_content['table_body'] = f"\n\n$\n {block['lines'][0]['spans'][0]['latex']}\n$\n\n" elif block["lines"][0]["spans"][0].get('html', ''): para_content['table_body'] = f"\n\n{block['lines'][0]['spans'][0]['html']}\n\n" - para_content['img_path'] = join_path(img_buket_path, block["lines"][0]["spans"][0]['image_path']) if block['type'] == BlockType.TableCaption: para_content['table_caption'].append(merge_para_with_text(block)) if block['type'] == BlockType.TableFootnote:
sentry
https://github.com/getsentry/sentry
e9071c235eb171e65857bf759c0d76574451d36b
Raj Joshi
2024-05-09 09:08:35
chore(api-idorslug): Updating More Comments to Reflect Support for organization_id_or_slug (#70569)
Some more comment changes en-masse. Should be the last of them.
chore(api-idorslug): Updating More Comments to Reflect Support for organization_id_or_slug (#70569) Some more comment changes en-masse. Should be the last of them.
diff --git a/src/sentry/api/endpoints/artifact_bundles.py b/src/sentry/api/endpoints/artifact_bundles.py index 0978afd672334f..702aad5dc1133f 100644 --- a/src/sentry/api/endpoints/artifact_bundles.py +++ b/src/sentry/api/endpoints/artifact_bundles.py @@ -67,7 +67,7 @@ def get(self, request: Request, project) -> Response: Retrieve a list of artifact bundles for a given project. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the artifact bundle belongs to. :pparam string project_id_or_slug: the id or slug of the project to list the artifact bundles of. @@ -121,7 +121,7 @@ def delete(self, request: Request, project) -> Response: Delete all artifacts inside given archive. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the archive belongs to. :pparam string project_id_or_slug: the id or slug of the project to delete the archive of. diff --git a/src/sentry/api/endpoints/artifact_lookup.py b/src/sentry/api/endpoints/artifact_lookup.py index 62dbbb3f4a6ed2..7395eda362ea71 100644 --- a/src/sentry/api/endpoints/artifact_lookup.py +++ b/src/sentry/api/endpoints/artifact_lookup.py @@ -104,7 +104,7 @@ def get(self, request: Request, project: Project) -> Response: Retrieve a list of individual artifacts or artifact bundles for a given project. - :pparam string organization_slug: the id or slug of the organization to query. + :pparam string organization_id_or_slug: the id or slug of the organization to query. :pparam string project_id_or_slug: the id or slug of the project to query. :qparam string debug_id: if set, will query and return the artifact bundle that matches the given `debug_id`. diff --git a/src/sentry/api/endpoints/codeowners/details.py b/src/sentry/api/endpoints/codeowners/details.py index 3fb5093be8870b..e37b370da45191 100644 --- a/src/sentry/api/endpoints/codeowners/details.py +++ b/src/sentry/api/endpoints/codeowners/details.py @@ -58,7 +58,7 @@ def put(self, request: Request, project: Project, codeowners: ProjectCodeOwners) Update a CodeOwners ````````````` - :pparam string organization_slug: the id or slug of the organization. + :pparam string organization_id_or_slug: the id or slug of the organization. :pparam string project_id_or_slug: the id or slug of the project to get. :pparam string codeowners_id: id of codeowners object :param string raw: the raw CODEOWNERS text diff --git a/src/sentry/api/endpoints/codeowners/external_actor/user_details.py b/src/sentry/api/endpoints/codeowners/external_actor/user_details.py index 4192f120a6eeb4..929101bda7eeb5 100644 --- a/src/sentry/api/endpoints/codeowners/external_actor/user_details.py +++ b/src/sentry/api/endpoints/codeowners/external_actor/user_details.py @@ -48,7 +48,7 @@ def put( Update an External User ````````````` - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the user belongs to. :pparam int user_id: the User id. :pparam string external_user_id: id of external_user object diff --git a/src/sentry/api/endpoints/codeowners/external_actor/user_index.py b/src/sentry/api/endpoints/codeowners/external_actor/user_index.py index 737eb9794216bb..e6c7f801dc5772 100644 --- a/src/sentry/api/endpoints/codeowners/external_actor/user_index.py +++ b/src/sentry/api/endpoints/codeowners/external_actor/user_index.py @@ -27,7 +27,7 @@ def post(self, request: Request, organization: Organization) -> Response: Create an External User ````````````` - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the user belongs to. :param required string provider: enum("github", "gitlab", "slack") :param required string external_name: the associated username for this provider. diff --git a/src/sentry/api/endpoints/codeowners/index.py b/src/sentry/api/endpoints/codeowners/index.py index 6159398dc03f0a..28116d3505aae5 100644 --- a/src/sentry/api/endpoints/codeowners/index.py +++ b/src/sentry/api/endpoints/codeowners/index.py @@ -88,7 +88,7 @@ def post(self, request: Request, project: Project) -> Response: Upload a CODEOWNERS for project ````````````` - :pparam string organization_slug: the id or slug of the organization. + :pparam string organization_id_or_slug: the id or slug of the organization. :pparam string project_id_or_slug: the id or slug of the project to get. :param string raw: the raw CODEOWNERS text :param string codeMappingId: id of the RepositoryProjectPathConfig object diff --git a/src/sentry/api/endpoints/debug_files.py b/src/sentry/api/endpoints/debug_files.py index fcd82d05a2c92d..88cc895261e567 100644 --- a/src/sentry/api/endpoints/debug_files.py +++ b/src/sentry/api/endpoints/debug_files.py @@ -157,7 +157,7 @@ def get(self, request: Request, project) -> Response: Retrieve a list of associated releases for a given Proguard File. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the file belongs to. :pparam string project_id_or_slug: the id or slug of the project to list the DIFs of. @@ -227,7 +227,7 @@ def get(self, request: Request, project) -> Response: Retrieve a list of debug information files for a given project. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the file belongs to. :pparam string project_id_or_slug: the id or slug of the project to list the DIFs of. @@ -312,7 +312,7 @@ def delete(self, request: Request, project: Project) -> Response: Delete a debug information file for a given project. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the file belongs to. :pparam string project_id_or_slug: the id or slug of the project to delete the DIF. @@ -346,7 +346,7 @@ def post(self, request: Request, project) -> Response: contains the individual debug images. Uploading through this endpoint will create different files for the contained images. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project to change the release of. @@ -521,7 +521,7 @@ def get(self, request: Request, project) -> Response: Retrieve a list of source map archives (releases, later bundles) for a given project. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the source map archive belongs to. :pparam string project_id_or_slug: the id or slug of the project to list the source map archives of. @@ -585,7 +585,7 @@ def delete(self, request: Request, project) -> Response: Delete all artifacts inside given archive. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the archive belongs to. :pparam string project_id_or_slug: the id or slug of the project to delete the archive of. diff --git a/src/sentry/api/endpoints/event_attachment_details.py b/src/sentry/api/endpoints/event_attachment_details.py index 1711b0b8a9aeb2..e1366da8081f3f 100644 --- a/src/sentry/api/endpoints/event_attachment_details.py +++ b/src/sentry/api/endpoints/event_attachment_details.py @@ -78,7 +78,7 @@ def get(self, request: Request, project, event_id, attachment_id) -> Response: Retrieve an Attachment `````````````````````` - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the issues belong to. :pparam string project_id_or_slug: the id or slug of the project the event belongs to. diff --git a/src/sentry/api/endpoints/event_attachments.py b/src/sentry/api/endpoints/event_attachments.py index ef979e59ba311b..64ae882475abb2 100644 --- a/src/sentry/api/endpoints/event_attachments.py +++ b/src/sentry/api/endpoints/event_attachments.py @@ -24,7 +24,7 @@ def get(self, request: Request, project, event_id) -> Response: Retrieve attachments for an event ````````````````````````````````` - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the issues belong to. :pparam string project_id_or_slug: the id or slug of the project the event belongs to. diff --git a/src/sentry/api/endpoints/event_reprocessable.py b/src/sentry/api/endpoints/event_reprocessable.py index 39c5a8f3df15dd..9358add9776c5f 100644 --- a/src/sentry/api/endpoints/event_reprocessable.py +++ b/src/sentry/api/endpoints/event_reprocessable.py @@ -48,7 +48,7 @@ def get(self, request: Request, project, event_id) -> Response: * `attachment.not_found`: A required attachment, such as the original minidump, is missing. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the issues belong to. :pparam string project_id_or_slug: the id or slug of the project the event belongs to. diff --git a/src/sentry/api/endpoints/filechange.py b/src/sentry/api/endpoints/filechange.py index cbc7617f6a228e..15818c993087ac 100644 --- a/src/sentry/api/endpoints/filechange.py +++ b/src/sentry/api/endpoints/filechange.py @@ -29,7 +29,7 @@ def get(self, request: Request, organization, version) -> Response: Retrieve a list of files that were changed in a given release's commits. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string version: the version identifier of the release. diff --git a/src/sentry/api/endpoints/group_details.py b/src/sentry/api/endpoints/group_details.py index 25f3b89540466f..46f409d0da3cbf 100644 --- a/src/sentry/api/endpoints/group_details.py +++ b/src/sentry/api/endpoints/group_details.py @@ -136,7 +136,7 @@ def get(self, request: Request, group) -> Response: the issue (title, last seen, first seen), some overall numbers (number of comments, user reports) as well as the summarized event data. - :pparam string organization_slug: The slug of the organization. + :pparam string organization_id_or_slug: The slug of the organization. :pparam string issue_id: the ID of the issue to retrieve. :auth: required """ diff --git a/src/sentry/api/endpoints/group_tombstone_details.py b/src/sentry/api/endpoints/group_tombstone_details.py index 27020170d88da1..addd62e9489545 100644 --- a/src/sentry/api/endpoints/group_tombstone_details.py +++ b/src/sentry/api/endpoints/group_tombstone_details.py @@ -25,7 +25,7 @@ def delete(self, request: Request, project, tombstone_id) -> Response: Undiscards a group such that new events in that group will be captured. This does not restore any previous data. - :pparam string organization_slug: the id or slug of the organization. + :pparam string organization_id_or_slug: the id or slug of the organization. :pparam string project_id_or_slug: the id or slug of the project to which this tombstone belongs. :pparam string tombstone_id: the ID of the tombstone to remove. :auth: required diff --git a/src/sentry/api/endpoints/organization_api_key_details.py b/src/sentry/api/endpoints/organization_api_key_details.py index cef671fe023d7c..66e59a3316a76e 100644 --- a/src/sentry/api/endpoints/organization_api_key_details.py +++ b/src/sentry/api/endpoints/organization_api_key_details.py @@ -36,7 +36,7 @@ def get(self, request: Request, organization_context, organization, api_key_id) Retrieves API Key details ````````````````````````` - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the team belongs to. :pparam string api_key_id: the ID of the api key to delete :auth: required @@ -53,7 +53,7 @@ def put(self, request: Request, organization_context, organization, api_key_id) Update an API Key ````````````````` - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the team belongs to. :pparam string api_key_id: the ID of the api key to delete :param string label: the new label for the api key @@ -89,7 +89,7 @@ def delete(self, request: Request, organization_context, organization, api_key_i Deletes an API Key `````````````````` - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the team belongs to. :pparam string api_key_id: the ID of the api key to delete :auth: required diff --git a/src/sentry/api/endpoints/organization_api_key_index.py b/src/sentry/api/endpoints/organization_api_key_index.py index 45438b30ad5fd2..06713f169f6d26 100644 --- a/src/sentry/api/endpoints/organization_api_key_index.py +++ b/src/sentry/api/endpoints/organization_api_key_index.py @@ -30,7 +30,7 @@ def get(self, request: Request, organization_context, organization) -> Response: List an Organization's API Keys ``````````````````````````````````` - :pparam string organization_slug: the organization short name + :pparam string organization_id_or_slug: the id or slug of the organization :auth: required """ queryset = sorted( @@ -44,7 +44,7 @@ def post(self, request: Request, organization_context, organization) -> Response Create an Organization API Key ``````````````````````````````````` - :pparam string organization_slug: the organization short name + :pparam string organization_id_or_slug: the id or slug of the organization :auth: required """ key = ApiKey.objects.create(organization_id=organization.id, scope_list=DEFAULT_SCOPES) diff --git a/src/sentry/api/endpoints/organization_auth_provider_details.py b/src/sentry/api/endpoints/organization_auth_provider_details.py index 7ecb1e113e266e..144c4b22004bf0 100644 --- a/src/sentry/api/endpoints/organization_auth_provider_details.py +++ b/src/sentry/api/endpoints/organization_auth_provider_details.py @@ -26,7 +26,7 @@ def get(self, request: Request, organization: Organization) -> Response: currently installed auth_provider `````````````````````````````````````````````````````` - :pparam string organization_slug: the organization short name + :pparam string organization_id_or_slug: the id or slug of the organization :auth: required """ auth_provider = auth_service.get_auth_provider(organization_id=organization.id) diff --git a/src/sentry/api/endpoints/organization_auth_providers.py b/src/sentry/api/endpoints/organization_auth_providers.py index c844e8e5950349..cac490e3167fb0 100644 --- a/src/sentry/api/endpoints/organization_auth_providers.py +++ b/src/sentry/api/endpoints/organization_auth_providers.py @@ -22,7 +22,7 @@ def get(self, request: Request, organization) -> Response: List available auth providers that are available to use for an Organization ``````````````````````````````````````````````````````````````````````````` - :pparam string organization_slug: the organization short name + :pparam string organization_id_or_slug: the id or slug of the organization :auth: required """ provider_list = [] diff --git a/src/sentry/api/endpoints/organization_code_mapping_details.py b/src/sentry/api/endpoints/organization_code_mapping_details.py index 296ca265b939fa..6395e678de9967 100644 --- a/src/sentry/api/endpoints/organization_code_mapping_details.py +++ b/src/sentry/api/endpoints/organization_code_mapping_details.py @@ -50,7 +50,7 @@ def put(self, request: Request, config_id, organization, config) -> Response: Update a repository project path config `````````````````` - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the team should be created for. :param int repository_id: :param int project_id: diff --git a/src/sentry/api/endpoints/organization_code_mappings.py b/src/sentry/api/endpoints/organization_code_mappings.py index e2be4bb2bf1c75..e8f544e2aa935b 100644 --- a/src/sentry/api/endpoints/organization_code_mappings.py +++ b/src/sentry/api/endpoints/organization_code_mappings.py @@ -141,7 +141,7 @@ def get(self, request: Request, organization) -> Response: """ Get the list of repository project path configs - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the team should be created for. :qparam int integrationId: the optional integration id. :qparam int project: Optional. Pass "-1" to filter to 'all projects user has access to'. Omit to filter for 'all projects user is a member of'. @@ -175,7 +175,7 @@ def post(self, request: Request, organization) -> Response: Create a new repository project path config `````````````````` - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the team should be created for. :param int repositoryId: :param int projectId: diff --git a/src/sentry/api/endpoints/organization_dashboards.py b/src/sentry/api/endpoints/organization_dashboards.py index b3bc3ab64343cc..bcc6e754c61f7a 100644 --- a/src/sentry/api/endpoints/organization_dashboards.py +++ b/src/sentry/api/endpoints/organization_dashboards.py @@ -49,7 +49,7 @@ def get(self, request: Request, organization) -> Response: If on the first page, this endpoint will also include any pre-built dashboards that haven't been replaced or removed. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the dashboards belongs to. :qparam string query: the title of the dashboard being searched for. :auth: required @@ -142,7 +142,7 @@ def post(self, request: Request, organization, retry=0) -> Response: `````````````````````````````````````````` Create a new dashboard for the given Organization - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the dashboards belongs to. """ if not features.has("organizations:dashboards-edit", organization, actor=request.user): diff --git a/src/sentry/api/endpoints/organization_details.py b/src/sentry/api/endpoints/organization_details.py index 2eea3a854706b1..5fad6ab51224a2 100644 --- a/src/sentry/api/endpoints/organization_details.py +++ b/src/sentry/api/endpoints/organization_details.py @@ -555,7 +555,7 @@ def get(self, request: Request, organization) -> Response: Return details on an individual organization including various details such as membership access, features, and teams. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the team should be created for. :param string detailed: Specify '0' to retrieve details without projects and teams. :auth: required @@ -581,7 +581,7 @@ def put(self, request: Request, organization) -> Response: Update various attributes and configurable settings for the given organization. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the team should be created for. :param string name: an optional new name for the organization. :param string slug: an optional new slug for the organization. Needs @@ -714,7 +714,7 @@ def delete(self, request: Request, organization) -> Response: However once deletion has begun the state of an organization changes and will be hidden from most public views. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the team should be created for. :auth: required, user-context-needed """ diff --git a/src/sentry/api/endpoints/organization_eventid.py b/src/sentry/api/endpoints/organization_eventid.py index a0f5cf74db89a3..3fddf7346d45c5 100644 --- a/src/sentry/api/endpoints/organization_eventid.py +++ b/src/sentry/api/endpoints/organization_eventid.py @@ -35,7 +35,7 @@ def get(self, request: Request, organization, event_id) -> Response: This resolves an event ID to the project slug and internal issue ID and internal event ID. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the event ID should be looked up in. :param string event_id: the event ID to look up. validated by a regex in the URL. diff --git a/src/sentry/api/endpoints/organization_issues_resolved_in_release.py b/src/sentry/api/endpoints/organization_issues_resolved_in_release.py index 753a27e7352ce6..7eeec5edfd219c 100644 --- a/src/sentry/api/endpoints/organization_issues_resolved_in_release.py +++ b/src/sentry/api/endpoints/organization_issues_resolved_in_release.py @@ -26,7 +26,7 @@ def get(self, request: Request, organization, version) -> Response: Retrieve a list of issues to be resolved in a given release. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string version: the version identifier of the release. :auth: required diff --git a/src/sentry/api/endpoints/organization_member/requests/invite/details.py b/src/sentry/api/endpoints/organization_member/requests/invite/details.py index 03b5ed54426662..35a7e36ca545d1 100644 --- a/src/sentry/api/endpoints/organization_member/requests/invite/details.py +++ b/src/sentry/api/endpoints/organization_member/requests/invite/details.py @@ -90,7 +90,7 @@ def put( Update and/or approve an invite request to an organization. - :pparam string organization_slug: the id or slug of the organization the member will belong to + :pparam string organization_id_or_slug: the id or slug of the organization the member will belong to :param string member_id: the member ID :param boolean approve: allows the member to be invited :param string role: the suggested role of the new member @@ -171,7 +171,7 @@ def delete( Delete an invite request to an organization. - :pparam string organization_slug: the id or slug of the organization the member would belong to + :pparam string organization_id_or_slug: the id or slug of the organization the member would belong to :param string member_id: the member ID :auth: required diff --git a/src/sentry/api/endpoints/organization_member/requests/invite/index.py b/src/sentry/api/endpoints/organization_member/requests/invite/index.py index 7f90b4bbcee38d..1f335a57698deb 100644 --- a/src/sentry/api/endpoints/organization_member/requests/invite/index.py +++ b/src/sentry/api/endpoints/organization_member/requests/invite/index.py @@ -61,7 +61,7 @@ def post(self, request: Request, organization) -> Response: Creates an invite request given an email and suggested role / teams. - :pparam string organization_slug: the id or slug of the organization the member will belong to + :pparam string organization_id_or_slug: the id or slug of the organization the member will belong to :param string email: the email address to invite :param string role: the suggested role of the new member :param string orgRole: the suggested org-role of the new member diff --git a/src/sentry/api/endpoints/organization_processingissues.py b/src/sentry/api/endpoints/organization_processingissues.py index eb4b3f350a8ec9..27836dde854cdd 100644 --- a/src/sentry/api/endpoints/organization_processingissues.py +++ b/src/sentry/api/endpoints/organization_processingissues.py @@ -21,7 +21,7 @@ def get(self, request: Request, organization) -> Response: For each Project in an Organization, list its processing issues. Can be passed `project` to filter down to specific projects. - :pparam string organization_slug: the id or slug of the organization. + :pparam string organization_id_or_slug: the id or slug of the organization. :qparam array[string] project: An optional list of project ids to filter to within the organization :auth: required diff --git a/src/sentry/api/endpoints/organization_projects_experiment.py b/src/sentry/api/endpoints/organization_projects_experiment.py index 8ebff6b033f68e..8c3b614204d2d2 100644 --- a/src/sentry/api/endpoints/organization_projects_experiment.py +++ b/src/sentry/api/endpoints/organization_projects_experiment.py @@ -71,7 +71,7 @@ def post(self, request: Request, organization: Organization) -> Response: If this is taken, a random three letter suffix is added as needed (eg: ...-gnm, ...-zls). Then create a new project bound to this team - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the team should be created for. :param string name: the name for the new project. :param string platform: the optional platform that this project is for. diff --git a/src/sentry/api/endpoints/organization_projects_sent_first_event.py b/src/sentry/api/endpoints/organization_projects_sent_first_event.py index dab0e3f054e17c..9d2d087e0b2be3 100644 --- a/src/sentry/api/endpoints/organization_projects_sent_first_event.py +++ b/src/sentry/api/endpoints/organization_projects_sent_first_event.py @@ -23,7 +23,7 @@ def get(self, request: Request, organization) -> Response: Returns true if any projects within the organization have received a first event, false otherwise. - :pparam string organization_slug: the id or slug of the organization + :pparam string organization_id_or_slug: the id or slug of the organization containing the projects to check for a first event from. :qparam array[string] project: An optional list of project ids to filter diff --git a/src/sentry/api/endpoints/organization_release_commits.py b/src/sentry/api/endpoints/organization_release_commits.py index 3533619bd83c03..fc93f9b5dc6353 100644 --- a/src/sentry/api/endpoints/organization_release_commits.py +++ b/src/sentry/api/endpoints/organization_release_commits.py @@ -23,7 +23,7 @@ def get(self, request: Request, organization, version) -> Response: Retrieve a list of commits for a given release. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string version: the version identifier of the release. :auth: required diff --git a/src/sentry/api/endpoints/organization_release_details.py b/src/sentry/api/endpoints/organization_release_details.py index e2b9f65ae9881e..1d32a1af27f45a 100644 --- a/src/sentry/api/endpoints/organization_release_details.py +++ b/src/sentry/api/endpoints/organization_release_details.py @@ -288,7 +288,7 @@ def get(self, request: Request, organization, version) -> Response: Return details on an individual release. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string version: the version identifier of the release. :auth: required @@ -383,7 +383,7 @@ def put(self, request: Request, organization, version) -> Response: Update a release. This can change some metadata associated with the release (the ref, url, and dates). - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string version: the version identifier of the release. :param string ref: an optional commit reference. This is useful if @@ -510,7 +510,7 @@ def delete(self, request: Request, organization, version) -> Response: Permanently remove a release and all of its files. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string version: the version identifier of the release. :auth: required diff --git a/src/sentry/api/endpoints/organization_release_file_details.py b/src/sentry/api/endpoints/organization_release_file_details.py index 2b190e4fb068ad..f24233bc8da3ca 100644 --- a/src/sentry/api/endpoints/organization_release_file_details.py +++ b/src/sentry/api/endpoints/organization_release_file_details.py @@ -33,7 +33,7 @@ def get(self, request: Request, organization, version, file_id) -> Response: not actually return the contents of the file, just the associated metadata. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string version: the version identifier of the release. :pparam string file_id: the ID of the file to retrieve. @@ -62,7 +62,7 @@ def put(self, request: Request, organization, version, file_id) -> Response: Update metadata of an existing file. Currently only the name of the file can be changed. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string version: the version identifier of the release. :pparam string file_id: the ID of the file to update. @@ -89,7 +89,7 @@ def delete(self, request: Request, organization, version, file_id) -> Response: This will also remove the physical file from storage. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string version: the version identifier of the release. :pparam string file_id: the ID of the file to delete. diff --git a/src/sentry/api/endpoints/organization_release_files.py b/src/sentry/api/endpoints/organization_release_files.py index 91abde8ceac0c2..4e057726f2c47f 100644 --- a/src/sentry/api/endpoints/organization_release_files.py +++ b/src/sentry/api/endpoints/organization_release_files.py @@ -25,7 +25,7 @@ def get(self, request: Request, organization, version) -> Response: Retrieve a list of files for a given release. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string version: the version identifier of the release. :qparam string query: If set, only files with these partial names will be returned. @@ -56,7 +56,7 @@ def post(self, request: Request, organization, version) -> Response: that this file will be referenced as. For example, in the case of JavaScript you might specify the full web URI. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string version: the version identifier of the release. :param string name: the name (full path) of the file. diff --git a/src/sentry/api/endpoints/organization_release_meta.py b/src/sentry/api/endpoints/organization_release_meta.py index 987629564165a5..89b85033600bab 100644 --- a/src/sentry/api/endpoints/organization_release_meta.py +++ b/src/sentry/api/endpoints/organization_release_meta.py @@ -28,7 +28,7 @@ def get(self, request: Request, organization, version) -> Response: The data returned from here is auxiliary meta data that the UI uses. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string version: the version identifier of the release. :auth: required diff --git a/src/sentry/api/endpoints/organization_releases.py b/src/sentry/api/endpoints/organization_releases.py index 23f2d92376d665..1a9e1653bb1b7b 100644 --- a/src/sentry/api/endpoints/organization_releases.py +++ b/src/sentry/api/endpoints/organization_releases.py @@ -243,7 +243,7 @@ def get(self, request: Request, organization) -> Response: ``````````````````````````````` Return a list of releases for a given organization. - :pparam string organization_slug: the organization short name + :pparam string organization_id_or_slug: the id or slug of the organization :qparam string query: this parameter can be used to create a "starts with" filter for the version. """ @@ -421,7 +421,7 @@ def post(self, request: Request, organization) -> Response: Releases are also necessary for sourcemaps and other debug features that require manual upload for functioning well. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :param string version: a version identifier for this release. Can be a version number, a commit hash etc. @@ -595,7 +595,7 @@ def get(self, request: Request, organization) -> Response: ``````````````````````````````` Return a list of releases for a given organization, sorted for most recent releases. - :pparam string organization_slug: the organization short name + :pparam string organization_id_or_slug: the id or slug of the organization """ query = request.GET.get("query") diff --git a/src/sentry/api/endpoints/organization_repositories.py b/src/sentry/api/endpoints/organization_repositories.py index eaff3ab3350bd6..63af7088763af2 100644 --- a/src/sentry/api/endpoints/organization_repositories.py +++ b/src/sentry/api/endpoints/organization_repositories.py @@ -40,7 +40,7 @@ def get(self, request: Request, organization) -> Response: Return a list of version control repositories for a given organization. - :pparam string organization_slug: the organization short name + :pparam string organization_id_or_slug: the id or slug of the organization :qparam string query: optional filter by repository name :auth: required """ diff --git a/src/sentry/api/endpoints/organization_repository_commits.py b/src/sentry/api/endpoints/organization_repository_commits.py index 97997b42769d61..ac4211ef3e2bc0 100644 --- a/src/sentry/api/endpoints/organization_repository_commits.py +++ b/src/sentry/api/endpoints/organization_repository_commits.py @@ -26,7 +26,7 @@ def get(self, request: Request, organization, repo_id) -> Response: Return a list of commits for a given repository. - :pparam string organization_slug: the organization short name + :pparam string organization_id_or_slug: the id or slug of the organization :pparam string repo_id: the repository ID :auth: required """ diff --git a/src/sentry/api/endpoints/organization_shortid.py b/src/sentry/api/endpoints/organization_shortid.py index 8af3609c66d1f3..c7c50db957f054 100644 --- a/src/sentry/api/endpoints/organization_shortid.py +++ b/src/sentry/api/endpoints/organization_shortid.py @@ -24,7 +24,7 @@ def get(self, request: Request, organization, short_id) -> Response: This resolves a short ID to the project slug and internal issue ID. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the short ID should be looked up in. :pparam string short_id: the short ID to look up. :auth: required diff --git a/src/sentry/api/endpoints/organization_slugs.py b/src/sentry/api/endpoints/organization_slugs.py index 94bd9ef07df280..f1151059bd809e 100644 --- a/src/sentry/api/endpoints/organization_slugs.py +++ b/src/sentry/api/endpoints/organization_slugs.py @@ -25,7 +25,7 @@ def put(self, request: Request, organization) -> Response: Updates the slugs of projects within the organization. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the short ID should be looked up in. :param slugs: a dictionary of project IDs to their intended slugs. :auth: required diff --git a/src/sentry/api/endpoints/organization_stats.py b/src/sentry/api/endpoints/organization_stats.py index 45a1de7c05ad58..927cd779822aef 100644 --- a/src/sentry/api/endpoints/organization_stats.py +++ b/src/sentry/api/endpoints/organization_stats.py @@ -32,7 +32,7 @@ def get(self, request: Request, organization) -> Response: Return a set of points representing a normalized timestamp and the number of events seen in the period. - :pparam string organization_slug: the id or slug of the organization for + :pparam string organization_id_or_slug: the id or slug of the organization for which the stats should be retrieved. :qparam string stat: the name of the stat to query (``"received"``, diff --git a/src/sentry/api/endpoints/organization_user_reports.py b/src/sentry/api/endpoints/organization_user_reports.py index 9550595381670c..a083d32db550c7 100644 --- a/src/sentry/api/endpoints/organization_user_reports.py +++ b/src/sentry/api/endpoints/organization_user_reports.py @@ -35,7 +35,7 @@ def get(self, request: Request, organization) -> Response: Return a list of user feedback items within this organization. Can be filtered by projects/environments/creation date. - :pparam string organization_slug: the id or slug of the organization. + :pparam string organization_id_or_slug: the id or slug of the organization. :pparam string project_id_or_slug: the id or slug of the project. :auth: required """ diff --git a/src/sentry/api/endpoints/organization_users.py b/src/sentry/api/endpoints/organization_users.py index 242677487a93dc..7be07bf57876b5 100644 --- a/src/sentry/api/endpoints/organization_users.py +++ b/src/sentry/api/endpoints/organization_users.py @@ -27,7 +27,7 @@ def get(self, request: Request, organization) -> Response: Return a list of users that belong to a given organization and are part of a project. :qparam string project: restrict results to users who have access to a given project ID - :pparam string organization_slug: the id or slug of the organization for which the users + :pparam string organization_id_or_slug: the id or slug of the organization for which the users should be listed. :auth: required """ diff --git a/src/sentry/api/endpoints/project_artifact_bundle_file_details.py b/src/sentry/api/endpoints/project_artifact_bundle_file_details.py index 16530c4ee9f64d..6b941dc2f91fc2 100644 --- a/src/sentry/api/endpoints/project_artifact_bundle_file_details.py +++ b/src/sentry/api/endpoints/project_artifact_bundle_file_details.py @@ -63,7 +63,7 @@ def get(self, request: Request, project, bundle_id, file_id) -> Response: not actually return the contents of the file, just the associated metadata. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project to retrieve the file of. diff --git a/src/sentry/api/endpoints/project_artifact_bundle_files.py b/src/sentry/api/endpoints/project_artifact_bundle_files.py index 2ae9b585ebfa53..423b2e4cb2ee64 100644 --- a/src/sentry/api/endpoints/project_artifact_bundle_files.py +++ b/src/sentry/api/endpoints/project_artifact_bundle_files.py @@ -69,7 +69,7 @@ def get(self, request: Request, project, bundle_id) -> Response: Retrieve a list of files for a given artifact bundle. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the artifact bundle belongs to. :pparam string project_id_or_slug: the id or slug of the project the artifact bundle belongs to. diff --git a/src/sentry/api/endpoints/project_commits.py b/src/sentry/api/endpoints/project_commits.py index bfcbf574032535..b280df59dbeece 100644 --- a/src/sentry/api/endpoints/project_commits.py +++ b/src/sentry/api/endpoints/project_commits.py @@ -26,7 +26,7 @@ def get(self, request: Request, project) -> Response: Retrieve a list of commits for a given project. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the commit belongs to. :pparam string project_id_or_slug: the id or slug of the project to list the commits of. diff --git a/src/sentry/api/endpoints/project_environments.py b/src/sentry/api/endpoints/project_environments.py index 668f2f19212e27..80536ec9de6f9b 100644 --- a/src/sentry/api/endpoints/project_environments.py +++ b/src/sentry/api/endpoints/project_environments.py @@ -27,7 +27,7 @@ def get(self, request: Request, project) -> Response: environments, or ``"all"`` for both hidden and visible environments. - :pparam string organization_slug: the id or slug of the organization the project + :pparam string organization_id_or_slug: the id or slug of the organization the project belongs to. :pparam string project_id_or_slug: the id or slug of the project. diff --git a/src/sentry/api/endpoints/project_event_details.py b/src/sentry/api/endpoints/project_event_details.py index 4d584f978e9c24..b99258f2ce80fa 100644 --- a/src/sentry/api/endpoints/project_event_details.py +++ b/src/sentry/api/endpoints/project_event_details.py @@ -64,7 +64,7 @@ def get(self, request: Request, project, event_id) -> Response: Return details on an individual event. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the event belongs to. :pparam string project_id_or_slug: the id or slug of the project the event belongs to. diff --git a/src/sentry/api/endpoints/project_events.py b/src/sentry/api/endpoints/project_events.py index c0a91ccce6ccab..ee39b55e471c7f 100644 --- a/src/sentry/api/endpoints/project_events.py +++ b/src/sentry/api/endpoints/project_events.py @@ -46,7 +46,7 @@ def get(self, request: Request, project) -> Response: :qparam bool sample: return events in pseudo-random order. This is deterministic, same query will return the same events in the same order. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the groups belong to. :pparam string project_id_or_slug: the id or slug of the project the groups belong to. diff --git a/src/sentry/api/endpoints/project_group_index.py b/src/sentry/api/endpoints/project_group_index.py index f4a24bc3d30935..637a5fd6fea6e6 100644 --- a/src/sentry/api/endpoints/project_group_index.py +++ b/src/sentry/api/endpoints/project_group_index.py @@ -77,7 +77,7 @@ def get(self, request: Request, project) -> Response: ``"is:unresolved"`` is assumed.) :qparam string environment: this restricts the issues to ones containing events from this environment - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the issues belong to. :pparam string project_id_or_slug: the id or slug of the project the issues belong to. @@ -214,7 +214,7 @@ def put(self, request: Request, project) -> Response: specified status. Valid values are ``"resolved"``, ``"unresolved"`` and ``"ignored"``. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the issues belong to. :pparam string project_id_or_slug: the id or slug of the project the issues belong to. @@ -271,7 +271,7 @@ def delete(self, request: Request, project) -> Response: :qparam int id: a list of IDs of the issues to be removed. This parameter shall be repeated for each issue. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the issues belong to. :pparam string project_id_or_slug: the id or slug of the project the issues belong to. diff --git a/src/sentry/api/endpoints/project_issues_resolved_in_release.py b/src/sentry/api/endpoints/project_issues_resolved_in_release.py index 760e51e5f5083a..5d9d97dcc8090f 100644 --- a/src/sentry/api/endpoints/project_issues_resolved_in_release.py +++ b/src/sentry/api/endpoints/project_issues_resolved_in_release.py @@ -26,7 +26,7 @@ def get(self, request: Request, project, version) -> Response: Retrieve a list of issues to be resolved in a given release. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project associated with the release. :pparam string version: the version identifier of the release. diff --git a/src/sentry/api/endpoints/project_performance_issue_settings.py b/src/sentry/api/endpoints/project_performance_issue_settings.py index 9e02b05511c575..1d2aaea6e3bd8f 100644 --- a/src/sentry/api/endpoints/project_performance_issue_settings.py +++ b/src/sentry/api/endpoints/project_performance_issue_settings.py @@ -184,7 +184,7 @@ def get(self, request: Request, project) -> Response: Return settings for performance issues - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the project belongs to. :pparam string project_id_or_slug: the id or slug of the project to configure. :auth: required diff --git a/src/sentry/api/endpoints/project_release_commits.py b/src/sentry/api/endpoints/project_release_commits.py index 1e692c01fc0378..624d669d91cf8f 100644 --- a/src/sentry/api/endpoints/project_release_commits.py +++ b/src/sentry/api/endpoints/project_release_commits.py @@ -26,7 +26,7 @@ def get(self, request: Request, project, version) -> Response: Retrieve a list of commits for a given release. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project to list the release files of. diff --git a/src/sentry/api/endpoints/project_release_details.py b/src/sentry/api/endpoints/project_release_details.py index 7eeba16e5eaa59..75a68e1b3e7492 100644 --- a/src/sentry/api/endpoints/project_release_details.py +++ b/src/sentry/api/endpoints/project_release_details.py @@ -34,7 +34,7 @@ def get(self, request: Request, project, version) -> Response: Return details on an individual release. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project to retrieve the release of. @@ -78,7 +78,7 @@ def put(self, request: Request, project, version) -> Response: Update a release. This can change some metadata associated with the release (the ref, url, and dates). - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project to change the release of. @@ -154,7 +154,7 @@ def delete(self, request: Request, project, version) -> Response: Permanently remove a release and all of its files. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project to delete the release of. diff --git a/src/sentry/api/endpoints/project_release_file_details.py b/src/sentry/api/endpoints/project_release_file_details.py index 43ef2174994ce8..b72a1c2b1a03a9 100644 --- a/src/sentry/api/endpoints/project_release_file_details.py +++ b/src/sentry/api/endpoints/project_release_file_details.py @@ -217,7 +217,7 @@ def get(self, request: Request, project, version, file_id) -> Response: not actually return the contents of the file, just the associated metadata. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project to retrieve the file of. @@ -247,7 +247,7 @@ def put(self, request: Request, project, version, file_id) -> Response: Update metadata of an existing file. Currently only the name of the file can be changed. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project to update the file of. @@ -276,7 +276,7 @@ def delete(self, request: Request, project, version, file_id) -> Response: This will also remove the physical file from storage, except if it is stored as part of an artifact bundle. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project to delete the file of. diff --git a/src/sentry/api/endpoints/project_release_files.py b/src/sentry/api/endpoints/project_release_files.py index b5873e23258323..5674787662a85d 100644 --- a/src/sentry/api/endpoints/project_release_files.py +++ b/src/sentry/api/endpoints/project_release_files.py @@ -244,7 +244,7 @@ def get(self, request: Request, project, version) -> Response: Retrieve a list of files for a given release. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project to list the release files of. @@ -276,7 +276,7 @@ def post(self, request: Request, project, version) -> Response: that this file will be referenced as. For example, in the case of JavaScript you might specify the full web URI. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project to change the release of. diff --git a/src/sentry/api/endpoints/project_release_repositories.py b/src/sentry/api/endpoints/project_release_repositories.py index 6e6e7e9f94c76f..95b57ce4e0dc46 100644 --- a/src/sentry/api/endpoints/project_release_repositories.py +++ b/src/sentry/api/endpoints/project_release_repositories.py @@ -26,7 +26,7 @@ def get(self, request: Request, project, version) -> Response: This endpoint is used in the commits and changed files tab of the release details page - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project to retrieve the release of. diff --git a/src/sentry/api/endpoints/project_release_stats.py b/src/sentry/api/endpoints/project_release_stats.py index d0860b5650df88..f769298539d52a 100644 --- a/src/sentry/api/endpoints/project_release_stats.py +++ b/src/sentry/api/endpoints/project_release_stats.py @@ -39,7 +39,7 @@ def get(self, request: Request, project, version) -> Response: Returns the stats of a given release under a project. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project to list the release files of. diff --git a/src/sentry/api/endpoints/project_releases.py b/src/sentry/api/endpoints/project_releases.py index 6c530a95a81f24..c69b315e7b3bb5 100644 --- a/src/sentry/api/endpoints/project_releases.py +++ b/src/sentry/api/endpoints/project_releases.py @@ -42,7 +42,7 @@ def get(self, request: Request, project) -> Response: Retrieve a list of releases for a given project. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project to list the releases of. @@ -97,7 +97,7 @@ def post(self, request: Request, project) -> Response: Releases are also necessary for sourcemaps and other debug features that require manual upload for functioning well. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string project_id_or_slug: the id or slug of the project to create a release for. diff --git a/src/sentry/api/endpoints/project_servicehook_details.py b/src/sentry/api/endpoints/project_servicehook_details.py index e06d6a344450ae..5908675291dcf6 100644 --- a/src/sentry/api/endpoints/project_servicehook_details.py +++ b/src/sentry/api/endpoints/project_servicehook_details.py @@ -31,7 +31,7 @@ def get(self, request: Request, project, hook_id) -> Response: Return a service hook bound to a project. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the client keys belong to. :pparam string project_id_or_slug: the id or slug of the project the client keys belong to. @@ -49,7 +49,7 @@ def put(self, request: Request, project, hook_id) -> Response: Update a Service Hook ````````````````````` - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the client keys belong to. :pparam string project_id_or_slug: the id or slug of the project the client keys belong to. @@ -102,7 +102,7 @@ def delete(self, request: Request, project, hook_id) -> Response: Remove a Service Hook ````````````````````` - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the client keys belong to. :pparam string project_id_or_slug: the id or slug of the project the client keys belong to. diff --git a/src/sentry/api/endpoints/project_servicehooks.py b/src/sentry/api/endpoints/project_servicehooks.py index 8b5c1d2938c054..6199cb96ba0249 100644 --- a/src/sentry/api/endpoints/project_servicehooks.py +++ b/src/sentry/api/endpoints/project_servicehooks.py @@ -37,7 +37,7 @@ def get(self, request: Request, project) -> Response: This endpoint requires the 'servicehooks' feature to be enabled for your project. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the client keys belong to. :pparam string project_id_or_slug: the id or slug of the project the client keys belong to. @@ -83,7 +83,7 @@ def post(self, request: Request, project) -> Response: This endpoint requires the 'servicehooks' feature to be enabled for your project. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the client keys belong to. :pparam string project_id_or_slug: the id or slug of the project the client keys belong to. diff --git a/src/sentry/api/endpoints/project_stats.py b/src/sentry/api/endpoints/project_stats.py index b0e0e3583bca13..f0ae58a5590815 100644 --- a/src/sentry/api/endpoints/project_stats.py +++ b/src/sentry/api/endpoints/project_stats.py @@ -31,7 +31,7 @@ def get(self, request: Request, project) -> Response: Query ranges are limited to Sentry's configured time-series resolutions. - :pparam string organization_slug: the id or slug of the organization. + :pparam string organization_id_or_slug: the id or slug of the organization. :pparam string project_id_or_slug: the id or slug of the project. :qparam string stat: the name of the stat to query (``"received"``, ``"rejected"``, ``"blacklisted"``, ``generated``) diff --git a/src/sentry/api/endpoints/project_tagkey_values.py b/src/sentry/api/endpoints/project_tagkey_values.py index 9f4cd23c0ff588..83bed72538978c 100644 --- a/src/sentry/api/endpoints/project_tagkey_values.py +++ b/src/sentry/api/endpoints/project_tagkey_values.py @@ -29,7 +29,7 @@ def get(self, request: Request, project, key) -> Response: values. When paginated can return at most 1000 values. - :pparam string organization_slug: the id or slug of the organization. + :pparam string organization_id_or_slug: the id or slug of the organization. :pparam string project_id_or_slug: the id or slug of the project. :pparam string key: the tag key to look up. :auth: required diff --git a/src/sentry/api/endpoints/project_teams.py b/src/sentry/api/endpoints/project_teams.py index 261eb1272515f5..20faec5e946dab 100644 --- a/src/sentry/api/endpoints/project_teams.py +++ b/src/sentry/api/endpoints/project_teams.py @@ -24,7 +24,7 @@ def get(self, request: Request, project) -> Response: Return a list of teams that have access to this project. - :pparam string organization_slug: the id or slug of the organization. + :pparam string organization_id_or_slug: the id or slug of the organization. :pparam string project_id_or_slug: the id or slug of the project. :auth: required """ diff --git a/src/sentry/api/endpoints/project_transfer.py b/src/sentry/api/endpoints/project_transfer.py index 2112635baecf8e..3a429d12c27d42 100644 --- a/src/sentry/api/endpoints/project_transfer.py +++ b/src/sentry/api/endpoints/project_transfer.py @@ -39,7 +39,7 @@ def post(self, request: Request, project) -> Response: Schedules a project for transfer to a new organization. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the project belongs to. :pparam string project_id_or_slug: the id or slug of the project to delete. :param string email: email of new owner. must be an organization owner diff --git a/src/sentry/api/endpoints/project_user_reports.py b/src/sentry/api/endpoints/project_user_reports.py index 3359d8b455dd7d..36dda69e763ff7 100644 --- a/src/sentry/api/endpoints/project_user_reports.py +++ b/src/sentry/api/endpoints/project_user_reports.py @@ -45,7 +45,7 @@ def get(self, request: Request, project) -> Response: Return a list of user feedback items within this project. - :pparam string organization_slug: the id or slug of the organization. + :pparam string organization_id_or_slug: the id or slug of the organization. :pparam string project_id_or_slug: the id or slug of the project. :auth: required """ @@ -100,7 +100,7 @@ def post(self, request: Request, project) -> Response: Note: Feedback may be submitted with DSN authentication (see auth documentation). - :pparam string organization_slug: the id or slug of the organization. + :pparam string organization_id_or_slug: the id or slug of the organization. :pparam string project_id_or_slug: the id or slug of the project. :auth: required :param string event_id: the event ID diff --git a/src/sentry/api/endpoints/project_users.py b/src/sentry/api/endpoints/project_users.py index 943404972aa732..fffd5df8ac17b0 100644 --- a/src/sentry/api/endpoints/project_users.py +++ b/src/sentry/api/endpoints/project_users.py @@ -31,7 +31,7 @@ def get(self, request: Request, project) -> Response: Return a list of users seen within this project. - :pparam string organization_slug: the id or slug of the organization. + :pparam string organization_id_or_slug: the id or slug of the organization. :pparam string project_id_or_slug: the id or slug of the project. :pparam string key: the tag key to look up. :auth: required diff --git a/src/sentry/api/endpoints/release_deploys.py b/src/sentry/api/endpoints/release_deploys.py index 8aba55033e8e3b..65aa46ed31eaee 100644 --- a/src/sentry/api/endpoints/release_deploys.py +++ b/src/sentry/api/endpoints/release_deploys.py @@ -52,7 +52,7 @@ def get(self, request: Request, organization, version) -> Response: Returns a list of deploys based on the organization, version, and project. - :pparam string organization_slug: the organization short name + :pparam string organization_id_or_slug: the id or slug of the organization :pparam string version: the version identifier of the release. """ try: @@ -92,7 +92,7 @@ def post(self, request: Request, organization, version) -> Response: Create a deploy for a given release. - :pparam string organization_slug: the organization short name + :pparam string organization_id_or_slug: the id or slug of the organization :pparam string version: the version identifier of the release. :param string environment: the environment you're deploying to :param string name: the optional name of the deploy diff --git a/src/sentry/api/endpoints/team_details.py b/src/sentry/api/endpoints/team_details.py index d09435aa351818..148556db671577 100644 --- a/src/sentry/api/endpoints/team_details.py +++ b/src/sentry/api/endpoints/team_details.py @@ -51,7 +51,7 @@ def get(self, request: Request, team) -> Response: Return details on an individual team. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the team belongs to. :pparam string team_id_or_slug: the id or slug of the team to get. :qparam list expand: an optional list of strings to opt in to additional @@ -81,7 +81,7 @@ def put(self, request: Request, team) -> Response: Update various attributes and configurable settings for the given team. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the team belongs to. :pparam string team_id_or_slug: the id or slug of the team to get. :param string name: the new name for the team. diff --git a/src/sentry/issues/endpoints/organization_group_index.py b/src/sentry/issues/endpoints/organization_group_index.py index a5766858316355..57f85ca63456c7 100644 --- a/src/sentry/issues/endpoints/organization_group_index.py +++ b/src/sentry/issues/endpoints/organization_group_index.py @@ -251,7 +251,7 @@ def get(self, request: Request, organization) -> Response: :qparam bool savedSearch: if this is set to False, then we are making the request without a saved search and will look for the default search from this endpoint. :qparam string searchId: if passed in, this is the selected search - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the issues belong to. :auth: required :qparam list expand: an optional list of strings to opt in to additional data. Supports `inbox` @@ -445,7 +445,7 @@ def put(self, request: Request, organization) -> Response: specified status. Valid values are ``"resolved"``, ``"unresolved"`` and ``"ignored"``. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the issues belong to. :param string status: the new status for the issues. Valid values are ``"resolved"``, ``"resolvedInNextRelease"``, @@ -521,7 +521,7 @@ def delete(self, request: Request, organization) -> Response: parameter shall be repeated for each issue, e.g. `?id=1&id=2&id=3`. If this parameter is not provided, it will attempt to remove the first 1000 issues. - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the issues belong to. :auth: required """ diff --git a/src/sentry/issues/endpoints/organization_release_previous_commits.py b/src/sentry/issues/endpoints/organization_release_previous_commits.py index 3559400c0a49b1..edc49300f09610 100644 --- a/src/sentry/issues/endpoints/organization_release_previous_commits.py +++ b/src/sentry/issues/endpoints/organization_release_previous_commits.py @@ -26,7 +26,7 @@ def get(self, request: Request, organization: Organization, version: str) -> Res Retrieve an Organization's Most Recent Release with Commits ```````````````````````````````````````````````````````````` - :pparam string organization_slug: the id or slug of the organization the + :pparam string organization_id_or_slug: the id or slug of the organization the release belongs to. :pparam string version: the version identifier of the release. :auth: required
immich
https://github.com/immich-app/immich
6f37ab6a9ebae4da191b853109f89df2317d1118
Alex
2024-09-04 02:34:35
fix(server): empty trash for archived assets (#12281)
* fix(server): empty trash for archived assets * use withArchived * add e2e test
fix(server): empty trash for archived assets (#12281) * fix(server): empty trash for archived assets * use withArchived * add e2e test
diff --git a/e2e/src/api/specs/trash.e2e-spec.ts b/e2e/src/api/specs/trash.e2e-spec.ts index 3049ff151165b..0c28a72825beb 100644 --- a/e2e/src/api/specs/trash.e2e-spec.ts +++ b/e2e/src/api/specs/trash.e2e-spec.ts @@ -42,6 +42,23 @@ describe('/trash', () => { const after = await getAssetStatistics({ isTrashed: true }, { headers: asBearerAuth(admin.accessToken) }); expect(after.total).toBe(0); }); + + it('should empty the trash with archived assets', async () => { + const { id: assetId } = await utils.createAsset(admin.accessToken); + await utils.archiveAssets(admin.accessToken, [assetId]); + await utils.deleteAssets(admin.accessToken, [assetId]); + + const before = await getAssetInfo({ id: assetId }, { headers: asBearerAuth(admin.accessToken) }); + expect(before).toStrictEqual(expect.objectContaining({ id: assetId, isTrashed: true, isArchived: true })); + + const { status } = await request(app).post('/trash/empty').set('Authorization', `Bearer ${admin.accessToken}`); + expect(status).toBe(204); + + await utils.waitForWebsocketEvent({ event: 'assetDelete', id: assetId }); + + const after = await getAssetStatistics({ isTrashed: true }, { headers: asBearerAuth(admin.accessToken) }); + expect(after.total).toBe(0); + }); }); describe('POST /trash/restore', () => { diff --git a/e2e/src/utils.ts b/e2e/src/utils.ts index e2f05d5261759..c67e5696975a9 100644 --- a/e2e/src/utils.ts +++ b/e2e/src/utils.ts @@ -30,6 +30,7 @@ import { signUpAdmin, updateAdminOnboarding, updateAlbumUser, + updateAssets, updateConfig, validate, } from '@immich/sdk'; @@ -389,6 +390,9 @@ export const utils = { return searchMetadata({ metadataSearchDto: dto }, { headers: asBearerAuth(accessToken) }); }, + archiveAssets: (accessToken: string, ids: string[]) => + updateAssets({ assetBulkUpdateDto: { ids, isArchived: true } }, { headers: asBearerAuth(accessToken) }), + deleteAssets: (accessToken: string, ids: string[]) => deleteAssets({ assetBulkDeleteDto: { ids } }, { headers: asBearerAuth(accessToken) }), diff --git a/server/src/services/trash.service.ts b/server/src/services/trash.service.ts index 8376ba9221dea..ac141521ddc18 100644 --- a/server/src/services/trash.service.ts +++ b/server/src/services/trash.service.ts @@ -41,6 +41,7 @@ export class TrashService { const assetPagination = usePagination(JOBS_ASSET_PAGINATION_SIZE, (pagination) => this.assetRepository.getByUserId(pagination, auth.user.id, { trashedBefore: DateTime.now().toJSDate(), + withArchived: true, }), );
nocodb
https://github.com/nocodb/nocodb
6c4d0482e340c0baa94418719d7724ebc96add0f
Anbarasu
2024-05-14 12:32:10
fix: user management followup (#8458)
* fix(nocodb): image upload * fix(nc-gui): invite workspace error * feat: bug fixes(wip) * fix(nocodb): incorrect members list * fix(nc-gui): update row size * fix(nc-gui): some more changes * fix(nc-gui): show image * chore: cleanup
fix: user management followup (#8458) * fix(nocodb): image upload * fix(nc-gui): invite workspace error * feat: bug fixes(wip) * fix(nocodb): incorrect members list * fix(nc-gui): update row size * fix(nc-gui): some more changes * fix(nc-gui): show image * chore: cleanup
diff --git a/packages/nc-gui/components/dlg/InviteDlg.vue b/packages/nc-gui/components/dlg/InviteDlg.vue index 56f7ada6f1f2..5ba335e95ff9 100644 --- a/packages/nc-gui/components/dlg/InviteDlg.vue +++ b/packages/nc-gui/components/dlg/InviteDlg.vue @@ -1,7 +1,7 @@ <script lang="ts" setup> import { ProjectRoles, type RoleLabels, WorkspaceUserRoles } from 'nocodb-sdk' -import { extractEmail } from '~/helpers/parsers/parserHelpers' +import { extractEmail } from '../../helpers/parsers/parserHelpers' const props = defineProps<{ modelValue: boolean @@ -12,6 +12,8 @@ const props = defineProps<{ }>() const emit = defineEmits(['update:modelValue']) +const { baseRoles, workspaceRoles } = useRoles() + const basesStore = useBases() const workspaceStore = useWorkspace() @@ -26,6 +28,10 @@ const orderedRoles = computed(() => { return props.type === 'base' ? ProjectRoles : WorkspaceUserRoles }) +const userRoles = computed(() => { + return props.type === 'base' ? baseRoles.value : workspaceRoles.value +}) + const inviteData = reactive({ email: '', roles: orderedRoles.value.NO_ACCESS, @@ -47,6 +53,28 @@ const emailBadges = ref<Array<string>>([]) const allowedRoles = ref<[]>([]) +const isLoading = ref(false) + +const organizationStore = useOrganization() + +const { listWorkspaces } = organizationStore + +const { workspaces } = storeToRefs(organizationStore) + +const searchQuery = ref('') + +const workSpaceSelectList = computed<WorkspaceType[]>(() => { + return workspaces.value.filter((w: WorkspaceType) => w.title!.toLowerCase().includes(searchQuery.value.toLowerCase())) +}) + +const checked = reactive<{ + [key: string]: boolean +}>({}) + +const selectedWorkspaces = computed<WorkspaceType[]>(() => { + return workSpaceSelectList.value.filter((ws: WorkspaceType) => checked[ws.id!]) +}) + const focusOnDiv = () => { focusRef.value?.focus() isDivFocused.value = true @@ -218,10 +246,9 @@ const onPaste = (e: ClipboardEvent) => { inviteData.email = '' } -const workSpaces = ref<NcWorkspace[]>([]) - const inviteCollaborator = async () => { try { + isLoading.value = true const payloadData = singleEmailValue.value || emailBadges.value.join(',') if (!payloadData.includes(',')) { const validationStatus = validateEmail(payloadData) @@ -239,7 +266,7 @@ const inviteCollaborator = async () => { await inviteWsCollaborator(payloadData, inviteData.roles, props.workspaceId) } else if (props.type === 'organization') { // TODO: Add support for Bulk Workspace Invite - for (const workspace of workSpaces.value) { + for (const workspace of selectedWorkspaces.value) { await inviteWsCollaborator(payloadData, inviteData.roles, workspace.id) } } @@ -252,32 +279,17 @@ const inviteCollaborator = async () => { message.error(await extractSdkResponseErrorMsg(e)) } finally { singleEmailValue.value = '' + isLoading.value = false } } -const organizationStore = useOrganization() - -const { listWorkspaces } = organizationStore - -const { workspaces } = storeToRefs(organizationStore) - -const workSpaceSelectList = computed(() => { - return workspaces.value.filter((w) => !workSpaces.value.find((ws) => ws.id === w.id)) -}) - -const addToList = (workspaceId: string) => { - workSpaces.value.push(workspaces.value.find((w) => w.id === workspaceId)!) -} -const removeWorkspace = (workspaceId: string) => { - workSpaces.value = workSpaces.value.filter((w) => w.id !== workspaceId) -} +const isOrgSelectMenuOpen = ref(false) onMounted(async () => { if (props.type === 'organization') { await listWorkspaces() } }) - const onRoleChange = (role: keyof typeof RoleLabels) => (inviteData.roles = role as ProjectRoles | WorkspaceUserRoles) </script> @@ -291,7 +303,7 @@ const onRoleChange = (role: keyof typeof RoleLabels) => (inviteData.roles = role @keydown.esc="dialogShow = false" > <template #header> - <div class="flex flex-row items-center gap-x-2"> + <div class="flex flex-row text-2xl font-bold items-center gap-x-2"> {{ type === 'organization' ? $t('labels.addMembersToOrganization') @@ -331,6 +343,7 @@ const onRoleChange = (role: keyof typeof RoleLabels) => (inviteData.roles = role id="email" ref="focusRef" v-model="inviteData.email" + :disabled="isLoading" :placeholder="$t('activity.enterEmail')" class="w-full min-w-36 outline-none px-2" data-testid="email-input" @@ -354,23 +367,71 @@ const onRoleChange = (role: keyof typeof RoleLabels) => (inviteData.roles = role }}</span> <template v-if="type === 'organization'"> - <NcSelect :placeholder="$t('labels.selectWorkspace')" size="middle" @change="addToList"> - <a-select-option v-for="workspace in workSpaceSelectList" :key="workspace.id" :value="workspace.id"> - {{ workspace.title }} - </a-select-option> - </NcSelect> - - <div class="flex flex-wrap gap-2"> - <NcBadge v-for="workspace in workSpaces" :key="workspace.id"> - <div class="px-2 flex gap-2 items-center py-1"> - <GeneralWorkspaceIcon :workspace="workspace" hide-label size="small" /> - <span class="text-gray-600"> - {{ workspace.title }} - </span> - <component :is="iconMap.close" class="w-3 h-3" @click="removeWorkspace(workspace.id)" /> + <NcDropdown v-model:visible="isOrgSelectMenuOpen"> + <NcButton class="!justify-between" full-width size="medium" type="secondary"> + <div + :class="{ + '!text-gray-600': selectedWorkspaces.length > 0, + }" + class="flex text-gray-500 justify-between items-center w-full" + > + <NcTooltip class="!max-w-130 truncate" show-on-truncate-only> + <span class=""> + {{ + selectedWorkspaces.length > 0 + ? selectedWorkspaces.map((w) => w.title).join(', ') + : '-select workspaces to invite to-' + }} + </span> + <template #title> + {{ + selectedWorkspaces.length > 0 + ? selectedWorkspaces.map((w) => w.title).join(', ') + : '-select workspaces to invite to-' + }} + </template> + </NcTooltip> + + <component :is="iconMap.chevronDown" /> </div> - </NcBadge> - </div> + </NcButton> + <template #overlay> + <div class="py-2"> + <div class="mx-2"> + <a-input + v-model:value="searchQuery" + :class="{ + '!border-brand-500': searchQuery.length > 0, + }" + class="!rounded-lg !h-8 !ring-0 !placeholder:text-gray-500 !border-gray-200 !px-4" + data-testid="nc-ws-search" + placeholder="Search workspace" + > + <template #prefix> + <component :is="iconMap.search" class="h-4 w-4 mr-1 text-gray-500" /> + </template> + </a-input> + </div> + + <div class="flex flex-col max-h-64 overflow-y-auto nc-scrollbar-md mt-2"> + <div + v-for="ws in workSpaceSelectList" + :key="ws.id" + class="px-4 cursor-pointer hover:bg-gray-100 rounded-lg h-9.5 py-2 w-full flex gap-2" + @click="checked[ws.id!] = !checked[ws.id!]" + > + <div class="flex gap-2 capitalize items-center"> + <GeneralWorkspaceIcon :hide-label="true" :workspace="ws" size="small" /> + {{ ws.title }} + </div> + <div class="flex-1" /> + <NcCheckbox v-model:checked="checked[ws.id!]" size="large" /> + </div> + </div> + </div> + </template> + /> + </NcDropdown> </template> </div> </div> @@ -378,7 +439,8 @@ const onRoleChange = (role: keyof typeof RoleLabels) => (inviteData.roles = role <div class="flex gap-2"> <NcButton type="secondary" @click="dialogShow = false"> {{ $t('labels.cancel') }} </NcButton> <NcButton - :disabled="isInviteButtonDisabled || emailValidation.isError" + :disabled="isInviteButtonDisabled || emailValidation.isError || isLoading" + :loading="isLoading" size="medium" type="primary" class="nc-invite-btn" diff --git a/packages/nc-gui/components/dlg/WorkspaceDelete.vue b/packages/nc-gui/components/dlg/WorkspaceDelete.vue new file mode 100644 index 000000000000..bd2c304e8ed3 --- /dev/null +++ b/packages/nc-gui/components/dlg/WorkspaceDelete.vue @@ -0,0 +1,64 @@ +<script lang="ts" setup> +const props = defineProps<{ + visible: boolean + workspaceId: string +}>() + +const emits = defineEmits(['update:visible']) +const visible = useVModel(props, 'visible', emits) + +const workspaceStore = useWorkspace() + +const { deleteWorkspace: _deleteWorkspace, loadWorkspaces, navigateToWorkspace, loadWorkspace } = workspaceStore + +const { workspacesList, activeWorkspace } = storeToRefs(workspaceStore) + +const { refreshCommandPalette } = useCommandPalette() + +const workspace = computedAsync(async () => { + if (props.workspaceId) { + const ws = workspacesList.value.find((workspace) => workspace.id === props.workspaceId) + if (!ws) { + await loadWorkspace(props.workspaceId) + + return workspacesList.value.find((workspace) => workspace.id === props.workspaceId) + } + } + return activeWorkspace.value ?? workspacesList.value[0] +}) + +const onDelete = async () => { + if (!workspace.value) return + + try { + await _deleteWorkspace(workspace.value.id!) + await loadWorkspaces() + + if (!workspacesList.value?.[0]?.id) { + return await navigateToWorkspace() + } + + await navigateToWorkspace(workspacesList.value?.[0]?.id) + } catch (e: any) { + message.error(await extractSdkResponseErrorMsg(e)) + } finally { + refreshCommandPalette() + } +} +</script> + +<template> + <GeneralDeleteModal v-model:visible="visible" :entity-name="$t('objects.workspace')" :on-delete="onDelete"> + <template #entity-preview> + <div v-if="workspace" class="flex flex-row items-center py-2.25 px-2.75 bg-gray-50 rounded-lg text-gray-700 mb-4"> + <GeneralIcon icon="workspace" /> + <div + class="capitalize text-ellipsis overflow-hidden select-none w-full pl-2.25" + :style="{ wordBreak: 'keep-all', whiteSpace: 'nowrap', display: 'inline' }" + > + {{ workspace.title }} + </div> + </div> + </template> + </GeneralDeleteModal> +</template> diff --git a/packages/nc-gui/components/project/AccessSettings.vue b/packages/nc-gui/components/project/AccessSettings.vue index b3dae99d35bd..64a3784661a1 100644 --- a/packages/nc-gui/components/project/AccessSettings.vue +++ b/packages/nc-gui/components/project/AccessSettings.vue @@ -152,6 +152,27 @@ onMounted(async () => { } }) +const selected = reactive<{ + [key: number]: boolean +}>({}) + +const toggleSelectAll = (value: boolean) => { + filteredCollaborators.value.forEach((_, i) => { + selected[_.id] = value + }) +} + +// const isSomeSelected = computed(() => Object.values(selected).some((v) => v)) + +const selectAll = computed({ + get: () => + Object.values(selected).every((v) => v) && + Object.keys(selected).length > 0 && + Object.values(selected).length === filteredCollaborators.value.length, + set: (value) => { + toggleSelectAll(value) + }, +}) watch(isInviteModalVisible, () => { if (!isInviteModalVisible.value) { loadCollaborators() @@ -172,11 +193,12 @@ watch(currentBase, () => { > <div v-if="isAdminPanel" class="font-bold w-full !mb-5 text-2xl" data-rec="true"> <div class="flex items-center gap-3"> - <!-- TODO: @DarkPhoenix2704 --> <NuxtLink :href="`/admin/${orgId}/bases`" - class="!hover:(text-black underline-gray-600) !text-black !underline-transparent ml-0.75 max-w-1/4" + class="!hover:(text-black underline-gray-600) flex items-center !text-black !underline-transparent ml-0.75 max-w-1/4" > + <component :is="iconMap.arrowLeft" class="text-3xl" /> + {{ $t('objects.projects') }} </NuxtLink> @@ -218,8 +240,10 @@ watch(currentBase, () => { <a-empty :description="$t('title.noMembersFound')" /> </div> <div v-else class="nc-collaborators-list mt-6 h-full"> - <div class="flex flex-col rounded-lg overflow-hidden border-1 max-w-350 max-h-[calc(100%-8rem)]"> + <div class="flex flex-col overflow-hidden max-w-350 max-h-[calc(100%-8rem)]"> <div class="flex flex-row bg-gray-50 min-h-12 items-center border-b-1"> + <div class="py-3 px-6"><NcCheckbox v-model:checked="selectAll" /></div> + <LazyAccountHeaderWithSorter class="users-email-grid" :header="$t('objects.users')" @@ -243,8 +267,14 @@ watch(currentBase, () => { <div v-for="(collab, i) of sortedCollaborators" :key="i" - class="user-row flex flex-row border-b-1 py-1 min-h-14 items-center" + :class="{ + 'bg-[#F0F3FF]': selected[collab.id], + }" + class="user-row flex hover:bg-[#F0F3FF] flex-row border-b-1 py-1 min-h-14 items-center" > + <div class="py-3 px-6"> + <NcCheckbox v-model:checked="selected[collab.id]" /> + </div> <div class="flex gap-3 items-center users-email-grid"> <GeneralUserIcon size="base" :email="collab.email" /> <div class="flex flex-col"> diff --git a/packages/nc-gui/components/workspace/CollaboratorsList.vue b/packages/nc-gui/components/workspace/CollaboratorsList.vue index f044e87e4342..388d2c248798 100644 --- a/packages/nc-gui/components/workspace/CollaboratorsList.vue +++ b/packages/nc-gui/components/workspace/CollaboratorsList.vue @@ -9,12 +9,20 @@ const { workspaceRoles, loadRoles } = useRoles() const workspaceStore = useWorkspace() -const { removeCollaborator, updateCollaborator: _updateCollaborator } = workspaceStore +const { removeCollaborator, updateCollaborator: _updateCollaborator, loadWorkspace } = workspaceStore -const { collaborators, activeWorkspace: _activeWorkspace, workspaces } = storeToRefs(workspaceStore) +const { collaborators, activeWorkspace, workspacesList } = storeToRefs(workspaceStore) -const currentWorkspace = computed(() => { - return props.workspaceId ? workspaces.value.get(props.workspaceId) : _activeWorkspace.value +const currentWorkspace = computedAsync(async () => { + if (props.workspaceId) { + const ws = workspacesList.value.find((workspace) => workspace.id === props.workspaceId) + if (!ws) { + await loadWorkspace(props.workspaceId) + + return workspacesList.value.find((workspace) => workspace.id === props.workspaceId) + } + } + return activeWorkspace.value ?? workspacesList.value[0] }) const { sorts, loadSorts, handleGetSortedData, toggleSort } = useUserSorts('Workspace') @@ -34,8 +42,8 @@ const filterCollaborators = computed(() => { return collaborators.value.filter( (collab) => - collab.display_name.toLowerCase().includes(userSearchText.value.toLowerCase()) || - collab.email.toLowerCase().includes(userSearchText.value.toLowerCase()), + collab.display_name?.toLowerCase().includes(userSearchText.value.toLowerCase()) || + collab.email?.toLowerCase().includes(userSearchText.value.toLowerCase()), ) }) @@ -64,8 +72,10 @@ const selectAll = computed({ }) const updateCollaborator = async (collab: any, roles: WorkspaceUserRoles) => { + if (!currentWorkspace.value || !currentWorkspace.value.id) return + console.log(WorkspaceUserRoles.OWNER) try { - await _updateCollaborator(collab.id, roles, currentWorkspace.value?.id) + await _updateCollaborator(collab.id, roles, currentWorkspace.value.id) message.success('Successfully updated user role') collaborators.value?.forEach((collaborator) => { @@ -93,7 +103,7 @@ onMounted(async () => { </script> <template> - <DlgInviteDlg v-model:model-value="inviteDlg" :workspace-id="currentWorkspace?.id" type="workspace" /> + <DlgInviteDlg v-if="currentWorkspace" v-model:model-value="inviteDlg" :workspace-id="currentWorkspace?.id" type="workspace" /> <div class="nc-collaborator-table-container mt-4 h-[calc(100vh-10rem)] max-w-350"> <div class="w-full flex justify-between mt-6.5 mb-2"> <a-input v-model:value="userSearchText" class="!max-w-90 !rounded-md mr-4" placeholder="Search members"> @@ -138,7 +148,10 @@ onMounted(async () => { <div v-for="(collab, i) of sortedCollaborators" :key="i" - class="user-row flex hover:bg-gray-50 flex-row last:border-b-0 border-b-1 py-1 min-h-14 items-center" + :class="{ + 'bg-[#F0F3FF]': selected[i], + }" + class="user-row flex hover:bg-[#F0F3FF] flex-row last:border-b-0 border-b-1 py-1 min-h-14 items-center" > <div class="py-3 px-6"> <NcCheckbox v-model:checked="selected[i]" /> @@ -149,7 +162,7 @@ onMounted(async () => { <div class="flex flex-col"> <div class="flex gap-3"> <span class="text-gray-800 capitalize font-semibold"> - {{ collab.display_name || collab.email.slice(0, collab.email.indexOf('@')) }} + {{ collab.display_name || collab?.email?.slice(0, collab.email.indexOf('@')) }} </span> </div> <span class="text-xs text-gray-600"> @@ -159,10 +172,10 @@ onMounted(async () => { </div> <div class="w-full flex-1 px-6 py-3"> <div class="w-[30px]"> - <template v-if="accessibleRoles.includes(collab.roles)"> + <template v-if="accessibleRoles.includes(collab.roles as WorkspaceUserRoles)"> <RolesSelector :description="false" - :on-role-change="(role) => updateCollaborator(collab, role)" + :on-role-change="(role) => updateCollaborator(collab, role as WorkspaceUserRoles)" :role="collab.roles" :roles="accessibleRoles" class="cursor-pointer" diff --git a/packages/nc-gui/components/workspace/View.vue b/packages/nc-gui/components/workspace/View.vue index fefd32a6e15d..776fb8cbd74d 100644 --- a/packages/nc-gui/components/workspace/View.vue +++ b/packages/nc-gui/components/workspace/View.vue @@ -77,8 +77,10 @@ onMounted(() => { <div class="flex items-center gap-3"> <NuxtLink :href="`/admin/${orgId}/workspaces`" - class="!hover:(text-black underline-gray-600) !text-black !underline-transparent ml-0.75 max-w-1/4" + class="!hover:(text-black underline-gray-600) flex items-center !text-black !underline-transparent ml-0.75 max-w-1/4" > + <component :is="iconMap.arrowLeft" class="text-3xl" /> + {{ $t('labels.workspaces') }} </NuxtLink> diff --git a/packages/nc-gui/composables/useUserSorts.ts b/packages/nc-gui/composables/useUserSorts.ts index 3ea7c04d8ce1..49f984d117ab 100644 --- a/packages/nc-gui/composables/useUserSorts.ts +++ b/packages/nc-gui/composables/useUserSorts.ts @@ -138,6 +138,15 @@ export function useUserSorts(roleType: 'Workspace' | 'Org' | 'Project' | 'Organi return b[sortsConfig.field]?.localeCompare(a[sortsConfig.field]) } } + case 'baseCount': + case 'workspaceCount': + case 'memberCount': { + if (sortsConfig.direction === 'asc') { + return a[sortsConfig.field] - b[sortsConfig.field] + } else { + return b[sortsConfig.field] - a[sortsConfig.field] + } + } } return 0 diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index 3021a2f11acb..c481dcfce56c 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -449,6 +449,7 @@ }, "labels": { "today": "Today", + "workspace": "Workspace", "txt": "TXT Record value", "transferOwnership": "Transfer Ownership", "recentActivity": "Recent Activity", diff --git a/packages/nc-gui/lib/types.ts b/packages/nc-gui/lib/types.ts index c32fdab28b77..1392f63b5f07 100644 --- a/packages/nc-gui/lib/types.ts +++ b/packages/nc-gui/lib/types.ts @@ -204,7 +204,7 @@ interface SidebarTableNode extends TableType { } interface UsersSortType { - field?: 'email' | 'roles' | 'title' | 'id' + field?: 'email' | 'roles' | 'title' | 'id' | 'memberCount' | 'baseCount' | 'workspaceCount' direction?: 'asc' | 'desc' }
ccxt
https://github.com/ccxt/ccxt
6810e85601c3e8006989c12dd79c9f8e3a79686e
Dan
2023-12-15 11:04:18
test(okcoin): static request, spot market orders
Added some market order tests for createOrder
test(okcoin): static request, spot market orders Added some market order tests for createOrder
diff --git a/ts/src/test/static/request/okcoin.json b/ts/src/test/static/request/okcoin.json index c5acc82d5d6d8..fa603cdaa32e8 100644 --- a/ts/src/test/static/request/okcoin.json +++ b/ts/src/test/static/request/okcoin.json @@ -43,7 +43,7 @@ ], "createOrder": [ { - "description": "create Order", + "description": "Spot market buy order", "method": "createOrder", "url": "https://www.okcoin.com/api/v5/trade/batch-orders", "input": [ @@ -55,7 +55,7 @@ "output": "[{\"instId\":\"BTC-USD\",\"side\":\"buy\",\"ordType\":\"market\",\"sz\":\"1\",\"tdMode\":\"cash\",\"tgtCcy\":\"base_ccy\"}]" }, { - "description": "create Order", + "description": "Spot market buy order with triggerPrice", "method": "createOrder", "url": "https://www.okcoin.com/api/v5/trade/order-algo", "input": [ @@ -69,6 +69,53 @@ } ], "output": "{\"instId\":\"BTC-USD\",\"side\":\"buy\",\"ordType\":\"trigger\",\"sz\":\"1\",\"tdMode\":\"cash\",\"tgtCcy\":\"base_ccy\",\"triggerPx\":\"40000\",\"orderPx\":\"-1\"}" + }, + { + "description": "Spot market sell order", + "method": "createOrder", + "url": "https://www.okcoin.com/api/v5/trade/batch-orders", + "input": [ + "USDT/USD", + "market", + "sell", + 11, + null + ], + "output": "[{\"instId\":\"USDT-USD\",\"side\":\"sell\",\"ordType\":\"market\",\"tdMode\":\"cash\",\"tgtCcy\":\"base_ccy\",\"sz\":\"11\"}]" + }, + { + "description": "Spot market buy order with createMarketBuyOrderRequiresPrice set to false and tgtCcy set to quote", + "method": "createOrder", + "url": "https://www.okcoin.com/api/v5/trade/batch-orders", + "input": [ + "BTC/USD", + "market", + "buy", + 5, + null, + { + "createMarketBuyOrderRequiresPrice": false, + "tgtCcy": "quote_ccy" + } + ], + "output": "[{\"instId\":\"BTC-USD\",\"side\":\"buy\",\"ordType\":\"market\",\"tdMode\":\"cash\",\"tgtCcy\":\"quote_ccy\",\"sz\":\"5\"}]" + }, + { + "description": "Spot market buy order using the cost param and tgtCcy set to quote", + "method": "createOrder", + "url": "https://www.okcoin.com/api/v5/trade/batch-orders", + "input": [ + "BTC/USD", + "market", + "buy", + null, + null, + { + "cost": 5, + "tgtCcy": "quote_ccy" + } + ], + "output": "[{\"instId\":\"BTC-USD\",\"side\":\"buy\",\"ordType\":\"market\",\"tdMode\":\"cash\",\"tgtCcy\":\"quote_ccy\",\"sz\":\"5\"}]" } ], "createMarketBuyOrderWithCost": [
grafana
https://github.com/grafana/grafana
4fef6ff30d683073f0f2e4c10ac039970197446d
ismail simsek
2024-05-15 16:12:09
Chore: Use TemplateSrv from @grafana/runtime in influxdb datasource (#87813)
use templatesrv from @grafana/runtime
Chore: Use TemplateSrv from @grafana/runtime in influxdb datasource (#87813) use templatesrv from @grafana/runtime
diff --git a/public/app/plugins/datasource/influxdb/__mocks__/datasource.ts b/public/app/plugins/datasource/influxdb/__mocks__/datasource.ts index 6630252bd64d0..4024021c2f3bb 100644 --- a/public/app/plugins/datasource/influxdb/__mocks__/datasource.ts +++ b/public/app/plugins/datasource/influxdb/__mocks__/datasource.ts @@ -1,32 +1,23 @@ import { of } from 'rxjs'; -import { AdHocVariableFilter, DataSourceInstanceSettings, PluginType, ScopedVars } from '@grafana/data'; -import { FetchResponse, getBackendSrv, setBackendSrv, VariableInterpolation } from '@grafana/runtime'; +import { DataSourceInstanceSettings, PluginType, ScopedVars } from '@grafana/data'; +import { FetchResponse, getBackendSrv, setBackendSrv, TemplateSrv, VariableInterpolation } from '@grafana/runtime'; -import { TemplateSrv } from '../../../../features/templating/template_srv'; import InfluxDatasource from '../datasource'; import { InfluxOptions, InfluxVersion } from '../types'; -const getAdhocFiltersMock = jest.fn().mockImplementation(() => []); -const replaceMock = jest.fn().mockImplementation((a: string, ...rest: unknown[]) => a); - -export const templateSrvStub = { - getAdhocFilters: getAdhocFiltersMock, - replace: replaceMock, -} as unknown as TemplateSrv; - +export const replaceMock = jest.fn().mockImplementation((a: string, ...rest: unknown[]) => a); +export const templateSrvStub = mockTemplateSrv(replaceMock); export function mockTemplateSrv( - getAdhocFiltersMock: (datasourceName: string) => AdHocVariableFilter[], - replaceMock: ( + rm: ( target?: string, scopedVars?: ScopedVars, format?: string | Function | undefined, interpolations?: VariableInterpolation[] - ) => string + ) => string = replaceMock ): TemplateSrv { return { - getAdhocFilters: getAdhocFiltersMock, - replace: replaceMock, + replace: rm, } as unknown as TemplateSrv; } @@ -42,7 +33,7 @@ export function mockBackendService(response: FetchResponse) { export function getMockInfluxDS( instanceSettings: DataSourceInstanceSettings<InfluxOptions> = getMockDSInstanceSettings(), - templateSrv: TemplateSrv = templateSrvStub + templateSrv: TemplateSrv = mockTemplateSrv(replaceMock) ): InfluxDatasource { return new InfluxDatasource(instanceSettings, templateSrv); } diff --git a/public/app/plugins/datasource/influxdb/__mocks__/request.ts b/public/app/plugins/datasource/influxdb/__mocks__/request.ts index 986c780922df4..d646b62a4eff7 100644 --- a/public/app/plugins/datasource/influxdb/__mocks__/request.ts +++ b/public/app/plugins/datasource/influxdb/__mocks__/request.ts @@ -19,6 +19,7 @@ export const mockInfluxQueryRequest = (targets?: QueryType[]): DataQueryRequest< from: dateTime(0), to: dateTime(10), }, + filters: [{ key: 'adhoc_key', value: 'adhoc_val', operator: '=' }], requestId: '', scopedVars: {}, startTime: 0, diff --git a/public/app/plugins/datasource/influxdb/datasource.test.ts b/public/app/plugins/datasource/influxdb/datasource.test.ts index b33a6787bbc53..5d961dd3866ea 100644 --- a/public/app/plugins/datasource/influxdb/datasource.test.ts +++ b/public/app/plugins/datasource/influxdb/datasource.test.ts @@ -1,18 +1,15 @@ import { lastValueFrom, of } from 'rxjs'; -import { BackendSrvRequest } from '@grafana/runtime'; +import { BackendSrvRequest, TemplateSrv } from '@grafana/runtime'; import config from 'app/core/config'; -import { TemplateSrv } from '../../../features/templating/template_srv'; import { queryBuilder } from '../../../features/variables/shared/testing/builders'; -import { getMockDSInstanceSettings, getMockInfluxDS, mockBackendService } from './__mocks__/datasource'; -import { queryOptions } from './__mocks__/query'; -import { mockInfluxQueryRequest, mockInfluxQueryWithTemplateVars } from './__mocks__/request'; +import { getMockDSInstanceSettings, getMockInfluxDS, mockBackendService, replaceMock } from './__mocks__/datasource'; +import { mockInfluxQueryRequest } from './__mocks__/request'; import { mockInfluxFetchResponse, mockMetricFindQueryResponse } from './__mocks__/response'; import { BROWSER_MODE_DISABLED_MESSAGE } from './constants'; import InfluxDatasource from './datasource'; -import { InfluxQuery, InfluxVersion } from './types'; const fetchMock = mockBackendService(mockInfluxFetchResponse()); @@ -142,24 +139,11 @@ describe('InfluxDataSource Frontend Mode [influxdbBackendMigration=false]', () = // Update this after starting to use TemplateSrv from @grafana/runtime package describe('adhoc variables', () => { - const adhocFilters = [ - { - key: 'adhoc_key', - operator: '=', - value: 'adhoc_val', - condition: '', - }, - ]; - const mockTemplateService = new TemplateSrv(); - mockTemplateService.getAdhocFilters = jest.fn((_: string) => adhocFilters); - let ds = getMockInfluxDS(getMockDSInstanceSettings(), mockTemplateService); + let ds = getMockInfluxDS(getMockDSInstanceSettings()); it('query should contain the ad-hoc variable', () => { ds.query(mockInfluxQueryRequest()); - const expected = encodeURIComponent( - 'SELECT mean("value") FROM "cpu" WHERE time >= 0ms and time <= 10ms AND "adhoc_key" = \'adhoc_val\' GROUP BY time($__interval) fill(null)' - ); - expect(fetchMock.mock.calls[0][0].data).toBe(`q=${expected}`); + expect(replaceMock.mock.calls[0][0]).toBe('adhoc_val'); }); it('should make the fetch call for adhoc filter keys', () => { @@ -257,125 +241,6 @@ describe('InfluxDataSource Frontend Mode [influxdbBackendMigration=false]', () = expect(ds.database).toBe('fallback'); }); }); - - describe('variable interpolation', () => { - const variablesMock = [ - queryBuilder().withId('var1').withName('var1').withCurrent('var1_value').build(), - queryBuilder().withId('path').withName('path').withCurrent('/etc/hosts').build(), - ]; - const mockTemplateService = new TemplateSrv({ - getVariables: () => variablesMock, - getVariableWithName: (name: string) => variablesMock.filter((v) => v.name === name)[0], - getFilteredVariables: jest.fn(), - }); - // Remove this after start using TemplateSrv from @grafana/runtime - mockTemplateService.getAdhocFilters = jest.fn(); - - describe('when interpolating query variables for dashboard->explore', () => { - it('should interpolate all variables with Flux mode', () => { - const ds = getMockInfluxDS(getMockDSInstanceSettings({ version: InfluxVersion.Flux }), mockTemplateService); - const fluxQuery = { - refId: 'x', - query: 'some query with $var1 and $path', - }; - const queries = ds.interpolateVariablesInQueries([fluxQuery], {}); - expect(queries[0].query).toBe('some query with var1_value and /etc/hosts'); - }); - - it('should interpolate all variables with InfluxQL mode', () => { - const ds = getMockInfluxDS(getMockDSInstanceSettings({ version: InfluxVersion.InfluxQL }), mockTemplateService); - const [query] = ds.interpolateVariablesInQueries([mockInfluxQueryWithTemplateVars([])], {}); - expect(query.alias).toBe('var1_value'); - expect(query.measurement).toBe('var1_value'); - expect(query.policy).toBe('var1_value'); - expect(query.limit).toBe('var1_value'); - expect(query.slimit).toBe('var1_value'); - expect(query.tz).toBe('var1_value'); - expect(query.tags![0].value).toBe(`/^\\/etc\\/hosts$/`); - expect(query.groupBy![0].params![0]).toBe('var1_value'); - expect(query.select![0][0].params![0]).toBe('var1_value'); - }); - }); - - describe('applyTemplateVariables', () => { - it('should apply all template variables with Flux mode', () => { - const ds = getMockInfluxDS(getMockDSInstanceSettings({ version: InfluxVersion.Flux }), mockTemplateService); - const fluxQuery = { - refId: 'x', - query: '$var1', - }; - const query = ds.applyTemplateVariables(fluxQuery, {}); - expect(query.query).toBe('var1_value'); - }); - }); - - describe('variable interpolation with chained variables with frontend mode', () => { - let ds = getMockInfluxDS(getMockDSInstanceSettings(), mockTemplateService); - const fetchMockImpl = () => - of({ - data: { - status: 'success', - results: [ - { - series: [ - { - name: 'measurement', - columns: ['name'], - values: [['cpu']], - }, - ], - }, - ], - }, - }); - - beforeEach(() => { - jest.clearAllMocks(); - fetchMock.mockImplementation(fetchMockImpl); - }); - - it('should render chained regex variables with floating point number', () => { - ds.metricFindQuery(`SELECT sum("piece_count") FROM "rp"."pdata" WHERE diameter <= $maxSED`, { - scopedVars: { maxSED: { text: '8.1', value: '8.1' } }, - }); - const qe = `SELECT sum("piece_count") FROM "rp"."pdata" WHERE diameter <= 8.1`; - const qData = decodeURIComponent(fetchMock.mock.calls[0][0].data.substring(2)); - expect(qData).toBe(qe); - }); - - it('should render chained regex variables with URL', () => { - ds.metricFindQuery('SHOW TAG VALUES WITH KEY = "agent_url" WHERE agent_url =~ /^$var1$/', { - scopedVars: { - var1: { - text: 'https://aaaa-aa-aaa.bbb.ccc.ddd:8443/ggggg', - value: 'https://aaaa-aa-aaa.bbb.ccc.ddd:8443/ggggg', - }, - }, - }); - const qe = `SHOW TAG VALUES WITH KEY = "agent_url" WHERE agent_url =~ /^https:\\/\\/aaaa-aa-aaa\\.bbb\\.ccc\\.ddd:8443\\/ggggg$/`; - const qData = decodeURIComponent(fetchMock.mock.calls[0][0].data.substring(2)); - expect(qData).toBe(qe); - }); - - it('should render chained regex variables with floating point number and url', () => { - ds.metricFindQuery( - 'SELECT sum("piece_count") FROM "rp"."pdata" WHERE diameter <= $maxSED AND agent_url =~ /^$var1$/', - { - scopedVars: { - var1: { - text: 'https://aaaa-aa-aaa.bbb.ccc.ddd:8443/ggggg', - value: 'https://aaaa-aa-aaa.bbb.ccc.ddd:8443/ggggg', - }, - maxSED: { text: '8.1', value: '8.1' }, - }, - } - ); - const qe = `SELECT sum("piece_count") FROM "rp"."pdata" WHERE diameter <= 8.1 AND agent_url =~ /^https:\\/\\/aaaa-aa-aaa\\.bbb\\.ccc\\.ddd:8443\\/ggggg$/`; - const qData = decodeURIComponent(fetchMock.mock.calls[0][0].data.substring(2)); - expect(qData).toBe(qe); - }); - }); - }); }); describe('InfluxDataSource Backend Mode [influxdbBackendMigration=true]', () => { @@ -399,171 +264,10 @@ describe('InfluxDataSource Backend Mode [influxdbBackendMigration=true]', () => expect(values[0].text).toBe('test-t2-1'); }); }); - - describe('variable interpolation with chained variables with backend mode', () => { - const variablesMock = [ - queryBuilder().withId('var1').withName('var1').withCurrent('var1').build(), - queryBuilder().withId('path').withName('path').withCurrent('/etc/hosts').build(), - queryBuilder() - .withId('field_var') - .withName('field_var') - .withMulti(true) - .withOptions( - { - text: `field_1`, - value: `field_1`, - }, - { - text: `field_2`, - value: `field_2`, - }, - { - text: `field_3`, - value: `field_3`, - } - ) - .withCurrent(['field_1', 'field_3']) - .build(), - ]; - const mockTemplateService = new TemplateSrv({ - getVariables: () => variablesMock, - getVariableWithName: (name: string) => variablesMock.filter((v) => v.name === name)[0], - getFilteredVariables: jest.fn(), - }); - mockTemplateService.getAdhocFilters = jest.fn((_: string) => []); - let ds = getMockInfluxDS(getMockDSInstanceSettings(), mockTemplateService); - const fetchMockImpl = () => - of({ - data: { - status: 'success', - results: [ - { - series: [ - { - name: 'measurement', - columns: ['name'], - values: [['cpu']], - }, - ], - }, - ], - }, - }); - - beforeEach(() => { - jest.clearAllMocks(); - fetchMock.mockImplementation(fetchMockImpl); - }); - - it('should render chained regex variables with floating point number', () => { - ds.metricFindQuery(`SELECT sum("piece_count") FROM "rp"."pdata" WHERE diameter <= $maxSED`, { - ...queryOptions, - scopedVars: { maxSED: { text: '8.1', value: '8.1' } }, - }); - const qe = `SELECT sum("piece_count") FROM "rp"."pdata" WHERE diameter <= 8.1`; - const qData = fetchMock.mock.calls[0][0].data.queries[0].query; - expect(qData).toBe(qe); - }); - - it('should render chained regex variables with URL', () => { - ds.metricFindQuery('SHOW TAG VALUES WITH KEY = "agent_url" WHERE agent_url =~ /^$var1$/', { - ...queryOptions, - scopedVars: { - var1: { - text: 'https://aaaa-aa-aaa.bbb.ccc.ddd:8443/ggggg', - value: 'https://aaaa-aa-aaa.bbb.ccc.ddd:8443/ggggg', - }, - }, - }); - const qe = `SHOW TAG VALUES WITH KEY = "agent_url" WHERE agent_url =~ /^https:\\/\\/aaaa-aa-aaa\\.bbb\\.ccc\\.ddd:8443\\/ggggg$/`; - expect(fetchMock).toHaveBeenCalled(); - const qData = fetchMock.mock.calls[0][0].data.queries[0].query; - expect(qData).toBe(qe); - }); - - it('should render chained regex variables with floating point number and url', () => { - ds.metricFindQuery( - 'SELECT sum("piece_count") FROM "rp"."pdata" WHERE diameter <= $maxSED AND agent_url =~ /^$var1$/', - { - ...queryOptions, - scopedVars: { - var1: { - text: 'https://aaaa-aa-aaa.bbb.ccc.ddd:8443/ggggg', - value: 'https://aaaa-aa-aaa.bbb.ccc.ddd:8443/ggggg', - }, - maxSED: { text: '8.1', value: '8.1' }, - }, - } - ); - const qe = `SELECT sum("piece_count") FROM "rp"."pdata" WHERE diameter <= 8.1 AND agent_url =~ /^https:\\/\\/aaaa-aa-aaa\\.bbb\\.ccc\\.ddd:8443\\/ggggg$/`; - const qData = fetchMock.mock.calls[0][0].data.queries[0].query; - expect(qData).toBe(qe); - }); - - it('should interpolate variable inside a regex pattern', () => { - const query: InfluxQuery = { - refId: 'A', - tags: [ - { - key: 'key', - operator: '=~', - value: '/^.*-$var1$/', - }, - ], - }; - const res = ds.applyVariables(query, {}); - const expected = `/^.*-var1$/`; - expect(res.tags?.[0].value).toEqual(expected); - }); - - it('should remove regex wrappers when operator is not a regex operator', () => { - const query: InfluxQuery = { - refId: 'A', - tags: [ - { - key: 'key', - operator: '=', - value: '/^$path$/', - }, - ], - }; - const res = ds.applyVariables(query, {}); - const expected = `/etc/hosts`; - expect(res.tags?.[0].value).toEqual(expected); - }); - - it('should interpolate field keys with given scopedVars', () => { - const query: InfluxQuery = { - refId: 'A', - tags: [ - { - key: 'key', - operator: '=', - value: 'value', - }, - ], - select: [ - [ - { - type: 'field', - params: ['$field_var'], - }, - { - type: 'mean', - params: [], - }, - ], - ], - }; - const res = ds.applyVariables(query, { field_var: { text: 'field_3', value: 'field_3' } }); - const expected = `field_3`; - expect(res.select?.[0][0].params?.[0]).toEqual(expected); - }); - }); }); describe('interpolateQueryExpr', () => { - let ds = getMockInfluxDS(getMockDSInstanceSettings(), new TemplateSrv()); + let ds = getMockInfluxDS(getMockDSInstanceSettings(), {} as TemplateSrv); it('should return the value as it is', () => { const value = 'normalValue'; const variableMock = queryBuilder().withId('tempVar').withName('tempVar').withMulti(false).build(); diff --git a/public/app/plugins/datasource/influxdb/datasource.ts b/public/app/plugins/datasource/influxdb/datasource.ts index e1f514efa849f..e25441fb55784 100644 --- a/public/app/plugins/datasource/influxdb/datasource.ts +++ b/public/app/plugins/datasource/influxdb/datasource.ts @@ -3,6 +3,7 @@ import { lastValueFrom, merge, Observable, of, throwError } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; import { + AdHocVariableFilter, AnnotationEvent, DataFrame, DataQueryError, @@ -31,10 +32,11 @@ import { FetchResponse, frameToMetricFindValue, getBackendSrv, + getTemplateSrv, + TemplateSrv, } from '@grafana/runtime'; import { QueryFormat, SQLQuery } from '@grafana/sql'; import config from 'app/core/config'; -import { getTemplateSrv, TemplateSrv } from 'app/features/templating/template_srv'; import { AnnotationEditor } from './components/editor/annotation/AnnotationEditor'; import { FluxQueryEditor } from './components/editor/query/flux/FluxQueryEditor'; @@ -170,7 +172,11 @@ export default class InfluxDatasource extends DataSourceWithBackend<InfluxQuery, return true; } - applyTemplateVariables(query: InfluxQuery, scopedVars: ScopedVars): InfluxQuery & SQLQuery { + applyTemplateVariables( + query: InfluxQuery, + scopedVars: ScopedVars, + filters?: AdHocVariableFilter[] + ): InfluxQuery & SQLQuery { const variables = scopedVars || {}; // We want to interpolate these variables on backend. @@ -190,7 +196,7 @@ export default class InfluxDatasource extends DataSourceWithBackend<InfluxQuery, } if (this.version === InfluxVersion.SQL || this.isMigrationToggleOnAndIsAccessProxy()) { - query = this.applyVariables(query, variables); + query = this.applyVariables(query, variables, filters); if (query.adhocFilters?.length) { const adhocFiltersToTags: InfluxQueryTag[] = (query.adhocFilters ?? []).map((af) => { const { condition, ...asTag } = af; @@ -238,7 +244,7 @@ export default class InfluxDatasource extends DataSourceWithBackend<InfluxQuery, }); } - applyVariables(query: InfluxQuery & SQLQuery, scopedVars: ScopedVars) { + applyVariables(query: InfluxQuery & SQLQuery, scopedVars: ScopedVars, filters?: AdHocVariableFilter[]) { const expandedQuery = { ...query }; if (query.groupBy) { expandedQuery.groupBy = query.groupBy.map((groupBy) => { @@ -282,7 +288,7 @@ export default class InfluxDatasource extends DataSourceWithBackend<InfluxQuery, return { ...expandedQuery, - adhocFilters: this.templateSrv.getAdhocFilters(this.name) ?? [], + adhocFilters: filters ?? [], query: this.templateSrv.replace( query.query ?? '', scopedVars, @@ -651,7 +657,7 @@ export default class InfluxDatasource extends DataSourceWithBackend<InfluxQuery, } // add global adhoc filters to timeFilter - const adhocFilters = this.templateSrv.getAdhocFilters(this.name); + const adhocFilters = options.filters; const adhocFiltersFromDashboard = options.targets.flatMap((target: InfluxQuery) => target.adhocFilters ?? []); if (adhocFilters?.length || adhocFiltersFromDashboard?.length) { const ahFilters = adhocFilters?.length ? adhocFilters : adhocFiltersFromDashboard; diff --git a/public/app/plugins/datasource/influxdb/datasource_sql.test.ts b/public/app/plugins/datasource/influxdb/datasource_sql.test.ts index bc516995873af..72d940d5ad0d4 100644 --- a/public/app/plugins/datasource/influxdb/datasource_sql.test.ts +++ b/public/app/plugins/datasource/influxdb/datasource_sql.test.ts @@ -14,7 +14,7 @@ mockBackendService(mockInfluxSQLFetchResponse); describe('InfluxDB SQL Support', () => { const replaceMock = jest.fn(); - const templateSrv = mockTemplateSrv(jest.fn(), replaceMock); + const templateSrv = mockTemplateSrv(replaceMock); let sqlQuery: SQLQuery; diff --git a/public/app/plugins/datasource/influxdb/influx_query_model.test.ts b/public/app/plugins/datasource/influxdb/influx_query_model.test.ts index 92a92f41aac4f..15aa3b72c152f 100644 --- a/public/app/plugins/datasource/influxdb/influx_query_model.test.ts +++ b/public/app/plugins/datasource/influxdb/influx_query_model.test.ts @@ -1,4 +1,4 @@ -import { TemplateSrv } from 'app/features/templating/template_srv'; +import { TemplateSrv } from '@grafana/runtime'; import InfluxQueryModel from './influx_query_model'; diff --git a/public/app/plugins/datasource/influxdb/influxql_query_builder.ts b/public/app/plugins/datasource/influxdb/influxql_query_builder.ts index a9f6c37f02ae2..1ca19b15b9adc 100644 --- a/public/app/plugins/datasource/influxdb/influxql_query_builder.ts +++ b/public/app/plugins/datasource/influxdb/influxql_query_builder.ts @@ -1,8 +1,7 @@ import { reduce } from 'lodash'; -import { escapeRegex, ScopedVars } from '@grafana/data/src'; - -import { TemplateSrv } from '../../../features/templating/template_srv'; +import { escapeRegex, ScopedVars } from '@grafana/data'; +import { TemplateSrv } from '@grafana/runtime'; import { DEFAULT_POLICY, InfluxQueryTag, MetadataQueryType } from './types';
angular
https://github.com/angular/angular
7dbd47fb3015117c420f984181bfcb48e533525a
Kristiyan Kostadinov
2023-10-10 23:49:41
fix(compiler): allow newlines in track and let expressions (#52137)
Fixes that the template parser didn't allow for newlines in the `track` and `let` expressions of `@for` blocks.
fix(compiler): allow newlines in track and let expressions (#52137) Fixes that the template parser didn't allow for newlines in the `track` and `let` expressions of `@for` blocks. Fixes #52132. PR Close #52137
diff --git a/packages/compiler/src/render3/r3_control_flow.ts b/packages/compiler/src/render3/r3_control_flow.ts index 1e01ab5b4dea97..199fa3e329220c 100644 --- a/packages/compiler/src/render3/r3_control_flow.ts +++ b/packages/compiler/src/render3/r3_control_flow.ts @@ -17,7 +17,7 @@ import * as t from './r3_ast'; const FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+(.*)/; /** Pattern for the tracking expression in a for loop block. */ -const FOR_LOOP_TRACK_PATTERN = /^track\s+(.*)/; +const FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/; /** Pattern for the `as` expression in a conditional block. */ const CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/; @@ -26,7 +26,7 @@ const CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/; const ELSE_IF_PATTERN = /^else[^\S\r\n]+if/; /** Pattern used to identify a `let` parameter. */ -const FOR_LOOP_LET_PATTERN = /^let\s+(.*)/; +const FOR_LOOP_LET_PATTERN = /^let\s+([\S\s]*)/; /** Names of variables that are allowed to be used in the `let` expression of a `for` loop. */ const ALLOWED_FOR_LOOP_LET_VARIABLES = diff --git a/packages/compiler/test/render3/r3_template_transform_spec.ts b/packages/compiler/test/render3/r3_template_transform_spec.ts index af64263ec9e02f..1e7cef62facf04 100644 --- a/packages/compiler/test/render3/r3_template_transform_spec.ts +++ b/packages/compiler/test/render3/r3_template_transform_spec.ts @@ -1516,6 +1516,24 @@ describe('R3 template transform', () => { ]); }); + it('should parse a for loop block with newlines in its let parameters', () => { + expectFromHtml(` + @for (item of items.foo.bar; track item.id; let\nidx = $index,\nf = $first,\nc = $count,\nl = $last,\nev = $even,\nod = $odd) { + {{ item }} + } + `).toEqual([ + ['ForLoopBlock', 'items.foo.bar', 'item.id'], + ['Variable', 'item', '$implicit'], + ['Variable', 'idx', '$index'], + ['Variable', 'f', '$first'], + ['Variable', 'c', '$count'], + ['Variable', 'l', '$last'], + ['Variable', 'ev', '$even'], + ['Variable', 'od', '$odd'], + ['BoundText', ' {{ item }} '], + ]); + }); + it('should parse nested for loop blocks', () => { expectFromHtml(` @for (item of items.foo.bar; track item.id) { @@ -1553,6 +1571,21 @@ describe('R3 template transform', () => { ]); }); + it('should parse a for loop block with newlines in its expression', () => { + const expectedResult = [ + ['ForLoopBlock', 'items.foo.bar', 'item.id + foo'], + ['Variable', 'item', '$implicit'], + ['BoundText', '{{ item }}'], + ]; + + expectFromHtml(` + @for (item\nof\nitems.foo.bar; track item.id +\nfoo) {{{ item }}} + `).toEqual(expectedResult); + expectFromHtml(` + @for ((item\nof\nitems.foo.bar); track (item.id +\nfoo)) {{{ item }}} + `).toEqual(expectedResult); + }); + describe('validations', () => { it('should report if for loop does not have an expression', () => { expect(() => parse(`@for {hello}`)).toThrowError(/@for loop does not have an expression/);
MahApps.Metro
https://github.com/MahApps/MahApps.Metro
82f6af2867d8a11267cfa3377c68cb55df99b9f2
punker76
2022-06-23 13:29:39
feat: use ClearControlCommand for PasswordBox
Use ClearControlCommand for PasswordBox instead the TextBoxHelper.IsClearTextButtonBehaviorEnabled attached property.
feat: use ClearControlCommand for PasswordBox Use ClearControlCommand for PasswordBox instead the TextBoxHelper.IsClearTextButtonBehaviorEnabled attached property. BREAKING CHANGE: remove MahApps.Styles.PasswordBox.Button and rename MahApps.Styles.PasswordBox.Button.Revealed style Remove the obsolete MahApps.Styles.PasswordBox.Button style. Rename style MahApps.Styles.PasswordBox.Button.Revealed to MahApps.Styles.PasswordBox.Revealed.
diff --git a/src/MahApps.Metro.Samples/MahApps.Metro.Demo/ExampleViews/TextExamples.xaml b/src/MahApps.Metro.Samples/MahApps.Metro.Demo/ExampleViews/TextExamples.xaml index b031303944..e303116a9d 100644 --- a/src/MahApps.Metro.Samples/MahApps.Metro.Demo/ExampleViews/TextExamples.xaml +++ b/src/MahApps.Metro.Samples/MahApps.Metro.Demo/ExampleViews/TextExamples.xaml @@ -276,33 +276,31 @@ UseLayoutRounding="True"> <StackPanel> <PasswordBox Margin="{StaticResource ControlMargin}" - mah:TextBoxHelper.Watermark="Password" + mah:TextBoxHelper.Watermark="Password..." Password="Password" /> <PasswordBox Margin="{StaticResource ControlMargin}" mah:TextBoxHelper.ClearTextButton="True" mah:TextBoxHelper.UseFloatingWatermark="True" - mah:TextBoxHelper.Watermark="Win8" + mah:TextBoxHelper.Watermark="Win8..." Password="Win8" Style="{StaticResource MahApps.Styles.PasswordBox.Win8}" /> <PasswordBox Margin="{StaticResource ControlMargin}" mah:TextBoxHelper.ClearTextButton="{Binding RelativeSource={RelativeSource Self}, Path=(mah:TextBoxHelper.HasText), Mode=OneWay}" mah:TextBoxHelper.IsWaitingForData="True" mah:TextBoxHelper.UseFloatingWatermark="True" - mah:TextBoxHelper.Watermark="Revealed PasswordBox" - Style="{StaticResource MahApps.Styles.PasswordBox.Button.Revealed}" /> + mah:TextBoxHelper.Watermark="Revealed..." + Style="{StaticResource MahApps.Styles.PasswordBox.Revealed}" /> <PasswordBox Margin="{StaticResource ControlMargin}" mah:TextBoxHelper.ButtonCommand="{Binding TextBoxButtonCmd, Mode=OneWay}" - mah:TextBoxHelper.ClearTextButton="True" mah:TextBoxHelper.UseFloatingWatermark="True" - mah:TextBoxHelper.Watermark="Password" + mah:TextBoxHelper.Watermark="Password..." Password="Password" /> <PasswordBox Margin="{StaticResource ControlMargin}" mah:PasswordBoxHelper.CapsLockIcon="!" mah:TextBoxHelper.ButtonCommand="{Binding TextBoxButtonCmd, Mode=OneWay}" mah:TextBoxHelper.ButtonContent="4" mah:TextBoxHelper.UseFloatingWatermark="True" - mah:TextBoxHelper.Watermark="Custom icon style" - Style="{DynamicResource MahApps.Styles.PasswordBox.Button}"> + mah:TextBoxHelper.Watermark="Custom icon..."> <mah:PasswordBoxHelper.CapsLockWarningToolTip> <TextBlock> <Run Text="This is a custom Warning to show you that" /> @@ -320,8 +318,6 @@ mah:TextBoxHelper.ClearTextButton="True" IsEnabled="False" Password="Password" /> - - <Label Content="Select all on focus" /> <PasswordBox Margin="{StaticResource ControlMargin}" mah:TextBoxHelper.SelectAllOnFocus="True" Password="Password" diff --git a/src/MahApps.Metro/Styles/Controls.ComboBox.xaml b/src/MahApps.Metro/Styles/Controls.ComboBox.xaml index d450cde040..d90ae49f63 100644 --- a/src/MahApps.Metro/Styles/Controls.ComboBox.xaml +++ b/src/MahApps.Metro/Styles/Controls.ComboBox.xaml @@ -7,6 +7,8 @@ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.TextBox.xaml" /> </ResourceDictionary.MergedDictionaries> + <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> + <Thickness x:Key="ComboBoxBorderThemeThickness">1</Thickness> <CornerRadius x:Key="ComboBoxPopupBorderThemeCornerRadius">0</CornerRadius> <Thickness x:Key="ComboBoxPopupBorderThemeThickness">1</Thickness> diff --git a/src/MahApps.Metro/Styles/Controls.PasswordBox.xaml b/src/MahApps.Metro/Styles/Controls.PasswordBox.xaml index 8be3fde687..d60b929844 100644 --- a/src/MahApps.Metro/Styles/Controls.PasswordBox.xaml +++ b/src/MahApps.Metro/Styles/Controls.PasswordBox.xaml @@ -9,8 +9,6 @@ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.Buttons.xaml" /> </ResourceDictionary.MergedDictionaries> - <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> - <mahConverters:StringToVisibilityConverter x:Key="StringToVisibilityConverter" /> <!-- Button Style for MahApps.Styles.PasswordBox.Win8 --> @@ -196,16 +194,18 @@ Grid.RowSpan="2" Grid.Column="2" Width="{TemplateBinding mah:TextBoxHelper.ButtonWidth}" - mah:TextBoxHelper.IsClearTextButtonBehaviorEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:TextBoxHelper.ClearTextButton), Mode=OneWay}" + Command="{TemplateBinding mah:TextBoxHelper.ButtonCommand}" + CommandParameter="{TemplateBinding mah:TextBoxHelper.ButtonCommandParameter}" + CommandTarget="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type PasswordBox}}, Mode=OneWay}" Content="{TemplateBinding mah:TextBoxHelper.ButtonContent}" ContentTemplate="{TemplateBinding mah:TextBoxHelper.ButtonContentTemplate}" Focusable="False" FontFamily="{TemplateBinding mah:TextBoxHelper.ButtonFontFamily}" FontSize="{TemplateBinding mah:TextBoxHelper.ButtonFontSize}" - Foreground="{TemplateBinding Foreground}" IsTabStop="False" Style="{DynamicResource MahApps.Styles.Button.Chromeless}" - Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:TextBoxHelper.ClearTextButton), Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}" /> + Template="{TemplateBinding mah:TextBoxHelper.ButtonTemplate}" + Visibility="Visible" /> </Grid> <Border x:Name="DisabledVisualElement" @@ -219,6 +219,17 @@ Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ControlsHelper.DisabledVisualElementVisibility), Mode=OneWay}" /> </Grid> <ControlTemplate.Triggers> + <Trigger Property="mah:TextBoxHelper.ClearTextButton" Value="True"> + <Setter TargetName="PART_ClearText" Property="Command" Value="{x:Static mah:MahAppsCommands.ClearControlCommand}" /> + </Trigger> + <MultiTrigger> + <MultiTrigger.Conditions> + <Condition Property="mah:TextBoxHelper.ClearTextButton" Value="False" /> + <Condition Property="mah:TextBoxHelper.ButtonCommand" Value="{x:Null}" /> + </MultiTrigger.Conditions> + <Setter TargetName="PART_ClearText" Property="Visibility" Value="Collapsed" /> + </MultiTrigger> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=(mah:TextBoxHelper.ButtonsAlignment)}" Value="Left"> <Setter TargetName="ButtonColumn" Property="Width" Value="*" /> <Setter TargetName="PART_ClearText" Property="Grid.Column" Value="0" /> @@ -258,6 +269,7 @@ <Setter TargetName="PART_FloatingMessage" Property="Foreground" Value="{DynamicResource MahApps.Brushes.TextBlock.FloatingMessage}" /> <Setter TargetName="PART_FloatingMessage" Property="Opacity" Value="1" /> </Trigger> + <Trigger SourceName="PART_ClearText" Property="IsMouseOver" Value="True"> <Setter TargetName="PART_ClearText" Property="Background" Value="{DynamicResource MahApps.Brushes.Gray8}" /> <Setter TargetName="PART_ClearText" Property="Foreground" Value="{DynamicResource MahApps.Brushes.Accent}" /> @@ -315,249 +327,19 @@ </behaviors:StylizedBehaviorCollection> </Setter.Value> </Setter> + <Setter Property="mah:ControlsHelper.FocusBorderBrush" Value="{DynamicResource MahApps.Brushes.TextBox.Border.Focus}" /> <Setter Property="mah:ControlsHelper.MouseOverBorderBrush" Value="{DynamicResource MahApps.Brushes.TextBox.Border.MouseOver}" /> + <Setter Property="mah:PasswordBoxHelper.CapsLockIcon" Value="{StaticResource MahApps.Controls.CapsLockIcon}" /> + + <Setter Property="mah:TextBoxHelper.ButtonCommandParameter" Value="{Binding RelativeSource={RelativeSource Self}, Mode=OneWay}" /> <Setter Property="mah:TextBoxHelper.ButtonFontSize" Value="{DynamicResource MahApps.Font.Size.Button.ClearText}" /> + <Setter Property="mah:TextBoxHelper.ButtonTemplate" Value="{DynamicResource MahApps.Templates.Button.Chromeless}" /> <Setter Property="mah:TextBoxHelper.ButtonWidth" Value="22" /> <Setter Property="mah:TextBoxHelper.IsMonitoring" Value="True" /> </Style> - <!-- Button Command PasswordBox Style --> - <Style x:Key="MahApps.Styles.PasswordBox.Button" - BasedOn="{StaticResource MahApps.Styles.PasswordBox}" - TargetType="{x:Type PasswordBox}"> - <Setter Property="Template"> - <Setter.Value> - <ControlTemplate TargetType="{x:Type PasswordBox}"> - <Grid> - <AdornerDecorator x:Name="PART_WaitingForDataEffectAdornerDecorator" Visibility="Collapsed"> - <Border x:Name="PART_WaitingForDataEffectGrid" - Background="{TemplateBinding Background}" - BorderBrush="Transparent" - BorderThickness="{TemplateBinding BorderThickness}" - CornerRadius="{TemplateBinding mah:ControlsHelper.CornerRadius}" - Effect="{DynamicResource MahApps.DropShadowEffect.WaitingForData}" - SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> - </AdornerDecorator> - - <Border x:Name="Base" - Background="{TemplateBinding Background}" - BorderBrush="{TemplateBinding BorderBrush}" - BorderThickness="{TemplateBinding BorderThickness}" - CornerRadius="{TemplateBinding mah:ControlsHelper.CornerRadius}" - SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> - - <Grid x:Name="PART_InnerGrid" Margin="{TemplateBinding BorderThickness}"> - <Grid.ColumnDefinitions> - <ColumnDefinition x:Name="TextColumn" Width="*" /> - <ColumnDefinition x:Name="CapsLockColumn" Width="Auto" /> - <ColumnDefinition x:Name="ButtonColumn" Width="Auto" /> - </Grid.ColumnDefinitions> - <Grid.RowDefinitions> - <RowDefinition Height="Auto" /> - <RowDefinition x:Name="ButtonRow" Height="*" /> - </Grid.RowDefinitions> - - <ScrollViewer x:Name="PART_ContentHost" - Grid.Row="1" - Grid.Column="0" - Margin="0" - Padding="{TemplateBinding Padding}" - VerticalAlignment="Stretch" - Background="{x:Null}" - BorderThickness="0" - IsTabStop="False" - SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" - Style="{DynamicResource MahApps.Styles.ScrollViewer.TextControlContentHost}" /> - - <TextBlock x:Name="PART_Message" - Grid.Row="1" - Grid.Column="0" - Margin="4 0" - Padding="{TemplateBinding Padding}" - HorizontalAlignment="Stretch" - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" - Foreground="{TemplateBinding Foreground}" - Style="{DynamicResource MahApps.Styles.TextBlock.Watermark}" - Text="{TemplateBinding mah:TextBoxHelper.Watermark}" - TextAlignment="{TemplateBinding mah:TextBoxHelper.WatermarkAlignment}" - TextTrimming="{TemplateBinding mah:TextBoxHelper.WatermarkTrimming}" - Visibility="Collapsed" /> - - <ContentControl x:Name="PART_FloatingMessageContainer" - Grid.Row="0" - Grid.Column="0" - Margin="4 0" - Style="{DynamicResource MahApps.Styles.ContentControl.FloatingMessageContainer}"> - <ContentControl.Height> - <MultiBinding Converter="{mahConverters:MathMultiplyConverter}" FallbackValue="0"> - <Binding ElementName="PART_FloatingMessage" - Mode="OneWay" - Path="ActualHeight" /> - <Binding ElementName="PART_FloatingMessageContainer" - Mode="OneWay" - Path="Opacity" /> - </MultiBinding> - </ContentControl.Height> - <TextBlock x:Name="PART_FloatingMessage" - HorizontalAlignment="Stretch" - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" - Foreground="{TemplateBinding Foreground}" - Style="{DynamicResource MahApps.Styles.TextBlock.AutoCollapsing}" - Text="{TemplateBinding mah:TextBoxHelper.Watermark}" - TextAlignment="{TemplateBinding mah:TextBoxHelper.WatermarkAlignment}" - TextTrimming="{TemplateBinding mah:TextBoxHelper.WatermarkTrimming}"> - <TextBlock.RenderTransform> - <TranslateTransform x:Name="FloatingMessageTransform"> - <TranslateTransform.Y> - <MultiBinding Converter="{mahConverters:MathSubtractConverter}" FallbackValue="0"> - <Binding ElementName="PART_FloatingMessage" - Mode="OneWay" - Path="ActualHeight" /> - <Binding ElementName="PART_FloatingMessageContainer" - Mode="OneWay" - Path="ActualHeight" /> - </MultiBinding> - </TranslateTransform.Y> - </TranslateTransform> - </TextBlock.RenderTransform> - </TextBlock> - </ContentControl> - - <ContentPresenter x:Name="PART_CapsLockIndicator" - Grid.Row="0" - Grid.RowSpan="2" - Grid.Column="1" - Margin="1" - HorizontalAlignment="Right" - VerticalAlignment="Center" - Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:PasswordBoxHelper.CapsLockIcon), Mode=TwoWay}" - TextBlock.Foreground="{DynamicResource MahApps.Brushes.Control.Validation}" - ToolTip="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:PasswordBoxHelper.CapsLockWarningToolTip), Mode=OneWay}" - Visibility="Collapsed" /> - - <Button x:Name="PART_ClearText" - Grid.Row="0" - Grid.RowSpan="2" - Grid.Column="2" - Width="{TemplateBinding mah:TextBoxHelper.ButtonWidth}" - mah:TextBoxHelper.IsClearTextButtonBehaviorEnabled="True" - Content="{TemplateBinding mah:TextBoxHelper.ButtonContent}" - ContentTemplate="{TemplateBinding mah:TextBoxHelper.ButtonContentTemplate}" - Focusable="False" - FontFamily="{TemplateBinding mah:TextBoxHelper.ButtonFontFamily}" - FontSize="{TemplateBinding mah:TextBoxHelper.ButtonFontSize}" - Foreground="{TemplateBinding Foreground}" - IsTabStop="False" - Style="{DynamicResource MahApps.Styles.Button.Chromeless}" - Template="{TemplateBinding mah:TextBoxHelper.ButtonTemplate}" - Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:TextBoxHelper.TextButton), Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}" /> - </Grid> - - <Border x:Name="DisabledVisualElement" - Background="{DynamicResource MahApps.Brushes.Control.Disabled}" - BorderBrush="{DynamicResource MahApps.Brushes.Control.Disabled}" - BorderThickness="{TemplateBinding BorderThickness}" - CornerRadius="{TemplateBinding mah:ControlsHelper.CornerRadius}" - IsHitTestVisible="False" - Opacity="0" - SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" - Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ControlsHelper.DisabledVisualElementVisibility), Mode=OneWay}" /> - </Grid> - <ControlTemplate.Triggers> - <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=(mah:TextBoxHelper.ButtonsAlignment)}" Value="Left"> - <Setter TargetName="ButtonColumn" Property="Width" Value="*" /> - <Setter TargetName="PART_ClearText" Property="Grid.Column" Value="0" /> - <Setter TargetName="PART_ContentHost" Property="Grid.Column" Value="2" /> - <Setter TargetName="PART_FloatingMessageContainer" Property="Grid.Column" Value="2" /> - <Setter TargetName="PART_Message" Property="Grid.Column" Value="2" /> - <Setter TargetName="TextColumn" Property="Width" Value="Auto" /> - </DataTrigger> - - <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Password, Mode=OneWay}" Value=""> - <Setter TargetName="PART_Message" Property="Visibility" Value="Visible" /> - </DataTrigger> - - <MultiDataTrigger> - <MultiDataTrigger.Conditions> - <Condition Binding="{Binding Path=IsVisible, RelativeSource={RelativeSource Self}}" Value="True" /> - <Condition Binding="{Binding Path=(mah:TextBoxHelper.UseFloatingWatermark), RelativeSource={RelativeSource Self}}" Value="True" /> - <Condition Binding="{Binding Path=(mah:TextBoxHelper.HasText), RelativeSource={RelativeSource Self}}" Value="True" /> - <Condition Binding="{Binding Path=(mah:TextBoxHelper.Watermark), RelativeSource={RelativeSource Self}, Converter={x:Static mahConverters:StringIsNullOrEmptyConverter.Default}}" Value="False" /> - </MultiDataTrigger.Conditions> - <MultiDataTrigger.EnterActions> - <BeginStoryboard Storyboard="{StaticResource MahApps.Storyboard.ShowFloatingMessage}" /> - </MultiDataTrigger.EnterActions> - <MultiDataTrigger.ExitActions> - <BeginStoryboard Storyboard="{StaticResource MahApps.Storyboard.HideFloatingMessage}" /> - </MultiDataTrigger.ExitActions> - </MultiDataTrigger> - - <Trigger Property="IsMouseOver" Value="True"> - <Setter TargetName="Base" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ControlsHelper.MouseOverBorderBrush)}" /> - </Trigger> - <Trigger Property="IsEnabled" Value="False"> - <Setter TargetName="DisabledVisualElement" Property="Opacity" Value="0.6" /> - </Trigger> - <Trigger Property="IsFocused" Value="True"> - <Setter TargetName="Base" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ControlsHelper.FocusBorderBrush)}" /> - <Setter TargetName="PART_FloatingMessage" Property="Foreground" Value="{DynamicResource MahApps.Brushes.TextBlock.FloatingMessage}" /> - <Setter TargetName="PART_FloatingMessage" Property="Opacity" Value="1" /> - </Trigger> - <Trigger SourceName="PART_ClearText" Property="IsMouseOver" Value="True"> - <Setter TargetName="PART_ClearText" Property="Background" Value="{DynamicResource MahApps.Brushes.Gray8}" /> - <Setter TargetName="PART_ClearText" Property="Foreground" Value="{DynamicResource MahApps.Brushes.Accent}" /> - </Trigger> - <Trigger SourceName="PART_ClearText" Property="IsPressed" Value="True"> - <Setter TargetName="PART_ClearText" Property="Background" Value="{DynamicResource MahApps.Brushes.ThemeForeground}" /> - <Setter TargetName="PART_ClearText" Property="Foreground" Value="{DynamicResource MahApps.Brushes.ThemeBackground}" /> - </Trigger> - - <MultiTrigger> - <MultiTrigger.Conditions> - <Condition Property="mah:TextBoxHelper.HasText" Value="False" /> - <Condition Property="IsFocused" Value="True" /> - </MultiTrigger.Conditions> - <MultiTrigger.EnterActions> - <BeginStoryboard Storyboard="{StaticResource MahApps.Storyboard.EnterGotFocus}" /> - </MultiTrigger.EnterActions> - <MultiTrigger.ExitActions> - <BeginStoryboard Storyboard="{StaticResource MahApps.Storyboard.ExitGotFocus}" /> - </MultiTrigger.ExitActions> - </MultiTrigger> - - <Trigger Property="mah:TextBoxHelper.HasText" Value="True"> - <Setter TargetName="PART_Message" Property="Visibility" Value="Visible" /> - <Trigger.EnterActions> - <BeginStoryboard Storyboard="{StaticResource MahApps.Storyboard.EnterHasText}" /> - </Trigger.EnterActions> - <Trigger.ExitActions> - <BeginStoryboard Storyboard="{StaticResource MahApps.Storyboard.ExitHasText}" /> - </Trigger.ExitActions> - </Trigger> - - <MultiTrigger> - <MultiTrigger.Conditions> - <Condition Property="IsVisible" Value="True" /> - <Condition Property="mah:TextBoxHelper.IsWaitingForData" Value="True" /> - </MultiTrigger.Conditions> - <Setter TargetName="PART_WaitingForDataEffectAdornerDecorator" Property="Visibility" Value="Visible" /> - <MultiTrigger.EnterActions> - <BeginStoryboard Storyboard="{StaticResource MahApps.Storyboard.WaitingForData}" /> - </MultiTrigger.EnterActions> - </MultiTrigger> - <Trigger Property="mah:TextBoxHelper.IsWaitingForData" Value="False"> - <Setter TargetName="PART_WaitingForDataEffectAdornerDecorator" Property="Visibility" Value="Collapsed" /> - </Trigger> - </ControlTemplate.Triggers> - </ControlTemplate> - </Setter.Value> - </Setter> - <Setter Property="mah:TextBoxHelper.ButtonTemplate" Value="{DynamicResource MahApps.Templates.Button.Chromeless}" /> - <Setter Property="mah:TextBoxHelper.TextButton" Value="True" /> - </Style> - <Style x:Key="MahApps.Styles.TextBox.PasswordBox.Revealed" TargetType="{x:Type TextBox}"> <Setter Property="Template"> <Setter.Value> @@ -578,7 +360,7 @@ </Style> <!-- Button Revealed PasswordBox Style --> - <Style x:Key="MahApps.Styles.PasswordBox.Button.Revealed" + <Style x:Key="MahApps.Styles.PasswordBox.Revealed" BasedOn="{StaticResource MahApps.Styles.PasswordBox}" TargetType="{x:Type PasswordBox}"> <Setter Property="Template"> @@ -720,7 +502,6 @@ Content="{TemplateBinding mah:PasswordBoxHelper.RevealButtonContent}" ContentTemplate="{TemplateBinding mah:PasswordBoxHelper.RevealButtonContentTemplate}" Focusable="False" - Foreground="{TemplateBinding Foreground}" IsTabStop="False" Style="{DynamicResource MahApps.Styles.Button.Reveal}" Visibility="{Binding ElementName=RevealedPassword, Path=Text, Converter={StaticResource StringToVisibilityConverter}}" /> @@ -730,17 +511,18 @@ Grid.RowSpan="2" Grid.Column="3" Width="{TemplateBinding mah:TextBoxHelper.ButtonWidth}" - mah:TextBoxHelper.IsClearTextButtonBehaviorEnabled="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:TextBoxHelper.ClearTextButton), Mode=OneWay}" + Command="{TemplateBinding mah:TextBoxHelper.ButtonCommand}" + CommandParameter="{TemplateBinding mah:TextBoxHelper.ButtonCommandParameter}" + CommandTarget="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type PasswordBox}}, Mode=OneWay}" Content="{TemplateBinding mah:TextBoxHelper.ButtonContent}" ContentTemplate="{TemplateBinding mah:TextBoxHelper.ButtonContentTemplate}" Focusable="False" FontFamily="{TemplateBinding mah:TextBoxHelper.ButtonFontFamily}" FontSize="{TemplateBinding mah:TextBoxHelper.ButtonFontSize}" - Foreground="{TemplateBinding Foreground}" IsTabStop="False" Style="{DynamicResource MahApps.Styles.Button.Chromeless}" Template="{TemplateBinding mah:TextBoxHelper.ButtonTemplate}" - Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:TextBoxHelper.ClearTextButton), Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}" /> + Visibility="Visible" /> </Grid> <Border x:Name="DisabledVisualElement" @@ -754,6 +536,17 @@ Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ControlsHelper.DisabledVisualElementVisibility), Mode=OneWay}" /> </Grid> <ControlTemplate.Triggers> + <Trigger Property="mah:TextBoxHelper.ClearTextButton" Value="True"> + <Setter TargetName="PART_ClearText" Property="Command" Value="{x:Static mah:MahAppsCommands.ClearControlCommand}" /> + </Trigger> + <MultiTrigger> + <MultiTrigger.Conditions> + <Condition Property="mah:TextBoxHelper.ClearTextButton" Value="False" /> + <Condition Property="mah:TextBoxHelper.ButtonCommand" Value="{x:Null}" /> + </MultiTrigger.Conditions> + <Setter TargetName="PART_ClearText" Property="Visibility" Value="Collapsed" /> + </MultiTrigger> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=(mah:TextBoxHelper.ButtonsAlignment)}" Value="Left"> <Setter TargetName="ButtonColumn" Property="Width" Value="*" /> <Setter TargetName="PART_CapsLockIndicator" Property="Grid.Column" Value="2" /> @@ -796,6 +589,7 @@ <Setter TargetName="PART_FloatingMessage" Property="Foreground" Value="{DynamicResource MahApps.Brushes.TextBlock.FloatingMessage}" /> <Setter TargetName="PART_FloatingMessage" Property="Opacity" Value="1" /> </Trigger> + <Trigger SourceName="PART_RevealButton" Property="IsMouseOver" Value="True"> <Setter TargetName="PART_RevealButton" Property="Background" Value="{DynamicResource MahApps.Brushes.Gray8}" /> <Setter TargetName="PART_RevealButton" Property="Foreground" Value="{DynamicResource MahApps.Brushes.Accent}" /> @@ -806,6 +600,7 @@ <Setter TargetName="PART_RevealButton" Property="Foreground" Value="{DynamicResource MahApps.Brushes.ThemeBackground}" /> <Setter TargetName="RevealedPassword" Property="Visibility" Value="Visible" /> </Trigger> + <Trigger SourceName="PART_ClearText" Property="IsMouseOver" Value="True"> <Setter TargetName="PART_ClearText" Property="Background" Value="{DynamicResource MahApps.Brushes.Gray8}" /> <Setter TargetName="PART_ClearText" Property="Foreground" Value="{DynamicResource MahApps.Brushes.Accent}" /> @@ -856,12 +651,11 @@ </Setter.Value> </Setter> <Setter Property="mah:PasswordBoxHelper.RevealButtonContent" Value="{StaticResource MahApps.Controls.RevealIcon}" /> - <Setter Property="mah:TextBoxHelper.ButtonTemplate" Value="{DynamicResource MahApps.Templates.Button.Chromeless}" /> </Style> <!-- MahApps.Styles.PasswordBox.Win8 Style --> <Style x:Key="MahApps.Styles.PasswordBox.Win8" - BasedOn="{StaticResource MahApps.Styles.PasswordBox.Button.Revealed}" + BasedOn="{StaticResource MahApps.Styles.PasswordBox.Revealed}" TargetType="{x:Type PasswordBox}"> <Setter Property="AllowDrop" Value="true" /> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> diff --git a/src/MahApps.Metro/Styles/Controls.RichTextBox.xaml b/src/MahApps.Metro/Styles/Controls.RichTextBox.xaml index ee0401e129..7fbe6ab5f6 100644 --- a/src/MahApps.Metro/Styles/Controls.RichTextBox.xaml +++ b/src/MahApps.Metro/Styles/Controls.RichTextBox.xaml @@ -7,8 +7,6 @@ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.Shared.xaml" /> </ResourceDictionary.MergedDictionaries> - <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> - <Style x:Key="MahApps.Styles.RichTextBox" TargetType="{x:Type RichTextBox}"> <Style.Resources> <Style BasedOn="{StaticResource {x:Type Hyperlink}}" TargetType="{x:Type Hyperlink}"> diff --git a/src/MahApps.Metro/Styles/Controls.TextBox.xaml b/src/MahApps.Metro/Styles/Controls.TextBox.xaml index f0e776b392..53e8dfac45 100644 --- a/src/MahApps.Metro/Styles/Controls.TextBox.xaml +++ b/src/MahApps.Metro/Styles/Controls.TextBox.xaml @@ -7,8 +7,6 @@ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.Shared.xaml" /> </ResourceDictionary.MergedDictionaries> - <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> - <!-- TextBox Style --> <Style x:Key="MahApps.Styles.TextBox" TargetType="{x:Type TextBox}"> <Setter Property="Background" Value="{DynamicResource MahApps.Brushes.Control.Background}" /> diff --git a/src/Mahapps.Metro.Tests/Tests/TextBoxHelperTests.Fixture.cs b/src/Mahapps.Metro.Tests/Tests/TextBoxHelperTests.Fixture.cs index 6769feab0b..480e5c9b9c 100644 --- a/src/Mahapps.Metro.Tests/Tests/TextBoxHelperTests.Fixture.cs +++ b/src/Mahapps.Metro.Tests/Tests/TextBoxHelperTests.Fixture.cs @@ -31,7 +31,6 @@ public async Task PrepareForTestAsync(IList<string>? properties = null) this.Window?.TestTextBox.ClearDependencyProperties(properties); this.Window?.TestButtonTextBox.ClearDependencyProperties(properties); this.Window?.TestPasswordBox.ClearDependencyProperties(properties); - this.Window?.TestButtonPasswordBox.ClearDependencyProperties(properties); this.Window?.TestButtonRevealedPasswordBox.ClearDependencyProperties(properties); this.Window?.TestComboBox.ClearDependencyProperties(properties); this.Window?.TestEditableComboBox.ClearDependencyProperties(properties); diff --git a/src/Mahapps.Metro.Tests/Tests/TextBoxHelperTests.cs b/src/Mahapps.Metro.Tests/Tests/TextBoxHelperTests.cs index 5dd2a4dee7..640cc28bcb 100644 --- a/src/Mahapps.Metro.Tests/Tests/TextBoxHelperTests.cs +++ b/src/Mahapps.Metro.Tests/Tests/TextBoxHelperTests.cs @@ -36,8 +36,6 @@ public async Task TestAttachedPropertyButtonWidth() this.fixture.Window?.TestPasswordBox.SetValue(TextBoxHelper.ButtonWidthProperty, width); Assert.Equal(width, this.fixture.Window?.TestPasswordBox.FindChild<Button>("PART_ClearText")?.Width); - this.fixture.Window?.TestButtonPasswordBox.SetValue(TextBoxHelper.ButtonWidthProperty, width); - Assert.Equal(width, this.fixture.Window?.TestButtonPasswordBox.FindChild<Button>("PART_ClearText")?.Width); this.fixture.Window?.TestButtonRevealedPasswordBox.SetValue(TextBoxHelper.ButtonWidthProperty, width); Assert.Equal(width, this.fixture.Window?.TestButtonRevealedPasswordBox.FindChild<Button>("PART_ClearText")?.Width); Assert.Equal(width, this.fixture.Window?.TestButtonRevealedPasswordBox.FindChild<Button>("PART_RevealButton")?.Width); @@ -74,8 +72,6 @@ public async Task TestAttachedPropertyButtonContent() this.fixture.Window?.TestPasswordBox.SetValue(TextBoxHelper.ButtonContentProperty, content); Assert.Equal(content, this.fixture.Window?.TestPasswordBox.FindChild<Button>("PART_ClearText")?.Content); - this.fixture.Window?.TestButtonPasswordBox.SetValue(TextBoxHelper.ButtonContentProperty, content); - Assert.Equal(content, this.fixture.Window?.TestButtonPasswordBox.FindChild<Button>("PART_ClearText")?.Content); this.fixture.Window?.TestButtonRevealedPasswordBox.SetValue(TextBoxHelper.ButtonContentProperty, content); Assert.Equal(content, this.fixture.Window?.TestButtonRevealedPasswordBox.FindChild<Button>("PART_ClearText")?.Content); @@ -112,8 +108,6 @@ public async Task TestAttachedPropertyButtonContentTemplate() this.fixture.Window?.TestPasswordBox.SetResourceReference(TextBoxHelper.ButtonContentTemplateProperty, resourceKey); Assert.Equal(dataTemplate, this.fixture.Window?.TestPasswordBox.FindChild<Button>("PART_ClearText")?.ContentTemplate); - this.fixture.Window?.TestButtonPasswordBox.SetResourceReference(TextBoxHelper.ButtonContentTemplateProperty, resourceKey); - Assert.Equal(dataTemplate, this.fixture.Window?.TestButtonPasswordBox.FindChild<Button>("PART_ClearText")?.ContentTemplate); this.fixture.Window?.TestButtonRevealedPasswordBox.SetResourceReference(TextBoxHelper.ButtonContentTemplateProperty, resourceKey); Assert.Equal(dataTemplate, this.fixture.Window?.TestButtonRevealedPasswordBox.FindChild<Button>("PART_ClearText")?.ContentTemplate); @@ -148,8 +142,6 @@ public async Task TestAttachedPropertyButtonFontFamily() this.fixture.Window?.TestPasswordBox.SetValue(TextBoxHelper.ButtonFontFamilyProperty, fontFamily); Assert.Equal(fontFamily, this.fixture.Window?.TestPasswordBox.FindChild<Button>("PART_ClearText")?.FontFamily); - this.fixture.Window?.TestButtonPasswordBox.SetValue(TextBoxHelper.ButtonFontFamilyProperty, fontFamily); - Assert.Equal(fontFamily, this.fixture.Window?.TestButtonPasswordBox.FindChild<Button>("PART_ClearText")?.FontFamily); this.fixture.Window?.TestButtonRevealedPasswordBox.SetValue(TextBoxHelper.ButtonFontFamilyProperty, fontFamily); Assert.Equal(fontFamily, this.fixture.Window?.TestButtonRevealedPasswordBox.FindChild<Button>("PART_ClearText")?.FontFamily); @@ -184,8 +176,6 @@ public async Task TestAttachedPropertyButtonFontSize() this.fixture.Window?.TestPasswordBox.SetValue(TextBoxHelper.ButtonFontSizeProperty, fontSize); Assert.Equal(fontSize, this.fixture.Window?.TestPasswordBox.FindChild<Button>("PART_ClearText")?.FontSize); - this.fixture.Window?.TestButtonPasswordBox.SetValue(TextBoxHelper.ButtonFontSizeProperty, fontSize); - Assert.Equal(fontSize, this.fixture.Window?.TestButtonPasswordBox.FindChild<Button>("PART_ClearText")?.FontSize); this.fixture.Window?.TestButtonRevealedPasswordBox.SetValue(TextBoxHelper.ButtonFontSizeProperty, fontSize); Assert.Equal(fontSize, this.fixture.Window?.TestButtonRevealedPasswordBox.FindChild<Button>("PART_ClearText")?.FontSize); @@ -218,8 +208,6 @@ public async Task TestAttachedPropertyButtonTemplate() this.fixture.Window?.TestButtonTextBox.SetResourceReference(TextBoxHelper.ButtonTemplateProperty, resourceKey); Assert.Equal(controlTemplate, this.fixture.Window?.TestButtonTextBox.FindChild<Button>("PART_ClearText")?.Template); - this.fixture.Window?.TestButtonPasswordBox.SetResourceReference(TextBoxHelper.ButtonTemplateProperty, resourceKey); - Assert.Equal(controlTemplate, this.fixture.Window?.TestButtonPasswordBox.FindChild<Button>("PART_ClearText")?.Template); this.fixture.Window?.TestButtonRevealedPasswordBox.SetResourceReference(TextBoxHelper.ButtonTemplateProperty, resourceKey); Assert.Equal(controlTemplate, this.fixture.Window?.TestButtonRevealedPasswordBox.FindChild<Button>("PART_ClearText")?.Template); } diff --git a/src/Mahapps.Metro.Tests/Views/TextBoxHelperTestWindow.xaml b/src/Mahapps.Metro.Tests/Views/TextBoxHelperTestWindow.xaml index 7e72d066a4..0a878f636d 100644 --- a/src/Mahapps.Metro.Tests/Views/TextBoxHelperTestWindow.xaml +++ b/src/Mahapps.Metro.Tests/Views/TextBoxHelperTestWindow.xaml @@ -19,8 +19,7 @@ <TextBox x:Name="TestTextBox" /> <TextBox x:Name="TestButtonTextBox" Style="{DynamicResource MahApps.Styles.TextBox.Search}" /> <PasswordBox x:Name="TestPasswordBox" /> - <PasswordBox x:Name="TestButtonPasswordBox" Style="{DynamicResource MahApps.Styles.PasswordBox.Button}" /> - <PasswordBox x:Name="TestButtonRevealedPasswordBox" Style="{DynamicResource MahApps.Styles.PasswordBox.Button.Revealed}" /> + <PasswordBox x:Name="TestButtonRevealedPasswordBox" Style="{DynamicResource MahApps.Styles.PasswordBox.Revealed}" /> <ComboBox x:Name="TestComboBox" /> <ComboBox x:Name="TestEditableComboBox" IsEditable="True" /> <mah:NumericUpDown x:Name="TestNumericUpDown" />
azerothcore-wotlk
https://github.com/azerothcore/azerothcore-wotlk
a1e9dfce41dbe75586ed9bf4a233e9122085893d
Kitzunu
2024-07-31 02:23:11
fix(Core/World): Crash on SendWorldText(Optional) (#19531)
* fix(Core/World): Crash on SendWorldText(Optional) * WorldText should be sent to all sessions * now it works
fix(Core/World): Crash on SendWorldText(Optional) (#19531) * fix(Core/World): Crash on SendWorldText(Optional) * WorldText should be sent to all sessions * now it works
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 1cc245c3e6657d..9cd64c8a17fbf6 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -102,50 +102,36 @@ bool ChatHandler::HasLowerSecurityAccount(WorldSession* target, uint32 target_ac void ChatHandler::SendWorldText(std::string_view str) { std::vector<std::string_view> lines = Acore::Tokenize(str, '\n', true); - for (SessionMap::const_iterator itr = sWorld->GetAllSessions().begin(); itr != sWorld->GetAllSessions().end(); ++itr) - { - WorldSession* session = itr->second; - if (!session) - continue; - // Player should be in world - Player* player = session->GetPlayer(); - if (!player || !player->IsInWorld()) - continue; + Player* player = m_session->GetPlayer(); + if (!player || !player->IsInWorld()) + return; - for (std::string_view line : lines) - { - WorldPacket data; - ChatHandler::BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, nullptr, nullptr, line); - player->SendDirectMessage(&data); - } + for (std::string_view line : lines) + { + WorldPacket data; + ChatHandler::BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, nullptr, nullptr, line); + player->SendDirectMessage(&data); } } void ChatHandler::SendWorldTextOptional(std::string_view str, uint32 flag) { std::vector<std::string_view> lines = Acore::Tokenize(str, '\n', true); - for (SessionMap::const_iterator itr = sWorld->GetAllSessions().begin(); itr != sWorld->GetAllSessions().end(); ++itr) - { - WorldSession* session = itr->second; - if (!session) - continue; - // Player should be in world - Player* player = session->GetPlayer(); - if (!player || !player->IsInWorld()) - continue; + Player* player = m_session->GetPlayer(); + if (!player || !player->IsInWorld()) + return; - if (sWorld->getBoolConfig(CONFIG_PLAYER_SETTINGS_ENABLED)) - if (player->GetPlayerSetting(AzerothcorePSSource, SETTING_ANNOUNCER_FLAGS).HasFlag(flag)) - continue; + if (sWorld->getBoolConfig(CONFIG_PLAYER_SETTINGS_ENABLED)) + if (player->GetPlayerSetting(AzerothcorePSSource, SETTING_ANNOUNCER_FLAGS).HasFlag(flag)) + return; - for (std::string_view line : lines) - { - WorldPacket data; - ChatHandler::BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, nullptr, nullptr, line); - player->SendDirectMessage(&data); - } + for (std::string_view line : lines) + { + WorldPacket data; + ChatHandler::BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, nullptr, nullptr, line); + player->SendDirectMessage(&data); } } diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h index eb0d7256e99177..17642a46d5a7a7 100644 --- a/src/server/game/Chat/Chat.h +++ b/src/server/game/Chat/Chat.h @@ -20,6 +20,7 @@ #include "ChatCommand.h" #include "Errors.h" +#include "Player.h" #include "SharedDefines.h" #include "WorldSession.h" #include <vector> @@ -54,24 +55,64 @@ class AC_GAME_API ChatHandler template<typename... Args> void SendWorldText(uint32 strId, Args&&... args) { - SendWorldText(Acore::StringFormatFmt(GetAcoreString(strId), std::forward<Args>(args)...)); + // WorldText should be sent to all sessions + SessionMap::const_iterator itr; + for (itr = sWorld->GetAllSessions().begin(); itr != sWorld->GetAllSessions().end(); ++itr) + { + Player* player = itr->second->GetPlayer(); + if (player && player->IsInWorld()) + { + m_session = player->GetSession(); + SendWorldText(Acore::StringFormatFmt(GetAcoreString(strId), std::forward<Args>(args)...)); + } + } } template<typename... Args> void SendWorldText(char const* fmt, Args&&... args) { - SendWorldText(Acore::StringFormatFmt(fmt, std::forward<Args>(args)...)); + // WorldTextOptional should be sent to all sessions + SessionMap::const_iterator itr; + for (itr = sWorld->GetAllSessions().begin(); itr != sWorld->GetAllSessions().end(); ++itr) + { + Player* player = itr->second->GetPlayer(); + if (player && player->IsInWorld()) + { + m_session = player->GetSession(); + SendWorldText(Acore::StringFormatFmt(fmt, std::forward<Args>(args)...)); + } + } } void SendWorldTextOptional(std::string_view str, uint32 flag); template<typename... Args> void SendWorldTextOptional(uint32 strId, uint32 flag, Args&&... args) { - SendWorldTextOptional(Acore::StringFormatFmt(GetAcoreString(strId), std::forward<Args>(args)...), flag); + // WorldTextOptional should be sent to all sessions + SessionMap::const_iterator itr; + for (itr = sWorld->GetAllSessions().begin(); itr != sWorld->GetAllSessions().end(); ++itr) + { + Player* player = itr->second->GetPlayer(); + if (player && player->IsInWorld()) + { + m_session = player->GetSession(); + SendWorldTextOptional(Acore::StringFormatFmt(GetAcoreString(strId), std::forward<Args>(args)...), flag); + } + } } template<typename... Args> void SendWorldTextOptional(char const* fmt, uint32 flag, Args&&... args) { - SendWorldTextOptional(Acore::StringFormatFmt(fmt, std::forward<Args>(args)...), flag); + // WorldTextOptional should be sent to all sessions + SessionMap::const_iterator itr; + for (itr = sWorld->GetAllSessions().begin(); itr != sWorld->GetAllSessions().end(); ++itr) + { + Player* player = itr->second->GetPlayer(); + if (player && player->IsInWorld()) + { + m_session = player->GetSession(); + SendWorldTextOptional(Acore::StringFormatFmt(fmt, std::forward<Args>(args)...), flag); + } + } } // function with different implementation for chat/console
appsmith
https://github.com/appsmithorg/appsmith
0845f783d0302d7d303527f88a5e7fe364def82d
Shrikant Sharat Kandula
2023-02-02 12:21:39
chore: Fix Installation complete event not being sent (#20301)
The problem was that the Mono returned by `analyticsService.sendEvent` was returned inside a `.map` call, which, (almost) always results in a bug. This PR fixes that.
chore: Fix Installation complete event not being sent (#20301) The problem was that the Mono returned by `analyticsService.sendEvent` was returned inside a `.map` call, which, (almost) always results in a bug. This PR fixes that.
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ExchangeUtils.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ExchangeUtils.java index c0f6771c6a7a..3d8be5751710 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ExchangeUtils.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ExchangeUtils.java @@ -21,6 +21,8 @@ public static Mono<String> getAnonymousUserIdFromCurrentRequest() { contextView.get(ServerWebExchange.class).getRequest().getHeaders().getFirst(HEADER_ANONYMOUS_USER_ID), FieldName.ANONYMOUS_USER )) + // An error is thrown when the context is not available. We don't want to fail the request in this case. + .onErrorResume(error -> Mono.empty()) .defaultIfEmpty(FieldName.ANONYMOUS_USER); } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/UserSignupCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/UserSignupCEImpl.java index 2c655f6faf3f..711f36796092 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/UserSignupCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/UserSignupCEImpl.java @@ -225,7 +225,7 @@ public Mono<User> signupAndLoginSuper(UserSignupRequestDTO userFromRequest, Serv return Mono.when( userDataService.updateForUser(user, userData), configService.getInstanceId() - .map(instanceId -> { + .flatMap(instanceId -> { log.debug("Installation setup complete."); analyticsService.identifyInstance(instanceId, userData.getRole(), userData.getUseCase()); return analyticsService.sendEvent( @@ -239,7 +239,7 @@ public Mono<User> signupAndLoginSuper(UserSignupRequestDTO userFromRequest, Serv "goal", ObjectUtils.defaultIfNull(userData.getUseCase(), "") ), false - ).thenReturn(instanceId); + ); }), envManager.applyChanges(Map.of( APPSMITH_DISABLE_TELEMETRY.name(),
self-hosted
https://github.com/getsentry/self-hosted
f2e2dc2bb3c0c2505d0a6044989bdd29c7905fef
jnm
2021-09-28 17:13:36
docs: simplify Linux `sudo` instructions in README (#1096)
Describe an easier way to pass the `SENTRY_IMAGE` environment variable to `install.sh` when using `sudo` that doesn't require modifying the `sudo` configuration
docs: simplify Linux `sudo` instructions in README (#1096) Describe an easier way to pass the `SENTRY_IMAGE` environment variable to `install.sh` when using `sudo` that doesn't require modifying the `sudo` configuration
diff --git a/README.md b/README.md index 6c4874d19e..5c93853f16 100644 --- a/README.md +++ b/README.md @@ -38,23 +38,10 @@ Note that this may not work for all commit SHAs as this repository evolves with ### Using Linux -If you are using Linux and you need to use `sudo` when running `./install.sh`, modifying the version of Sentry is slightly different. First, run the following: +If you are using Linux and you need to use `sudo` when running `./install.sh`, make sure to place the environment variable *after* `sudo`: ```shell -sudo visudo -``` - -Then add the following line: - -```shell -Defaults env_keep += "SENTRY_IMAGE" -``` - -Save the file then in your terminal run the following - -```shell -export SENTRY_IMAGE=us.gcr.io/sentryio/sentry:83b1380 -sudo ./install.sh +sudo SENTRY_IMAGE=us.gcr.io/sentryio/sentry:83b1380 ./install.sh ``` Where you replace `83b1380` with the sha you want to use.
coredns
https://github.com/coredns/coredns
09046304a9c23287b94c083cc9e9dfa02999dee5
dependabot[bot]
2021-12-21 02:33:42
build(deps): bump k8s.io/klog/v2 from 2.30.0 to 2.40.1 (#5052)
Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.30.0 to 2.40.1. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes/klog/compare/v2.30.0...v2.40.1) ---
build(deps): bump k8s.io/klog/v2 from 2.30.0 to 2.40.1 (#5052) Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.30.0 to 2.40.1. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes/klog/compare/v2.30.0...v2.40.1) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
diff --git a/go.mod b/go.mod index 4ab590676c0..37a4d3afc53 100644 --- a/go.mod +++ b/go.mod @@ -38,5 +38,5 @@ require ( k8s.io/api v0.23.1 k8s.io/apimachinery v0.23.1 k8s.io/client-go v0.23.0 - k8s.io/klog/v2 v2.30.0 + k8s.io/klog/v2 v2.40.1 ) diff --git a/go.sum b/go.sum index 0e18134d56f..b920555603a 100644 --- a/go.sum +++ b/go.sum @@ -955,8 +955,9 @@ k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.40.1 h1:P4RRucWk/lFOlDdkAr3mc7iWFkgKrZY9qZMAgek06S4= +k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
immich
https://github.com/immich-app/immich
147747de32a7362db842d95433a4ab1688eece92
kurama
2024-09-23 13:10:23
docs: add section for Traefik Reverse Proxy (#12813)
* added a section for the Traefik Proxy * minimized the configs * replaced config with a comment. * Update docs/docs/administration/reverse-proxy.md changed timeout values
docs: add section for Traefik Reverse Proxy (#12813) * added a section for the Traefik Proxy * minimized the configs * replaced config with a comment. * Update docs/docs/administration/reverse-proxy.md changed timeout values Co-authored-by: dvbthien <[email protected]> * changed timeouts back to 10 minutes * fixed typo and set default writeTimeout 600s Leaving it at 0 may be also bad practice * removed whitespace * run `npm run format -- --check -w` --------- Co-authored-by: dvbthien <[email protected]>
diff --git a/docs/docs/administration/reverse-proxy.md b/docs/docs/administration/reverse-proxy.md index 1d2488f1192d8..c40fecbdc4c23 100644 --- a/docs/docs/administration/reverse-proxy.md +++ b/docs/docs/administration/reverse-proxy.md @@ -64,3 +64,43 @@ Below is an example config for Apache2 site configuration. ProxyPreserveHost On </VirtualHost> ``` + +### Traefik Proxy example config + +The example below is for Traefik version 3. + +The most important is to increase the `respondingTimeouts` of the entrypoint used by immich. In this example of entrypoint `websecure` for port `443`. Per default it's set to 60s which leeds to videos stop uploading after 1 minute (Error Code 499). With this config it will fail after 10 minutes which is in most cases enough. Increase it if needed. + +`traefik.yaml` + +```yaml +[...] +entryPoints: + websecure: + address: :443 + # this section needs to be added + transport: + respondingTimeouts: + readTimeout: 600s + idleTimeout: 600s + writeTimeout: 600s +``` + +The second part is in the `docker-compose.yml` file where immich is in. Add the Traefik specific labels like in the example. + +`docker-compose.yml` + +```yaml +services: + immich-server: + [...] + labels: + traefik.enable: true + # increase readingTimeouts for the entrypoint used here + traefik.http.routers.immich.entrypoints: websecure + traefik.http.routers.immich.rule: Host(`immich.your-domain.com`) + traefik.http.services.immich.loadbalancer.server.port: 3001 +``` + +Keep in mind, that Traefik needs to communicate with the network where immich is in, usually done +by adding the Traefik network to the `immich-server`.
blockly
https://github.com/google/blockly
e9996bddef736421d51614b8426f664878ba51d0
dependabot[bot]
2022-06-21 19:32:08
chore(deps): bump eslint from 8.17.0 to 8.18.0 (#6229)
Bumps [eslint](https://github.com/eslint/eslint) from 8.17.0 to 8.18.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.17.0...v8.18.0) ---
chore(deps): bump eslint from 8.17.0 to 8.18.0 (#6229) Bumps [eslint](https://github.com/eslint/eslint) from 8.17.0 to 8.18.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.17.0...v8.18.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
diff --git a/package-lock.json b/package-lock.json index c4ec7cebe17..8e096046993 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3871,9 +3871,9 @@ } }, "node_modules/eslint": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.17.0.tgz", - "integrity": "sha512-gq0m0BTJfci60Fz4nczYxNAlED+sMcihltndR8t9t1evnU/azx53x3t2UHXC/uRjcbvRw/XctpaNygSTcQD+Iw==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", + "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.0", @@ -15871,9 +15871,9 @@ } }, "eslint": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.17.0.tgz", - "integrity": "sha512-gq0m0BTJfci60Fz4nczYxNAlED+sMcihltndR8t9t1evnU/azx53x3t2UHXC/uRjcbvRw/XctpaNygSTcQD+Iw==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", + "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.0",
eslint
https://github.com/eslint/eslint
ce3e62a86ef356bde4cc91e6badd5244dfaebe09
薛定谔的猫
2018-05-28 21:22:35
Docs: remove test coverage badge (#10407)
Temporaryly removed the badge, since it has being disabled for a long time. sorry for not following the template. :(
Docs: remove test coverage badge (#10407) Temporaryly removed the badge, since it has being disabled for a long time. sorry for not following the template. :(
diff --git a/README.md b/README.md index cb8c0277d8e0..95c272094c76 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ [![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] -[![Test coverage][coveralls-image]][coveralls-url] [![Downloads][downloads-image]][downloads-url] [![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=282608)](https://www.bountysource.com/trackers/282608-eslint?utm_source=282608&utm_medium=shield&utm_campaign=TRACKER_BADGE) [![Join the chat at https://gitter.im/eslint/eslint](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/eslint/eslint?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Android-Password-Store
https://github.com/android-password-store/Android-Password-Store
b708aca9e51692a2454a97a104fab71299f7a8fa
renovate[bot]
2023-08-24 10:20:11
chore(deps): update kotlin and compose (#2657)
* chore(deps): update kotlin and compose * fix(deps): use prerelease Compose Compiler ---------
chore(deps): update kotlin and compose (#2657) * chore(deps): update kotlin and compose * fix(deps): use prerelease Compose Compiler --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Harsh Shandilya <[email protected]>
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 825296122f..a962a0f7e2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,11 +4,11 @@ androidxActivity = "1.8.0-alpha07" bouncycastle = "1.76" moshi = "1.15.0" # @keep used for kotlinCompilerExtensionVersion -composeCompiler = "1.5.1" +composeCompiler = "1.5.3-dev-k1.9.10-593b4c95fce" coroutines = "1.7.3" flowbinding = "1.2.0" hilt = "2.47" -kotlin = "1.9.0" +kotlin = "1.9.10" leakcanary = "2.12" lifecycle = "2.6.1" diff --git a/settings.gradle.kts b/settings.gradle.kts index be182556f1..119d901885 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -87,7 +87,6 @@ dependencyResolutionManagement { includeGroup("androidx.cardview") includeGroup("androidx.collection") includeGroup("androidx.compose.animation") - includeGroup("androidx.compose.compiler") includeGroup("androidx.compose.foundation") includeGroup("androidx.compose.material") includeGroup("androidx.compose.material3") @@ -164,6 +163,10 @@ dependencyResolutionManagement { forRepository { maven("https://storage.googleapis.com/r8-releases/raw") } filter { includeModule("com.android.tools", "r8") } } + exclusiveContent { + forRepository { maven("https://androidx.dev/storage/compose-compiler/repository") } + filter { includeGroup("androidx.compose.compiler") } + } mavenCentral() } }
RSSHub
https://github.com/DIYgod/RSSHub
f892480be7f3795fae6ec2c8b60fd598670986f3
SettingDust
2024-02-03 08:05:11
fix(modrinth): using path param instead of query string since the que… (#14367)
* fix(modrinth): using path param instead of query string since the query won't affect cached result * fix(modrinth): use `URLSearchParams` instead of querystring * docs(modrinth): typo * fix(modrinth): avoid empty array query when no value ---------
fix(modrinth): using path param instead of query string since the que… (#14367) * fix(modrinth): using path param instead of query string since the query won't affect cached result * fix(modrinth): use `URLSearchParams` instead of querystring * docs(modrinth): typo * fix(modrinth): avoid empty array query when no value ---------
diff --git a/lib/v2/modrinth/maintainer.js b/lib/v2/modrinth/maintainer.js index 56b5f95fc8a684..c0bf2494494afb 100644 --- a/lib/v2/modrinth/maintainer.js +++ b/lib/v2/modrinth/maintainer.js @@ -1,3 +1,3 @@ module.exports = { - '/project/:id/versions': ['SettingDust'], + '/project/:id/versions/:routeParams?': ['SettingDust'], }; diff --git a/lib/v2/modrinth/router.js b/lib/v2/modrinth/router.js index 98b0a2848fa0c7..e95fb268fc3913 100644 --- a/lib/v2/modrinth/router.js +++ b/lib/v2/modrinth/router.js @@ -1,3 +1,3 @@ module.exports = (router) => { - router.get('/project/:id/versions', require('./versions')); + router.get('/project/:id/versions/:routeParams?', require('./versions')); }; diff --git a/lib/v2/modrinth/versions.js b/lib/v2/modrinth/versions.js index 32148d1cf78aac..3dca9eb7b96070 100644 --- a/lib/v2/modrinth/versions.js +++ b/lib/v2/modrinth/versions.js @@ -2,6 +2,7 @@ const { parseDate } = require('@/utils/parse-date'); const { art } = require('@/utils/render'); const path = require('path'); const { value: config } = require('@/config'); + const got = require('@/utils/got').extend({ headers: { // https://docs.modrinth.com/#section/User-Agents @@ -19,32 +20,28 @@ module.exports = async ( const { /** @type string */ id, + /** @type {string | undefined} */ + routeParams, } = ctx.params; - let { - /** @type {string | string[] | undefined} */ - loaders, - /** @type {string | string[] | undefined} */ - game_versions, - } = ctx.query; - const { featured } = ctx.query; - if (typeof loaders === 'string') { - loaders = [loaders]; - } - if (typeof game_versions === 'string') { - game_versions = [game_versions]; - } + /** + * /@type {{ + * loaders: string | string[] | undefined + * game_versions: string | string[] | undefined + * featured: string | undefined + * }} + */ + const parsedQuery = new URLSearchParams(routeParams); + + parsedQuery.set('loaders', parsedQuery.has('loaders') ? JSON.stringify(parsedQuery.getAll('loaders')) : ''); + parsedQuery.set('game_versions', parsedQuery.has('game_versions') ? JSON.stringify(parsedQuery.getAll('game_versions')) : ''); try { /** @type {import('./api').Project} */ const project = await got(`https://api.modrinth.com/v2/project/${id}`).json(); /** @type {import('./api').Version[]} */ const versions = await got(`https://api.modrinth.com/v2/project/${id}/version`, { - searchParams: { - loaders: loaders ? JSON.stringify(loaders) : undefined, - game_versions: game_versions ? JSON.stringify(game_versions) : undefined, - featured, - }, + searchParams: parsedQuery, }).json(); /** @type {import('./api').Author[]} */ const authors = await got(`https://api.modrinth.com/v2/users`, { diff --git a/website/docs/routes/game.mdx b/website/docs/routes/game.mdx index a6bdc908a67034..c0e37c9ad6f7ba 100644 --- a/website/docs/routes/game.mdx +++ b/website/docs/routes/game.mdx @@ -341,15 +341,13 @@ ### Project versions {#modrinth-project-versions} -<Route author="SettingDust" example="/project/modrinth/sodium/versions" path="/project/modrinth/:id/versions" paramsDesc={['Id or slug of the Modrinth project']} radar="1" /> +<Route author="SettingDust" example="/modrinth/project/sodium/versions" path="/modrinth/project/:id/versions/:routeParams?" paramsDesc={['Id or slug of the Modrinth project','Extra route params. See the table below for options']} radar="1" /> -Addition query parameters - -| Name | Example | -| -------------- | --------------------------------------------- | -| loaders | ?loaders=fabric\&loaders=quilt\&loaders=forge | -| game\_versions | ?game\_versions=1.20.1\&game\_versions=1.20.2 | -| featured | ?featured=true | +| Name | Example | +| -------------- | -------------------------------------------- | +| loaders | loaders=fabric\&loaders=quilt\&loaders=forge | +| game\_versions | game\_versions=1.20.1\&game\_versions=1.20.2 | +| featured | featured=true | ## Nintendo {#nintendo}
databend
https://github.com/databendlabs/databend
4bf53b947bdc1c0ff289a186627135ff0a092da5
张炎泼
2023-02-25 19:53:34
refactor(meta): upgrade openraft to 0.7.4
openraft released 0.7.4; Nothing really changed since 0.7.4-alpha.3
refactor(meta): upgrade openraft to 0.7.4 openraft released 0.7.4; Nothing really changed since 0.7.4-alpha.3
diff --git a/Cargo.lock b/Cargo.lock index 0cd6291a6f46d..e6a4728f0e5bb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5550,8 +5550,8 @@ dependencies = [ [[package]] name = "openraft" -version = "0.7.3" -source = "git+https://github.com/drmingdrmer/openraft?tag=v0.7.4-alpha.3#c6fe29d4a53b47f6c43d83a24e1610788a4c0166" +version = "0.7.4" +source = "git+https://github.com/datafuselabs/openraft?tag=v0.7.4#959636885e2069c685b1bdb9ebc5a875565f4a8a" dependencies = [ "anyerror", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index ab52459cd7e7f..994e9fd77aeb3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -89,7 +89,7 @@ members = [ [workspace.dependencies] # databend maintains: -openraft = { git = "https://github.com/drmingdrmer/openraft", tag = "v0.7.4-alpha.3" } +openraft = { git = "https://github.com/datafuselabs/openraft", tag = "v0.7.4" } sled = { git = "https://github.com/datafuse-extras/sled", tag = "v0.34.7-datafuse.1", default-features = false } opendal = { version = "0.28.0" } ordered-float = { version = "3.4.0", default-features = false } diff --git a/src/meta/raft-store/src/applied_state.rs b/src/meta/raft-store/src/applied_state.rs index b2311b6a7cc08..cf39157ea83f3 100644 --- a/src/meta/raft-store/src/applied_state.rs +++ b/src/meta/raft-store/src/applied_state.rs @@ -19,7 +19,6 @@ use common_meta_types::protobuf::RaftReply; use common_meta_types::Change; use common_meta_types::Node; use common_meta_types::TxnReply; -use openraft::AppDataResponse; /// The state of an applied raft log. /// Normally it includes two fields: the state before applying and the state after applying the log. @@ -47,8 +46,6 @@ pub enum AppliedState { None, } -impl AppDataResponse for AppliedState {} - impl fmt::Display for AppliedState { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { write!(f, "AppliedState: ")?; diff --git a/src/meta/types/src/log_entry.rs b/src/meta/types/src/log_entry.rs index d515df329b970..b685652c02883 100644 --- a/src/meta/types/src/log_entry.rs +++ b/src/meta/types/src/log_entry.rs @@ -15,7 +15,6 @@ use std::fmt::Display; use std::fmt::Formatter; -use openraft::AppData; use serde::Deserialize; use serde::Serialize; @@ -44,8 +43,6 @@ pub struct LogEntry { pub cmd: Cmd, } -impl AppData for LogEntry {} - impl Display for LogEntry { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { if let Some(txid) = &self.txid {
materialize
https://github.com/MaterializeInc/materialize
74ec54045ba91040d49ce3663ce3e100535ad30e
dependabot[bot]
2022-08-28 21:07:55
build(deps): bump sysctl from 0.4.4 to 0.4.6
Bumps [sysctl](https://github.com/johalun/sysctl-rs) from 0.4.4 to 0.4.6. - [Release notes](https://github.com/johalun/sysctl-rs/releases) - [Changelog](https://github.com/johalun/sysctl-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/johalun/sysctl-rs/commits/v0.4.6) ---
build(deps): bump sysctl from 0.4.4 to 0.4.6 Bumps [sysctl](https://github.com/johalun/sysctl-rs) from 0.4.4 to 0.4.6. - [Release notes](https://github.com/johalun/sysctl-rs/releases) - [Changelog](https://github.com/johalun/sysctl-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/johalun/sysctl-rs/commits/v0.4.6) --- updated-dependencies: - dependency-name: sysctl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
diff --git a/Cargo.lock b/Cargo.lock index 73b7b00eb7fb8..abca4de16d078 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5956,9 +5956,9 @@ dependencies = [ [[package]] name = "sysctl" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1123645dfaf2b5eac6b6c88addafc359c789b8ef2a770ecaef758c1ddf363ea4" +checksum = "225e483f02d0ad107168dc57381a8a40c3aeea6abe47f37506931f861643cfa8" dependencies = [ "bitflags", "byteorder", diff --git a/src/environmentd/Cargo.toml b/src/environmentd/Cargo.toml index 8b0db14712ffd..bdfad1f41ee87 100644 --- a/src/environmentd/Cargo.toml +++ b/src/environmentd/Cargo.toml @@ -61,7 +61,7 @@ rlimit = "0.8.3" serde = { version = "1.0.140", features = ["derive"] } serde_json = "1.0.82" shell-words = "1.1.0" -sysctl = "0.4.4" +sysctl = "0.4.6" sysinfo = "0.25.3" tempfile = "3.2.0" thiserror = "1.0.31"
gatsby
https://github.com/gatsbyjs/gatsby
c6520c28bf432419397f54aecbec67dc0fb59d50
Erin
2019-11-01 05:01:19
Docs: Added Info on Global Styles (#18293)
* added info about global styles * edits based on suggestions/feedback * PR feedback
Docs: Added Info on Global Styles (#18293) * added info about global styles * edits based on suggestions/feedback * PR feedback
diff --git a/docs/docs/styled-components.md b/docs/docs/styled-components.md index 2da273e6e49e2..79def1db1f60a 100644 --- a/docs/docs/styled-components.md +++ b/docs/docs/styled-components.md @@ -112,6 +112,28 @@ export default () => ( ) ``` +## Creating Global Styles + +Styled-components are primarily used for a single CSS class that is isolated from other components. In some cases, you want to override global styling — for example, the default margins of your `body` element. Styled-components has your back. You can use the `createGlobalStyle` to accomplish this. It's advised to use `createGlobalStyle` in [Layout components](/docs/layout-components/), which are shared over multiple pages rather than using it on a single page. + +The example below shows how to create a `GlobalStyle` (which is a StyledComponent) for the color purple by importing `createGlobalStyle` from `styled-components`. + +```jsx:title=src/components/layout.js +import React from "react" +import { createGlobalStyle } from "styled-components" + +const GlobalStyle = createGlobalStyle` + body { + color: ${props => (props.theme === "purple" ? "purple" : "white")}; + } +` +export default ({ children }) => ( + <React.Fragment> + <GlobalStyle theme="purple" /> + </React.Fragment> +) +``` + ## Enabling user stylesheets with a stable class name Adding a persistent CSS `className` to your styled components can make it easier for end users of your website to take advantage of [user stylesheets](https://www.viget.com/articles/inline-styles-user-style-sheets-and-accessibility/) for accessibility.
bytebase
https://github.com/bytebase/bytebase
851e2f874999888378852319a9a01843ff4c777e
Liu Ji
2023-10-10 07:45:12
feat(sql-editor): cancel query (#8617)
* feat: cancel query * chore: wrong field
feat(sql-editor): cancel query (#8617) * feat: cancel query * chore: wrong field
diff --git a/frontend/src/composables/useExecuteSQL.ts b/frontend/src/composables/useExecuteSQL.ts index d13835ae7e9da5..819ef737b8bcf9 100644 --- a/frontend/src/composables/useExecuteSQL.ts +++ b/frontend/src/composables/useExecuteSQL.ts @@ -173,16 +173,38 @@ const useExecuteSQL = () => { }); }; + const abortController = new AbortController(); + tabStore.updateTab(tab.id, { + queryContext: { + beginTimestampMS: Date.now(), + abortController, + }, + }); for (const database of batchQueryDatabases) { const isUnknownDatabase = database.uid === String(UNKNOWN_ID); - try { - const sqlResultSet = await sqlEditorStore.executeQuery({ - instanceId: isUnknownDatabase - ? tab.connection.instanceId - : database.instanceEntity.uid, - databaseName: isUnknownDatabase ? "" : database.databaseName, - statement: selectStatement, + if (abortController.signal.aborted) { + // Once any one of the batch queries is aborted, don't go further + // and mock an "Aborted" result for the rest queries. + fail(database, { + advices: [], + allowExport: false, + error: "AbortError: The user aborted a request.", + results: [], + status: Status.ABORTED, }); + continue; + } + try { + const sqlResultSet = await sqlEditorStore.executeQuery( + { + instanceId: isUnknownDatabase + ? tab.connection.instanceId + : database.instanceEntity.uid, + databaseName: isUnknownDatabase ? "" : database.databaseName, + statement: selectStatement, + }, + abortController.signal + ); let adviceStatus: "SUCCESS" | "ERROR" | "WARNING" = "SUCCESS"; let adviceNotifyMessage = ""; for (const advice of sqlResultSet.advices) { diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json index 81742aa9fcd5f2..17481ed92f0e1b 100644 --- a/frontend/src/locales/en-US.json +++ b/frontend/src/locales/en-US.json @@ -2062,7 +2062,8 @@ "database-labels": "{database} labels", "database-has-no-label": "{database} has no label", "description": "Batch query {count} additional databases with the same label values." - } + }, + "executing-query": "Executing query" }, "schema-editor": { "self": "Schema Editor", diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json index 01a39cbba89d84..71d2f9654a8ea5 100644 --- a/frontend/src/locales/es-ES.json +++ b/frontend/src/locales/es-ES.json @@ -2058,7 +2058,8 @@ "database-labels": "Etiquetas de {database}", "database-has-no-label": "{database} no tiene etiquetas", "description": "Consulta por lotes bases de datos adicionales con los mismos valores de etiqueta." - } + }, + "executing-query": "Ejecutando consulta" }, "schema-editor": { "self": "Editor de esquema", diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json index da4a58bc0ebc62..74aa673a66163e 100644 --- a/frontend/src/locales/zh-CN.json +++ b/frontend/src/locales/zh-CN.json @@ -2057,7 +2057,8 @@ "database-labels": "{database} 标签", "database-has-no-label": "{database} 没有标签", "description": "批量查询具有相同标签值的其他数据库。" - } + }, + "executing-query": "执行查询" }, "schema-editor": { "self": "Schema 编辑器", diff --git a/frontend/src/store/modules/sqlEditor.ts b/frontend/src/store/modules/sqlEditor.ts index 2c1a549a42e253..1034dd11612c05 100644 --- a/frontend/src/store/modules/sqlEditor.ts +++ b/frontend/src/store/modules/sqlEditor.ts @@ -35,20 +35,26 @@ export const useSQLEditorStore = defineStore("sqlEditor", { setIsFetchingQueryHistory(payload: boolean) { this.isFetchingQueryHistory = payload; }, - async executeQuery({ - instanceId, - databaseName, - statement, - }: Pick<QueryInfo, "instanceId" | "databaseName" | "statement">) { + async executeQuery( + { + instanceId, + databaseName, + statement, + }: Pick<QueryInfo, "instanceId" | "databaseName" | "statement">, + signal: AbortSignal + ) { const instance = useInstanceV1Store().getInstanceByUID( String(instanceId) ); - const response = await useSQLStore().queryReadonly({ - name: instance.name, - connectionDatabase: databaseName || "", - statement, - limit: RESULT_ROWS_LIMIT, - }); + const response = await useSQLStore().queryReadonly( + { + name: instance.name, + connectionDatabase: databaseName || "", + statement, + limit: RESULT_ROWS_LIMIT, + }, + signal + ); return response; }, diff --git a/frontend/src/store/modules/v1/sql.ts b/frontend/src/store/modules/v1/sql.ts index f32663a93f6d12..f114cc05d272b8 100644 --- a/frontend/src/store/modules/v1/sql.ts +++ b/frontend/src/store/modules/v1/sql.ts @@ -41,7 +41,8 @@ const getSqlReviewReports = (err: unknown): Advice[] => { export const useSQLStore = defineStore("sql", () => { const queryReadonly = async ( - params: QueryRequest + params: QueryRequest, + signal: AbortSignal ): Promise<SQLResultSetV1> => { try { const response = await sqlServiceClient.query(params, { @@ -49,6 +50,7 @@ export const useSQLStore = defineStore("sql", () => { // errors manually. ignoredCodes: [Status.PERMISSION_DENIED], silent: true, + signal, }); return { diff --git a/frontend/src/types/tab.ts b/frontend/src/types/tab.ts index 8b6e6e1bae9d2c..5c92ded0e793c0 100644 --- a/frontend/src/types/tab.ts +++ b/frontend/src/types/tab.ts @@ -29,6 +29,11 @@ export interface BatchQueryContext { selectedLabels: string[]; } +export type QueryContext = { + beginTimestampMS: number; + abortController: AbortController; +}; + export interface TabInfo { id: string; name: string; @@ -49,6 +54,8 @@ export interface TabInfo { isFreshNew?: boolean; // batchQueryContext saves the context of batch query, including the selected labels. batchQueryContext?: BatchQueryContext; + // queryContext saves the context of a query, including beginTimestampMS and abortController + queryContext?: QueryContext; // databaseQueryResultMap is used to store the query result of each database. // It's used for the case that the user selects multiple databases to query. // The key is the databaseName. Format: instances/{instance}/databases/{database} diff --git a/frontend/src/views/sql-editor/ResultPanel/ResultPanel.vue b/frontend/src/views/sql-editor/ResultPanel/ResultPanel.vue index 10c432cbfb17b4..f7bded2041b599 100644 --- a/frontend/src/views/sql-editor/ResultPanel/ResultPanel.vue +++ b/frontend/src/views/sql-editor/ResultPanel/ResultPanel.vue @@ -4,13 +4,27 @@ :class="loading && 'bg-white/80 dark:bg-black/80'" > <template v-if="loading"> - <div class="w-full h-full flex flex-col justify-center items-center"> - <BBSpin /> - {{ $t("sql-editor.loading-data") }} + <div + class="w-full h-full flex flex-col justify-center items-center text-sm gap-y-1" + > + <div class="flex flex-row gap-x-1"> + <BBSpin /> + <span>{{ $t("sql-editor.executing-query") }}</span> + <span>-</span> + <!-- use mono font to prevent the UI jitters frequently --> + <span class="font-mono">{{ queryElapsedTime }}</span> + </div> + <div> + <NButton size="small" @click="cancelQuery"> + {{ $t("common.cancel") }} + </NButton> + </div> </div> </template> <template v-else-if="!selectedResultSet"> - <div class="w-full h-full flex flex-col justify-center items-center"> + <div + class="w-full h-full flex flex-col justify-center items-center text-sm" + > <span>{{ $t("sql-editor.table-empty-placeholder") }}</span> </div> </template> @@ -59,6 +73,7 @@ </template> <script lang="ts" setup> +import { useTimestamp } from "@vueuse/core"; import { head } from "lodash-es"; import { Info } from "lucide-vue-next"; import { NButton, NTooltip } from "naive-ui"; @@ -86,12 +101,30 @@ const selectedResultSet = computed(() => { }); const executeParams = computed(() => tabStore.currentTab.executeParams); const loading = computed(() => tabStore.currentTab.isExecutingSQL); +const currentTimestampMS = useTimestamp(); +const queryElapsedTime = computed(() => { + if (!loading.value) return ""; + const tab = tabStore.currentTab; + const { isExecutingSQL, queryContext } = tab; + if (!isExecutingSQL) return ""; + if (!queryContext) return; + const beginMS = queryContext.beginTimestampMS; + const elapsedMS = currentTimestampMS.value - beginMS; + return `${(elapsedMS / 1000).toFixed(1)}s`; +}); const isDatabaseQueryFailed = (database: ComposedDatabase) => { return tabStore.currentTab.databaseQueryResultMap?.get(database.name || "") ?.error; }; +const cancelQuery = () => { + const { queryContext } = tabStore.currentTab; + if (!queryContext) return; + const { abortController } = queryContext; + abortController?.abort(); +}; + // Auto select the first database when the databases are ready. watch( () => databases.value, diff --git a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/DatabaseSchema.vue b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/DatabaseSchema.vue index c0e526f4a43782..9a29871c2adfed 100644 --- a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/DatabaseSchema.vue +++ b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/DatabaseSchema.vue @@ -7,7 +7,7 @@ @click="handleClickHeader" > <heroicons-outline:database class="h-4 w-4 mr-1 flex-shrink-0" /> - <span class="text-sm">{{ databaseMetadata.name }}</span> + <span class="text-sm">{{ database.databaseName }}</span> </div> <div class="flex justify-end gap-x-0.5"> <SchemaDiagramButton
core
https://github.com/stenciljs/core
13fac0399fd08672832adb52ee3caed57aef2f2f
Tanner Reits
2023-07-15 00:30:42
fix(compiler): only create one class member when transforming `@Element()` decorators (#4547)
* only create one class member for an `@Element()` * add some regression tests
fix(compiler): only create one class member when transforming `@Element()` decorators (#4547) * only create one class member for an `@Element()` * add some regression tests
diff --git a/src/compiler/transformers/component-lazy/lazy-element-getter.ts b/src/compiler/transformers/component-lazy/lazy-element-getter.ts index 27c490b67b7..0e4b1158e6b 100644 --- a/src/compiler/transformers/component-lazy/lazy-element-getter.ts +++ b/src/compiler/transformers/component-lazy/lazy-element-getter.ts @@ -14,20 +14,35 @@ export const addLazyElementGetter = ( if (cmp.elementRef) { addCoreRuntimeApi(moduleFile, RUNTIME_APIS.getElement); - classMembers.push( - ts.factory.createGetAccessorDeclaration( - undefined, - cmp.elementRef, - [], - undefined, - ts.factory.createBlock([ - ts.factory.createReturnStatement( - ts.factory.createCallExpression(ts.factory.createIdentifier(GET_ELEMENT), undefined, [ - ts.factory.createThis(), - ]) - ), - ]) - ) + // Create the getter that will be used in the transformed class declaration + const getter = ts.factory.createGetAccessorDeclaration( + undefined, + cmp.elementRef, + [], + undefined, + ts.factory.createBlock([ + ts.factory.createReturnStatement( + ts.factory.createCallExpression(ts.factory.createIdentifier(GET_ELEMENT), undefined, [ + ts.factory.createThis(), + ]) + ), + ]) ); + + // Find the index in the class members array that correlates with the element + // ref identifier we have + const index = classMembers.findIndex( + (member) => + member.kind === ts.SyntaxKind.PropertyDeclaration && (member.name as any)?.escapedText === cmp.elementRef + ); + + // Index should never not be a valid integer, but we'll be safe just in case. + // If the index is valid, we'll overwrite the existing class member with the getter + // so we don't create multiple members with the same identifier + if (index >= 0) { + classMembers[index] = getter; + } else { + classMembers.push(getter); + } } }; diff --git a/src/compiler/transformers/component-native/native-element-getter.ts b/src/compiler/transformers/component-native/native-element-getter.ts index aa95345be1f..6117d40be43 100644 --- a/src/compiler/transformers/component-native/native-element-getter.ts +++ b/src/compiler/transformers/component-native/native-element-getter.ts @@ -7,14 +7,30 @@ export const addNativeElementGetter = (classMembers: ts.ClassElement[], cmp: d.C // is transformed into: // get element() { return this; } if (cmp.elementRef) { - classMembers.push( - ts.factory.createGetAccessorDeclaration( - undefined, - cmp.elementRef, - [], - undefined, - ts.factory.createBlock([ts.factory.createReturnStatement(ts.factory.createThis())]) - ) + // Create the getter that will be used in the transformed class declaration + const getter = ts.factory.createGetAccessorDeclaration( + undefined, + cmp.elementRef, + [], + undefined, + ts.factory.createBlock([ts.factory.createReturnStatement(ts.factory.createThis())]) ); + + ts.SyntaxKind.AmpersandToken; + // Find the index in the class members array that correlates with the element + // ref identifier we have + const index = classMembers.findIndex( + (member) => + member.kind === ts.SyntaxKind.PropertyDeclaration && (member.name as any)?.escapedText === cmp.elementRef + ); + + // Index should never not be a valid integer, but we'll be safe just in case. + // If the index is valid, we'll overwrite the existing class member with the getter + // so we don't create multiple members with the same identifier + if (index >= 0) { + classMembers[index] = getter; + } else { + classMembers.push(getter); + } } }; diff --git a/src/compiler/transformers/test/lazy-component.spec.ts b/src/compiler/transformers/test/lazy-component.spec.ts index 73053c4a5c8..662a86a8053 100644 --- a/src/compiler/transformers/test/lazy-component.spec.ts +++ b/src/compiler/transformers/test/lazy-component.spec.ts @@ -33,4 +33,33 @@ describe('lazy-component', () => { expect(t.outputText).toContain(`import { registerInstance as __stencil_registerInstance } from "@stencil/core"`); expect(t.outputText).toContain(`__stencil_registerInstance(this, hostRef)`); }); + + it('adds a getter for an @Element() reference', () => { + const compilerCtx = mockCompilerCtx(); + const transformOpts: d.TransformOptions = { + coreImportPath: '@stencil/core', + componentExport: 'lazy', + componentMetadata: null, + currentDirectory: '/', + proxy: null, + style: 'static', + styleImportData: null, + }; + + const code = ` + @Component({ + tag: 'cmp-a' + }) + export class CmpA { + @Element() el: HtmlElement; + } + `; + + const transformer = lazyComponentTransform(compilerCtx, transformOpts); + + const t = transpileModule(code, null, compilerCtx, [], [transformer]); + + expect(t.outputText).toContain(`get el() { return __stencil_getElement(this); } };`); + expect(t.outputText).not.toContain(`el;`); + }); }); diff --git a/src/compiler/transformers/test/native-constructor.spec.ts b/src/compiler/transformers/test/native-constructor.spec.ts index 4b689d9bd82..f366316bcd3 100644 --- a/src/compiler/transformers/test/native-constructor.spec.ts +++ b/src/compiler/transformers/test/native-constructor.spec.ts @@ -67,5 +67,23 @@ describe('nativeComponentTransform', () => { ); expect(transpiledModule.outputText).toContain(`this.__attachShadow()`); }); + + it('adds a getter for an @Element() reference', () => { + const code = ` + @Component({ + tag: 'cmp-a' + }) + export class CmpA { + @Element() el: HtmlElement; + } + `; + + const transformer = nativeComponentTransform(compilerCtx, transformOpts); + + const transpiledModule = transpileModule(code, null, compilerCtx, [], [transformer]); + + expect(transpiledModule.outputText).toContain(`get el() { return this; }`); + expect(transpiledModule.outputText).not.toContain(`el;`); + }); }); });
tabby
https://github.com/TabbyML/tabby
28cd13797f3fc161d3f3fe25132b5d53030155dd
Wei Zhang
2025-01-20 21:13:22
feat(graphQL): add is_sso_user and forbid update name, password for s… (#3733)
* feat(graphQL): add is_sso_user and forbid update name, password for sso users
feat(graphQL): add is_sso_user and forbid update name, password for s… (#3733) * feat(graphQL): add is_sso_user and forbid update name, password for sso users Signed-off-by: Wei Zhang <[email protected]> * chore: users should return is_sso_user Signed-off-by: Wei Zhang <[email protected]> * [autofix.ci] apply automated fixes * chore: fix tests Signed-off-by: Wei Zhang <[email protected]> --------- Signed-off-by: Wei Zhang <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
diff --git a/ee/tabby-db/src/users.rs b/ee/tabby-db/src/users.rs index 347415e04735..b5c7409fcb3a 100644 --- a/ee/tabby-db/src/users.rs +++ b/ee/tabby-db/src/users.rs @@ -16,6 +16,9 @@ pub struct UserDAO { pub id: i64, pub email: String, pub name: Option<String>, + + // when the user is created with password, this field is set and will never be changed to None + // when the user is created with SSO, this field is None and will never be set pub password_encrypted: Option<String>, pub is_admin: bool, diff --git a/ee/tabby-schema/graphql/schema.graphql b/ee/tabby-schema/graphql/schema.graphql index 80df435749c0..7038ac55d4bc 100644 --- a/ee/tabby-schema/graphql/schema.graphql +++ b/ee/tabby-schema/graphql/schema.graphql @@ -296,6 +296,7 @@ interface User { isAdmin: Boolean! isOwner: Boolean! active: Boolean! + isSsoUser: Boolean! } """ @@ -965,6 +966,7 @@ type UserSecured implements User { active: Boolean! authToken: String! isPasswordSet: Boolean! + isSsoUser: Boolean! } type WebContextSource implements ContextSourceId & ContextSource { diff --git a/ee/tabby-schema/src/schema/auth.rs b/ee/tabby-schema/src/schema/auth.rs index 237e0d4538d4..d29b6fdd2af9 100644 --- a/ee/tabby-schema/src/schema/auth.rs +++ b/ee/tabby-schema/src/schema/auth.rs @@ -198,6 +198,11 @@ pub struct UserSecured { pub auth_token: String, pub is_password_set: bool, + // is_sso_user is used to indicate if the user is created by SSO + // and should not be able to change Name and Password + // e.g. LDAP, OAuth users + pub is_sso_user: bool, + #[graphql(skip)] pub policy: AccessPolicy, } diff --git a/ee/tabby-schema/src/schema/interface.rs b/ee/tabby-schema/src/schema/interface.rs index 927651c5872a..92488ca8ca16 100644 --- a/ee/tabby-schema/src/schema/interface.rs +++ b/ee/tabby-schema/src/schema/interface.rs @@ -14,6 +14,7 @@ pub struct User { pub is_admin: bool, pub is_owner: bool, pub active: bool, + pub is_sso_user: bool, } impl relay::NodeType for UserValue { diff --git a/ee/tabby-webserver/src/service/auth.rs b/ee/tabby-webserver/src/service/auth.rs index 6fbd615640f8..c677ffb6a4a1 100644 --- a/ee/tabby-webserver/src/service/auth.rs +++ b/ee/tabby-webserver/src/service/auth.rs @@ -161,6 +161,11 @@ impl AuthenticationService for AuthenticationServiceImpl { } async fn generate_reset_password_url(&self, id: &ID) -> Result<String> { + let user = self.get_user(id).await?; + if user.is_sso_user { + bail!("Cannot generate reset password url for SSO users"); + } + let external_url = self.setting.read_network_setting().await?.external_url; let id = id.as_rowid()?; let user = self.db.get_user(id).await?.context("User doesn't exits")?; @@ -179,6 +184,10 @@ impl AuthenticationService for AuthenticationServiceImpl { return Ok(None); }; + if user.is_sso_user { + bail!("Cannot request password reset for SSO users"); + } + let id = user.id.as_rowid()?; // request_password_reset_email is invoked by the user, so we need to check for existing password reset requests to prevent spamming @@ -200,6 +209,11 @@ impl AuthenticationService for AuthenticationServiceImpl { let password_encrypted = password_hash(password).map_err(|_| anyhow!("Unknown error"))?; let user_id = self.db.verify_password_reset(code).await?; + let user = self.get_user(&user_id.as_id()).await?; + if user.is_sso_user { + bail!("Password cannot be reset for SSO users"); + } + let old_pass_encrypted = self .db .get_user(user_id) @@ -227,6 +241,11 @@ impl AuthenticationService for AuthenticationServiceImpl { bail!("Changing passwords is disabled in demo mode"); } + let user = self.get_user(id).await?; + if user.is_sso_user { + bail!("Password cannot be changed for SSO users"); + } + let user = self .db .get_user(id.as_rowid()?) @@ -280,6 +299,12 @@ impl AuthenticationService for AuthenticationServiceImpl { if is_demo_mode() { bail!("Changing profile data is disabled in demo mode"); } + + let user = self.get_user(id).await?; + if user.is_sso_user { + bail!("Name cannot be changed for SSO users"); + } + let id = id.as_rowid()?; self.db.update_user_name(id, name).await?; Ok(()) @@ -1602,19 +1627,24 @@ mod tests { let service = test_authentication_service().await; let id = service .db - .create_user("[email protected]".into(), None, true, None) + .create_user( + "[email protected]".into(), + password_hash("pass").ok(), + true, + None, + ) .await .unwrap(); let id = id.as_id(); assert!(service - .update_user_password(&id, None, "newpass") + .update_user_password(&id, Some("pass"), "newpass") .await .is_ok()); assert!(service - .update_user_password(&id, None, "newpass2") + .update_user_password(&id, Some("wrong"), "newpass2") .await .is_err()); @@ -1624,6 +1654,68 @@ mod tests { .is_ok()); } + #[tokio::test] + async fn test_sso_user_forbid_update_password() { + let service = test_authentication_service().await; + let id = service + .db + .create_user("[email protected]".into(), None, true, None) + .await + .unwrap(); + + let id = id.as_id(); + + assert!(service + .update_user_password(&id, None, "newpass2") + .await + .is_err()); + } + + #[tokio::test] + async fn test_sso_user_forbid_update_name() { + let service = test_authentication_service().await; + let id = service + .db + .create_user("[email protected]".into(), None, true, None) + .await + .unwrap(); + + assert!(service + .update_user_name(&id.as_id(), "newname".into()) + .await + .is_err()); + } + + #[tokio::test] + async fn test_sso_user_forbid_generate_password_reset_url() { + let service = test_authentication_service().await; + let id = service + .db + .create_user("[email protected]".into(), None, true, None) + .await + .unwrap(); + + assert!(service + .generate_reset_password_url(&id.as_id()) + .await + .is_err()); + } + + #[tokio::test] + async fn test_sso_user_forbid_request_password_reset_email() { + let service = test_authentication_service().await; + let id = service + .db + .create_user("[email protected]".into(), None, true, None) + .await + .unwrap(); + + assert!(service + .request_password_reset_email("[email protected]".into()) + .await + .is_err()); + } + #[tokio::test] async fn test_cannot_reset_same_password() { let (service, _mail) = test_authentication_service_with_mail().await; diff --git a/ee/tabby-webserver/src/service/mod.rs b/ee/tabby-webserver/src/service/mod.rs index 7e7cc2731e03..f7de37bfc73e 100644 --- a/ee/tabby-webserver/src/service/mod.rs +++ b/ee/tabby-webserver/src/service/mod.rs @@ -463,6 +463,11 @@ impl UserSecuredExt for tabby_schema::auth::UserSecured { created_at: val.created_at, active: val.active, is_password_set: val.password_encrypted.is_some(), + + // when a user created by registration, password_encrypted is set + // when a user created by SSO, password_encrypted is not set + // so, we can determine if a user is SSO user by checking if password_encrypted is set + is_sso_user: val.password_encrypted.is_none(), } } }
sqlc
https://github.com/sqlc-dev/sqlc
b9c3af439a03ee48a2313fbbc12b40d7c0198421
dependabot[bot]
2023-07-25 20:50:46
build(deps): bump sphinxcontrib-htmlhelp from 2.0.0 to 2.0.1 in /docs (#2518)
Bumps [sphinxcontrib-htmlhelp](https://github.com/sphinx-doc/sphinxcontrib-htmlhelp) from 2.0.0 to 2.0.1. - [Changelog](https://github.com/sphinx-doc/sphinxcontrib-htmlhelp/blob/master/CHANGES) - [Commits](https://github.com/sphinx-doc/sphinxcontrib-htmlhelp/compare/2.0.0...2.0.1) ---
build(deps): bump sphinxcontrib-htmlhelp from 2.0.0 to 2.0.1 in /docs (#2518) Bumps [sphinxcontrib-htmlhelp](https://github.com/sphinx-doc/sphinxcontrib-htmlhelp) from 2.0.0 to 2.0.1. - [Changelog](https://github.com/sphinx-doc/sphinxcontrib-htmlhelp/blob/master/CHANGES) - [Commits](https://github.com/sphinx-doc/sphinxcontrib-htmlhelp/compare/2.0.0...2.0.1) --- updated-dependencies: - dependency-name: sphinxcontrib-htmlhelp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
diff --git a/docs/requirements.txt b/docs/requirements.txt index ef645a22bb..16ec60a678 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -21,7 +21,7 @@ sphinx-rtd-theme==1.2.2 sphinxcontrib-applehelp==1.0.2 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-serializinghtml==1.1.5 -sphinxcontrib-htmlhelp==2.0.0 +sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 urllib3==2.0.4
amplication
https://github.com/amplication/amplication
8deb711e5a8664d7208314111d877259b78bb7e1
Daniele Iasella
2022-12-08 18:40:42
chore(ci): fix ci auto-deploy on next environment (#4589)
* chore(ci): fix and improve visibility of ci cd pipeline * fix: workflow input usage - https://github.blog/changelog/2022-06-10-github-actions-inputs-unified-across-manual-and-reusable-workflows
chore(ci): fix ci auto-deploy on next environment (#4589) * chore(ci): fix and improve visibility of ci cd pipeline * fix: workflow input usage - https://github.blog/changelog/2022-06-10-github-actions-inputs-unified-across-manual-and-reusable-workflows
diff --git a/.github/workflows/ci-nx.yml b/.github/workflows/ci-nx.yml index 980131e3bf..2debdfecce 100644 --- a/.github/workflows/ci-nx.yml +++ b/.github/workflows/ci-nx.yml @@ -160,3 +160,12 @@ jobs: # https://www.npmjs.com/package/@nx-tools/nx-docker INPUT_TAGS: ${{ steps.meta.outputs.tags }} INPUT_PUSH: true + + deploy: + if: ${{ github.head_ref == 'next' }} + needs: dockerize + uses: ./.github/workflows/deploy.yml + with: + target-env: ${{ github.head_ref }} + confirm-env: ${{ github.head_ref }} + diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4703231c91..b93c47300a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,23 +23,22 @@ on: description: Confirm the environment to deploy required: true default: staging - workflow_run: - workflows: ["Continuous Integration (Nx - Affected)"] - branches: ["next"] - types: - - "completed" + + workflow_call: inputs: - target-env: + target-env: type: string + required: true default: next confirm-env: type: string + required: true default: next jobs: validate-image: runs-on: ubuntu-20.04 - if: github.event.inputs.target-env == github.event.inputs.confirm-env + if: inputs.target-env == inputs.confirm-env outputs: valid_image: ${{ steps.check-image.outputs.image_exist }} steps: @@ -76,7 +75,7 @@ jobs: echo "::set-output name=ARGOCD::AWS_STAGING_ARGOCD" fi env: - TARGET_ENV: ${{ github.event.inputs.target-env }} + TARGET_ENV: ${{ inputs.target-env }} deploy: runs-on: ubuntu-20.04 needs: @@ -99,13 +98,13 @@ jobs: run: | echo "BRANCH_NAME=$(echo $GITHUB_REF_NAME | sed "s/[^a-zA-Z0-9]/-/g")" >> $GITHUB_ENV env: - SOURCE_BRANCH_NAME: ${{ github.event.inputs.source-branch }} + SOURCE_BRANCH_NAME: ${{ inputs.source-branch }} - name: calculate docker tags id: calculate-docker-tags run: | bash ./.github/workflows/scripts/build-values-command.sh env: - TARGET_ENV: ${{ github.event.inputs.target-env }} + TARGET_ENV: ${{ inputs.target-env }} - name: set namespace id: set-namespace run: | @@ -113,7 +112,7 @@ jobs: echo "Will deploy to $NAMESPACE" echo "NAMESPACE=$NAMESPACE" >> $GITHUB_ENV env: - TARGET_ENV: ${{ github.event.inputs.target-env }} + TARGET_ENV: ${{ inputs.target-env }} - name: set cluster name id: set-cluster-name run: | @@ -124,7 +123,7 @@ jobs: echo "Will deploy to $CLUSTER_NAME eks cluster" echo "CLUSTER_NAME=$CLUSTER_NAME" >> $GITHUB_ENV env: - TARGET_ENV: ${{ github.event.inputs.target-env }} + TARGET_ENV: ${{ inputs.target-env }} - name: set repo url id: set-repo-url run: | @@ -162,7 +161,7 @@ jobs: ls kubectl apply -f . -n $TARGET_ENV env: - TARGET_ENV: ${{ github.event.inputs.target-env }} + TARGET_ENV: ${{ inputs.target-env }} SECRETS_FILE_PATH: helm/charts/amplication/values-secrets-raw.json SECRETS_TEMPLATE_FILE_PATH: .github/workflows/scripts/secret_template.yaml - name: delete unused job @@ -176,7 +175,7 @@ jobs: run: | helm upgrade -i dsg-runner-infra . --namespace $TARGET_ENV-dsg --create-namespace -f values/$TARGET_ENV.yaml env: - TARGET_ENV: ${{ github.event.inputs.target-env }} + TARGET_ENV: ${{ inputs.target-env }} - name: deploy app id: deploy-app run: | @@ -209,4 +208,4 @@ jobs: env: ARGO_CD_PASSWORD: ${{ secrets[env.ARGOCD] }} - TARGET_ENV: ${{ github.event.inputs.target-env }} + TARGET_ENV: ${{ inputs.target-env }}
angular
https://github.com/angular/angular
3ab923328c3301be57684c3d7d84f42083ea5ad5
Andrew Scott
2023-09-26 23:29:20
refactor(router): Remove code duplication in matching logic (#51731)
This commit re-uses the match function rather than duplicating the matching and error handling PR Close #51731
refactor(router): Remove code duplication in matching logic (#51731) This commit re-uses the match function rather than duplicating the matching and error handling PR Close #51731
diff --git a/packages/router/src/recognize.ts b/packages/router/src/recognize.ts index f12f7998843a0f..d974691df6dac8 100644 --- a/packages/router/src/recognize.ts +++ b/packages/router/src/recognize.ts @@ -64,49 +64,38 @@ export class Recognizer { recognize(): Observable<{state: RouterStateSnapshot, tree: UrlTree}> { const rootSegmentGroup = split(this.urlTree.root, [], [], this.config).segmentGroup; - return this.processSegmentGroup(this.injector, this.config, rootSegmentGroup, PRIMARY_OUTLET) - .pipe( - catchError((e: any) => { - if (e instanceof AbsoluteRedirect) { - // After an absolute redirect we do not apply any more redirects! - // If this implementation changes, update the documentation note in `redirectTo`. - this.allowRedirects = false; - this.urlTree = e.urlTree; - return this.match(e.urlTree); - } - - if (e instanceof NoMatch) { - throw this.noMatchError(e); - } - - throw e; - }), - map(children => { - // Use Object.freeze to prevent readers of the Router state from modifying it outside - // of a navigation, resulting in the router being out of sync with the browser. - const root = new ActivatedRouteSnapshot( - [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}), - this.urlTree.fragment, {}, PRIMARY_OUTLET, this.rootComponentType, null, {}); - - const rootNode = new TreeNode(root, children); - const routeState = new RouterStateSnapshot('', rootNode); - const tree = createUrlTreeFromSnapshot( - root, [], this.urlTree.queryParams, this.urlTree.fragment); - // https://github.com/angular/angular/issues/47307 - // Creating the tree stringifies the query params - // We don't want to do this here so reassign them to the original. - tree.queryParams = this.urlTree.queryParams; - routeState.url = this.urlSerializer.serialize(tree); - this.inheritParamsAndData(routeState._root); - return {state: routeState, tree}; - })); + return this.match(rootSegmentGroup).pipe(map(children => { + // Use Object.freeze to prevent readers of the Router state from modifying it outside + // of a navigation, resulting in the router being out of sync with the browser. + const root = new ActivatedRouteSnapshot( + [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}), + this.urlTree.fragment, {}, PRIMARY_OUTLET, this.rootComponentType, null, {}); + + const rootNode = new TreeNode(root, children); + const routeState = new RouterStateSnapshot('', rootNode); + const tree = + createUrlTreeFromSnapshot(root, [], this.urlTree.queryParams, this.urlTree.fragment); + // https://github.com/angular/angular/issues/47307 + // Creating the tree stringifies the query params + // We don't want to do this here so reassign them to the original. + tree.queryParams = this.urlTree.queryParams; + routeState.url = this.urlSerializer.serialize(tree); + this.inheritParamsAndData(routeState._root); + return {state: routeState, tree}; + })); } - private match(tree: UrlTree) { - const expanded$ = - this.processSegmentGroup(this.injector, this.config, tree.root, PRIMARY_OUTLET); + private match(root: UrlSegmentGroup): Observable<TreeNode<ActivatedRouteSnapshot>[]> { + const expanded$ = this.processSegmentGroup(this.injector, this.config, root, PRIMARY_OUTLET); return expanded$.pipe(catchError((e: any) => { + if (e instanceof AbsoluteRedirect) { + // After an absolute redirect we do not apply any more redirects! + // If this implementation changes, update the documentation note in `redirectTo`. + this.allowRedirects = false; + this.urlTree = e.urlTree; + return this.match(e.urlTree.root); + } if (e instanceof NoMatch) { throw this.noMatchError(e); }
components
https://github.com/angular/components
8872c1642c2f5c7b94f1794ceb457e2bb85f532e
Kristiyan Kostadinov
2023-06-14 18:02:24
refactor(material/autocomplete): switch to tokens API (#27288)
Reworks the autocomplete to use the new tokens API.
refactor(material/autocomplete): switch to tokens API (#27288) Reworks the autocomplete to use the new tokens API.
diff --git a/src/material/autocomplete/BUILD.bazel b/src/material/autocomplete/BUILD.bazel index 6c6607f3c27a..7af110535912 100644 --- a/src/material/autocomplete/BUILD.bazel +++ b/src/material/autocomplete/BUILD.bazel @@ -38,6 +38,7 @@ sass_binary( deps = [ "//:mdc_sass_lib", "//src/cdk:sass_lib", + "//src/material/core:core_scss_lib", ], ) diff --git a/src/material/autocomplete/_autocomplete-theme.scss b/src/material/autocomplete/_autocomplete-theme.scss index a66cdaa2af4e..a10049668498 100644 --- a/src/material/autocomplete/_autocomplete-theme.scss +++ b/src/material/autocomplete/_autocomplete-theme.scss @@ -1,31 +1,20 @@ -@use '@material/menu-surface/mixins' as mdc-menu-surface; -@use '@material/list/evolution-mixins' as mdc-list; @use '../core/theming/theming'; @use '../core/typography/typography'; -@use '../core/mdc-helpers/mdc-helpers'; +@use '../core/style/sass-utils'; +@use '../core/tokens/token-utils'; +@use '../core/tokens/m2/mat/autocomplete' as tokens-mat-autocomplete; @mixin color($config-or-theme) { $config: theming.get-color-config($config-or-theme); - @include mdc-helpers.using-mdc-theme($config) { - @include mdc-menu-surface.core-styles(mdc-helpers.$mdc-theme-styles-query); - @include mdc-list.without-ripple(mdc-helpers.$mdc-theme-styles-query); - } -} - -@mixin typography($config-or-theme) { - $config: typography.private-typography-to-2018-config( - theming.get-typography-config($config-or-theme)); - @include mdc-helpers.using-mdc-typography($config) { - @include mdc-menu-surface.core-styles(mdc-helpers.$mdc-typography-styles-query); - .mat-mdc-autocomplete-panel { - // Note that we include this private mixin, because the public one adds - // a bunch of styles that we aren't using for the autocomplete panel. - @include mdc-list.list-base(mdc-helpers.$mdc-typography-styles-query); - } + @include sass-utils.current-selector-or-root() { + @include token-utils.create-token-values(tokens-mat-autocomplete.$prefix, + tokens-mat-autocomplete.get-color-tokens($config)); } } +@mixin typography($config-or-theme) {} + @mixin density($config-or-theme) {} @mixin theme($theme-or-color-config) { diff --git a/src/material/autocomplete/autocomplete.scss b/src/material/autocomplete/autocomplete.scss index 70978e4944dc..44f4e297ad4c 100644 --- a/src/material/autocomplete/autocomplete.scss +++ b/src/material/autocomplete/autocomplete.scss @@ -1,21 +1,30 @@ @use '@angular/cdk'; -@use '@material/menu-surface/mixins' as mdc-menu-surface; -@use '@material/list/evolution-mixins' as mdc-list; - -@include mdc-menu-surface.core-styles($query: structure); - -// Note that the `.mdc-menu-surface` is here in order to bump up the specificity -// and avoid interference with `mat-menu` which uses the same mixins from MDC. -.mdc-menu-surface.mat-mdc-autocomplete-panel { +@use '../core/style/elevation'; +@use '../core/tokens/token-utils'; +@use '../core/tokens/m2/mat/autocomplete' as tokens-mat-autocomplete; + +// Even though we don't use the MDC styles, we need to keep the classes in the +// DOM for the Gmat versions to work. We need to bump up the specificity here +// so that it's higher than MDC's styles. +div.mat-mdc-autocomplete-panel { + @include elevation.elevation(8); width: 100%; // Ensures that the panel matches the overlay width. max-height: 256px; // Prevents lists with a lot of option from growing too high. - position: static; // MDC uses `absolute` by default which will throw off our positioning. visibility: hidden; - // MDC sets the transform-origin programmatically based on whether the dropdown is above or - // below the input. We use our own positioning logic, so we need to set this ourselves. transform-origin: center top; + overflow: auto; + padding: 8px 0; + border-radius: 4px; + box-sizing: border-box; + + // Workaround in case other MDC menu surface styles bleed in. + position: static; + + @include token-utils.use-tokens( + tokens-mat-autocomplete.$prefix, tokens-mat-autocomplete.get-token-slots()) { + @include token-utils.create-token-slot(background-color, background-color); + } - @include mdc-list.list-base($query: structure); @include cdk.high-contrast(active, off) { outline: solid 1px; } @@ -28,8 +37,6 @@ .mat-mdc-autocomplete-panel-above & { border-bottom-left-radius: 0; border-bottom-right-radius: 0; - // MDC sets the transform-origin programmatically based on whether the dropdown is above or - // below the input. We use our own positioning logic, so we need to set this ourselves. transform-origin: center bottom; } diff --git a/src/material/core/tokens/m2/mat/_autocomplete.scss b/src/material/core/tokens/m2/mat/_autocomplete.scss new file mode 100644 index 000000000000..13747f52a87f --- /dev/null +++ b/src/material/core/tokens/m2/mat/_autocomplete.scss @@ -0,0 +1,43 @@ +@use 'sass:map'; +@use '../../token-utils'; +@use '../../../theming/theming'; +@use '../../../style/sass-utils'; + +// The prefix used to generate the fully qualified name for tokens in this file. +$prefix: (mat, autocomplete); + +// Tokens that can't be configured through Angular Material's current theming API, +// but may be in a future version of the theming API. +@function get-unthemable-tokens() { + @return (); +} + +// Tokens that can be configured through Angular Material's color theming API. +@function get-color-tokens($config) { + $background: map.get($config, background); + + @return ( + background-color: theming.get-color-from-palette($background, card) + ); +} + +// Tokens that can be configured through Angular Material's typography theming API. +@function get-typography-tokens($config) { + @return (); +} + +// Tokens that can be configured through Angular Material's density theming API. +@function get-density-tokens($config) { + @return (); +} + +// Combines the tokens generated by the above functions into a single map with placeholder values. +// This is used to create token slots. +@function get-token-slots() { + @return sass-utils.deep-merge-all( + get-unthemable-tokens(), + get-color-tokens(token-utils.$placeholder-color-config), + get-typography-tokens(token-utils.$placeholder-typography-config), + get-density-tokens(token-utils.$placeholder-density-config) + ); +}
influxdb
https://github.com/influxdata/influxdb
231e0f48ab82e0705cc97db3a2c4e445643f8c55
Marco Neumann
2023-05-03 18:16:51
test: add test for InfluxQL md queries w/ `FROM ""` (#7728)
See https://github.com/influxdata/idpe/issues/17559 .
test: add test for InfluxQL md queries w/ `FROM ""` (#7728) See https://github.com/influxdata/idpe/issues/17559 . Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
diff --git a/influxdb_iox/tests/query_tests2/cases/in/influxql_metadata.influxql b/influxdb_iox/tests/query_tests2/cases/in/influxql_metadata.influxql index c8a44f80330..0cdf0f0048e 100644 --- a/influxdb_iox/tests/query_tests2/cases/in/influxql_metadata.influxql +++ b/influxdb_iox/tests/query_tests2/cases/in/influxql_metadata.influxql @@ -36,6 +36,7 @@ SHOW FIELD KEYS FROM cpu,disk,cpu; SHOW FIELD KEYS FROM /m.*/; SHOW FIELD KEYS FROM /d\isk/; SHOW FIELD KEYS FROM does_not_exist; +SHOW FIELD KEYS FROM ""; -- unimplemented features in `SHOW FIELD KEYS` SHOW FIELD KEYS ON my_db; @@ -59,6 +60,7 @@ SHOW TAG VALUES FROM m1,m0,m1 WITH KEY = "tag0"; SHOW TAG VALUES FROM /m.*/ WITH KEY = "tag0"; SHOW TAG VALUES FROM /d\isk/ WITH KEY = "device"; SHOW TAG VALUES FROM does_not_exist WITH KEY = "tag0"; +SHOW TAG VALUES FROM "" WITH KEY = "tag0"; SHOW TAG VALUES WITH KEY = "tt_tag"; SHOW TAG VALUES WITH KEY = "tt_tag" WHERE time >= '1990-01-01T00:00:00Z'; SHOW TAG VALUES WITH KEY = "tt_tag" WHERE time >= '2022-10-31T02:00:00Z'; @@ -83,6 +85,7 @@ SHOW TAG KEYS FROM cpu,disk,cpu; SHOW TAG KEYS FROM /m.*/; SHOW TAG KEYS FROM /d\isk/; SHOW TAG KEYS FROM does_not_exist; +SHOW TAG KEYS FROM ""; SHOW TAG KEYS FROM time_test WHERE time >= '1990-01-01T00:00:00Z'; SHOW TAG KEYS FROM time_test WHERE time >= '2022-10-31T02:00:00Z'; SHOW TAG KEYS FROM time_test WHERE time >= '1970-01-01T01:00:00Z'; diff --git a/influxdb_iox/tests/query_tests2/cases/in/influxql_metadata.influxql.expected b/influxdb_iox/tests/query_tests2/cases/in/influxql_metadata.influxql.expected index 1351c6e3ec3..015ee6c8292 100644 --- a/influxdb_iox/tests/query_tests2/cases/in/influxql_metadata.influxql.expected +++ b/influxdb_iox/tests/query_tests2/cases/in/influxql_metadata.influxql.expected @@ -408,6 +408,11 @@ name: disk | fieldKey | fieldType | +----------+-----------+ +----------+-----------+ +-- InfluxQL: SHOW FIELD KEYS FROM ""; ++----------+-----------+ +| fieldKey | fieldType | ++----------+-----------+ ++----------+-----------+ -- InfluxQL: SHOW FIELD KEYS ON my_db; Error while planning query: This feature is not implemented: SHOW FIELD KEYS ON <database> -- InfluxQL: SHOW FIELD KEYS FROM x.my_db; @@ -923,6 +928,11 @@ name: disk | key | value | +-----+-------+ +-----+-------+ +-- InfluxQL: SHOW TAG VALUES FROM "" WITH KEY = "tag0"; ++-----+-------+ +| key | value | ++-----+-------+ ++-----+-------+ -- InfluxQL: SHOW TAG VALUES WITH KEY = "tt_tag"; name: time_test +--------+-------------------+ @@ -1284,6 +1294,11 @@ name: disk | tagKey | +--------+ +--------+ +-- InfluxQL: SHOW TAG KEYS FROM ""; ++--------+ +| tagKey | ++--------+ ++--------+ -- InfluxQL: SHOW TAG KEYS FROM time_test WHERE time >= '1990-01-01T00:00:00Z'; name: time_test +--------------------------+
cilium
https://github.com/cilium/cilium
9606ff5a7552cbb8c4160ef3ff19111e05930b8f
Tam Mach
2020-08-04 21:05:53
docs(e2e): Update kube version in e2e docs
This PR is to update the default version to 1.19 if K8S_VERSION in not passed, as well as to remove old versions that cilium is no longer supported.
docs(e2e): Update kube version in e2e docs This PR is to update the default version to 1.19 if K8S_VERSION in not passed, as well as to remove old versions that cilium is no longer supported. Signed-off-by: Tam Mach <[email protected]>
diff --git a/Documentation/contributing/testing/e2e.rst b/Documentation/contributing/testing/e2e.rst index 06266794a06ea..587ca53f2221e 100644 --- a/Documentation/contributing/testing/e2e.rst +++ b/Documentation/contributing/testing/e2e.rst @@ -122,10 +122,6 @@ contain any characters after it. The Kubernetes tests support the following Kubernetes versions: -* 1.8 -* 1.9 -* 1.10 -* 1.11 * 1.12 * 1.13 * 1.14 @@ -135,7 +131,7 @@ The Kubernetes tests support the following Kubernetes versions: * 1.18 * 1.19 -By default, the Vagrant VMs are provisioned with Kubernetes 1.18. To run with any other +By default, the Vagrant VMs are provisioned with Kubernetes 1.19. To run with any other supported version of Kubernetes, run the test suite with the following format: ::
leetcode
https://github.com/doocs/leetcode
90f4977e717f65b8da60fe5723b8ea4f86231b08
yanglbme
2023-05-19 15:29:23
feat: add solutions to lc problem: No.1375
No.1375.Number of Times Binary String Is Prefix-Aligned
feat: add solutions to lc problem: No.1375 No.1375.Number of Times Binary String Is Prefix-Aligned
diff --git a/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/README.md b/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/README.md index 0cd0d7bf1341d..a951721a0a124 100644 --- a/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/README.md +++ b/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/README.md @@ -58,13 +58,11 @@ **方法一:直接遍历** -遍历数组 $flips$,记录最大值,将最大值与当前遍历到的下标 $i$ 比较,若相等,答案累加。 +我们可以遍历数组 $flips$,记录当前遍历过的元素的最大值 $mx$,若 $mx$ 等于当前遍历到的下标 $i$,则说明前 $i$ 个元素都被翻转过了,即前缀一致,答案累加。 -时间复杂度 $O(n)$。 +遍历结束后,返回答案即可。 -**方法二:树状数组** - -时间复杂度 $O(nlogn)$。 +时间复杂度 $O(n)$,其中 $n$ 为数组 $flips$ 的长度。空间复杂度 $O(1)$。 <!-- tabs:start --> @@ -76,46 +74,9 @@ class Solution: def numTimesAllBlue(self, flips: List[int]) -> int: ans = mx = 0 - for i, v in enumerate(flips, 1): - mx = max(mx, v) - if mx == i: - ans += 1 - return ans -``` - -```python -class BinaryIndexedTree: - def __init__(self, n): - self.n = n - self.c = [0] * (n + 1) - - @staticmethod - def lowbit(x): - return x & -x - - def update(self, x, delta): - while x <= self.n: - self.c[x] += delta - x += BinaryIndexedTree.lowbit(x) - - def query(self, x): - s = 0 - while x > 0: - s += self.c[x] - x -= BinaryIndexedTree.lowbit(x) - return s - - -class Solution: - def numTimesAllBlue(self, flips: List[int]) -> int: - n = len(flips) - tree = BinaryIndexedTree(n) - ans = mx = 0 - for v in flips: - mx = max(mx, v) - tree.update(v, 1) - if tree.query(mx) == mx: - ans += 1 + for i, x in enumerate(flips, 1): + mx = max(mx, x) + ans += mx == i return ans ``` @@ -126,8 +87,7 @@ class Solution: ```java class Solution { public int numTimesAllBlue(int[] flips) { - int ans = 0; - int mx = 0; + int ans = 0, mx = 0; for (int i = 1; i <= flips.length; ++i) { mx = Math.max(mx, flips[i - 1]); if (mx == i) { @@ -139,55 +99,6 @@ class Solution { } ``` -```java -class BinaryIndexedTree { - private int n; - private int[] c; - - public BinaryIndexedTree(int n) { - this.n = n; - this.c = new int[n + 1]; - } - - public static int lowbit(int x) { - return x & -x; - } - - public void update(int x, int delta) { - while (x <= n) { - c[x] += delta; - x += lowbit(x); - } - } - - public int query(int x) { - int s = 0; - while (x > 0) { - s += c[x]; - x -= lowbit(x); - } - return s; - } -} - -class Solution { - public int numTimesAllBlue(int[] flips) { - int n = flips.length; - BinaryIndexedTree tree = new BinaryIndexedTree(n); - int ans = 0; - int mx = 0; - for (int v : flips) { - mx = Math.max(mx, v); - tree.update(v, 1); - if (tree.query(mx) == mx) { - ++ans; - } - } - return ans; - } -} -``` - ### **C++** ```cpp @@ -204,119 +115,18 @@ public: }; ``` -```cpp -class BinaryIndexedTree { -public: - int n; - vector<int> c; - - BinaryIndexedTree(int _n): n(_n), c(_n + 1){} - - void update(int x, int delta) { - while (x <= n) - { - c[x] += delta; - x += lowbit(x); - } - } - - int query(int x) { - int s = 0; - while (x > 0) - { - s += c[x]; - x -= lowbit(x); - } - return s; - } - - int lowbit(int x) { - return x & -x; - } -}; - -class Solution { -public: - int numTimesAllBlue(vector<int>& flips) { - int n = flips.size(); - BinaryIndexedTree* tree = new BinaryIndexedTree(n); - int ans = 0, mx = 0; - for (int v : flips) - { - mx = max(mx, v); - tree->update(v, 1); - ans += tree->query(mx) == mx; - } - return ans; - } -}; -``` - ### **Go** ```go -func numTimesAllBlue(flips []int) int { - ans, mx := 0, 0 - for i := 1; i <= len(flips); i++ { - mx = max(mx, flips[i-1]) - if mx == i { - ans++ - } - } - return ans -} - -func max(a, b int) int { - if a > b { - return a - } - return b -} -``` - -```go -type BinaryIndexedTree struct { - n int - c []int -} - -func newBinaryIndexedTree(n int) *BinaryIndexedTree { - c := make([]int, n+1) - return &BinaryIndexedTree{n, c} -} - -func (this *BinaryIndexedTree) lowbit(x int) int { - return x & -x -} - -func (this *BinaryIndexedTree) update(x, delta int) { - for x <= this.n { - this.c[x] += delta - x += this.lowbit(x) - } -} - -func (this *BinaryIndexedTree) query(x int) int { - s := 0 - for x > 0 { - s += this.c[x] - x -= this.lowbit(x) - } - return s -} - -func numTimesAllBlue(flips []int) int { - n := len(flips) - tree := newBinaryIndexedTree(n) - ans, mx := 0, 0 - for _, v := range flips { - mx = max(mx, v) - tree.update(v, 1) - if tree.query(mx) == mx { +func numTimesAllBlue(flips []int) (ans int) { + mx := 0 + for i, x := range flips { + mx = max(mx, x) + if mx == i+1 { ans++ } } - return ans + return } func max(a, b int) int { @@ -329,10 +139,18 @@ func max(a, b int) int { ### **TypeScript** -<!-- 这里可写当前语言的特殊实现逻辑 --> - ```ts - +function numTimesAllBlue(flips: number[]): number { + let ans = 0; + let mx = 0; + for (let i = 1; i <= flips.length; ++i) { + mx = Math.max(mx, flips[i - 1]); + if (mx === i) { + ++ans; + } + } + return ans; +} ``` ### **...** diff --git a/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/README_EN.md b/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/README_EN.md index cfd2518f206e2..dc5298bead5ce 100644 --- a/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/README_EN.md +++ b/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/README_EN.md @@ -57,46 +57,9 @@ We can see that the string was prefix-aligned 1 time, so we return 1. class Solution: def numTimesAllBlue(self, flips: List[int]) -> int: ans = mx = 0 - for i, v in enumerate(flips, 1): - mx = max(mx, v) - if mx == i: - ans += 1 - return ans -``` - -```python -class BinaryIndexedTree: - def __init__(self, n): - self.n = n - self.c = [0] * (n + 1) - - @staticmethod - def lowbit(x): - return x & -x - - def update(self, x, delta): - while x <= self.n: - self.c[x] += delta - x += BinaryIndexedTree.lowbit(x) - - def query(self, x): - s = 0 - while x > 0: - s += self.c[x] - x -= BinaryIndexedTree.lowbit(x) - return s - - -class Solution: - def numTimesAllBlue(self, flips: List[int]) -> int: - n = len(flips) - tree = BinaryIndexedTree(n) - ans = mx = 0 - for v in flips: - mx = max(mx, v) - tree.update(v, 1) - if tree.query(mx) == mx: - ans += 1 + for i, x in enumerate(flips, 1): + mx = max(mx, x) + ans += mx == i return ans ``` @@ -105,8 +68,7 @@ class Solution: ```java class Solution { public int numTimesAllBlue(int[] flips) { - int ans = 0; - int mx = 0; + int ans = 0, mx = 0; for (int i = 1; i <= flips.length; ++i) { mx = Math.max(mx, flips[i - 1]); if (mx == i) { @@ -118,55 +80,6 @@ class Solution { } ``` -```java -class BinaryIndexedTree { - private int n; - private int[] c; - - public BinaryIndexedTree(int n) { - this.n = n; - this.c = new int[n + 1]; - } - - public static int lowbit(int x) { - return x & -x; - } - - public void update(int x, int delta) { - while (x <= n) { - c[x] += delta; - x += lowbit(x); - } - } - - public int query(int x) { - int s = 0; - while (x > 0) { - s += c[x]; - x -= lowbit(x); - } - return s; - } -} - -class Solution { - public int numTimesAllBlue(int[] flips) { - int n = flips.length; - BinaryIndexedTree tree = new BinaryIndexedTree(n); - int ans = 0; - int mx = 0; - for (int v : flips) { - mx = Math.max(mx, v); - tree.update(v, 1); - if (tree.query(mx) == mx) { - ++ans; - } - } - return ans; - } -} -``` - ### **C++** ```cpp @@ -183,119 +96,18 @@ public: }; ``` -```cpp -class BinaryIndexedTree { -public: - int n; - vector<int> c; - - BinaryIndexedTree(int _n): n(_n), c(_n + 1){} - - void update(int x, int delta) { - while (x <= n) - { - c[x] += delta; - x += lowbit(x); - } - } - - int query(int x) { - int s = 0; - while (x > 0) - { - s += c[x]; - x -= lowbit(x); - } - return s; - } - - int lowbit(int x) { - return x & -x; - } -}; - -class Solution { -public: - int numTimesAllBlue(vector<int>& flips) { - int n = flips.size(); - BinaryIndexedTree* tree = new BinaryIndexedTree(n); - int ans = 0, mx = 0; - for (int v : flips) - { - mx = max(mx, v); - tree->update(v, 1); - ans += tree->query(mx) == mx; - } - return ans; - } -}; -``` - ### **Go** ```go -func numTimesAllBlue(flips []int) int { - ans, mx := 0, 0 - for i := 1; i <= len(flips); i++ { - mx = max(mx, flips[i-1]) - if mx == i { - ans++ - } - } - return ans -} - -func max(a, b int) int { - if a > b { - return a - } - return b -} -``` - -```go -type BinaryIndexedTree struct { - n int - c []int -} - -func newBinaryIndexedTree(n int) *BinaryIndexedTree { - c := make([]int, n+1) - return &BinaryIndexedTree{n, c} -} - -func (this *BinaryIndexedTree) lowbit(x int) int { - return x & -x -} - -func (this *BinaryIndexedTree) update(x, delta int) { - for x <= this.n { - this.c[x] += delta - x += this.lowbit(x) - } -} - -func (this *BinaryIndexedTree) query(x int) int { - s := 0 - for x > 0 { - s += this.c[x] - x -= this.lowbit(x) - } - return s -} - -func numTimesAllBlue(flips []int) int { - n := len(flips) - tree := newBinaryIndexedTree(n) - ans, mx := 0, 0 - for _, v := range flips { - mx = max(mx, v) - tree.update(v, 1) - if tree.query(mx) == mx { +func numTimesAllBlue(flips []int) (ans int) { + mx := 0 + for i, x := range flips { + mx = max(mx, x) + if mx == i+1 { ans++ } } - return ans + return } func max(a, b int) int { @@ -309,7 +121,17 @@ func max(a, b int) int { ### **TypeScript** ```ts - +function numTimesAllBlue(flips: number[]): number { + let ans = 0; + let mx = 0; + for (let i = 1; i <= flips.length; ++i) { + mx = Math.max(mx, flips[i - 1]); + if (mx === i) { + ++ans; + } + } + return ans; +} ``` ### **...** diff --git a/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/Solution.go b/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/Solution.go index 37c98573b3af3..23c60efd811eb 100644 --- a/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/Solution.go +++ b/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/Solution.go @@ -1,12 +1,12 @@ -func numTimesAllBlue(flips []int) int { - ans, mx := 0, 0 - for i := 1; i <= len(flips); i++ { - mx = max(mx, flips[i-1]) - if mx == i { +func numTimesAllBlue(flips []int) (ans int) { + mx := 0 + for i, x := range flips { + mx = max(mx, x) + if mx == i+1 { ans++ } } - return ans + return } func max(a, b int) int { diff --git a/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/Solution.java b/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/Solution.java index ab754ef7a3dfc..19934ade8d7f2 100644 --- a/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/Solution.java +++ b/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/Solution.java @@ -1,7 +1,6 @@ class Solution { public int numTimesAllBlue(int[] flips) { - int ans = 0; - int mx = 0; + int ans = 0, mx = 0; for (int i = 1; i <= flips.length; ++i) { mx = Math.max(mx, flips[i - 1]); if (mx == i) { diff --git a/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/Solution.py b/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/Solution.py index f90c07fa3c10d..102193fadd339 100644 --- a/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/Solution.py +++ b/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/Solution.py @@ -1,8 +1,7 @@ class Solution: def numTimesAllBlue(self, flips: List[int]) -> int: ans = mx = 0 - for i, v in enumerate(flips, 1): - mx = max(mx, v) - if mx == i: - ans += 1 + for i, x in enumerate(flips, 1): + mx = max(mx, x) + ans += mx == i return ans diff --git a/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/Solution.ts b/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/Solution.ts new file mode 100644 index 0000000000000..c135a7647712d --- /dev/null +++ b/solution/1300-1399/1375.Number of Times Binary String Is Prefix-Aligned/Solution.ts @@ -0,0 +1,11 @@ +function numTimesAllBlue(flips: number[]): number { + let ans = 0; + let mx = 0; + for (let i = 1; i <= flips.length; ++i) { + mx = Math.max(mx, flips[i - 1]); + if (mx === i) { + ++ans; + } + } + return ans; +}
aws-cdk
https://github.com/aws/aws-cdk
b3145fa0c97174d502fdea66b587e8dd9f234f02
dependabot-preview[bot]
2020-03-07 08:52:15
chore(deps-dev): bump @types/jest from 25.1.3 to 25.1.4 (#6614)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.1.3 to 25.1.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)
chore(deps-dev): bump @types/jest from 25.1.3 to 25.1.4 (#6614) Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.1.3 to 25.1.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
diff --git a/packages/@aws-cdk/assert/package.json b/packages/@aws-cdk/assert/package.json index 5631aa386ec2d..b36243c58f53a 100644 --- a/packages/@aws-cdk/assert/package.json +++ b/packages/@aws-cdk/assert/package.json @@ -29,7 +29,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^25.1.2", + "@types/jest": "^25.1.4", "cdk-build-tools": "0.0.0", "jest": "^24.9.0", "pkglint": "0.0.0", diff --git a/packages/@aws-cdk/aws-sam/package.json b/packages/@aws-cdk/aws-sam/package.json index 50e79ec1f9982..197d98acb19f4 100644 --- a/packages/@aws-cdk/aws-sam/package.json +++ b/packages/@aws-cdk/aws-sam/package.json @@ -64,7 +64,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/jest": "^25.1.2", + "@types/jest": "^25.1.4", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", "jest": "^24.9.0", diff --git a/packages/@aws-cdk/cdk-assets-schema/package.json b/packages/@aws-cdk/cdk-assets-schema/package.json index 289b65d20ec40..95c7811dc2ac6 100644 --- a/packages/@aws-cdk/cdk-assets-schema/package.json +++ b/packages/@aws-cdk/cdk-assets-schema/package.json @@ -66,7 +66,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^25.1.2", + "@types/jest": "^25.1.4", "cdk-build-tools": "0.0.0", "jest": "^24.9.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index dcc45fbfbb4ee..71b4dd40fd174 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -38,7 +38,7 @@ "table": "^5.4.6" }, "devDependencies": { - "@types/jest": "^25.1.2", + "@types/jest": "^25.1.4", "@types/string-width": "^4.0.1", "@types/table": "^4.0.7", "cdk-build-tools": "0.0.0", diff --git a/packages/@aws-cdk/cx-api/package.json b/packages/@aws-cdk/cx-api/package.json index 5d337f674bd0e..20c4de5d1d208 100644 --- a/packages/@aws-cdk/cx-api/package.json +++ b/packages/@aws-cdk/cx-api/package.json @@ -66,7 +66,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^25.1.2", + "@types/jest": "^25.1.4", "@types/mock-fs": "^4.10.0", "@types/semver": "^7.1.0", "cdk-build-tools": "0.0.0", diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index 7b6cab93a0c1b..0ac59369e38fc 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -40,7 +40,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^25.1.2", + "@types/jest": "^25.1.4", "cdk-build-tools": "0.0.0", "jest": "^24.9.0", "pkglint": "0.0.0", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 8cf79ed4ac0af..126e02338604c 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -44,7 +44,7 @@ "@types/archiver": "^3.1.0", "@types/fs-extra": "^8.1.0", "@types/glob": "^7.1.1", - "@types/jest": "^25.1.2", + "@types/jest": "^25.1.4", "@types/jszip": "^3.1.7", "@types/minimatch": "^3.0.3", "@types/mockery": "^1.4.29", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 783d669defae9..db1d7539c59fd 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -30,7 +30,7 @@ "devDependencies": { "@types/archiver": "^3.1.0", "@types/glob": "^7.1.1", - "@types/jest": "^24.0.25", + "@types/jest": "^25.1.4", "@types/mock-fs": "^4.10.0", "@types/node": "^10.17.17", "@types/yargs": "^15.0.4", diff --git a/packages/cdk-dasm/package.json b/packages/cdk-dasm/package.json index 397e45109048e..7716fb047069a 100644 --- a/packages/cdk-dasm/package.json +++ b/packages/cdk-dasm/package.json @@ -30,7 +30,7 @@ "yaml": "1.7.2" }, "devDependencies": { - "@types/jest": "^25.1.2", + "@types/jest": "^25.1.4", "@types/yaml": "1.2.0", "jest": "^24.9.0" }, diff --git a/packages/decdk/package.json b/packages/decdk/package.json index 310ed6c10618e..10a4614c56454 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -171,7 +171,7 @@ }, "devDependencies": { "@types/fs-extra": "^8.1.0", - "@types/jest": "^25.1.2", + "@types/jest": "^25.1.4", "@types/yaml": "1.2.0", "@types/yargs": "^15.0.4", "jest": "^24.9.0", diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 5d5c6af7cd026..105dd2cbae077 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -32,7 +32,7 @@ "license": "Apache-2.0", "devDependencies": { "@types/fs-extra": "^8.1.0", - "@types/jest": "^25.1.2", + "@types/jest": "^25.1.4", "@types/yargs": "^15.0.4", "pkglint": "0.0.0" }, diff --git a/tools/cfn2ts/package.json b/tools/cfn2ts/package.json index 3b2c20a8863c7..2938bc63ed94d 100644 --- a/tools/cfn2ts/package.json +++ b/tools/cfn2ts/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@types/fs-extra": "^8.1.0", - "@types/jest": "^25.1.2", + "@types/jest": "^25.1.4", "@types/yargs": "^15.0.4", "cdk-build-tools": "0.0.0", "jest": "^24.9.0", diff --git a/yarn.lock b/yarn.lock index 86a450009c537..0f176ba343a16 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1992,17 +1992,10 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-report" "*" -"@types/jest@^24.0.25": - version "24.9.1" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-24.9.1.tgz#02baf9573c78f1b9974a5f36778b366aa77bd534" - integrity sha512-Fb38HkXSVA4L8fGKEZ6le5bB8r6MRWlOCZbVuWZcmOMSCd2wCYOwN1ibj8daIoV9naq7aaOZjrLCoCMptKU/4Q== - dependencies: - jest-diff "^24.3.0" - -"@types/jest@^25.1.2": - version "25.1.3" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-25.1.3.tgz#9b0b5addebccfb631175870be8ba62182f1bc35a" - integrity sha512-jqargqzyJWgWAJCXX96LBGR/Ei7wQcZBvRv0PLEu9ZByMfcs23keUJrKv9FMR6YZf9YCbfqDqgmY+JUBsnqhrg== +"@types/jest@^25.1.4": + version "25.1.4" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-25.1.4.tgz#9e9f1e59dda86d3fd56afce71d1ea1b331f6f760" + integrity sha512-QDDY2uNAhCV7TMCITrxz+MRk1EizcsevzfeS6LykIlq2V1E5oO4wXG8V2ZEd9w7Snxeeagk46YbMgZ8ESHx3sw== dependencies: jest-diff "^25.1.0" pretty-format "^25.1.0" @@ -6679,7 +6672,7 @@ jest-config@^24.9.0: pretty-format "^24.9.0" realpath-native "^1.1.0" -jest-diff@^24.3.0, jest-diff@^24.9.0: +jest-diff@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.9.0.tgz#931b7d0d5778a1baf7452cb816e325e3724055da" integrity sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==
ruffle
https://github.com/ruffle-rs/ruffle
f455037d34523c652618a436f6e5a56cddfe174f
dependabot[bot]
2024-06-24 18:42:48
build(deps): bump the npm-minor group in /web with 7 updates
Bumps the npm-minor group in /web with 7 updates: | Package | From | To | | --- | --- | --- | | [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) | `36.0.0` | `36.0.1` | | [typescript](https://github.com/Microsoft/TypeScript) | `5.4.5` | `5.5.2` | | [tsx](https://github.com/privatenumber/tsx) | `4.15.6` | `4.15.7` | | [chromedriver](https://github.com/giggio/node-chromedriver) | `126.0.2` | `126.0.3` | | [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) | `10.0.6` | `10.0.7` | | [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | `48.2.12` | `48.4.0` | | [typedoc](https://github.com/TypeStrong/TypeDoc) | `0.25.13` | `0.26.2` | Updates `stylelint-config-standard` from 36.0.0 to 36.0.1 - [Release notes](https://github.com/stylelint/stylelint-config-standard/releases) - [Changelog](https://github.com/stylelint/stylelint-config-standard/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint-config-standard/compare/36.0.0...36.0.1) Updates `typescript` from 5.4.5 to 5.5.2 - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.5...v5.5.2) Updates `tsx` from 4.15.6 to 4.15.7 - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.15.6...v4.15.7) Updates `chromedriver` from 126.0.2 to 126.0.3 - [Commits](https://github.com/giggio/node-chromedriver/compare/126.0.2...126.0.3) Updates `@types/mocha` from 10.0.6 to 10.0.7 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) Updates `eslint-plugin-jsdoc` from 48.2.12 to 48.4.0 - [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases) - [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc) - [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v48.2.12...v48.4.0) Updates `typedoc` from 0.25.13 to 0.26.2 - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.25.13...v0.26.2) ---
build(deps): bump the npm-minor group in /web with 7 updates Bumps the npm-minor group in /web with 7 updates: | Package | From | To | | --- | --- | --- | | [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) | `36.0.0` | `36.0.1` | | [typescript](https://github.com/Microsoft/TypeScript) | `5.4.5` | `5.5.2` | | [tsx](https://github.com/privatenumber/tsx) | `4.15.6` | `4.15.7` | | [chromedriver](https://github.com/giggio/node-chromedriver) | `126.0.2` | `126.0.3` | | [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) | `10.0.6` | `10.0.7` | | [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | `48.2.12` | `48.4.0` | | [typedoc](https://github.com/TypeStrong/TypeDoc) | `0.25.13` | `0.26.2` | Updates `stylelint-config-standard` from 36.0.0 to 36.0.1 - [Release notes](https://github.com/stylelint/stylelint-config-standard/releases) - [Changelog](https://github.com/stylelint/stylelint-config-standard/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint-config-standard/compare/36.0.0...36.0.1) Updates `typescript` from 5.4.5 to 5.5.2 - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.5...v5.5.2) Updates `tsx` from 4.15.6 to 4.15.7 - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.15.6...v4.15.7) Updates `chromedriver` from 126.0.2 to 126.0.3 - [Commits](https://github.com/giggio/node-chromedriver/compare/126.0.2...126.0.3) Updates `@types/mocha` from 10.0.6 to 10.0.7 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) Updates `eslint-plugin-jsdoc` from 48.2.12 to 48.4.0 - [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases) - [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc) - [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v48.2.12...v48.4.0) Updates `typedoc` from 0.25.13 to 0.26.2 - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.25.13...v0.26.2) --- updated-dependencies: - dependency-name: stylelint-config-standard dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-minor - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-minor - dependency-name: tsx dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-minor - dependency-name: chromedriver dependency-type: direct:production update-type: version-update:semver-patch dependency-group: npm-minor - dependency-name: "@types/mocha" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-minor - dependency-name: eslint-plugin-jsdoc dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-minor - dependency-name: typedoc dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-minor ... Signed-off-by: dependabot[bot] <[email protected]>
diff --git a/web/package-lock.json b/web/package-lock.json index eccd71966c284..15a75af69fd2f 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -29,17 +29,17 @@ "mocha": "^10.4.0", "prettier": "^3.3.2", "stylelint": "^16.6.1", - "stylelint-config-standard": "^36.0.0", + "stylelint-config-standard": "^36.0.1", "stylelint-prettier": "^5.0.0", "ts-loader": "^9.5.1", - "tsx": "^4.15.6", - "typescript": "^5.4.5", + "tsx": "^4.15.7", + "typescript": "^5.5.2", "wdio-chromedriver-service": "^8.1.1", "webpack": "^5.92.1", "webpack-cli": "^5.1.4" }, "optionalDependencies": { - "chromedriver": "^126.0.2" + "chromedriver": "^126.0.3" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -1645,6 +1645,12 @@ "win32" ] }, + "node_modules/@shikijs/core": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.9.0.tgz", + "integrity": "sha512-cbSoY8P/jgGByG8UOl3jnP/CWg/Qk+1q+eAKWtcrU3pNoILF8wTsLB0jT44qUBV8Ce1SvA9uqcM9Xf+u3fJFBw==", + "dev": true + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -1992,9 +1998,9 @@ "dev": true }, "node_modules/@types/mocha": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", - "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", + "version": "10.0.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.7.tgz", + "integrity": "sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw==", "dev": true }, "node_modules/@types/node": { @@ -3047,12 +3053,6 @@ "node": ">=8" } }, - "node_modules/ansi-sequence-parser": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", - "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", - "dev": true - }, "node_modules/ansi-styles": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", @@ -3826,9 +3826,9 @@ } }, "node_modules/chromedriver": { - "version": "126.0.2", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-126.0.2.tgz", - "integrity": "sha512-61R0w7C+uJVCykabdqWsvitne2rg3MTI8xOKJosk+YbKdyLeGHYiCCeU82ZsUY+v9qnN1p48THcthgKubxPRWQ==", + "version": "126.0.3", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-126.0.3.tgz", + "integrity": "sha512-4o+ZK8926/8lqIlnnvcljCHV88Z8IguEMB5PInOiS9/Lb6cyeZSj2Uvz+ky1Jgyw2Bn7qCLJFfbUslaWnvUUbg==", "hasInstallScript": true, "optional": true, "dependencies": { @@ -5288,9 +5288,9 @@ } }, "node_modules/es-module-lexer": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.0.tgz", - "integrity": "sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", "dev": true }, "node_modules/esbuild": { @@ -5447,9 +5447,9 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "48.2.12", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.12.tgz", - "integrity": "sha512-sO9sKkJx5ovWoRk9hV0YiNzXQ4Z6j27CqE/po2E3wddZVuy9wvKPSTiIhpxMTrP/qURvKayJIDB2+o9kyCW1Fw==", + "version": "48.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.4.0.tgz", + "integrity": "sha512-xBUxuAx03cKoEA7y+MYSUdwyN8AJyZHbAJ257sOFXgVgCScm574S4zEYJpBoARwaCu4chhCbvA+gdm+00whlxA==", "dev": true, "dependencies": { "@es-joy/jsdoccomment": "~0.43.1", @@ -5458,8 +5458,10 @@ "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", "esquery": "^1.5.0", + "parse-imports": "^2.1.0", "semver": "^7.6.2", - "spdx-expression-parse": "^4.0.0" + "spdx-expression-parse": "^4.0.0", + "synckit": "^0.9.0" }, "engines": { "node": ">=18" @@ -5478,6 +5480,22 @@ "spdx-license-ids": "^3.0.0" } }, + "node_modules/eslint-plugin-jsdoc/node_modules/synckit": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.0.tgz", + "integrity": "sha512-7RnqIMq572L8PeEzKeBINYEJDDxpcH8JEgLwUqBd3TkofhFRbkq4QLR0u+36avGAhCRbk2nnmjcW9SE531hPDg==", + "dev": true, + "dependencies": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/eslint-plugin-prettier": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", @@ -8035,12 +8053,6 @@ "node": ">=6" } }, - "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true - }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -8257,6 +8269,15 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, + "node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "dev": true, + "dependencies": { + "uc.micro": "^2.0.0" + } + }, "node_modules/listenercount": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", @@ -8573,16 +8594,21 @@ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, - "node_modules/marked": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", - "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "node_modules/markdown-it": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", "dev": true, - "bin": { - "marked": "bin/marked.js" + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" }, - "engines": { - "node": ">= 12" + "bin": { + "markdown-it": "bin/markdown-it.mjs" } }, "node_modules/mathml-tag-names": { @@ -8601,6 +8627,12 @@ "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", "dev": true }, + "node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "dev": true + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -9540,6 +9572,19 @@ "node": ">=6" } }, + "node_modules/parse-imports": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/parse-imports/-/parse-imports-2.1.0.tgz", + "integrity": "sha512-JQWgmK2o4w8leUkZeZPatWdAny6vXGU/3siIUvMF6J2rDCud9aTt8h/px9oZJ6U3EcfhngBJ635uPFI0q0VAeA==", + "dev": true, + "dependencies": { + "es-module-lexer": "^1.5.3", + "slashes": "^3.0.12" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/parse-json": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-7.1.0.tgz", @@ -10020,6 +10065,15 @@ "node": ">=6" } }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/puppeteer-core": { "version": "20.9.0", "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-20.9.0.tgz", @@ -11250,15 +11304,12 @@ } }, "node_modules/shiki": { - "version": "0.14.7", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", - "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.9.0.tgz", + "integrity": "sha512-i6//Lqgn7+7nZA0qVjoYH0085YdNk4MC+tJV4bo+HgjgRMJ0JmkLZzFAuvVioJqLkcGDK5GAMpghZEZkCnwxpQ==", "dev": true, "dependencies": { - "ansi-sequence-parser": "^1.1.0", - "jsonc-parser": "^3.2.0", - "vscode-oniguruma": "^1.7.0", - "vscode-textmate": "^8.0.0" + "@shikijs/core": "1.9.0" } }, "node_modules/side-channel": { @@ -11294,6 +11345,12 @@ "node": ">=8" } }, + "node_modules/slashes": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/slashes/-/slashes-3.0.12.tgz", + "integrity": "sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==", + "dev": true + }, "node_modules/slice-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", @@ -11746,24 +11803,44 @@ } }, "node_modules/stylelint-config-recommended": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.0.tgz", - "integrity": "sha512-jSkx290CglS8StmrLp2TxAppIajzIBZKYm3IxT89Kg6fGlxbPiTiyH9PS5YUuVAFwaJLl1ikiXX0QWjI0jmgZQ==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz", + "integrity": "sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/stylelint" + }, + { + "type": "github", + "url": "https://github.com/sponsors/stylelint" + } + ], "engines": { "node": ">=18.12.0" }, "peerDependencies": { - "stylelint": "^16.0.0" + "stylelint": "^16.1.0" } }, "node_modules/stylelint-config-standard": { - "version": "36.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-36.0.0.tgz", - "integrity": "sha512-3Kjyq4d62bYFp/Aq8PMKDwlgUyPU4nacXsjDLWJdNPRUgpuxALu1KnlAHIj36cdtxViVhXexZij65yM0uNIHug==", + "version": "36.0.1", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-36.0.1.tgz", + "integrity": "sha512-8aX8mTzJ6cuO8mmD5yon61CWuIM4UD8Q5aBcWKGSf6kg+EC3uhB+iOywpTK4ca6ZL7B49en8yanOFtUW0qNzyw==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/stylelint" + }, + { + "type": "github", + "url": "https://github.com/sponsors/stylelint" + } + ], "dependencies": { - "stylelint-config-recommended": "^14.0.0" + "stylelint-config-recommended": "^14.0.1" }, "engines": { "node": ">=18.12.0" @@ -12295,9 +12372,9 @@ "devOptional": true }, "node_modules/tsx": { - "version": "4.15.6", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.15.6.tgz", - "integrity": "sha512-is0VQQlfNZRHEuSSTKA6m4xw74IU4AizmuB6lAYLRt9XtuyeQnyJYexhNZOPCB59SqC4JzmSzPnHGBXxf3k0hA==", + "version": "4.15.7", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.15.7.tgz", + "integrity": "sha512-u3H0iSFDZM3za+VxkZ1kywdCeHCn+8/qHQS1MNoO2sONDgD95HlWtt8aB23OzeTmFP9IU4/8bZUdg58Uu5J4cg==", "dev": true, "dependencies": { "esbuild": "~0.21.4", @@ -12351,24 +12428,25 @@ } }, "node_modules/typedoc": { - "version": "0.25.13", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.13.tgz", - "integrity": "sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ==", + "version": "0.26.2", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.2.tgz", + "integrity": "sha512-q/t+M+PZqhN9gPWLBZ3CCvP+KT8O1tyYkSzEYbcQ6mo89avdIrMlBEl3vfo5BgSzwC6Lbmq0W64E8RkY+eVsLA==", "dev": true, "dependencies": { "lunr": "^2.3.9", - "marked": "^4.3.0", - "minimatch": "^9.0.3", - "shiki": "^0.14.7" + "markdown-it": "^14.1.0", + "minimatch": "^9.0.4", + "shiki": "^1.9.0", + "yaml": "^2.4.5" }, "bin": { "typedoc": "bin/typedoc" }, "engines": { - "node": ">= 16" + "node": ">= 18" }, "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x" + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x" } }, "node_modules/typedoc/node_modules/brace-expansion": { @@ -12381,9 +12459,9 @@ } }, "node_modules/typedoc/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -12396,9 +12474,9 @@ } }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", + "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -12408,6 +12486,12 @@ "node": ">=14.17" } }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "dev": true + }, "node_modules/unbzip2-stream": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", @@ -12645,18 +12729,6 @@ } } }, - "node_modules/vscode-oniguruma": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", - "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", - "dev": true - }, - "node_modules/vscode-textmate": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", - "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", - "dev": true - }, "node_modules/wait-port": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/wait-port/-/wait-port-1.0.4.tgz", @@ -13473,6 +13545,18 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, + "node_modules/yaml": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", + "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", + "dev": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -13641,14 +13725,14 @@ "@fluent/bundle": "^0.18.0", "@fluent/langneg": "^0.7.0", "@tsconfig/strictest": "^2.0.5", - "@types/mocha": "^10.0.6", + "@types/mocha": "^10.0.7", "eslint": "^8.57.0", - "eslint-plugin-jsdoc": "^48.2.12", + "eslint-plugin-jsdoc": "^48.4.0", "mocha": "^10.4.0", "replace-in-file": "^7.2.0", - "tsx": "^4.15.6", - "typedoc": "^0.25.13", - "typescript": "^5.4.5" + "tsx": "^4.15.7", + "typedoc": "^0.26.2", + "typescript": "^5.5.2" } }, "packages/demo": { @@ -13669,7 +13753,7 @@ "eslint": "^8.57.0", "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-react-refresh": "^0.4.7", - "typescript": "^5.4.5", + "typescript": "^5.5.2", "vite": "^5.3.1" } }, @@ -13693,8 +13777,8 @@ "json5": "^2.2.3", "jsonwebtoken": "^9.0.2", "ts-loader": "^9.5.1", - "tsx": "^4.15.6", - "typescript": "^5.4.5", + "tsx": "^4.15.7", + "typescript": "^5.5.2", "webpack-cli": "^5.1.4" } }, diff --git a/web/package.json b/web/package.json index 10ada907df270..ca725974b5538 100644 --- a/web/package.json +++ b/web/package.json @@ -25,17 +25,17 @@ "mocha": "^10.4.0", "prettier": "^3.3.2", "stylelint": "^16.6.1", - "stylelint-config-standard": "^36.0.0", + "stylelint-config-standard": "^36.0.1", "stylelint-prettier": "^5.0.0", "ts-loader": "^9.5.1", - "typescript": "^5.4.5", + "typescript": "^5.5.2", "wdio-chromedriver-service": "^8.1.1", "webpack": "^5.92.1", "webpack-cli": "^5.1.4", - "tsx": "^4.15.6" + "tsx": "^4.15.7" }, "optionalDependencies": { - "chromedriver": "^126.0.2" + "chromedriver": "^126.0.3" }, "scripts": { "build": "npm run build --workspace=ruffle-core && npm run build --workspace=ruffle-demo --workspace=ruffle-extension --workspace=ruffle-selfhosted", diff --git a/web/packages/core/package.json b/web/packages/core/package.json index 3bf0f90954196..7f7c6c5114535 100644 --- a/web/packages/core/package.json +++ b/web/packages/core/package.json @@ -24,14 +24,14 @@ "@fluent/bundle": "^0.18.0", "@fluent/langneg": "^0.7.0", "@tsconfig/strictest": "^2.0.5", - "@types/mocha": "^10.0.6", + "@types/mocha": "^10.0.7", "eslint": "^8.57.0", - "eslint-plugin-jsdoc": "^48.2.12", + "eslint-plugin-jsdoc": "^48.4.0", "mocha": "^10.4.0", "replace-in-file": "^7.2.0", - "typedoc": "^0.25.13", - "typescript": "^5.4.5", - "tsx": "^4.15.6" + "typedoc": "^0.26.2", + "typescript": "^5.5.2", + "tsx": "^4.15.7" }, "sideEffects": false } diff --git a/web/packages/demo/package.json b/web/packages/demo/package.json index 9632bc0b73e37..bf56b60756f81 100644 --- a/web/packages/demo/package.json +++ b/web/packages/demo/package.json @@ -26,7 +26,7 @@ "eslint": "^8.57.0", "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-react-refresh": "^0.4.7", - "typescript": "^5.4.5", + "typescript": "^5.5.2", "vite": "^5.3.1" } } diff --git a/web/packages/extension/package.json b/web/packages/extension/package.json index d965637a84100..eadbfaa2e6c7a 100644 --- a/web/packages/extension/package.json +++ b/web/packages/extension/package.json @@ -25,11 +25,11 @@ "archiver": "^7.0.1", "json5": "^2.2.3", "ts-loader": "^9.5.1", - "typescript": "^5.4.5", + "typescript": "^5.5.2", "webpack-cli": "^5.1.4", "axios": "^1.7.2", "form-data": "^4.0.0", "jsonwebtoken": "^9.0.2", - "tsx": "^4.15.6" + "tsx": "^4.15.7" } }
RSSHub
https://github.com/DIYgod/RSSHub
98273972540c42becf9b3581ac7aa8a73ce2e76d
dependabot[bot]
2023-11-09 04:50:33
chore(deps-dev): bump @types/git-rev-sync from 2.0.1 to 2.0.2 (#13735)
* chore(deps-dev): bump @types/git-rev-sync from 2.0.1 to 2.0.2 Bumps [@types/git-rev-sync](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/git-rev-sync) from 2.0.1 to 2.0.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/git-rev-sync) ---
chore(deps-dev): bump @types/git-rev-sync from 2.0.1 to 2.0.2 (#13735) * chore(deps-dev): bump @types/git-rev-sync from 2.0.1 to 2.0.2 Bumps [@types/git-rev-sync](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/git-rev-sync) from 2.0.1 to 2.0.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/git-rev-sync) --- updated-dependencies: - dependency-name: "@types/git-rev-sync" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
diff --git a/package.json b/package.json index a84821013d8f29..ef09af5a3f0497 100644 --- a/package.json +++ b/package.json @@ -156,7 +156,7 @@ "@types/eslint-config-prettier": "6.11.2", "@types/etag": "1.8.2", "@types/fs-extra": "11.0.4", - "@types/git-rev-sync": "2.0.1", + "@types/git-rev-sync": "2.0.2", "@types/imapflow": "1.0.15", "@types/jsdom": "21.1.5", "@types/json-bigint": "1.0.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6536dafa42c95..0f0ddbd32ce638 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -221,8 +221,8 @@ devDependencies: specifier: 11.0.4 version: 11.0.4 '@types/git-rev-sync': - specifier: 2.0.1 - version: 2.0.1 + specifier: 2.0.2 + version: 2.0.2 '@types/imapflow': specifier: 1.0.15 version: 1.0.15 @@ -1479,8 +1479,8 @@ packages: '@types/node': 20.5.6 dev: true - /@types/[email protected]: - resolution: {integrity: sha512-L8yu3FMSyDhBRudlhAqTH8KTFYZr3niTFvxVUHPBaMIIUk5EGhoQBAYxHapfEdOStMxUMYvp+n1Ofnr5mdC+bQ==} + /@types/[email protected]: + resolution: {integrity: sha512-ygFM5I5q4VJjU+xrb2MSzgj4BpC6HUzMnmfWp4d8bgAw/XFkJTiKn1uaNpOOT1gw+IxELyfY97JA6sRBv7J9sA==} dev: true /@types/[email protected]:
DPlayer
https://github.com/DIYgod/DPlayer
75e399a9fb5fc98ad9ea7d31178ed5ca1cc820aa
dependabot-preview[bot]
2020-11-09 15:30:13
chore(deps-dev): bump mini-css-extract-plugin from 1.2.1 to 1.3.0
Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 1.2.1 to 1.3.0. - [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases) - [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.2.1...v1.3.0)
chore(deps-dev): bump mini-css-extract-plugin from 1.2.1 to 1.3.0 Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 1.2.1 to 1.3.0. - [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases) - [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v1.2.1...v1.3.0) Signed-off-by: dependabot-preview[bot] <[email protected]>
diff --git a/package.json b/package.json index 83358af29..675a76ff1 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "exports-loader": "^1.0.0", "file-loader": "^6.0.0", "git-revision-webpack-plugin": "^3.0.3", - "mini-css-extract-plugin": "1.2.1", + "mini-css-extract-plugin": "1.3.0", "node-sass": "^4.12.0", "postcss-loader": "^3.0.0", "prettier": "^2.0.4", diff --git a/yarn.lock b/yarn.lock index db994f009..5884e9299 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5858,10 +5858,10 @@ [email protected]: schema-utils "^1.0.0" webpack-sources "^1.1.0" [email protected]: - version "1.2.1" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-1.2.1.tgz#30ea7dee632b3002b0c77aeed447790408cb247e" - integrity sha512-G3yw7/TQaPfkuiR73MDcyiqhyP8SnbmLhUbpC76H+wtQxA6wfKhMCQOCb6wnPK0dQbjORAeOILQqEesg4/wF7A== [email protected]: + version "1.3.0" + resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-1.3.0.tgz#bbcba978b68c39f0a9c75822cfb2874f9cf6b018" + integrity sha512-4DKmPwFd0XKlwoqvrkLi2X8Mlosh2ey/E/OVAucnPUdzGqrSWHgSqed/p4Ue2Q39JjIvcdSDgmZDO6mir5Ovmw== dependencies: loader-utils "^2.0.0" schema-utils "^3.0.0"
nest
https://github.com/nestjs/nest
9972ac6f27fb3ff10c39c979178ffc8010ef2ea1
dependabot[bot]
2024-07-17 05:37:15
chore(deps-dev): bump @grpc/grpc-js from 1.10.11 to 1.11.1
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.10.11 to 1.11.1. - [Release notes](https://github.com/grpc/grpc-node/releases) - [Commits](https://github.com/grpc/grpc-node/compare/@grpc/[email protected]...@grpc/[email protected]) ---
chore(deps-dev): bump @grpc/grpc-js from 1.10.11 to 1.11.1 Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.10.11 to 1.11.1. - [Release notes](https://github.com/grpc/grpc-node/releases) - [Commits](https://github.com/grpc/grpc-node/compare/@grpc/[email protected]...@grpc/[email protected]) --- updated-dependencies: - dependency-name: "@grpc/grpc-js" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
diff --git a/package-lock.json b/package-lock.json index 7382d7f3e85..29719b45ad7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "@fastify/multipart": "8.3.0", "@fastify/static": "7.0.4", "@fastify/view": "9.1.0", - "@grpc/grpc-js": "1.10.11", + "@grpc/grpc-js": "1.11.1", "@grpc/proto-loader": "0.7.13", "@nestjs/apollo": "12.2.0", "@nestjs/graphql": "12.2.0", @@ -5463,9 +5463,9 @@ } }, "node_modules/@grpc/grpc-js": { - "version": "1.10.11", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.10.11.tgz", - "integrity": "sha512-3RaoxOqkHHN2c05bwtBNVJmOf/UwMam0rZYtdl7dsRpsvDwcNpv6LkGgzltQ7xVf822LzBoKEPRvf4D7+xeIDw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.11.1.tgz", + "integrity": "sha512-gyt/WayZrVPH2w/UTLansS7F9Nwld472JxxaETamrM8HNlsa+jSLNyKAZmhxI2Me4c3mQHFiS1wWHDY1g1Kthw==", "dev": true, "dependencies": { "@grpc/proto-loader": "^0.7.13", diff --git a/package.json b/package.json index d4b576947e5..8472ef13936 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@fastify/multipart": "8.3.0", "@fastify/static": "7.0.4", "@fastify/view": "9.1.0", - "@grpc/grpc-js": "1.10.11", + "@grpc/grpc-js": "1.11.1", "@grpc/proto-loader": "0.7.13", "@nestjs/apollo": "12.2.0", "@nestjs/graphql": "12.2.0",
resty
https://github.com/go-resty/resty
8b24a96079f4a70d14410e10e751efda8497520d
Jeevanandam M.
2024-11-24 08:57:39
feat!: enhance and add feature into digest auth flow #914 (#921)
- redesign the digest auth internals, cleanup, and improvements - add 'auth-int' QOP support - add and update digest hash functions - remove the 'Request.SetDigestAuth' method, keep the option only at the client level
feat!: enhance and add feature into digest auth flow #914 (#921) - redesign the digest auth internals, cleanup, and improvements - add 'auth-int' QOP support - add and update digest hash functions - remove the 'Request.SetDigestAuth' method, keep the option only at the client level
diff --git a/client.go b/client.go index c4db7656..f6f25243 100644 --- a/client.go +++ b/client.go @@ -575,8 +575,9 @@ func (c *Client) SetAuthScheme(scheme string) *Client { return c } -// SetDigestAuth method sets the Digest Access auth scheme for the client. If a server responds with 401 and sends -// a Digest challenge in the WWW-Authenticate header, requests will be resent with the appropriate Authorization header. +// SetDigestAuth method sets the Digest Auth transport with provided credentials in the client. +// If a server responds with 401 and sends a Digest challenge in the header `WWW-Authenticate`, +// the request will be resent with the appropriate digest `Authorization` header. // // For Example: To set the Digest scheme with user "Mufasa" and password "Circle Of Life" // @@ -584,24 +585,19 @@ func (c *Client) SetAuthScheme(scheme string) *Client { // // Information about Digest Access Authentication can be found in [RFC 7616]. // -// See [Request.SetDigestAuth]. +// NOTE: +// - On the QOP `auth-int` scenario, the request body is read into memory to +// compute the body hash that consumes additional memory usage. +// - It is recommended to create a dedicated client instance for digest auth, +// as it does digest auth for all the requests raised by the client. // // [RFC 7616]: https://datatracker.ietf.org/doc/html/rfc7616 func (c *Client) SetDigestAuth(username, password string) *Client { - c.lock.Lock() - oldTransport := c.httpClient.Transport - c.lock.Unlock() - c.AddRequestMiddleware(func(c *Client, _ *Request) error { - c.httpClient.Transport = &digestTransport{ - credentials: credentials{username, password}, - transport: oldTransport, - } - return nil - }) - c.AddResponseMiddleware(func(c *Client, _ *Response) error { - c.httpClient.Transport = oldTransport - return nil - }) + dt := &digestTransport{ + credentials: &credentials{username, password}, + transport: c.Transport(), + } + c.SetTransport(dt) return c } diff --git a/client_test.go b/client_test.go index 4e247415..a40c6851 100644 --- a/client_test.go +++ b/client_test.go @@ -90,79 +90,6 @@ func TestClientAuthScheme(t *testing.T) { } -func TestClientDigestAuth(t *testing.T) { - conf := defaultDigestServerConf() - ts := createDigestServer(t, conf) - defer ts.Close() - - c := dcnl(). - SetBaseURL(ts.URL+"/"). - SetDigestAuth(conf.username, conf.password) - - resp, err := c.R(). - SetResult(&AuthSuccess{}). - Get(conf.uri) - assertError(t, err) - assertEqual(t, http.StatusOK, resp.StatusCode()) - - t.Logf("Result Success: %q", resp.Result().(*AuthSuccess)) - logResponse(t, resp) -} - -func TestClientDigestSession(t *testing.T) { - conf := defaultDigestServerConf() - conf.algo = "MD5-sess" - conf.qop = "auth, auth-int" - ts := createDigestServer(t, conf) - defer ts.Close() - - c := dcnl(). - SetBaseURL(ts.URL+"/"). - SetDigestAuth(conf.username, conf.password) - - resp, err := c.R(). - SetResult(&AuthSuccess{}). - Get(conf.uri) - assertError(t, err) - assertEqual(t, http.StatusOK, resp.StatusCode()) - - t.Logf("Result Success: %q", resp.Result().(*AuthSuccess)) - logResponse(t, resp) -} - -func TestClientDigestErrors(t *testing.T) { - type test struct { - mutateConf func(*digestServerConfig) - expect error - } - tests := []test{ - {mutateConf: func(c *digestServerConfig) { c.algo = "BAD_ALGO" }, expect: ErrDigestAlgNotSupported}, - {mutateConf: func(c *digestServerConfig) { c.qop = "bad-qop" }, expect: ErrDigestQopNotSupported}, - {mutateConf: func(c *digestServerConfig) { c.qop = "" }, expect: ErrDigestNoQop}, - {mutateConf: func(c *digestServerConfig) { c.charset = "utf-16" }, expect: ErrDigestCharset}, - {mutateConf: func(c *digestServerConfig) { c.uri = "/bad" }, expect: ErrDigestBadChallenge}, - {mutateConf: func(c *digestServerConfig) { c.uri = "/unknown_param" }, expect: ErrDigestBadChallenge}, - {mutateConf: func(c *digestServerConfig) { c.uri = "/missing_value" }, expect: ErrDigestBadChallenge}, - {mutateConf: func(c *digestServerConfig) { c.uri = "/unclosed_quote" }, expect: ErrDigestBadChallenge}, - {mutateConf: func(c *digestServerConfig) { c.uri = "/no_challenge" }, expect: ErrDigestBadChallenge}, - {mutateConf: func(c *digestServerConfig) { c.uri = "/status_500" }, expect: nil}, - } - - for _, tc := range tests { - conf := defaultDigestServerConf() - tc.mutateConf(conf) - ts := createDigestServer(t, conf) - - c := dcnl(). - SetBaseURL(ts.URL+"/"). - SetDigestAuth(conf.username, conf.password) - - _, err := c.R().Get(conf.uri) - assertErrorIs(t, tc.expect, err) - ts.Close() - } -} - func TestClientResponseMiddleware(t *testing.T) { ts := createGenericServer(t) defer ts.Close() diff --git a/digest.go b/digest.go index 5b55dbe3..98ac6d73 100644 --- a/digest.go +++ b/digest.go @@ -8,156 +8,108 @@ package resty import ( + "bytes" "crypto/md5" "crypto/rand" "crypto/sha256" "crypto/sha512" + "encoding/hex" "errors" "fmt" "hash" "io" "net/http" + "strconv" "strings" ) var ( - ErrDigestBadChallenge = errors.New("digest: challenge is bad") - ErrDigestCharset = errors.New("digest: unsupported charset") - ErrDigestAlgNotSupported = errors.New("digest: algorithm is not supported") - ErrDigestQopNotSupported = errors.New("digest: no supported qop in list") - ErrDigestNoQop = errors.New("digest: qop must be specified") + ErrDigestBadChallenge = errors.New("resty: digest: challenge is bad") + ErrDigestInvalidCharset = errors.New("resty: digest: invalid charset") + ErrDigestAlgNotSupported = errors.New("resty: digest: algorithm is not supported") + ErrDigestQopNotSupported = errors.New("resty: digest: qop is not supported") ) -var hashFuncs = map[string]func() hash.Hash{ +// Reference: https://datatracker.ietf.org/doc/html/rfc7616#section-6.1 +var digestHashFuncs = map[string]func() hash.Hash{ "": md5.New, "MD5": md5.New, "MD5-sess": md5.New, "SHA-256": sha256.New, "SHA-256-sess": sha256.New, - "SHA-512-256": sha512.New, - "SHA-512-256-sess": sha512.New, + "SHA-512": sha512.New, + "SHA-512-sess": sha512.New, + "SHA-512-256": sha512.New512_256, + "SHA-512-256-sess": sha512.New512_256, } +const ( + qopAuth = "auth" + qopAuthInt = "auth-int" +) + type digestTransport struct { - credentials + *credentials transport http.RoundTripper } func (dt *digestTransport) RoundTrip(req *http.Request) (*http.Response, error) { - // Copy the request, so we don't modify the input. - req2 := new(http.Request) - *req2 = *req - req2.Header = make(http.Header) - for k, s := range req.Header { - req2.Header[k] = s - } + // first request without body for all HTTP verbs + req1 := dt.cloneReq(req, true) - // Fix http: ContentLength=xxx with Body length 0 - if req2.Body == nil { - req2.ContentLength = 0 - } else if req2.GetBody != nil { - var err error - req2.Body, err = req2.GetBody() - if err != nil { - return nil, err - } + // make a request to get the 401 that contains the challenge. + res, err := dt.transport.RoundTrip(req1) + if err != nil || res.StatusCode != http.StatusUnauthorized { + return res, err } + _, _ = ioCopy(io.Discard, res.Body) + closeq(res.Body) - // Make a request to get the 401 that contains the challenge. - resp, err := dt.transport.RoundTrip(req) - if err != nil || resp.StatusCode != http.StatusUnauthorized { - return resp, err - } - chal := resp.Header.Get(hdrWwwAuthenticateKey) - if chal == "" { - return resp, ErrDigestBadChallenge + chaHdrValue := strings.TrimSpace(res.Header.Get(hdrWwwAuthenticateKey)) + if chaHdrValue == "" { + return res, ErrDigestBadChallenge } - c, err := parseChallenge(chal) + cha, err := dt.parseChallenge(chaHdrValue) if err != nil { - return resp, err + return nil, err } - // Form credentials based on the challenge - cr := dt.newCredentials(req2, c) - auth, err := cr.authorize() + // prepare second request + req2 := dt.cloneReq(req, false) + cred, err := dt.createCredentials(cha, req2) if err != nil { - return resp, err + return nil, err } - err = resp.Body.Close() + + auth, err := cred.digest(cha) if err != nil { return nil, err } - // Make authenticated request req2.Header.Set(hdrAuthorizationKey, auth) return dt.transport.RoundTrip(req2) } -func (dt *digestTransport) newCredentials(req *http.Request, c *challenge) *digestCredentials { - return &digestCredentials{ - username: dt.Username, - userhash: c.userhash, - realm: c.realm, - nonce: c.nonce, - digestURI: req.URL.RequestURI(), - algorithm: c.algorithm, - sessionAlg: strings.HasSuffix(c.algorithm, "-sess"), - opaque: c.opaque, - messageQop: c.qop, - nc: 0, - method: req.Method, - password: dt.Password, - } -} - -type challenge struct { - realm string - domain string - nonce string - opaque string - stale string - algorithm string - qop string - userhash string -} - -func (c *challenge) setValue(k, v string) error { - switch k { - case "realm": - c.realm = v - case "domain": - c.domain = v - case "nonce": - c.nonce = v - case "opaque": - c.opaque = v - case "stale": - c.stale = v - case "algorithm": - c.algorithm = v - case "qop": - c.qop = v - case "charset": - if strings.ToUpper(v) != "UTF-8" { - return ErrDigestCharset - } - case "userhash": - c.userhash = v - default: - return ErrDigestBadChallenge +func (dt *digestTransport) cloneReq(r *http.Request, first bool) *http.Request { + r1 := r.Clone(r.Context()) + if first { + r1.Body = http.NoBody + r1.ContentLength = 0 + r1.GetBody = nil } - return nil + return r1 } -func parseChallenge(input string) (*challenge, error) { +func (dt *digestTransport) parseChallenge(input string) (*digestChallenge, error) { const ws = " \n\r\t" s := strings.Trim(input, ws) if !strings.HasPrefix(s, "Digest ") { return nil, ErrDigestBadChallenge } + s = strings.Trim(s[7:], ws) - c := &challenge{} + c := &digestChallenge{} b := strings.Builder{} key := "" quoted := false @@ -187,137 +139,260 @@ func parseChallenge(input string) (*challenge, error) { b.WriteRune(r) } } + + key = strings.TrimSpace(key) if quoted || (key == "" && b.Len() > 0) { return nil, ErrDigestBadChallenge } + if key != "" { val := strings.Trim(b.String(), ws) if err := c.setValue(key, val); err != nil { return nil, err } } - return c, nil -} -type digestCredentials struct { - username string - userhash string - realm string - nonce string - digestURI string - algorithm string - sessionAlg bool - cNonce string - opaque string - messageQop string - nc int - method string - password string + return c, nil } -func (c *digestCredentials) authorize() (string, error) { - if _, ok := hashFuncs[c.algorithm]; !ok { - return "", ErrDigestAlgNotSupported +func (dt *digestTransport) createCredentials(cha *digestChallenge, req *http.Request) (*digestCredentials, error) { + cred := &digestCredentials{ + username: dt.Username, + password: dt.Password, + uri: req.URL.RequestURI(), + method: req.Method, + realm: cha.realm, + nonce: cha.nonce, + nc: cha.nc, + algorithm: cha.algorithm, + sessAlgorithm: strings.HasSuffix(cha.algorithm, "-sess"), + opaque: cha.opaque, + userHash: cha.userHash, } - if err := c.validateQop(); err != nil { - return "", err + if cha.isQopSupported(qopAuthInt) { + if err := dt.prepareBody(req); err != nil { + return nil, fmt.Errorf("resty: digest: failed to prepare body for auth-int: %w", err) + } + body, err := req.GetBody() + if err != nil { + return nil, fmt.Errorf("resty: digest: failed to get body for auth-int: %w", err) + } + if body != http.NoBody { + defer closeq(body) + h := newHashFunc(cha.algorithm) + if _, err := ioCopy(h, body); err != nil { + return nil, err + } + cred.bodyHash = hex.EncodeToString(h.Sum(nil)) + } } - resp, err := c.resp() - if err != nil { - return "", err + return cred, nil +} + +func (dt *digestTransport) prepareBody(req *http.Request) error { + if req.GetBody != nil { + return nil } - sl := make([]string, 0, 10) - if c.userhash == "true" { - // RFC 7616 3.4.4 - c.username = c.h(fmt.Sprintf("%s:%s", c.username, c.realm)) - sl = append(sl, fmt.Sprintf(`userhash=%s`, c.userhash)) + if req.Body == nil || req.Body == http.NoBody { + req.GetBody = func() (io.ReadCloser, error) { + return http.NoBody, nil + } + return nil } - sl = append(sl, fmt.Sprintf(`username="%s"`, c.username)) - sl = append(sl, fmt.Sprintf(`realm="%s"`, c.realm)) - sl = append(sl, fmt.Sprintf(`nonce="%s"`, c.nonce)) - sl = append(sl, fmt.Sprintf(`uri="%s"`, c.digestURI)) - sl = append(sl, fmt.Sprintf(`response="%s"`, resp)) - sl = append(sl, fmt.Sprintf(`algorithm=%s`, c.algorithm)) - if c.opaque != "" { - sl = append(sl, fmt.Sprintf(`opaque="%s"`, c.opaque)) + + b, err := ioReadAll(req.Body) + if err != nil { + return err } - if c.messageQop != "" { - sl = append(sl, fmt.Sprintf("qop=%s", c.messageQop)) - sl = append(sl, fmt.Sprintf("nc=%08x", c.nc)) - sl = append(sl, fmt.Sprintf(`cnonce="%s"`, c.cNonce)) + closeq(req.Body) + req.Body = io.NopCloser(bytes.NewReader(b)) + req.GetBody = func() (io.ReadCloser, error) { + return io.NopCloser(bytes.NewReader(b)), nil } - return fmt.Sprintf("Digest %s", strings.Join(sl, ", ")), nil + return nil +} + +type digestChallenge struct { + realm string + domain string + nonce string + opaque string + stale string + algorithm string + qop []string + nc int + userHash string } -func (c *digestCredentials) validateQop() error { - // Currently only supporting auth quality of protection. TODO: add auth-int support - // NOTE: cURL support auth-int qop for requests other than POST and PUT (i.e. w/o body) by hashing an empty string - // is this applicable for resty? see: https://github.com/curl/curl/blob/307b7543ea1e73ab04e062bdbe4b5bb409eaba3a/lib/vauth/digest.c#L774 - if c.messageQop == "" { - return ErrDigestNoQop +func (dc *digestChallenge) isQopSupported(qop string) bool { + for _, v := range dc.qop { + if v == qop { + return true + } } - possibleQops := strings.Split(c.messageQop, ",") - var authSupport bool - for _, qop := range possibleQops { - qop = strings.TrimSpace(qop) - if qop == "auth" { - authSupport = true - break + return false +} + +func (dc *digestChallenge) setValue(k, v string) error { + switch k { + case "realm": + dc.realm = v + case "domain": + dc.domain = v + case "nonce": + dc.nonce = v + case "opaque": + dc.opaque = v + case "stale": + dc.stale = v + case "algorithm": + dc.algorithm = v + case "qop": + if !isStringEmpty(v) { + dc.qop = strings.Split(v, ",") + } + case "charset": + if strings.ToUpper(v) != "UTF-8" { + return ErrDigestInvalidCharset } + case "nc": + nc, err := strconv.ParseInt(v, 16, 32) + if err != nil { + return fmt.Errorf("resty: digest: invalid nc: %w", err) + } + dc.nc = int(nc) + case "userhash": + dc.userHash = v + default: + return ErrDigestBadChallenge + } + return nil +} + +type digestCredentials struct { + username string + password string + userHash string + method string + uri string + realm string + nonce string + algorithm string + sessAlgorithm bool + cnonce string + opaque string + qop string + nc int + response string + bodyHash string +} + +func (dc *digestCredentials) parseQop(cha *digestChallenge) error { + if len(cha.qop) == 0 { + return nil } - if !authSupport { - return ErrDigestQopNotSupported + + if cha.isQopSupported(qopAuth) { + dc.qop = qopAuth + return nil } - c.messageQop = "auth" + if cha.isQopSupported(qopAuthInt) { + dc.qop = qopAuthInt + return nil + } - return nil + return ErrDigestQopNotSupported } -func (c *digestCredentials) h(data string) string { - hfCtor := hashFuncs[c.algorithm] - hf := hfCtor() - _, _ = hf.Write([]byte(data)) // Hash.Write never returns an error - return fmt.Sprintf("%x", hf.Sum(nil)) +func (dc *digestCredentials) h(data string) string { + h := newHashFunc(dc.algorithm) + _, _ = h.Write([]byte(data)) + return hex.EncodeToString(h.Sum(nil)) } -func (c *digestCredentials) resp() (string, error) { - c.nc++ +func (dc *digestCredentials) digest(cha *digestChallenge) (string, error) { + if _, ok := digestHashFuncs[dc.algorithm]; !ok { + return "", ErrDigestAlgNotSupported + } - b := make([]byte, 16) - _, err := io.ReadFull(rand.Reader, b) - if err != nil { + if err := dc.parseQop(cha); err != nil { return "", err } - c.cNonce = fmt.Sprintf("%x", b)[:32] - ha1 := c.ha1() - ha2 := c.ha2() + dc.nc++ - return c.kd(ha1, fmt.Sprintf("%s:%08x:%s:%s:%s", - c.nonce, c.nc, c.cNonce, c.messageQop, ha2)), nil + b := make([]byte, 16) + _, _ = io.ReadFull(rand.Reader, b) + dc.cnonce = hex.EncodeToString(b) + + ha1 := dc.ha1() + ha2 := dc.ha2() + + var resp string + switch dc.qop { + case "": + resp = fmt.Sprintf("%s:%s:%s", ha1, dc.nonce, ha2) + case qopAuth, qopAuthInt: + resp = fmt.Sprintf("%s:%s:%08x:%s:%s:%s", + ha1, dc.nonce, dc.nc, dc.cnonce, dc.qop, ha2) + } + dc.response = dc.h(resp) + + return "Digest " + dc.String(), nil } -func (c *digestCredentials) kd(secret, data string) string { - return c.h(fmt.Sprintf("%s:%s", secret, data)) +// https://datatracker.ietf.org/doc/html/rfc7616#section-3.4.2 +func (dc *digestCredentials) ha1() string { + a1 := dc.h(fmt.Sprintf("%s:%s:%s", dc.username, dc.realm, dc.password)) + if dc.sessAlgorithm { + return dc.h(fmt.Sprintf("%s:%s:%s", a1, dc.nonce, dc.cnonce)) + } + return a1 } -// RFC 7616 3.4.2 -func (c *digestCredentials) ha1() string { - ret := c.h(fmt.Sprintf("%s:%s:%s", c.username, c.realm, c.password)) - if c.sessionAlg { - return c.h(fmt.Sprintf("%s:%s:%s", ret, c.nonce, c.cNonce)) +// https://datatracker.ietf.org/doc/html/rfc7616#section-3.4.3 +func (dc *digestCredentials) ha2() string { + if dc.qop == qopAuthInt { + return dc.h(fmt.Sprintf("%s:%s:%s", dc.method, dc.uri, dc.bodyHash)) + } + return dc.h(fmt.Sprintf("%s:%s", dc.method, dc.uri)) +} + +func (dc *digestCredentials) String() string { + sl := make([]string, 0, 10) + // https://datatracker.ietf.org/doc/html/rfc7616#section-3.4.4 + if dc.userHash == "true" { + dc.username = dc.h(fmt.Sprintf("%s:%s", dc.username, dc.realm)) + } + sl = append(sl, fmt.Sprintf(`username="%s"`, dc.username)) + sl = append(sl, fmt.Sprintf(`realm="%s"`, dc.realm)) + sl = append(sl, fmt.Sprintf(`nonce="%s"`, dc.nonce)) + sl = append(sl, fmt.Sprintf(`uri="%s"`, dc.uri)) + if dc.algorithm != "" { + sl = append(sl, fmt.Sprintf(`algorithm=%s`, dc.algorithm)) + } + if dc.opaque != "" { + sl = append(sl, fmt.Sprintf(`opaque="%s"`, dc.opaque)) + } + if dc.qop != "" { + sl = append(sl, fmt.Sprintf("qop=%s", dc.qop)) + sl = append(sl, fmt.Sprintf("nc=%08x", dc.nc)) + sl = append(sl, fmt.Sprintf(`cnonce="%s"`, dc.cnonce)) } + sl = append(sl, fmt.Sprintf(`userhash=%s`, dc.userHash)) + sl = append(sl, fmt.Sprintf(`response="%s"`, dc.response)) - return ret + return strings.Join(sl, ", ") } -// RFC 7616 3.4.3 -func (c *digestCredentials) ha2() string { - // currently no auth-int support - return c.h(fmt.Sprintf("%s:%s", c.method, c.digestURI)) +func newHashFunc(algorithm string) hash.Hash { + hf := digestHashFuncs[algorithm] + h := hf() + h.Reset() + return h } diff --git a/digest_test.go b/digest_test.go new file mode 100644 index 00000000..76f8410a --- /dev/null +++ b/digest_test.go @@ -0,0 +1,293 @@ +// Copyright (c) 2015-present Jeevanandam M ([email protected]), All rights reserved. +// resty source code and usage is governed by a MIT style +// license that can be found in the LICENSE file. +// SPDX-License-Identifier: MIT + +package resty + +import ( + "errors" + "io" + "net/http" + "strings" + "testing" +) + +type digestServerConfig struct { + realm, qop, nonce, opaque, algo, uri, charset, username, password, nc string +} + +func defaultDigestServerConf() *digestServerConfig { + return &digestServerConfig{ + realm: "[email protected]", + qop: "auth", + nonce: "dcd98b7102dd2f0e8b11d0f600bfb0c093", + opaque: "5ccc069c403ebaf9f0171e9517f40e41", + algo: "MD5", + uri: "/dir/index.html", + charset: "utf-8", + username: "Mufasa", + password: "Circle Of Life", + nc: "00000001", + } +} + +func TestClientDigestAuth(t *testing.T) { + conf := *defaultDigestServerConf() + ts := createDigestServer(t, &conf) + defer ts.Close() + + c := dcnl(). + SetBaseURL(ts.URL+"/"). + SetDigestAuth(conf.username, conf.password) + + resp, err := c.R(). + SetResult(&AuthSuccess{}). + Get(conf.uri) + assertError(t, err) + assertEqual(t, http.StatusOK, resp.StatusCode()) +} + +func TestClientDigestAuthSession(t *testing.T) { + conf := *defaultDigestServerConf() + conf.algo = "MD5-sess" + conf.qop = "auth, auth-int" + ts := createDigestServer(t, &conf) + defer ts.Close() + + c := dcnl(). + SetBaseURL(ts.URL+"/"). + SetDigestAuth(conf.username, conf.password) + + resp, err := c.R(). + SetResult(&AuthSuccess{}). + Get(conf.uri) + assertError(t, err) + assertEqual(t, http.StatusOK, resp.StatusCode()) +} + +func TestClientDigestAuthErrors(t *testing.T) { + type test struct { + mutateConf func(*digestServerConfig) + expect error + } + tests := []test{ + {mutateConf: func(c *digestServerConfig) { c.algo = "BAD_ALGO" }, expect: ErrDigestAlgNotSupported}, + {mutateConf: func(c *digestServerConfig) { c.qop = "bad-qop" }, expect: ErrDigestQopNotSupported}, + {mutateConf: func(c *digestServerConfig) { c.charset = "utf-16" }, expect: ErrDigestInvalidCharset}, + {mutateConf: func(c *digestServerConfig) { c.uri = "/bad" }, expect: ErrDigestBadChallenge}, + {mutateConf: func(c *digestServerConfig) { c.uri = "/unknown_param" }, expect: ErrDigestBadChallenge}, + {mutateConf: func(c *digestServerConfig) { c.uri = "/missing_value" }, expect: ErrDigestBadChallenge}, + {mutateConf: func(c *digestServerConfig) { c.uri = "/unclosed_quote" }, expect: ErrDigestBadChallenge}, + {mutateConf: func(c *digestServerConfig) { c.uri = "/no_challenge" }, expect: ErrDigestBadChallenge}, + {mutateConf: func(c *digestServerConfig) { c.uri = "/status_500" }, expect: nil}, + } + + for _, tc := range tests { + conf := *defaultDigestServerConf() + tc.mutateConf(&conf) + ts := createDigestServer(t, &conf) + + c := dcnl(). + SetBaseURL(ts.URL+"/"). + SetDigestAuth(conf.username, conf.password) + + _, err := c.R().Get(conf.uri) + assertErrorIs(t, tc.expect, err) + ts.Close() + } +} + +func TestClientDigestAuthWithBody(t *testing.T) { + conf := *defaultDigestServerConf() + ts := createDigestServer(t, &conf) + defer ts.Close() + + c := dcnl().SetDigestAuth(conf.username, conf.password) + + resp, err := c.R(). + SetResult(&AuthSuccess{}). + SetHeader(hdrContentTypeKey, "application/json"). + SetBody(map[string]any{"zip_code": "00000", "city": "Los Angeles"}). + Post(ts.URL + conf.uri) + + assertError(t, err) + assertEqual(t, http.StatusOK, resp.StatusCode()) +} + +func TestClientDigestAuthWithBodyQopAuthInt(t *testing.T) { + conf := *defaultDigestServerConf() + conf.qop = "auth-int" + ts := createDigestServer(t, &conf) + defer ts.Close() + + c := dcnl().SetDigestAuth(conf.username, conf.password) + + resp, err := c.R(). + SetResult(&AuthSuccess{}). + SetHeader(hdrContentTypeKey, "application/json"). + SetBody(map[string]any{"zip_code": "00000", "city": "Los Angeles"}). + Post(ts.URL + conf.uri) + + assertError(t, err) + assertEqual(t, http.StatusOK, resp.StatusCode()) +} + +func TestClientDigestAuthWithBodyQopAuthIntIoCopyError(t *testing.T) { + conf := *defaultDigestServerConf() + conf.qop = "auth-int" + ts := createDigestServer(t, &conf) + defer ts.Close() + + c := dcnl().SetDigestAuth(conf.username, conf.password) + + errCopyMsg := "test copy error" + ioCopy = func(dst io.Writer, src io.Reader) (written int64, err error) { + return 0, errors.New(errCopyMsg) + } + t.Cleanup(func() { + ioCopy = io.Copy + }) + + resp, err := c.R(). + SetResult(&AuthSuccess{}). + SetHeader(hdrContentTypeKey, "application/json"). + SetBody(map[string]any{"zip_code": "00000", "city": "Los Angeles"}). + Post(ts.URL + conf.uri) + + assertNotNil(t, err) + assertEqual(t, true, strings.Contains(err.Error(), errCopyMsg)) + assertEqual(t, 0, resp.StatusCode()) +} + +func TestClientDigestAuthWithBodyQopAuthIntGetBodyNil(t *testing.T) { + conf := *defaultDigestServerConf() + conf.qop = "auth-int" + ts := createDigestServer(t, &conf) + defer ts.Close() + + c := dcnl().SetDigestAuth(conf.username, conf.password) + c.SetRequestMiddlewares( + PrepareRequestMiddleware, + func(c *Client, r *Request) error { + r.RawRequest.GetBody = nil + return nil + }, + ) + + resp, err := c.R(). + SetResult(&AuthSuccess{}). + SetHeader(hdrContentTypeKey, "application/json"). + SetBody(map[string]any{"zip_code": "00000", "city": "Los Angeles"}). + Post(ts.URL + conf.uri) + + assertError(t, err) + assertEqual(t, http.StatusOK, resp.StatusCode()) +} + +func TestClientDigestAuthWithGetBodyError(t *testing.T) { + conf := *defaultDigestServerConf() + conf.qop = "auth-int" + ts := createDigestServer(t, &conf) + defer ts.Close() + + c := dcnl().SetDigestAuth(conf.username, conf.password) + c.SetRequestMiddlewares( + PrepareRequestMiddleware, + func(c *Client, r *Request) error { + r.RawRequest.GetBody = func() (_ io.ReadCloser, _ error) { + return nil, errors.New("get body test error") + } + return nil + }, + ) + + resp, err := c.R(). + SetResult(&AuthSuccess{}). + SetHeader(hdrContentTypeKey, "application/json"). + SetBody(map[string]any{"zip_code": "00000", "city": "Los Angeles"}). + Post(ts.URL + conf.uri) + + assertNotNil(t, err) + assertEqual(t, true, strings.Contains(err.Error(), "resty: digest: failed to get body for auth-int: get body test error")) + assertEqual(t, 0, resp.StatusCode()) +} + +func TestClientDigestAuthWithGetBodyNilReadError(t *testing.T) { + conf := *defaultDigestServerConf() + conf.qop = "auth-int" + ts := createDigestServer(t, &conf) + defer ts.Close() + + c := dcnl().SetDigestAuth(conf.username, conf.password) + c.SetRequestMiddlewares( + PrepareRequestMiddleware, + func(c *Client, r *Request) error { + r.RawRequest.GetBody = nil + return nil + }, + ) + + resp, err := c.R(). + SetResult(&AuthSuccess{}). + SetHeader(hdrContentTypeKey, "application/json"). + SetBody(&brokenReadCloser{}). + Post(ts.URL + conf.uri) + + assertNotNil(t, err) + assertEqual(t, true, strings.Contains(err.Error(), "resty: digest: failed to prepare body for auth-int: read error")) + assertEqual(t, 0, resp.StatusCode()) +} + +func TestClientDigestAuthWithNoBodyQopAuthInt(t *testing.T) { + conf := *defaultDigestServerConf() + conf.qop = "auth-int" + ts := createDigestServer(t, &conf) + defer ts.Close() + + c := dcnl().SetDigestAuth(conf.username, conf.password) + + resp, err := c.R().Get(ts.URL + conf.uri) + + assertError(t, err) + assertEqual(t, http.StatusOK, resp.StatusCode()) +} + +func TestClientDigestAuthNoQop(t *testing.T) { + conf := *defaultDigestServerConf() + conf.qop = "" + + ts := createDigestServer(t, &conf) + defer ts.Close() + + c := dcnl().SetDigestAuth(conf.username, conf.password) + + resp, err := c.R(). + SetResult(&AuthSuccess{}). + SetHeader(hdrContentTypeKey, "application/json"). + SetBody(map[string]any{"zip_code": "00000", "city": "Los Angeles"}). + Post(ts.URL + conf.uri) + + assertNil(t, err) + assertEqual(t, "200 OK", resp.Status()) +} + +func TestClientDigestAuthWithIncorrectNcValue(t *testing.T) { + conf := *defaultDigestServerConf() + conf.nc = "1234567890" + + ts := createDigestServer(t, &conf) + defer ts.Close() + + c := dcnl().SetDigestAuth(conf.username, conf.password) + + resp, err := c.R(). + SetResult(&AuthSuccess{}). + SetHeader(hdrContentTypeKey, "application/json"). + SetBody(map[string]any{"zip_code": "00000", "city": "Los Angeles"}). + Post(ts.URL + conf.uri) + + assertNotNil(t, err) + assertEqual(t, true, strings.Contains(err.Error(), `parsing "1234567890": value out of range`)) + assertEqual(t, "", resp.Status()) +} diff --git a/request.go b/request.go index 70f5ce81..3d759e1d 100644 --- a/request.go +++ b/request.go @@ -661,36 +661,6 @@ func (r *Request) SetAuthScheme(scheme string) *Request { return r } -// SetDigestAuth method sets the Digest Access auth scheme for the HTTP request. -// If a server responds with 401 and sends a Digest challenge in the WWW-Authenticate Header, -// the request will be resent with the appropriate Authorization Header. -// -// For Example: To set the Digest scheme with username "Mufasa" and password "Circle Of Life" -// -// client.R().SetDigestAuth("Mufasa", "Circle Of Life") -// -// Information about Digest Access Authentication can be found in [RFC 7616] -// -// It overrides the digest username and password set by method [Client.SetDigestAuth]. -// -// [RFC 7616]: https://datatracker.ietf.org/doc/html/rfc7616 -func (r *Request) SetDigestAuth(username, password string) *Request { - oldTransport := r.client.httpClient.Transport - r.client.AddRequestMiddleware(func(c *Client, _ *Request) error { - c.httpClient.Transport = &digestTransport{ - credentials: credentials{username, password}, - transport: oldTransport, - } - return nil - }) - r.client.AddResponseMiddleware(func(c *Client, _ *Response) error { - c.httpClient.Transport = oldTransport - return nil - }) - - return r -} - // SetOutputFile method sets the output file for the current HTTP request. The current // HTTP response will be saved in the given file. It is similar to the `curl -o` flag. // diff --git a/request_test.go b/request_test.go index 2f0ca699..eaa17312 100644 --- a/request_test.go +++ b/request_test.go @@ -680,59 +680,6 @@ func TestRequestAuthScheme(t *testing.T) { assertEqual(t, http.StatusOK, resp.StatusCode()) } -func TestRequestDigestAuth(t *testing.T) { - conf := defaultDigestServerConf() - ts := createDigestServer(t, nil) - defer ts.Close() - - resp, err := dcnldr(). - SetDigestAuth(conf.username, conf.password). - SetResult(&AuthSuccess{}). - Get(ts.URL + conf.uri) - - assertError(t, err) - assertEqual(t, http.StatusOK, resp.StatusCode()) - - t.Logf("Result Success: %q", resp.Result().(*AuthSuccess)) - logResponse(t, resp) -} - -func TestRequestDigestAuthFail(t *testing.T) { - conf := defaultDigestServerConf() - ts := createDigestServer(t, nil) - defer ts.Close() - - resp, err := dcnldr(). - SetDigestAuth(conf.username, "wrongPassword"). - SetError(AuthError{}). - Get(ts.URL + conf.uri) - - assertError(t, err) - assertEqual(t, http.StatusUnauthorized, resp.StatusCode()) - - t.Logf("Result Error: %q", resp.Error().(*AuthError)) - logResponse(t, resp) -} - -func TestRequestDigestAuthWithBody(t *testing.T) { - conf := defaultDigestServerConf() - ts := createDigestServer(t, nil) - defer ts.Close() - - resp, err := dcnldr(). - SetDigestAuth(conf.username, conf.password). - SetResult(&AuthSuccess{}). - SetHeader(hdrContentTypeKey, "application/json"). - SetBody(map[string]any{"zip_code": "00000", "city": "Los Angeles"}). - Post(ts.URL + conf.uri) - - assertError(t, err) - assertEqual(t, http.StatusOK, resp.StatusCode()) - - t.Logf("Result Success: %q", resp.Result().(*AuthSuccess)) - logResponse(t, resp) -} - func TestFormData(t *testing.T) { ts := createFormPostServer(t) defer ts.Close() diff --git a/resty_test.go b/resty_test.go index 25fcc65b..a1fd2248 100644 --- a/resty_test.go +++ b/resty_test.go @@ -10,9 +10,9 @@ import ( "compress/flate" "compress/gzip" "compress/lzw" - "crypto/md5" "crypto/tls" "encoding/base64" + "encoding/hex" "encoding/json" "encoding/xml" "errors" @@ -768,24 +768,6 @@ func createUnixSocketEchoServer(t *testing.T) string { return socketPath } -type digestServerConfig struct { - realm, qop, nonce, opaque, algo, uri, charset, username, password string -} - -func defaultDigestServerConf() *digestServerConfig { - return &digestServerConfig{ - realm: "[email protected]", - qop: "auth", - nonce: "dcd98b7102dd2f0e8b11d0f600bfb0c093", - opaque: "5ccc069c403ebaf9f0171e9517f40e41", - algo: "MD5", - uri: "/dir/index.html", - charset: "utf-8", - username: "Mufasa", - password: "Circle Of Life", - } -} - func createDigestServer(t *testing.T, conf *digestServerConfig) *httptest.Server { if conf == nil { conf = defaultDigestServerConf() @@ -822,14 +804,14 @@ func createDigestServer(t *testing.T, conf *digestServerConfig) *httptest.Server w.Header().Set(hdrContentTypeKey, "application/json; charset=utf-8") - if !authorizationHeaderValid(t, r, conf) { - setWWWAuthHeader(w, - fmt.Sprintf(`Digest realm="%s", domain="%s", qop="%s", algorithm=%s, nonce="%s", opaque="%s", userhash=true, charset=%s, stale=FALSE`, - conf.realm, conf.uri, conf.qop, conf.algo, conf.nonce, conf.opaque, conf.charset)) - _, _ = w.Write([]byte(`{ "id": "unauthorized", "message": "Invalid credentials" }`)) - } else { + if authorizationHeaderValid(t, r, conf) { w.WriteHeader(http.StatusOK) _, _ = w.Write([]byte(`{ "id": "success", "message": "login successful" }`)) + } else { + setWWWAuthHeader(w, + fmt.Sprintf(`Digest realm="%s", domain="%s", qop="%s", algorithm=%s, nonce="%s", opaque="%s", userhash=true, charset=%s, stale=FALSE, nc=%s`, + conf.realm, conf.uri, conf.qop, conf.algo, conf.nonce, conf.opaque, conf.charset, conf.nc)) + _, _ = w.Write([]byte(`{ "id": "unauthorized", "message": "Invalid credentials" }`)) } }) @@ -837,20 +819,11 @@ func createDigestServer(t *testing.T, conf *digestServerConfig) *httptest.Server } func authorizationHeaderValid(t *testing.T, r *http.Request, conf *digestServerConfig) bool { - h := func(data string) (string, error) { - hf := md5.New() - - _, err := io.WriteString(hf, data) - if err != nil { - return "", err - } - - return fmt.Sprintf("%x", hf.Sum(nil)), nil - } input := r.Header.Get(hdrAuthorizationKey) if input == "" { return false } + const ws = " \n\r\t" const qs = `"` s := strings.Trim(input, ws) @@ -864,28 +837,53 @@ func authorizationHeaderValid(t *testing.T, r *http.Request, conf *digestServerC pairs[pair[0]] = strings.Trim(pair[1], qs) } - assertEqual(t, conf.opaque, pairs["opaque"]) assertEqual(t, conf.algo, pairs["algorithm"]) + h := func(data string) string { + h := newHashFunc(pairs["algorithm"]) + _, _ = h.Write([]byte(data)) + return hex.EncodeToString(h.Sum(nil)) + } + + assertEqual(t, conf.opaque, pairs["opaque"]) assertEqual(t, "true", pairs["userhash"]) - userhash, err := h(fmt.Sprintf("%s:%s", conf.username, conf.realm)) - assertError(t, err) - assertEqual(t, userhash, pairs["username"]) + userHash := h(fmt.Sprintf("%s:%s", conf.username, conf.realm)) + assertEqual(t, userHash, pairs["username"]) - ha1, err := h(fmt.Sprintf("%s:%s:%s", conf.username, conf.realm, conf.password)) - assertError(t, err) + ha1 := h(fmt.Sprintf("%s:%s:%s", conf.username, conf.realm, conf.password)) if strings.HasSuffix(conf.algo, "-sess") { - ha1, err = h(fmt.Sprintf("%s:%s:%s", ha1, pairs["nonce"], pairs["cnonce"])) - assertError(t, err) + ha1 = h(fmt.Sprintf("%s:%s:%s", ha1, pairs["nonce"], pairs["cnonce"])) } - ha2, err := h(fmt.Sprintf("%s:%s", r.Method, conf.uri)) - assertError(t, err) + ha2 := h(fmt.Sprintf("%s:%s", r.Method, conf.uri)) + + qop := pairs["qop"] + if qop == "" { + kd := h(fmt.Sprintf("%s:%s:%s", ha1, pairs["nonce"], ha2)) + return kd == pairs["response"] + } + nonceCount, err := strconv.Atoi(pairs["nc"]) assertError(t, err) - kd, err := h(fmt.Sprintf("%s:%s", ha1, fmt.Sprintf("%s:%08x:%s:%s:%s", - pairs["nonce"], nonceCount, pairs["cnonce"], pairs["qop"], ha2))) + + // auth scenario + if qop == qopAuth { + kd := h(fmt.Sprintf("%s:%s", ha1, fmt.Sprintf("%s:%08x:%s:%s:%s", + pairs["nonce"], nonceCount, pairs["cnonce"], pairs["qop"], ha2))) + return kd == pairs["response"] + } + + // auth-int scenario + body, err := io.ReadAll(r.Body) + r.Body.Close() assertError(t, err) + bodyHash := "" + if len(body) > 0 { + bodyHash = h(string(body)) + } + ha2 = h(fmt.Sprintf("%s:%s:%s", r.Method, conf.uri, bodyHash)) + kd := h(fmt.Sprintf("%s:%s", ha1, fmt.Sprintf("%s:%08x:%s:%s:%s", + pairs["nonce"], nonceCount, pairs["cnonce"], pairs["qop"], ha2))) return kd == pairs["response"] }
revanced-patches
https://github.com/ReVanced/revanced-patches
ed24a201a9fbe08dd6694582d0ab08ced8ad026a
oSumAtrIX
2023-08-27 08:07:21
fix: Revert previous release
The previous release depends on a version of ReVanced Patcher which prevents usage of resource patches on lower Android versions. To solve this issue temporarily, until a fix is present, the previous release is reverted.
fix: Revert previous release The previous release depends on a version of ReVanced Patcher which prevents usage of resource patches on lower Android versions. To solve this issue temporarily, until a fix is present, the previous release is reverted.
diff --git a/build.gradle.kts b/build.gradle.kts index 88bcaec7bd..8a3149d6c5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,15 +4,17 @@ plugins { group = "app.revanced" +val githubUsername: String = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR") +val githubPassword: String = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN") + repositories { mavenCentral() mavenLocal() - google() maven { url = uri("https://maven.pkg.github.com/revanced/revanced-patcher") credentials { - username = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR") - password = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN") + username = githubUsername + password = githubPassword } } // Required for FlexVer-Java @@ -25,15 +27,15 @@ repositories { } dependencies { - implementation("app.revanced:revanced-patcher:14.0.0") - implementation("com.android.tools.smali:smali:3.0.3") - // Required because build fails without it. - // TODO: Find a way to remove this dependency. - implementation("com.google.guava:guava:32.1.2-jre") - // Used in JsonGenerator. + implementation("app.revanced:revanced-patcher:11.0.4") + implementation("app.revanced:multidexlib2:2.5.3-a3836654") + // Required for meta implementation("com.google.code.gson:gson:2.10.1") + // Required for FlexVer-Java + implementation("com.unascribed:flexver-java:1.0.2") + // A dependency to the Android library unfortunately fails the build, - // which is why this is required for the patch change-oauth-client-id. + // which is why this is required for the patch change-oauth-client-id compileOnly(project("dummy")) } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ac72c34e8a..62f495dfed 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/kotlin/app/revanced/extensions/Extensions.kt b/src/main/kotlin/app/revanced/extensions/Extensions.kt index 226f4b143d..e90fbdcfe3 100644 --- a/src/main/kotlin/app/revanced/extensions/Extensions.kt +++ b/src/main/kotlin/app/revanced/extensions/Extensions.kt @@ -1,26 +1,25 @@ package app.revanced.extensions -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.MethodFingerprintExtensions.name +import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResultError import app.revanced.patcher.util.proxy.mutableTypes.MutableClass import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.Method -import com.android.tools.smali.dexlib2.iface.instruction.WideLiteralInstruction -import com.android.tools.smali.dexlib2.util.MethodUtil +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.Method +import org.jf.dexlib2.iface.instruction.WideLiteralInstruction +import org.jf.dexlib2.util.MethodUtil import org.w3c.dom.Node +// TODO: populate this to all patches /** - * The [PatchException] of failing to resolve a [MethodFingerprint]. + * Convert a [MethodFingerprint] to a [PatchResultError]. * - * @return The [PatchException]. + * @return A [PatchResultError] for the [MethodFingerprint]. */ -val MethodFingerprint.exception - get() = PatchException("Failed to resolve $name") +internal fun MethodFingerprint.toErrorResult() = PatchResultError("Failed to resolve $name") /** * Find the [MutableMethod] from a given [Method] in a [MutableClass]. @@ -28,27 +27,27 @@ val MethodFingerprint.exception * @param method The [Method] to find. * @return The [MutableMethod]. */ -fun MutableClass.findMutableMethodOf(method: Method) = this.methods.first { +internal fun MutableClass.findMutableMethodOf(method: Method) = this.methods.first { MethodUtil.methodSignaturesMatch(it, method) } /** - * apply a transform to all methods of the class. + * apply a transform to all methods of the class * - * @param transform the transformation function. original method goes in, transformed method goes out. + * @param transform the transformation function. original method goes in, transformed method goes out */ -fun MutableClass.transformMethods(transform: MutableMethod.() -> MutableMethod) { +internal fun MutableClass.transformMethods(transform: MutableMethod.() -> MutableMethod) { val transformedMethods = methods.map { it.transform() } methods.clear() methods.addAll(transformedMethods) } -fun Node.doRecursively(action: (Node) -> Unit) { +internal fun Node.doRecursively(action: (Node) -> Unit) { action(this) for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action) } -fun MutableMethod.injectHideViewCall( +internal fun MutableMethod.injectHideViewCall( insertIndex: Int, viewRegister: Int, classDescriptor: String, @@ -58,13 +57,7 @@ fun MutableMethod.injectHideViewCall( "invoke-static { v$viewRegister }, $classDescriptor->$targetMethod(Landroid/view/View;)V" ) -/** - * Find the index of the first constant instruction with the id of the given resource name. - * - * @param resourceName the name of the resource to find the id for. - * @return the index of the first constant instruction with the id of the given resource name, or -1 if not found. - */ -fun Method.findIndexForIdResource(resourceName: String): Int { +internal fun Method.findIndexForIdResource(resourceName: String): Int { fun getIdResourceId(resourceName: String) = ResourceMappingPatch.resourceMappings.single { it.type == "id" && it.name == resourceName }.id @@ -73,8 +66,6 @@ fun Method.findIndexForIdResource(resourceName: String): Int { } /** - * Find the index of the first constant instruction with the given value. - * * @return the first constant instruction with the value, or -1 if not found. */ fun Method.indexOfFirstConstantInstructionValue(constantValue: Long): Int { @@ -86,23 +77,8 @@ fun Method.indexOfFirstConstantInstructionValue(constantValue: Long): Int { } /** - * Check if the method contains a constant with the given value. - * * @return if the method contains a constant with the given value. */ fun Method.containsConstantInstructionValue(constantValue: Long): Boolean { return indexOfFirstConstantInstructionValue(constantValue) >= 0 } - -/** - * Traverse the class hierarchy starting from the given root class. - * - * @param targetClass the class to start traversing the class hierarchy from. - * @param callback function that is called for every class in the hierarchy. - */ -fun BytecodeContext.traverseClassHierarchy(targetClass: MutableClass, callback: MutableClass.() -> Unit) { - callback(targetClass) - this.findClass(targetClass.superclass ?: return)?.mutableClass?.let { - traverseClassHierarchy(it, callback) - } -} \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/meta/JsonGenerator.kt b/src/main/kotlin/app/revanced/meta/JsonGenerator.kt index 3be7793f8a..cebf57d91e 100644 --- a/src/main/kotlin/app/revanced/meta/JsonGenerator.kt +++ b/src/main/kotlin/app/revanced/meta/JsonGenerator.kt @@ -6,6 +6,7 @@ import app.revanced.patcher.extensions.PatchExtensions.description import app.revanced.patcher.extensions.PatchExtensions.include import app.revanced.patcher.extensions.PatchExtensions.options import app.revanced.patcher.extensions.PatchExtensions.patchName +import app.revanced.patcher.extensions.PatchExtensions.version import app.revanced.patcher.patch.PatchOption import com.google.gson.GsonBuilder import java.io.File @@ -16,6 +17,7 @@ internal class JsonGenerator : PatchesFileGenerator { JsonPatch( it.patchName, it.description ?: "This patch has no description.", + it.version ?: "0.0.0", !it.include, it.options?.map { option -> JsonPatch.Option( @@ -46,6 +48,7 @@ internal class JsonGenerator : PatchesFileGenerator { private class JsonPatch( val name: String, val description: String, + val version: String, val excluded: Boolean, val options: Array<Option>, val dependencies: Array<String>, diff --git a/src/main/kotlin/app/revanced/meta/PatchesFileGenerator.kt b/src/main/kotlin/app/revanced/meta/PatchesFileGenerator.kt index 23c1d100f2..dfb57d9229 100644 --- a/src/main/kotlin/app/revanced/meta/PatchesFileGenerator.kt +++ b/src/main/kotlin/app/revanced/meta/PatchesFileGenerator.kt @@ -1,22 +1,25 @@ package app.revanced.meta -import app.revanced.patcher.PatchBundleLoader -import app.revanced.patcher.patch.PatchClass +import app.revanced.patcher.data.Context +import app.revanced.patcher.patch.Patch +import app.revanced.patcher.util.patch.PatchBundle import java.io.File -internal typealias PatchBundlePatches = List<PatchClass> +internal typealias PatchBundlePatches = List<Class<out Patch<Context>>> internal interface PatchesFileGenerator { fun generate(bundle: PatchBundlePatches) private companion object { @JvmStatic - fun main(args: Array<String>) = PatchBundleLoader.Jar( - File("build/libs/").listFiles { it -> it.name.endsWith(".jar") }!!.first() - ).also { loader -> - if (loader.isEmpty()) throw IllegalStateException("No patches found") + fun main(args: Array<String>) = PatchBundle.Jar( + File("build/libs/").listFiles()!!.first { + it.name.startsWith("revanced-patches-") && it.name.endsWith(".jar") + }.absolutePath + ).loadPatches().also { + if (it.isEmpty()) throw IllegalStateException("No patches found") }.let { bundle -> - arrayOf(JsonGenerator()).forEach { generator -> generator.generate(bundle) } + arrayOf(JsonGenerator()).forEach { it.generate(bundle) } } } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/all/activity/exportall/patch/ExportAllActivitiesPatch.kt b/src/main/kotlin/app/revanced/patches/all/activity/exportall/patch/ExportAllActivitiesPatch.kt index 4d67cdeb2f..b80fb24289 100644 --- a/src/main/kotlin/app/revanced/patches/all/activity/exportall/patch/ExportAllActivitiesPatch.kt +++ b/src/main/kotlin/app/revanced/patches/all/activity/exportall/patch/ExportAllActivitiesPatch.kt @@ -1,8 +1,10 @@ -package app.revanced.patches.all.activity.exportall.patch +package app.revanced.patches.all.activity.exportAll.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.Patch @@ -10,7 +12,7 @@ import app.revanced.patcher.patch.annotations.Patch @Name("Export all activities") @Description("Makes all app activities exportable.") class ExportAllActivitiesPatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { context.xmlEditor["AndroidManifest.xml"].use { editor -> val document = editor.file val activities = document.getElementsByTagName("activity") @@ -31,6 +33,8 @@ class ExportAllActivitiesPatch : ResourcePatch { } } } + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/all/connectivity/wifi/spoof/patch/SpoofWifiPatch.kt b/src/main/kotlin/app/revanced/patches/all/connectivity/wifi/spoof/patch/SpoofWifiPatch.kt index f6637c4393..7bf2652867 100644 --- a/src/main/kotlin/app/revanced/patches/all/connectivity/wifi/spoof/patch/SpoofWifiPatch.kt +++ b/src/main/kotlin/app/revanced/patches/all/connectivity/wifi/spoof/patch/SpoofWifiPatch.kt @@ -6,16 +6,16 @@ import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.RequiresIntegrations import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.util.patch.* -import com.android.tools.smali.dexlib2.iface.ClassDef -import com.android.tools.smali.dexlib2.iface.Method -import com.android.tools.smali.dexlib2.iface.instruction.Instruction +import org.jf.dexlib2.iface.ClassDef +import org.jf.dexlib2.iface.Method +import org.jf.dexlib2.iface.instruction.Instruction import java.util.* @Patch(false) @Name("Spoof wifi connection") @Description("Spoofs an existing Wi-Fi connection.") @RequiresIntegrations -class SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() { +internal class SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() { private companion object { const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX = "Lapp/revanced/all/connectivity/wifi/spoof/SpoofWifiPatch" diff --git a/src/main/kotlin/app/revanced/patches/all/interaction/gestures/patch/PredictiveBackGesturePatch.kt b/src/main/kotlin/app/revanced/patches/all/interaction/gestures/patch/PredictiveBackGesturePatch.kt index 22763c67f0..412487660c 100644 --- a/src/main/kotlin/app/revanced/patches/all/interaction/gestures/patch/PredictiveBackGesturePatch.kt +++ b/src/main/kotlin/app/revanced/patches/all/interaction/gestures/patch/PredictiveBackGesturePatch.kt @@ -3,6 +3,8 @@ package app.revanced.patches.all.interaction.gestures.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.Patch @@ -10,7 +12,7 @@ import app.revanced.patcher.patch.annotations.Patch @Name("Predictive back gesture") @Description("Enables the predictive back gesture introduced on Android 13.") class PredictiveBackGesturePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { context.xmlEditor["AndroidManifest.xml"].use { editor -> val document = editor.file @@ -23,6 +25,8 @@ class PredictiveBackGesturePatch : ResourcePatch { } } + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/all/misc/debugging/patch/EnableAndroidDebuggingPatch.kt b/src/main/kotlin/app/revanced/patches/all/misc/debugging/patch/EnableAndroidDebuggingPatch.kt index 441dc24a51..e575ad086b 100644 --- a/src/main/kotlin/app/revanced/patches/all/misc/debugging/patch/EnableAndroidDebuggingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/all/misc/debugging/patch/EnableAndroidDebuggingPatch.kt @@ -9,9 +9,9 @@ import org.w3c.dom.Element @Patch(false) @Name("Enable android debugging") -@Description("Enables Android debugging capabilities. This can slow down the app.") +@Description("Enables Android debugging capabilities.") class EnableAndroidDebuggingPatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { context.xmlEditor["AndroidManifest.xml"].use { dom -> val applicationNode = dom .file @@ -21,6 +21,8 @@ class EnableAndroidDebuggingPatch : ResourcePatch { // set application as debuggable applicationNode.setAttribute("android:debuggable", "true") } + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/all/misc/network/patch/OverrideCertificatePinningPatch.kt b/src/main/kotlin/app/revanced/patches/all/misc/network/patch/OverrideCertificatePinningPatch.kt deleted file mode 100644 index 5d571dbef5..0000000000 --- a/src/main/kotlin/app/revanced/patches/all/misc/network/patch/OverrideCertificatePinningPatch.kt +++ /dev/null @@ -1,75 +0,0 @@ -package app.revanced.patches.all.misc.network.patch - -import app.revanced.patcher.annotation.Description -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.patch.ResourcePatch -import app.revanced.patcher.patch.annotations.DependsOn -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.all.misc.debugging.patch.EnableAndroidDebuggingPatch -import org.w3c.dom.Element -import java.io.File - -@Patch(false) -@Name("Override certificate pinning") -@Description("Overrides certificate pinning, allowing to inspect traffic via a proxy.") -@DependsOn([EnableAndroidDebuggingPatch::class]) -class OverrideCertificatePinningPatch : ResourcePatch { - override fun execute(context: ResourceContext) { - val resXmlDirectory = context["res/xml"] - - // Add android:networkSecurityConfig="@xml/network_security_config" and the "networkSecurityConfig" attribute if it does not exist. - context.xmlEditor["AndroidManifest.xml"].use { editor -> - val document = editor.file - val applicationNode = document.getElementsByTagName("application").item(0) as Element - - if (!applicationNode.hasAttribute("networkSecurityConfig")) { - document.createAttribute("android:networkSecurityConfig") - .apply { value = "@xml/network_security_config" }.let(applicationNode.attributes::setNamedItem) - } - } - - // In case the file does not exist create the "network_security_config.xml" file. - File(resXmlDirectory, "network_security_config.xml").apply { - if (!exists()) { - createNewFile() - writeText( - """ - <?xml version="1.0" encoding="utf-8"?> - <network-security-config> - <base-config cleartextTrafficPermitted="true"> - <trust-anchors> - <certificates src="system" /> - <certificates - src="user" - overridePins="true" /> - </trust-anchors> - </base-config> - <debug-overrides> - <trust-anchors> - <certificates src="system" /> - <certificates - src="user" - overridePins="true" /> - </trust-anchors> - </debug-overrides> - </network-security-config> - """ - ) - } else { - // If the file already exists. - readText().let { text -> - if (!text.contains("<certificates src=\"user\" />")) { - writeText( - text.replace( - "<trust-anchors>", - "<trust-anchors>\n<certificates src=\"user\" overridePins=\"true\" />\n<certificates src=\"system\" />" - ) - ) - } - } - - } - } - } -} diff --git a/src/main/kotlin/app/revanced/patches/all/misc/packagename/patch/ChangePackageNamePatch.kt b/src/main/kotlin/app/revanced/patches/all/misc/packagename/patch/ChangePackageNamePatch.kt index 8498ee694f..0709e75c44 100644 --- a/src/main/kotlin/app/revanced/patches/all/misc/packagename/patch/ChangePackageNamePatch.kt +++ b/src/main/kotlin/app/revanced/patches/all/misc/packagename/patch/ChangePackageNamePatch.kt @@ -9,32 +9,30 @@ import org.w3c.dom.Element @Patch(false) @Name("Change package name") -@Description("Changes the package name. Appends \".revanced\" to the package name by default.") +@Description("Changes the package name.") class ChangePackageNamePatch : ResourcePatch { - override fun execute(context: ResourceContext) { - val packageNameToUse = packageName ?: getDefaultPackageName(context) + override fun execute(context: ResourceContext): PatchResult { + packageName?.let { packageName -> + val packageNameRegex = Regex("^[a-z]\\w*(\\.[a-z]\\w*)+\$") + if (!packageName.matches(packageNameRegex)) + return PatchResultError("Invalid package name") - val packageNameRegex = Regex("^[a-z]\\w*(\\.[a-z]\\w*)+\$") - if (!packageNameToUse.matches(packageNameRegex)) - throw PatchException("Invalid package name") + var originalPackageName: String + context.xmlEditor["AndroidManifest.xml"].use { editor -> + val manifest = editor.file.getElementsByTagName("manifest").item(0) as Element + originalPackageName = manifest.getAttribute("package") + } - val originalPackageName = getOriginalPackageName(context) + if (!originalPackageName.matches(packageNameRegex)) + return PatchResultError("Failed to get the original package name") - context["AndroidManifest.xml"].apply { - readText().replace(originalPackageName, packageNameToUse).let(::writeText) - } - } + context["AndroidManifest.xml"].apply { + readText().replace(originalPackageName, packageName).let(::writeText) + } - private fun getDefaultPackageName(context: ResourceContext): String { - val originalPackageName = getOriginalPackageName(context) - return "$originalPackageName.revanced" - } + } ?: return PatchResultError("No package name provided") - private fun getOriginalPackageName(context: ResourceContext): String { - context.xmlEditor["AndroidManifest.xml"].use { editor -> - val manifest = editor.file.getElementsByTagName("manifest").item(0) as Element - return manifest.getAttribute("package") - } + return PatchResultSuccess() } companion object : OptionsContainer() { @@ -43,7 +41,7 @@ class ChangePackageNamePatch : ResourcePatch { key = "packageName", default = null, title = "Package name", - description = "The name of the package to rename the app to.", + description = "The name of the package to rename of the app.", ) ) } diff --git a/src/main/kotlin/app/revanced/patches/all/screencapture/removerestriction/bytecode/patch/RemoveCaptureRestrictionPatch.kt b/src/main/kotlin/app/revanced/patches/all/screencapture/removerestriction/bytecode/patch/RemoveCaptureRestrictionPatch.kt index 7e372798b3..499f262bcf 100644 --- a/src/main/kotlin/app/revanced/patches/all/screencapture/removerestriction/bytecode/patch/RemoveCaptureRestrictionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/all/screencapture/removerestriction/bytecode/patch/RemoveCaptureRestrictionPatch.kt @@ -7,20 +7,17 @@ import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.RequiresIntegrations import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patches.all.screencapture.removerestriction.resource.patch.RemoveCaptureRestrictionResourcePatch -import app.revanced.util.patch.AbstractTransformInstructionsPatch -import app.revanced.util.patch.IMethodCall -import app.revanced.util.patch.Instruction35cInfo -import app.revanced.util.patch.filterMapInstruction35c -import com.android.tools.smali.dexlib2.iface.ClassDef -import com.android.tools.smali.dexlib2.iface.Method -import com.android.tools.smali.dexlib2.iface.instruction.Instruction +import app.revanced.util.patch.* +import org.jf.dexlib2.iface.ClassDef +import org.jf.dexlib2.iface.Method +import org.jf.dexlib2.iface.instruction.Instruction @Patch(false) @Name("Remove screen capture restriction") @Description("Removes the restriction of capturing audio from apps that normally wouldn't allow it.") @DependsOn([RemoveCaptureRestrictionResourcePatch::class]) @RequiresIntegrations -class RemoveCaptureRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() { +internal class RemoveCaptureRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() { // Information about method calls we want to replace enum class MethodCall( override val definedClassName: String, diff --git a/src/main/kotlin/app/revanced/patches/all/screencapture/removerestriction/resource/patch/RemoveCaptureRestrictionResourcePatch.kt b/src/main/kotlin/app/revanced/patches/all/screencapture/removerestriction/resource/patch/RemoveCaptureRestrictionResourcePatch.kt index 880b32c375..4efd191e26 100644 --- a/src/main/kotlin/app/revanced/patches/all/screencapture/removerestriction/resource/patch/RemoveCaptureRestrictionResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/all/screencapture/removerestriction/resource/patch/RemoveCaptureRestrictionResourcePatch.kt @@ -2,12 +2,14 @@ package app.revanced.patches.all.screencapture.removerestriction.resource.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import org.w3c.dom.Element @Description("Sets allowAudioPlaybackCapture in manifest to true.") internal class RemoveCaptureRestrictionResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { // create an xml editor instance context.xmlEditor["AndroidManifest.xml"].use { dom -> // get the application node @@ -19,5 +21,7 @@ internal class RemoveCaptureRestrictionResourcePatch : ResourcePatch { // set allowAudioPlaybackCapture attribute to true applicationNode.setAttribute("android:allowAudioPlaybackCapture", "true") } + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/all/screenshot/removerestriction/patch/RemoveScreenshotRestrictionPatch.kt b/src/main/kotlin/app/revanced/patches/all/screenshot/removerestriction/patch/RemoveScreenshotRestrictionPatch.kt index 05c49282b0..9f096e799b 100644 --- a/src/main/kotlin/app/revanced/patches/all/screenshot/removerestriction/patch/RemoveScreenshotRestrictionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/all/screenshot/removerestriction/patch/RemoveScreenshotRestrictionPatch.kt @@ -5,19 +5,17 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.RequiresIntegrations import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod -import app.revanced.util.patch.AbstractTransformInstructionsPatch -import app.revanced.util.patch.IMethodCall -import app.revanced.util.patch.Instruction35cInfo -import app.revanced.util.patch.filterMapInstruction35c -import com.android.tools.smali.dexlib2.iface.ClassDef -import com.android.tools.smali.dexlib2.iface.Method -import com.android.tools.smali.dexlib2.iface.instruction.Instruction +import app.revanced.util.patch.* +import org.jf.dexlib2.iface.ClassDef +import org.jf.dexlib2.iface.Method +import org.jf.dexlib2.iface.instruction.Instruction +import java.util.* @Patch(false) @Name("Remove screenshot restriction") @Description("Removes the restriction of taking screenshots in apps that normally wouldn't allow it.") @RequiresIntegrations -class RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() { +internal class RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() { private companion object { const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX = diff --git a/src/main/kotlin/app/revanced/patches/backdrops/misc/pro/fingerprints/ProUnlockFingerprint.kt b/src/main/kotlin/app/revanced/patches/backdrops/misc/pro/fingerprints/ProUnlockFingerprint.kt index 252e030810..2835fc0b2f 100644 --- a/src/main/kotlin/app/revanced/patches/backdrops/misc/pro/fingerprints/ProUnlockFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/backdrops/misc/pro/fingerprints/ProUnlockFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.backdrops.misc.pro.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object ProUnlockFingerprint : MethodFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/backdrops/misc/pro/patch/ProUnlockPatch.kt b/src/main/kotlin/app/revanced/patches/backdrops/misc/pro/patch/ProUnlockPatch.kt index 2c5d8ed5ce..ed9af58723 100644 --- a/src/main/kotlin/app/revanced/patches/backdrops/misc/pro/patch/ProUnlockPatch.kt +++ b/src/main/kotlin/app/revanced/patches/backdrops/misc/pro/patch/ProUnlockPatch.kt @@ -1,16 +1,18 @@ package app.revanced.patches.backdrops.misc.pro.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.backdrops.misc.pro.annotations.ProUnlockCompatibility import app.revanced.patches.backdrops.misc.pro.fingerprints.ProUnlockFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Patch @Name("Pro unlock") @@ -19,7 +21,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction class ProUnlockPatch : BytecodePatch( listOf(ProUnlockFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { ProUnlockFingerprint.result?.let { result -> val registerIndex = result.scanResult.patternScanResult!!.endIndex - 1 @@ -33,6 +35,8 @@ class ProUnlockPatch : BytecodePatch( ) } - } ?: throw ProUnlockFingerprint.exception + } ?: return ProUnlockFingerprint.toErrorResult() + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/candylinkvpn/patch/UnlockProPatch.kt b/src/main/kotlin/app/revanced/patches/candylinkvpn/patch/UnlockProPatch.kt index c1eb4b7f6f..c15c69348d 100644 --- a/src/main/kotlin/app/revanced/patches/candylinkvpn/patch/UnlockProPatch.kt +++ b/src/main/kotlin/app/revanced/patches/candylinkvpn/patch/UnlockProPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.candylinkvpn.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.candylinkvpn.annotations.UnlockProCompatibility import app.revanced.patches.candylinkvpn.fingerprints.IsPremiumPurchasedFingerprint @@ -17,13 +19,15 @@ import app.revanced.patches.candylinkvpn.fingerprints.IsPremiumPurchasedFingerpr class UnlockProPatch : BytecodePatch( listOf(IsPremiumPurchasedFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { IsPremiumPurchasedFingerprint.result?.mutableMethod?.addInstructions( 0, """ const/4 v0, 0x1 return v0 """ - ) ?: throw IsPremiumPurchasedFingerprint.exception + ) ?: return IsPremiumPurchasedFingerprint.toErrorResult() + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/duolingo/unlocksuper/fingerprints/IsUserSuperMethodFingerprint.kt b/src/main/kotlin/app/revanced/patches/duolingo/unlocksuper/fingerprints/IsUserSuperMethodFingerprint.kt deleted file mode 100644 index 8ee88fdcee..0000000000 --- a/src/main/kotlin/app/revanced/patches/duolingo/unlocksuper/fingerprints/IsUserSuperMethodFingerprint.kt +++ /dev/null @@ -1,14 +0,0 @@ -package app.revanced.patches.duolingo.unlocksuper.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode - -object IsUserSuperMethodFingerprint : MethodFingerprint( - returnType = "Ljava/lang/Object", - parameters = listOf("Ljava/lang/Object"), - accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, - strings = listOf("user"), - opcodes = listOf(Opcode.IGET_BOOLEAN), -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/duolingo/unlocksuper/fingerprints/UserSerializationMethodFingerprint.kt b/src/main/kotlin/app/revanced/patches/duolingo/unlocksuper/fingerprints/UserSerializationMethodFingerprint.kt deleted file mode 100644 index 2d8bcdda14..0000000000 --- a/src/main/kotlin/app/revanced/patches/duolingo/unlocksuper/fingerprints/UserSerializationMethodFingerprint.kt +++ /dev/null @@ -1,20 +0,0 @@ -package app.revanced.patches.duolingo.unlocksuper.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode - -object UserSerializationMethodFingerprint : MethodFingerprint( - returnType = "V", - accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, - strings = listOf( - "betaStatus", - "coachOutfit", - "globalAmbassadorStatus", - ), - opcodes = listOf( - Opcode.MOVE_FROM16, - Opcode.IPUT_BOOLEAN, - ), -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/duolingo/unlocksuper/patch/UnlockDuolingoSuperPatch.kt b/src/main/kotlin/app/revanced/patches/duolingo/unlocksuper/patch/UnlockDuolingoSuperPatch.kt deleted file mode 100644 index c02228f2b1..0000000000 --- a/src/main/kotlin/app/revanced/patches/duolingo/unlocksuper/patch/UnlockDuolingoSuperPatch.kt +++ /dev/null @@ -1,64 +0,0 @@ -package app.revanced.patches.duolingo.unlocksuper.patch - -import app.revanced.extensions.exception -import app.revanced.patcher.annotation.Compatibility -import app.revanced.patcher.annotation.Description -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.annotation.Package -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.getInstructions -import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod -import app.revanced.patches.duolingo.unlocksuper.fingerprints.IsUserSuperMethodFingerprint -import app.revanced.patches.duolingo.unlocksuper.fingerprints.UserSerializationMethodFingerprint -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction22c -import com.android.tools.smali.dexlib2.iface.reference.Reference - -@Patch -@Name("Unlock Duolingo Super") -@Description("Unlocks Duolingo Super features.") -@Compatibility([Package("com.duolingo")]) -class UnlockDuolingoSuperPatch : BytecodePatch( - listOf(UserSerializationMethodFingerprint, IsUserSuperMethodFingerprint) -) { - - /* First find the reference to the isUserSuper field, then patch the instruction that assigns it to false. - * This strategy is used because the method that sets the isUserSuper field is difficult to fingerprint reliably. - */ - override fun execute(context: BytecodeContext) { - // Find the reference to the isUserSuper field. - val isUserSuperReference = IsUserSuperMethodFingerprint - .result - ?.mutableMethod - ?.getInstructions() - ?.filterIsInstance<BuilderInstruction22c>() - ?.firstOrNull { it.opcode == Opcode.IGET_BOOLEAN } - ?.reference - ?: throw IsUserSuperMethodFingerprint.exception - - // Patch the instruction that assigns isUserSuper to true. - UserSerializationMethodFingerprint - .result - ?.mutableMethod - ?.apply { - replaceInstructions( - indexOfReference(isUserSuperReference) - 1, - "const/4 v2, 0x1" - ) - } - ?: throw UserSerializationMethodFingerprint.exception - } - - private companion object { - private fun MutableMethod.indexOfReference(reference: Reference) = getInstructions() - .filterIsInstance<BuilderInstruction22c>() - .filter { it.opcode == Opcode.IPUT_BOOLEAN }.indexOfFirst { it.reference == reference }.let { - if (it == -1) throw PatchException("Could not find index of instruction with supplied reference.") - else it - } - } -} \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/fingerprints/BootStateFingerprint.kt b/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/fingerprints/BootStateFingerprint.kt index b1956358a3..082ca3121d 100644 --- a/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/fingerprints/BootStateFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/fingerprints/BootStateFingerprint.kt @@ -1,8 +1,8 @@ package app.revanced.patches.finanzonline.detection.bootloader.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode // Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#isBootStateOk (3.0.1) object BootStateFingerprint : MethodFingerprint( diff --git a/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/fingerprints/CreateKeyFingerprint.kt b/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/fingerprints/CreateKeyFingerprint.kt index 62df653279..dcfcb0b8e5 100644 --- a/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/fingerprints/CreateKeyFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/fingerprints/CreateKeyFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.finanzonline.detection.bootloader.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags // Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#createKey (3.0.1) object CreateKeyFingerprint : MethodFingerprint( diff --git a/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/patch/BootloaderDetectionPatch.kt b/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/patch/BootloaderDetectionPatch.kt index 6864d96355..61ed8c5758 100644 --- a/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/patch/BootloaderDetectionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/patch/BootloaderDetectionPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.finanzonline.detection.bootloader.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.BootStateFingerprint import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.CreateKeyFingerprint @@ -19,7 +21,7 @@ import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionC class BootloaderDetectionPatch : BytecodePatch( listOf(CreateKeyFingerprint, BootStateFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { arrayOf(CreateKeyFingerprint, BootStateFingerprint).forEach { fingerprint -> fingerprint.result?.mutableMethod?.addInstructions( 0, @@ -27,7 +29,9 @@ class BootloaderDetectionPatch : BytecodePatch( const/4 v0, 0x1 return v0 """ - ) ?: throw fingerprint.exception + ) ?: return fingerprint.toErrorResult() } + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/finanzonline/detection/root/fingerprints/RootDetectionFingerprint.kt b/src/main/kotlin/app/revanced/patches/finanzonline/detection/root/fingerprints/RootDetectionFingerprint.kt index 73af27868e..8c0bb011d8 100644 --- a/src/main/kotlin/app/revanced/patches/finanzonline/detection/root/fingerprints/RootDetectionFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/finanzonline/detection/root/fingerprints/RootDetectionFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.finanzonline.detection.root.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode // Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.RootDetection#isRooted (3.0.1) object RootDetectionFingerprint : MethodFingerprint( diff --git a/src/main/kotlin/app/revanced/patches/finanzonline/detection/root/patch/RootDetectionPatch.kt b/src/main/kotlin/app/revanced/patches/finanzonline/detection/root/patch/RootDetectionPatch.kt index 35ebdfe323..a7a0066146 100644 --- a/src/main/kotlin/app/revanced/patches/finanzonline/detection/root/patch/RootDetectionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/finanzonline/detection/root/patch/RootDetectionPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.finanzonline.detection.root.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.finanzonline.detection.root.fingerprints.RootDetectionFingerprint import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionCompatibility @@ -17,13 +19,15 @@ import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionC class RootDetectionPatch : BytecodePatch( listOf(RootDetectionFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { RootDetectionFingerprint.result?.mutableMethod?.addInstructions( 0, """ sget-object v0, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean; return-object v0 """ - ) ?: throw RootDetectionFingerprint.exception + ) ?: return RootDetectionFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/googlerecorder/restrictions/patch/RemoveDeviceRestrictions.kt b/src/main/kotlin/app/revanced/patches/googlerecorder/restrictions/patch/RemoveDeviceRestrictions.kt index f505efbac1..6e408c06ca 100644 --- a/src/main/kotlin/app/revanced/patches/googlerecorder/restrictions/patch/RemoveDeviceRestrictions.kt +++ b/src/main/kotlin/app/revanced/patches/googlerecorder/restrictions/patch/RemoveDeviceRestrictions.kt @@ -1,6 +1,6 @@ package app.revanced.patches.googlerecorder.restrictions.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name @@ -10,9 +10,11 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.googlerecorder.restrictions.fingerprints.OnApplicationCreateFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Patch @Name("Remove device restrictions") @@ -21,7 +23,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction class RemoveDeviceRestrictions : BytecodePatch( listOf(OnApplicationCreateFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { OnApplicationCreateFingerprint.result?.let { val featureStringIndex = it.scanResult.stringsScanResult!!.matches.first().index @@ -34,6 +36,8 @@ class RemoveDeviceRestrictions : BytecodePatch( // Override "isPixelDevice()" to return true. addInstruction(featureStringIndex, "const/4 v$featureAvailableRegister, 0x1") } - } ?: throw OnApplicationCreateFingerprint.exception + } ?: return OnApplicationCreateFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/hexeditor/ad/patch/HexEditorAdsPatch.kt b/src/main/kotlin/app/revanced/patches/hexeditor/ad/patch/HexEditorAdsPatch.kt index 84d4dbf955..e5ad20d55b 100644 --- a/src/main/kotlin/app/revanced/patches/hexeditor/ad/patch/HexEditorAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/hexeditor/ad/patch/HexEditorAdsPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.hexeditor.ad.annotations.HexEditorAdsCompatibility import app.revanced.patches.hexeditor.ad.fingerprints.PrimaryAdsFingerprint @@ -18,7 +20,7 @@ class HexEditorAdsPatch : BytecodePatch( PrimaryAdsFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val method = PrimaryAdsFingerprint.result!!.mutableMethod method.replaceInstructions( @@ -28,5 +30,7 @@ class HexEditorAdsPatch : BytecodePatch( return v0 """ ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/iconpackstudio/misc/pro/patch/UnlockProPatch.kt b/src/main/kotlin/app/revanced/patches/iconpackstudio/misc/pro/patch/UnlockProPatch.kt index 13d8c8490f..bb866bfff5 100644 --- a/src/main/kotlin/app/revanced/patches/iconpackstudio/misc/pro/patch/UnlockProPatch.kt +++ b/src/main/kotlin/app/revanced/patches/iconpackstudio/misc/pro/patch/UnlockProPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.iconpackstudio.misc.pro.annotations.UnlockProCompatibility import app.revanced.patches.iconpackstudio.misc.pro.fingerprints.CheckProFingerprint @@ -18,7 +20,7 @@ class UnlockProPatch : BytecodePatch( CheckProFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val method = CheckProFingerprint.result!!.mutableMethod method.addInstructions( 0, @@ -27,5 +29,7 @@ class UnlockProPatch : BytecodePatch( return v0 """ ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/idaustria/detection/root/fingerprints/RootDetectionFingerprint.kt b/src/main/kotlin/app/revanced/patches/idaustria/detection/root/fingerprints/RootDetectionFingerprint.kt index 359d90db02..185a9e5ad8 100644 --- a/src/main/kotlin/app/revanced/patches/idaustria/detection/root/fingerprints/RootDetectionFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/idaustria/detection/root/fingerprints/RootDetectionFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.idaustria.detection.root.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object RootDetectionFingerprint : MethodFingerprint( "V", diff --git a/src/main/kotlin/app/revanced/patches/idaustria/detection/root/patch/RootDetectionPatch.kt b/src/main/kotlin/app/revanced/patches/idaustria/detection/root/patch/RootDetectionPatch.kt index f7edc70c25..04c486bbcc 100644 --- a/src/main/kotlin/app/revanced/patches/idaustria/detection/root/patch/RootDetectionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/idaustria/detection/root/patch/RootDetectionPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.idaustria.detection.root.fingerprints.RootDetectionFingerprint import app.revanced.patches.idaustria.detection.shared.annotations.DetectionCompatibility @@ -16,6 +18,8 @@ import app.revanced.patches.idaustria.detection.shared.annotations.DetectionComp class RootDetectionPatch : BytecodePatch( listOf(RootDetectionFingerprint) ) { - override fun execute(context: BytecodeContext) = + override fun execute(context: BytecodeContext): PatchResult { RootDetectionFingerprint.result!!.mutableMethod.addInstruction(0, "return-void") + return PatchResultSuccess() + } } diff --git a/src/main/kotlin/app/revanced/patches/idaustria/detection/signature/fingerprints/SpoofSignatureFingerprint.kt b/src/main/kotlin/app/revanced/patches/idaustria/detection/signature/fingerprints/SpoofSignatureFingerprint.kt index 461f818b9f..c11b2e0b6f 100644 --- a/src/main/kotlin/app/revanced/patches/idaustria/detection/signature/fingerprints/SpoofSignatureFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/idaustria/detection/signature/fingerprints/SpoofSignatureFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.idaustria.detection.signature.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object SpoofSignatureFingerprint : MethodFingerprint( "L", diff --git a/src/main/kotlin/app/revanced/patches/idaustria/detection/signature/patch/SpoofSignaturePatch.kt b/src/main/kotlin/app/revanced/patches/idaustria/detection/signature/patch/SpoofSignaturePatch.kt index 295855048f..6c1c229b7c 100644 --- a/src/main/kotlin/app/revanced/patches/idaustria/detection/signature/patch/SpoofSignaturePatch.kt +++ b/src/main/kotlin/app/revanced/patches/idaustria/detection/signature/patch/SpoofSignaturePatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.idaustria.detection.shared.annotations.DetectionCompatibility import app.revanced.patches.idaustria.detection.signature.fingerprints.SpoofSignatureFingerprint @@ -30,7 +32,7 @@ class SpoofSignaturePatch : BytecodePatch( "bf42c121d620ddfb7914f7a95c713d9e1c1b7bdb4a03d618e40cf7e9e235c0b5687e03b7ab3,publicExponent=10001}" } - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SpoofSignatureFingerprint.result!!.mutableMethod.addInstructions( 0, """ @@ -38,5 +40,6 @@ class SpoofSignaturePatch : BytecodePatch( return-object v0 """ ) + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/inshorts/ad/patch/InshortsAdsPatch.kt b/src/main/kotlin/app/revanced/patches/inshorts/ad/patch/InshortsAdsPatch.kt index 8b48bcd415..a0b314e750 100644 --- a/src/main/kotlin/app/revanced/patches/inshorts/ad/patch/InshortsAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/inshorts/ad/patch/InshortsAdsPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.inshorts.ad.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.inshorts.ad.annotations.HideAdsCompatibility import app.revanced.patches.inshorts.ad.fingerprints.InshortsAdsFingerprint @@ -17,7 +19,7 @@ import app.revanced.patches.inshorts.ad.fingerprints.InshortsAdsFingerprint class HideAdsPatch : BytecodePatch( listOf(InshortsAdsFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { InshortsAdsFingerprint.result?.let { result -> result.apply { mutableMethod.addInstruction( @@ -27,6 +29,8 @@ class HideAdsPatch : BytecodePatch( """ ) } - } ?: throw InshortsAdsFingerprint.exception + } ?: return InshortsAdsFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ShowAdFingerprint.kt b/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ShowAdFingerprint.kt index 5e936ce16b..55d2dafe50 100644 --- a/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ShowAdFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ShowAdFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object ShowAdFingerprint : MethodFingerprint( "Z", diff --git a/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/GenericMediaAdFingerprint.kt b/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/GenericMediaAdFingerprint.kt index ebfc11bde5..f4988a1358 100644 --- a/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/GenericMediaAdFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/GenericMediaAdFingerprint.kt @@ -1,6 +1,6 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object GenericMediaAdFingerprint : MediaAdFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/MediaAdFingerprint.kt b/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/MediaAdFingerprint.kt index ef0d12a118..b31290f703 100644 --- a/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/MediaAdFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/MediaAdFingerprint.kt @@ -2,10 +2,10 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.ClassDef -import com.android.tools.smali.dexlib2.iface.Method +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.ClassDef +import org.jf.dexlib2.iface.Method abstract class MediaAdFingerprint( returnType: String? = "Z", diff --git a/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/PaidPartnershipAdFingerprint.kt b/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/PaidPartnershipAdFingerprint.kt index db31e5e450..0f10168c66 100644 --- a/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/PaidPartnershipAdFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/PaidPartnershipAdFingerprint.kt @@ -1,8 +1,8 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.reference.MethodReference +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.reference.MethodReference object PaidPartnershipAdFingerprint : MediaAdFingerprint( "V", diff --git a/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/ShoppingAdFingerprint.kt b/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/ShoppingAdFingerprint.kt index 643ffad9a7..28bd08a2ec 100644 --- a/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/ShoppingAdFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ads/ShoppingAdFingerprint.kt @@ -1,6 +1,6 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object ShoppingAdFingerprint : MediaAdFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/patch/HideTimelineAdsPatch.kt b/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/patch/HideTimelineAdsPatch.kt index a8b2cc699a..3090f5be09 100644 --- a/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/patch/HideTimelineAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/patch/HideTimelineAdsPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.instagram.patches.ads.timeline.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.* import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels @@ -8,6 +8,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.ExternalLabel import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.MediaFingerprint @@ -16,8 +18,8 @@ import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.Gene import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.MediaAdFingerprint import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.PaidPartnershipAdFingerprint import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.ShoppingAdFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Patch @Name("Hide timeline ads") @@ -30,19 +32,19 @@ class HideTimelineAdsPatch : BytecodePatch( PaidPartnershipAdFingerprint // Unlike the other ads this one is resolved from all classes. ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // region Resolve required methods to check for ads. - ShowAdFingerprint.result ?: throw ShowAdFingerprint.exception + ShowAdFingerprint.result ?: return ShowAdFingerprint.toErrorResult() - PaidPartnershipAdFingerprint.result ?: throw PaidPartnershipAdFingerprint.exception + PaidPartnershipAdFingerprint.result ?: return PaidPartnershipAdFingerprint.toErrorResult() MediaFingerprint.result?.let { GenericMediaAdFingerprint.resolve(context, it.classDef) ShoppingAdFingerprint.resolve(context, it.classDef) return@let - } ?: throw MediaFingerprint.exception + } ?: return MediaFingerprint.toErrorResult() // endregion @@ -97,5 +99,7 @@ class HideTimelineAdsPatch : BytecodePatch( // endregion } + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/irplus/ad/fingerprints/IrplusAdsFingerprint.kt b/src/main/kotlin/app/revanced/patches/irplus/ad/fingerprints/IrplusAdsFingerprint.kt index 063b0ae70a..061606b1c4 100644 --- a/src/main/kotlin/app/revanced/patches/irplus/ad/fingerprints/IrplusAdsFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/irplus/ad/fingerprints/IrplusAdsFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.irplus.ad.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object IrplusAdsFingerprint : MethodFingerprint( "V", diff --git a/src/main/kotlin/app/revanced/patches/irplus/ad/patch/IrplusAdsPatch.kt b/src/main/kotlin/app/revanced/patches/irplus/ad/patch/IrplusAdsPatch.kt index a138d5fd91..c4e93e7c12 100644 --- a/src/main/kotlin/app/revanced/patches/irplus/ad/patch/IrplusAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/irplus/ad/patch/IrplusAdsPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.irplus.ad.annotations.IrplusAdsCompatibility import app.revanced.patches.irplus.ad.fingerprints.IrplusAdsFingerprint @@ -17,11 +19,13 @@ import app.revanced.patches.irplus.ad.fingerprints.IrplusAdsFingerprint class IrplusAdsPatch : BytecodePatch( listOf(IrplusAdsFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val method = IrplusAdsFingerprint.result!!.mutableMethod // By overwriting the second parameter of the method, // the view which holds the advertisement is removed. method.addInstruction(0, "const/4 p2, 0x0") + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/lightroom/misc/login/annotations/DisableMandatoryLoginCompatibility.kt b/src/main/kotlin/app/revanced/patches/lightroom/misc/login/annotations/DisableMandatoryLoginCompatibility.kt deleted file mode 100644 index edc9e68962..0000000000 --- a/src/main/kotlin/app/revanced/patches/lightroom/misc/login/annotations/DisableMandatoryLoginCompatibility.kt +++ /dev/null @@ -1,8 +0,0 @@ -package app.revanced.patches.lightroom.misc.login.annotations - -import app.revanced.patcher.annotation.Compatibility -import app.revanced.patcher.annotation.Package - -@Compatibility([Package("com.adobe.lrmobile",)]) -@Target(AnnotationTarget.CLASS) -internal annotation class DisableMandatoryLoginCompatibility diff --git a/src/main/kotlin/app/revanced/patches/lightroom/misc/login/fingerprint/IsLoggedInFingerprint.kt b/src/main/kotlin/app/revanced/patches/lightroom/misc/login/fingerprint/IsLoggedInFingerprint.kt deleted file mode 100644 index 7e56d8d02f..0000000000 --- a/src/main/kotlin/app/revanced/patches/lightroom/misc/login/fingerprint/IsLoggedInFingerprint.kt +++ /dev/null @@ -1,19 +0,0 @@ -package app.revanced.patches.lightroom.misc.login.fingerprint - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode - -object IsLoggedInFingerprint : MethodFingerprint( - returnType = "Z", - accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL, - opcodes = listOf( - Opcode.INVOKE_STATIC, - Opcode.MOVE_RESULT_OBJECT, - Opcode.SGET_OBJECT, - Opcode.IF_NE, - Opcode.CONST_4, - Opcode.GOTO - ) -) diff --git a/src/main/kotlin/app/revanced/patches/lightroom/misc/login/patch/DisableMandatoryLoginPatch.kt b/src/main/kotlin/app/revanced/patches/lightroom/misc/login/patch/DisableMandatoryLoginPatch.kt deleted file mode 100644 index b1317bb071..0000000000 --- a/src/main/kotlin/app/revanced/patches/lightroom/misc/login/patch/DisableMandatoryLoginPatch.kt +++ /dev/null @@ -1,23 +0,0 @@ -package app.revanced.patches.lightroom.misc.login.patch - -import app.revanced.extensions.exception -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.lightroom.misc.login.annotations.DisableMandatoryLoginCompatibility -import app.revanced.patches.lightroom.misc.login.fingerprint.IsLoggedInFingerprint - -@Patch -@Name("Disable mandatory login") -@DisableMandatoryLoginCompatibility -class DisableMandatoryLoginPatch : BytecodePatch(listOf(IsLoggedInFingerprint)) { - override fun execute(context: BytecodeContext) { - IsLoggedInFingerprint.result?.mutableMethod?.apply { - val index = implementation!!.instructions.lastIndex - 1 - // Set isLoggedIn = true. - replaceInstruction(index, "const/4 v0, 0x1") - } ?: throw IsLoggedInFingerprint.exception - } -} \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/lightroom/misc/premium/annotations/UnlockPremiumCompatibility.kt b/src/main/kotlin/app/revanced/patches/lightroom/misc/premium/annotations/UnlockPremiumCompatibility.kt deleted file mode 100644 index 1c03bff621..0000000000 --- a/src/main/kotlin/app/revanced/patches/lightroom/misc/premium/annotations/UnlockPremiumCompatibility.kt +++ /dev/null @@ -1,8 +0,0 @@ -package app.revanced.patches.lightroom.misc.premium.annotations - -import app.revanced.patcher.annotation.Compatibility -import app.revanced.patcher.annotation.Package - -@Compatibility([Package("com.adobe.lrmobile")]) -@Target(AnnotationTarget.CLASS) -internal annotation class UnlockPremiumCompatibility diff --git a/src/main/kotlin/app/revanced/patches/lightroom/misc/premium/fingerprint/HasPurchasedFingerprint.kt b/src/main/kotlin/app/revanced/patches/lightroom/misc/premium/fingerprint/HasPurchasedFingerprint.kt deleted file mode 100644 index 31bef22848..0000000000 --- a/src/main/kotlin/app/revanced/patches/lightroom/misc/premium/fingerprint/HasPurchasedFingerprint.kt +++ /dev/null @@ -1,18 +0,0 @@ -package app.revanced.patches.lightroom.misc.premium.fingerprint - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode - -object HasPurchasedFingerprint : MethodFingerprint( - returnType = "Z", - accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL, - strings = listOf("isPurchaseDoneRecently = true, access platform profile present? = "), - opcodes = listOf( - Opcode.SGET_OBJECT, - Opcode.CONST_4, - Opcode.CONST_4, - Opcode.CONST_4, - ) -) diff --git a/src/main/kotlin/app/revanced/patches/lightroom/misc/premium/patch/UnlockPremiumPatch.kt b/src/main/kotlin/app/revanced/patches/lightroom/misc/premium/patch/UnlockPremiumPatch.kt deleted file mode 100644 index f71cc2a95b..0000000000 --- a/src/main/kotlin/app/revanced/patches/lightroom/misc/premium/patch/UnlockPremiumPatch.kt +++ /dev/null @@ -1,23 +0,0 @@ -package app.revanced.patches.lightroom.misc.premium.patch - -import app.revanced.extensions.exception -import app.revanced.patcher.annotation.Description -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.lightroom.misc.premium.annotations.UnlockPremiumCompatibility -import app.revanced.patches.lightroom.misc.premium.fingerprint.HasPurchasedFingerprint - -@Patch -@Name("Unlock premium") -@Description("Unlocks premium features.") -@UnlockPremiumCompatibility -class UnlockPremiumPatch : BytecodePatch(listOf(HasPurchasedFingerprint)) { - override fun execute(context: BytecodeContext) { - // Set hasPremium = true. - HasPurchasedFingerprint.result?.mutableMethod?.replaceInstruction(2, "const/4 v2, 0x1") - ?: throw HasPurchasedFingerprint.exception - } -} \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/memegenerator/detection/license/fingerprint/LicenseValidationFingerprint.kt b/src/main/kotlin/app/revanced/patches/memegenerator/detection/license/fingerprint/LicenseValidationFingerprint.kt index d6454e7054..9de66ac2a6 100644 --- a/src/main/kotlin/app/revanced/patches/memegenerator/detection/license/fingerprint/LicenseValidationFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/memegenerator/detection/license/fingerprint/LicenseValidationFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.memegenerator.detection.license.fingerprint import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object LicenseValidationFingerprint : MethodFingerprint( returnType = "Z", diff --git a/src/main/kotlin/app/revanced/patches/memegenerator/detection/license/patch/LicenseValidationPatch.kt b/src/main/kotlin/app/revanced/patches/memegenerator/detection/license/patch/LicenseValidationPatch.kt index 337d3e171e..34b11e4862 100644 --- a/src/main/kotlin/app/revanced/patches/memegenerator/detection/license/patch/LicenseValidationPatch.kt +++ b/src/main/kotlin/app/revanced/patches/memegenerator/detection/license/patch/LicenseValidationPatch.kt @@ -1,17 +1,19 @@ package app.revanced.patches.memegenerator.detection.license.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.memegenerator.detection.license.fingerprint.LicenseValidationFingerprint @Description("Disables Firebase license validation.") class LicenseValidationPatch : BytecodePatch( listOf(LicenseValidationFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { LicenseValidationFingerprint.result?.apply { mutableMethod.replaceInstructions( 0, @@ -20,6 +22,8 @@ class LicenseValidationPatch : BytecodePatch( return p0 """ ) - } ?: throw LicenseValidationFingerprint.exception + } ?: throw LicenseValidationFingerprint.toErrorResult() + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/memegenerator/detection/signature/fingerprint/VerifySignatureFingerprint.kt b/src/main/kotlin/app/revanced/patches/memegenerator/detection/signature/fingerprint/VerifySignatureFingerprint.kt index 10ea37f9bb..bc8cdc9fb1 100644 --- a/src/main/kotlin/app/revanced/patches/memegenerator/detection/signature/fingerprint/VerifySignatureFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/memegenerator/detection/signature/fingerprint/VerifySignatureFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.memegenerator.detection.signature.fingerprint import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode @FuzzyPatternScanMethod(2) object VerifySignatureFingerprint : MethodFingerprint( diff --git a/src/main/kotlin/app/revanced/patches/memegenerator/detection/signature/patch/SignatureVerificationPatch.kt b/src/main/kotlin/app/revanced/patches/memegenerator/detection/signature/patch/SignatureVerificationPatch.kt index 47b056daf5..3105311b6a 100644 --- a/src/main/kotlin/app/revanced/patches/memegenerator/detection/signature/patch/SignatureVerificationPatch.kt +++ b/src/main/kotlin/app/revanced/patches/memegenerator/detection/signature/patch/SignatureVerificationPatch.kt @@ -1,17 +1,19 @@ package app.revanced.patches.memegenerator.detection.signature.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.memegenerator.detection.signature.fingerprint.VerifySignatureFingerprint @Description("Disables detection of incorrect signature.") class SignatureVerificationPatch : BytecodePatch( listOf(VerifySignatureFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { VerifySignatureFingerprint.result?.apply { mutableMethod.replaceInstructions( 0, @@ -20,6 +22,8 @@ class SignatureVerificationPatch : BytecodePatch( return p0 """ ) - } ?: throw VerifySignatureFingerprint.exception + } ?: throw VerifySignatureFingerprint.toErrorResult() + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/memegenerator/misc/pro/fingerprint/IsFreeVersionFingerprint.kt b/src/main/kotlin/app/revanced/patches/memegenerator/misc/pro/fingerprint/IsFreeVersionFingerprint.kt index d601f5b3c6..19f08da0e2 100644 --- a/src/main/kotlin/app/revanced/patches/memegenerator/misc/pro/fingerprint/IsFreeVersionFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/memegenerator/misc/pro/fingerprint/IsFreeVersionFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.memegenerator.misc.pro.fingerprint import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object IsFreeVersionFingerprint : MethodFingerprint( returnType = "Ljava/lang/Boolean;", diff --git a/src/main/kotlin/app/revanced/patches/memegenerator/misc/pro/patch/UnlockProVersionPatch.kt b/src/main/kotlin/app/revanced/patches/memegenerator/misc/pro/patch/UnlockProVersionPatch.kt index 601e78b240..74ec5da7a1 100644 --- a/src/main/kotlin/app/revanced/patches/memegenerator/misc/pro/patch/UnlockProVersionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/memegenerator/misc/pro/patch/UnlockProVersionPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.memegenerator.misc.pro.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.memegenerator.detection.license.patch.LicenseValidationPatch @@ -26,7 +28,7 @@ class UnlockProVersionPatch : BytecodePatch( IsFreeVersionFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { IsFreeVersionFingerprint.result?.apply { mutableMethod.replaceInstructions(0, """ @@ -34,6 +36,8 @@ class UnlockProVersionPatch : BytecodePatch( return-object p0 """ ) - } ?: throw IsFreeVersionFingerprint.exception + } ?: throw IsFreeVersionFingerprint.toErrorResult() + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/messenger/ads/inbox/fingerprints/LoadInboxAdsFingerprint.kt b/src/main/kotlin/app/revanced/patches/messenger/ads/inbox/fingerprints/LoadInboxAdsFingerprint.kt index 7352f1f9db..3bb5c3a385 100644 --- a/src/main/kotlin/app/revanced/patches/messenger/ads/inbox/fingerprints/LoadInboxAdsFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/messenger/ads/inbox/fingerprints/LoadInboxAdsFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.messenger.ads.inbox.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object LoadInboxAdsFingerprint : MethodFingerprint( returnType = "V", diff --git a/src/main/kotlin/app/revanced/patches/messenger/ads/inbox/patch/HideInboxAdsPatch.kt b/src/main/kotlin/app/revanced/patches/messenger/ads/inbox/patch/HideInboxAdsPatch.kt index 6101f4e6f5..e2d272125c 100644 --- a/src/main/kotlin/app/revanced/patches/messenger/ads/inbox/patch/HideInboxAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/messenger/ads/inbox/patch/HideInboxAdsPatch.kt @@ -1,10 +1,12 @@ package app.revanced.patches.messenger.ads.inbox.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.* import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.messenger.ads.inbox.fingerprints.LoadInboxAdsFingerprint @@ -15,10 +17,12 @@ import app.revanced.patches.messenger.ads.inbox.fingerprints.LoadInboxAdsFingerp class HideInboxAdsPatch : BytecodePatch( listOf(LoadInboxAdsFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { LoadInboxAdsFingerprint.result?.mutableMethod?.apply { this.replaceInstruction(0, "return-void") - } ?: throw LoadInboxAdsFingerprint.exception + } ?: return LoadInboxAdsFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/messenger/inputfield/fingerprints/SendTypingIndicatorFingerprint.kt b/src/main/kotlin/app/revanced/patches/messenger/inputfield/fingerprints/SendTypingIndicatorFingerprint.kt index dbaccb39d6..cff25ae299 100644 --- a/src/main/kotlin/app/revanced/patches/messenger/inputfield/fingerprints/SendTypingIndicatorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/messenger/inputfield/fingerprints/SendTypingIndicatorFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.messenger.inputfield.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.dexbacked.value.DexBackedStringEncodedValue +import org.jf.dexlib2.dexbacked.value.DexBackedStringEncodedValue object SendTypingIndicatorFingerprint : MethodFingerprint( returnType = "V", diff --git a/src/main/kotlin/app/revanced/patches/messenger/inputfield/fingerprints/SwitchMessangeInputEmojiButtonFingerprint.kt b/src/main/kotlin/app/revanced/patches/messenger/inputfield/fingerprints/SwitchMessangeInputEmojiButtonFingerprint.kt index 67b6713b21..ef01e1a5ab 100644 --- a/src/main/kotlin/app/revanced/patches/messenger/inputfield/fingerprints/SwitchMessangeInputEmojiButtonFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/messenger/inputfield/fingerprints/SwitchMessangeInputEmojiButtonFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.messenger.inputfield.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object SwitchMessangeInputEmojiButtonFingerprint : MethodFingerprint( returnType = "V", diff --git a/src/main/kotlin/app/revanced/patches/messenger/inputfield/patch/DisableSwitchingEmojiToStickerInMessageInputField.kt b/src/main/kotlin/app/revanced/patches/messenger/inputfield/patch/DisableSwitchingEmojiToStickerInMessageInputField.kt index dee26e289b..7aa77e12d6 100644 --- a/src/main/kotlin/app/revanced/patches/messenger/inputfield/patch/DisableSwitchingEmojiToStickerInMessageInputField.kt +++ b/src/main/kotlin/app/revanced/patches/messenger/inputfield/patch/DisableSwitchingEmojiToStickerInMessageInputField.kt @@ -1,21 +1,23 @@ package app.revanced.patches.messenger.inputfield.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.* import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.messenger.inputfield.fingerprints.SwitchMessangeInputEmojiButtonFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Patch @Name("Disable switching emoji to sticker in message input field") @Description("Disables switching from emoji to sticker search mode in message input field") @Compatibility([Package("com.facebook.orca")]) class DisableSwitchingEmojiToStickerInMessageInputField : BytecodePatch(listOf(SwitchMessangeInputEmojiButtonFingerprint)) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SwitchMessangeInputEmojiButtonFingerprint.result?.let { val setStringIndex = it.scanResult.patternScanResult!!.startIndex + 2 @@ -27,6 +29,8 @@ class DisableSwitchingEmojiToStickerInMessageInputField : BytecodePatch(listOf(S "const-string v$targetRegister, \"expression\"" ) } - } ?: throw SwitchMessangeInputEmojiButtonFingerprint.exception + } ?: throw SwitchMessangeInputEmojiButtonFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/messenger/inputfield/patch/DisableTypingIndicator.kt b/src/main/kotlin/app/revanced/patches/messenger/inputfield/patch/DisableTypingIndicator.kt index cfd852dad5..bb75cc1e65 100644 --- a/src/main/kotlin/app/revanced/patches/messenger/inputfield/patch/DisableTypingIndicator.kt +++ b/src/main/kotlin/app/revanced/patches/messenger/inputfield/patch/DisableTypingIndicator.kt @@ -1,6 +1,6 @@ package app.revanced.patches.messenger.inputfield.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name @@ -8,6 +8,8 @@ import app.revanced.patcher.annotation.Package import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.messenger.inputfield.fingerprints.SendTypingIndicatorFingerprint @@ -16,8 +18,10 @@ import app.revanced.patches.messenger.inputfield.fingerprints.SendTypingIndicato @Description("Disables the indicator while typing a message") @Compatibility([Package("com.facebook.orca")]) class DisableTypingIndicator : BytecodePatch(listOf(SendTypingIndicatorFingerprint)) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SendTypingIndicatorFingerprint.result?.mutableMethod?.replaceInstruction(0, "return-void") - ?: throw SendTypingIndicatorFingerprint.exception + ?: throw SendTypingIndicatorFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/moneymanager/fingerprints/UnlockProFingerprint.kt b/src/main/kotlin/app/revanced/patches/moneymanager/fingerprints/UnlockProFingerprint.kt index b051458df9..c7b6824a18 100644 --- a/src/main/kotlin/app/revanced/patches/moneymanager/fingerprints/UnlockProFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/moneymanager/fingerprints/UnlockProFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.moneymanager.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object UnlockProFingerprint : MethodFingerprint( "Z", diff --git a/src/main/kotlin/app/revanced/patches/moneymanager/patch/UnlockProPatch.kt b/src/main/kotlin/app/revanced/patches/moneymanager/patch/UnlockProPatch.kt index a6bbe51c52..9de5db3fcd 100644 --- a/src/main/kotlin/app/revanced/patches/moneymanager/patch/UnlockProPatch.kt +++ b/src/main/kotlin/app/revanced/patches/moneymanager/patch/UnlockProPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.moneymanager.annotations.UnlockProCompatibility import app.revanced.patches.moneymanager.fingerprints.UnlockProFingerprint @@ -16,7 +18,7 @@ import app.revanced.patches.moneymanager.fingerprints.UnlockProFingerprint class UnlockProPatch : BytecodePatch( listOf(UnlockProFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { UnlockProFingerprint.result!!.mutableMethod.addInstructions( 0, """ @@ -24,5 +26,6 @@ class UnlockProPatch : BytecodePatch( return v0 """ ) + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/music/ad/video/fingerprints/ShowMusicVideoAdsConstructorFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/ad/video/fingerprints/ShowMusicVideoAdsConstructorFingerprint.kt index 6832b875c7..dd60e2026e 100644 --- a/src/main/kotlin/app/revanced/patches/music/ad/video/fingerprints/ShowMusicVideoAdsConstructorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/ad/video/fingerprints/ShowMusicVideoAdsConstructorFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.music.ad.video.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode @FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value. object ShowMusicVideoAdsConstructorFingerprint : MethodFingerprint( diff --git a/src/main/kotlin/app/revanced/patches/music/ad/video/fingerprints/ShowMusicVideoAdsFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/ad/video/fingerprints/ShowMusicVideoAdsFingerprint.kt index c9230919f5..d6d8a138d9 100644 --- a/src/main/kotlin/app/revanced/patches/music/ad/video/fingerprints/ShowMusicVideoAdsFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/ad/video/fingerprints/ShowMusicVideoAdsFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.music.ad.video.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object ShowMusicVideoAdsFingerprint : MethodFingerprint( "V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"), listOf( diff --git a/src/main/kotlin/app/revanced/patches/music/ad/video/patch/MusicVideoAdsPatch.kt b/src/main/kotlin/app/revanced/patches/music/ad/video/patch/MusicVideoAdsPatch.kt index eca9604cd5..ea852b9dc6 100644 --- a/src/main/kotlin/app/revanced/patches/music/ad/video/patch/MusicVideoAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/ad/video/patch/MusicVideoAdsPatch.kt @@ -6,6 +6,8 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsConstructorFingerprint import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsFingerprint @@ -18,7 +20,7 @@ import app.revanced.patches.music.annotations.MusicCompatibility class MusicVideoAdsPatch : BytecodePatch( listOf(ShowMusicVideoAdsConstructorFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { ShowMusicVideoAdsFingerprint.resolve(context, ShowMusicVideoAdsConstructorFingerprint.result!!.classDef) val result = ShowMusicVideoAdsFingerprint.result!! @@ -29,5 +31,7 @@ class MusicVideoAdsPatch : BytecodePatch( const/4 p1, 0x0 """ ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/music/audio/codecs/fingerprints/AllCodecsReferenceFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/audio/codecs/fingerprints/AllCodecsReferenceFingerprint.kt index 2d0084014c..92f047d54c 100644 --- a/src/main/kotlin/app/revanced/patches/music/audio/codecs/fingerprints/AllCodecsReferenceFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/audio/codecs/fingerprints/AllCodecsReferenceFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.music.audio.codecs.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode @FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value. diff --git a/src/main/kotlin/app/revanced/patches/music/audio/codecs/fingerprints/CodecsLockFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/audio/codecs/fingerprints/CodecsLockFingerprint.kt index 2f99302763..8ab87777b3 100644 --- a/src/main/kotlin/app/revanced/patches/music/audio/codecs/fingerprints/CodecsLockFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/audio/codecs/fingerprints/CodecsLockFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.music.audio.codecs.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode @FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value. diff --git a/src/main/kotlin/app/revanced/patches/music/audio/codecs/patch/CodecsUnlockPatch.kt b/src/main/kotlin/app/revanced/patches/music/audio/codecs/patch/CodecsUnlockPatch.kt index 3dd5d59e77..679bdd8b7a 100644 --- a/src/main/kotlin/app/revanced/patches/music/audio/codecs/patch/CodecsUnlockPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/audio/codecs/patch/CodecsUnlockPatch.kt @@ -3,13 +3,16 @@ package app.revanced.patches.music.audio.codecs.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.data.toMethodWalker import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.toInstruction import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.audio.codecs.fingerprints.AllCodecsReferenceFingerprint import app.revanced.patches.music.audio.codecs.fingerprints.CodecsLockFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode @Patch @Name("Codecs unlock") @@ -20,7 +23,7 @@ class CodecsUnlockPatch : BytecodePatch( CodecsLockFingerprint, AllCodecsReferenceFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val codecsLockResult = CodecsLockFingerprint.result!! val implementation = codecsLockResult.mutableMethod.implementation!! @@ -45,5 +48,7 @@ class CodecsUnlockPatch : BytecodePatch( instructionIndex, "invoke-static {}, ${allCodecsMethod.definingClass}->${allCodecsMethod.name}()Ljava/util/Set;".toInstruction() ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/fingerprints/AllowExclusiveAudioPlaybackFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/fingerprints/AudioOnlyEnablerFingerprint.kt similarity index 56% rename from src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/fingerprints/AllowExclusiveAudioPlaybackFingerprint.kt rename to src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/fingerprints/AudioOnlyEnablerFingerprint.kt index bf604d04c6..29c90b6665 100644 --- a/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/fingerprints/AllowExclusiveAudioPlaybackFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/fingerprints/AudioOnlyEnablerFingerprint.kt @@ -2,14 +2,17 @@ package app.revanced.patches.music.audio.exclusiveaudio.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode -object AllowExclusiveAudioPlaybackFingerprint: MethodFingerprint( - "Z", - AccessFlags.PUBLIC or AccessFlags.FINAL, - listOf(), - listOf( +object AudioOnlyEnablerFingerprint: MethodFingerprint( + "Z", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf( + Opcode.IGET_OBJECT, + Opcode.INVOKE_INTERFACE, + Opcode.MOVE_RESULT_OBJECT, + Opcode.IGET_OBJECT, + Opcode.INVOKE_INTERFACE, + Opcode.MOVE_RESULT_OBJECT, Opcode.INVOKE_VIRTUAL, Opcode.MOVE_RESULT_OBJECT, Opcode.CHECK_CAST, diff --git a/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/fingerprints/ExclusiveAudioFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/fingerprints/ExclusiveAudioFingerprint.kt index cc5b47e7e5..02eb60adce 100644 --- a/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/fingerprints/ExclusiveAudioFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/fingerprints/ExclusiveAudioFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.music.audio.exclusiveaudio.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode @FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value. diff --git a/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/patch/ExclusiveAudioPatch.kt b/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/patch/ExclusiveAudioPatch.kt index e5801e64d3..c0a1d85d3f 100644 --- a/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/patch/ExclusiveAudioPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/patch/ExclusiveAudioPatch.kt @@ -1,31 +1,29 @@ package app.revanced.patches.music.audio.exclusiveaudio.patch -import app.revanced.extensions.exception import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.addInstructions +import app.revanced.patcher.extensions.InstructionExtensions.addInstruction +import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.music.annotations.MusicCompatibility -import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.AllowExclusiveAudioPlaybackFingerprint +import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.AudioOnlyEnablerFingerprint @Patch @Name("Exclusive audio playback") -@Description("Enables the option to play audio without video.") +@Description("Enables the option to play music without video.") @MusicCompatibility class ExclusiveAudioPatch : BytecodePatch( - listOf(AllowExclusiveAudioPlaybackFingerprint) + listOf(AudioOnlyEnablerFingerprint) ) { - override fun execute(context: BytecodeContext) { - AllowExclusiveAudioPlaybackFingerprint.result?.mutableMethod?.apply { - addInstructions( - 0, - """ - const/4 v0, 0x1 - return v0 - """ - ) - } ?: throw AllowExclusiveAudioPlaybackFingerprint.exception + override fun execute(context: BytecodeContext): PatchResult { + val method = AudioOnlyEnablerFingerprint.result!!.mutableMethod + method.replaceInstruction(method.implementation!!.instructions.count() - 1, "const/4 v0, 0x1") + method.addInstruction("return v0") + + return PatchResultSuccess() } -} \ No newline at end of file +} diff --git a/src/main/kotlin/app/revanced/patches/music/interaction/permanentrepeat/fingerprints/RepeatTrackFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/interaction/permanentrepeat/fingerprints/RepeatTrackFingerprint.kt deleted file mode 100644 index e1dfecdba8..0000000000 --- a/src/main/kotlin/app/revanced/patches/music/interaction/permanentrepeat/fingerprints/RepeatTrackFingerprint.kt +++ /dev/null @@ -1,22 +0,0 @@ -package app.revanced.patches.music.interaction.permanentrepeat.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode - -object RepeatTrackFingerprint : MethodFingerprint( - "V", - AccessFlags.PUBLIC or AccessFlags.FINAL, - listOf("L", "L"), - listOf( - Opcode.CHECK_CAST, - Opcode.INVOKE_INTERFACE, - Opcode.IGET_OBJECT, - Opcode.IGET_OBJECT, - Opcode.SGET_OBJECT, - Opcode.INVOKE_VIRTUAL, - Opcode.MOVE_RESULT, - Opcode.IF_NEZ - ) -) diff --git a/src/main/kotlin/app/revanced/patches/music/interaction/permanentrepeat/patch/PermanentRepeatPatch.kt b/src/main/kotlin/app/revanced/patches/music/interaction/permanentrepeat/patch/PermanentRepeatPatch.kt deleted file mode 100644 index bba4649c71..0000000000 --- a/src/main/kotlin/app/revanced/patches/music/interaction/permanentrepeat/patch/PermanentRepeatPatch.kt +++ /dev/null @@ -1,36 +0,0 @@ -package app.revanced.patches.music.interaction.permanentrepeat.patch - -import app.revanced.extensions.exception -import app.revanced.patcher.annotation.Description -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels -import app.revanced.patcher.extensions.InstructionExtensions.getInstruction -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patcher.util.smali.ExternalLabel -import app.revanced.patches.music.annotations.MusicCompatibility -import app.revanced.patches.music.interaction.permanentrepeat.fingerprints.RepeatTrackFingerprint - -@Patch(false) -@Name("Permanent repeat") -@Description("Permanently remember your repeating preference even if the playlist ends or another track is played.") -@MusicCompatibility -class PermanentRepeatPatch : BytecodePatch( - listOf(RepeatTrackFingerprint) -) { - override fun execute(context: BytecodeContext) { - RepeatTrackFingerprint.result?.let { - val startIndex = it.scanResult.patternScanResult!!.endIndex - val repeatIndex = startIndex + 3 - - it.mutableMethod.apply { - addInstructionsWithLabels( - startIndex, - "goto :repeat", - ExternalLabel("repeat", getInstruction(repeatIndex)) - ) - } - } ?: throw RepeatTrackFingerprint.exception - } -} diff --git a/src/main/kotlin/app/revanced/patches/music/interaction/permanentshuffle/fingerprints/DisableShuffleFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/interaction/permanentshuffle/fingerprints/DisableShuffleFingerprint.kt deleted file mode 100644 index 8b70475f23..0000000000 --- a/src/main/kotlin/app/revanced/patches/music/interaction/permanentshuffle/fingerprints/DisableShuffleFingerprint.kt +++ /dev/null @@ -1,20 +0,0 @@ -package app.revanced.patches.music.interaction.permanentshuffle.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode - -object DisableShuffleFingerprint : MethodFingerprint( - "V", - AccessFlags.PUBLIC or AccessFlags.FINAL, - listOf(), - listOf( - Opcode.IGET_OBJECT, - Opcode.INVOKE_VIRTUAL, - Opcode.SGET_OBJECT, - Opcode.IPUT_OBJECT, - Opcode.IGET_OBJECT, - Opcode.INVOKE_VIRTUAL - ) -) diff --git a/src/main/kotlin/app/revanced/patches/music/interaction/permanentshuffle/patch/PermanentShufflePatch.kt b/src/main/kotlin/app/revanced/patches/music/interaction/permanentshuffle/patch/PermanentShufflePatch.kt deleted file mode 100644 index 3bb5fde34a..0000000000 --- a/src/main/kotlin/app/revanced/patches/music/interaction/permanentshuffle/patch/PermanentShufflePatch.kt +++ /dev/null @@ -1,25 +0,0 @@ -package app.revanced.patches.music.interaction.permanentshuffle.patch - -import app.revanced.extensions.exception -import app.revanced.patcher.annotation.Description -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.addInstruction -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.music.annotations.MusicCompatibility -import app.revanced.patches.music.interaction.permanentshuffle.fingerprints.DisableShuffleFingerprint - -@Patch(false) -@Name("Permanent shuffle") -@Description("Permanently remember your shuffle preference " + - "even if the playlist ends or another track is played.") -@MusicCompatibility -class PermanentShuffleTogglePatch : BytecodePatch( - listOf(DisableShuffleFingerprint) -) { - override fun execute(context: BytecodeContext) { - DisableShuffleFingerprint.result?.mutableMethod?.addInstruction(0, "return-void") - ?: throw DisableShuffleFingerprint.exception - } -} diff --git a/src/main/kotlin/app/revanced/patches/music/layout/compactheader/fingerprints/CompactHeaderConstructorFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/layout/compactheader/fingerprints/CompactHeaderConstructorFingerprint.kt index 37e23aa436..661c138d75 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/compactheader/fingerprints/CompactHeaderConstructorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/compactheader/fingerprints/CompactHeaderConstructorFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.music.layout.compactheader.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object CompactHeaderConstructorFingerprint : MethodFingerprint( "V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L", "L", "L"), listOf( diff --git a/src/main/kotlin/app/revanced/patches/music/layout/compactheader/patch/CompactHeaderPatch.kt b/src/main/kotlin/app/revanced/patches/music/layout/compactheader/patch/CompactHeaderPatch.kt index bd2cec28ac..4cea853d6a 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/compactheader/patch/CompactHeaderPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/compactheader/patch/CompactHeaderPatch.kt @@ -5,10 +5,12 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.layout.compactheader.fingerprints.CompactHeaderConstructorFingerprint -import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction11x +import org.jf.dexlib2.builder.instruction.BuilderInstruction11x @Patch(false) @Name("Compact header") @@ -17,7 +19,7 @@ import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction11x class CompactHeaderPatch : BytecodePatch( listOf(CompactHeaderConstructorFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val result = CompactHeaderConstructorFingerprint.result!! val method = result.mutableMethod @@ -29,5 +31,7 @@ class CompactHeaderPatch : BytecodePatch( invoke-virtual {v${register}, v2}, Landroid/view/View;->setVisibility(I)V """ ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/music/layout/minimizedplayback/fingerprints/MinimizedPlaybackManagerFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/layout/minimizedplayback/fingerprints/MinimizedPlaybackManagerFingerprint.kt index 706eb6f179..eb3d28a080 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/minimizedplayback/fingerprints/MinimizedPlaybackManagerFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/minimizedplayback/fingerprints/MinimizedPlaybackManagerFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.music.layout.minimizedplayback.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object MinimizedPlaybackManagerFingerprint : MethodFingerprint( "V", diff --git a/src/main/kotlin/app/revanced/patches/music/layout/minimizedplayback/patch/MinimizedPlaybackPatch.kt b/src/main/kotlin/app/revanced/patches/music/layout/minimizedplayback/patch/MinimizedPlaybackPatch.kt index a1f0197e26..387e74bbb8 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/minimizedplayback/patch/MinimizedPlaybackPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/minimizedplayback/patch/MinimizedPlaybackPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.layout.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint @@ -16,12 +18,14 @@ import app.revanced.patches.music.layout.minimizedplayback.fingerprints.Minimize class MinimizedPlaybackPatch : BytecodePatch( listOf(MinimizedPlaybackManagerFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { MinimizedPlaybackManagerFingerprint.result!!.mutableMethod.addInstruction( 0, """ return-void """ ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/music/layout/premium/fingerprints/HideGetPremiumFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/layout/premium/fingerprints/HideGetPremiumFingerprint.kt index 3608aacd6d..5b89674cc6 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/premium/fingerprints/HideGetPremiumFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/premium/fingerprints/HideGetPremiumFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.music.layout.premium.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object HideGetPremiumFingerprint : MethodFingerprint( "V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf( diff --git a/src/main/kotlin/app/revanced/patches/music/layout/premium/fingerprints/HideGetPremiumParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/layout/premium/fingerprints/HideGetPremiumParentFingerprint.kt index fc15c531b8..d91ff64a46 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/premium/fingerprints/HideGetPremiumParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/premium/fingerprints/HideGetPremiumParentFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.music.layout.premium.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object HideGetPremiumParentFingerprint : MethodFingerprint( "V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf( diff --git a/src/main/kotlin/app/revanced/patches/music/layout/premium/patch/HideGetPremiumPatch.kt b/src/main/kotlin/app/revanced/patches/music/layout/premium/patch/HideGetPremiumPatch.kt index 5a9f09b9e3..1852409cab 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/premium/patch/HideGetPremiumPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/premium/patch/HideGetPremiumPatch.kt @@ -7,6 +7,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumFingerprint @@ -19,7 +21,7 @@ import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumPare class HideGetPremiumPatch : BytecodePatch( listOf(HideGetPremiumParentFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val parentResult = HideGetPremiumParentFingerprint.result!! HideGetPremiumFingerprint.resolve(context, parentResult.classDef) @@ -41,5 +43,7 @@ class HideGetPremiumPatch : BytecodePatch( const/16 v0, 0x8 """ ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/fingerprints/PivotBarConstructorFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/fingerprints/PivotBarConstructorFingerprint.kt index 63465f00ff..e62225b255 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/fingerprints/PivotBarConstructorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/fingerprints/PivotBarConstructorFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.music.layout.upgradebutton.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode @FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value. diff --git a/src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/patch/RemoveUpgradeButtonPatch.kt b/src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/patch/RemoveUpgradeButtonPatch.kt index 4a2f13c28a..05b1bb38e1 100644 --- a/src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/patch/RemoveUpgradeButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/layout/upgradebutton/patch/RemoveUpgradeButtonPatch.kt @@ -5,24 +5,26 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.toInstructions import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.layout.upgradebutton.fingerprints.PivotBarConstructorFingerprint -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction22t -import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c -import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.builder.instruction.BuilderInstruction22t +import org.jf.dexlib2.iface.instruction.formats.Instruction22c +import org.jf.dexlib2.iface.instruction.formats.Instruction35c @Patch -@Name("Remove upgrade button") +@Name("Upgrade button remover") @Description("Removes the upgrade tab from the pivot bar.") @MusicCompatibility class RemoveUpgradeButtonPatch : BytecodePatch( listOf(PivotBarConstructorFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val result = PivotBarConstructorFingerprint.result!! val implementation = result.mutableMethod.implementation!! @@ -34,7 +36,7 @@ class RemoveUpgradeButtonPatch : BytecodePatch( val instructionList = """ invoke-interface { v0 }, Ljava/util/List;->size()I move-result v1 - const/4 v2, 0x4 + const/4 v2, 0x3 invoke-interface {v0, v2}, Ljava/util/List;->remove(I)Ljava/lang/Object; iput-object v0, v$register, $pivotBarElementFieldRef """.toInstructions().toMutableList() @@ -67,5 +69,6 @@ class RemoveUpgradeButtonPatch : BytecodePatch( implementation.addInstructions( endIndex, instructionList ) + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/music/misc/androidauto/fingerprints/CheckCertificateFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/misc/androidauto/fingerprints/CheckCertificateFingerprint.kt index fd7d5cfc38..f6ab9dbbbc 100644 --- a/src/main/kotlin/app/revanced/patches/music/misc/androidauto/fingerprints/CheckCertificateFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/misc/androidauto/fingerprints/CheckCertificateFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.music.misc.androidauto.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object CheckCertificateFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/music/misc/androidauto/patch/BypassCertificateChecksPatch.kt b/src/main/kotlin/app/revanced/patches/music/misc/androidauto/patch/BypassCertificateChecksPatch.kt index aaf43598da..a59c1fc02e 100644 --- a/src/main/kotlin/app/revanced/patches/music/misc/androidauto/patch/BypassCertificateChecksPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/misc/androidauto/patch/BypassCertificateChecksPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.music.misc.androidauto.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.misc.androidauto.fingerprints.CheckCertificateFingerprint @@ -17,7 +19,7 @@ import app.revanced.patches.music.misc.androidauto.fingerprints.CheckCertificate class BypassCertificateChecksPatch : BytecodePatch( listOf(CheckCertificateFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { CheckCertificateFingerprint.result?.apply { mutableMethod.addInstructions( 0, """ @@ -25,6 +27,8 @@ class BypassCertificateChecksPatch : BytecodePatch( return v0 """ ) - } ?: throw CheckCertificateFingerprint.exception + } ?: return CheckCertificateFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/music/misc/microg/fingerprints/GooglePlayUtilityFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/misc/microg/fingerprints/GooglePlayUtilityFingerprint.kt index efdc5a7c11..eaefab9b28 100644 --- a/src/main/kotlin/app/revanced/patches/music/misc/microg/fingerprints/GooglePlayUtilityFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/misc/microg/fingerprints/GooglePlayUtilityFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.music.misc.microg.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object GooglePlayUtilityFingerprint : MethodFingerprint( "I", diff --git a/src/main/kotlin/app/revanced/patches/music/misc/microg/fingerprints/ServiceCheckFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/misc/microg/fingerprints/ServiceCheckFingerprint.kt index 5075d5b508..dd08331447 100644 --- a/src/main/kotlin/app/revanced/patches/music/misc/microg/fingerprints/ServiceCheckFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/misc/microg/fingerprints/ServiceCheckFingerprint.kt @@ -3,7 +3,7 @@ package app.revanced.patches.music.misc.microg.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags @FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value. diff --git a/src/main/kotlin/app/revanced/patches/music/misc/microg/patch/bytecode/MicroGBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/music/misc/microg/patch/bytecode/MicroGBytecodePatch.kt index e15d2b5671..6956721701 100644 --- a/src/main/kotlin/app/revanced/patches/music/misc/microg/patch/bytecode/MicroGBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/misc/microg/patch/bytecode/MicroGBytecodePatch.kt @@ -4,6 +4,7 @@ import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.music.annotations.MusicCompatibility @@ -36,25 +37,27 @@ class MicroGBytecodePatch : BytecodePatch( // - "com.google.android.gms.phenotype.PACKAGE_NAME", // - "com.google.android.gms.phenotype.UPDATE", // - "com.google.android.gms.phenotype", - override fun execute(context: BytecodeContext) = MicroGBytecodeHelper.patchBytecode( - context, - arrayOf( - MicroGBytecodeHelper.packageNameTransform( - Constants.PACKAGE_NAME, - Constants.REVANCED_PACKAGE_NAME + override fun execute(context: BytecodeContext) = + // apply common microG patch + MicroGBytecodeHelper.patchBytecode( + context, + arrayOf( + MicroGBytecodeHelper.packageNameTransform( + Constants.PACKAGE_NAME, + Constants.REVANCED_PACKAGE_NAME + ) + ), + MicroGBytecodeHelper.PrimeMethodTransformationData( + PrimeFingerprint, + MUSIC_PACKAGE_NAME, + REVANCED_MUSIC_PACKAGE_NAME + ), + listOf( + ServiceCheckFingerprint, + GooglePlayUtilityFingerprint, + CastDynamiteModuleFingerprint, + CastDynamiteModuleV2Fingerprint, + CastContextFetchFingerprint ) - ), - MicroGBytecodeHelper.PrimeMethodTransformationData( - PrimeFingerprint, - MUSIC_PACKAGE_NAME, - REVANCED_MUSIC_PACKAGE_NAME - ), - listOf( - ServiceCheckFingerprint, - GooglePlayUtilityFingerprint, - CastDynamiteModuleFingerprint, - CastDynamiteModuleV2Fingerprint, - CastContextFetchFingerprint - ) - ) + ).let { PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/music/misc/microg/patch/resource/MicroGResourcePatch.kt b/src/main/kotlin/app/revanced/patches/music/misc/microg/patch/resource/MicroGResourcePatch.kt index bbcfcf4a46..89dc28ee9e 100644 --- a/src/main/kotlin/app/revanced/patches/music/misc/microg/patch/resource/MicroGResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/misc/microg/patch/resource/MicroGResourcePatch.kt @@ -2,6 +2,8 @@ package app.revanced.patches.music.misc.microg.patch.resource import app.revanced.patcher.annotation.Description import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patches.music.misc.microg.shared.Constants.MUSIC_PACKAGE_NAME import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_APP_NAME @@ -13,7 +15,7 @@ import app.revanced.util.microg.MicroGResourceHelper @Description("Resource patch to allow YouTube Music ReVanced to run without root and under a different package name.") class MicroGResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { // update manifest MicroGResourceHelper.patchManifest( context, @@ -28,5 +30,6 @@ class MicroGResourcePatch : ResourcePatch { SPOOFED_PACKAGE_NAME, SPOOFED_PACKAGE_SIGNATURE ) + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/music/premium/backgroundplay/fingerprints/BackgroundPlaybackDisableFingerprint.kt b/src/main/kotlin/app/revanced/patches/music/premium/backgroundplay/fingerprints/BackgroundPlaybackDisableFingerprint.kt index 6693fb09ca..fdaea77606 100644 --- a/src/main/kotlin/app/revanced/patches/music/premium/backgroundplay/fingerprints/BackgroundPlaybackDisableFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/music/premium/backgroundplay/fingerprints/BackgroundPlaybackDisableFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.music.premium.backgroundplay.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode @FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value. diff --git a/src/main/kotlin/app/revanced/patches/music/premium/backgroundplay/patch/BackgroundPlayPatch.kt b/src/main/kotlin/app/revanced/patches/music/premium/backgroundplay/patch/BackgroundPlayPatch.kt index 3c9fbc0684..a3404c44cc 100644 --- a/src/main/kotlin/app/revanced/patches/music/premium/backgroundplay/patch/BackgroundPlayPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/premium/backgroundplay/patch/BackgroundPlayPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.premium.backgroundplay.fingerprints.BackgroundPlaybackDisableFingerprint @@ -16,7 +18,7 @@ import app.revanced.patches.music.premium.backgroundplay.fingerprints.Background class BackgroundPlayPatch : BytecodePatch( listOf(BackgroundPlaybackDisableFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { BackgroundPlaybackDisableFingerprint.result!!.mutableMethod.addInstructions( 0, """ @@ -24,5 +26,7 @@ class BackgroundPlayPatch : BytecodePatch( return v0 """ ) + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/patch/UnlockProPatch.kt b/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/patch/UnlockProPatch.kt index ad60a41d42..83b4624be2 100644 --- a/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/patch/UnlockProPatch.kt +++ b/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/patch/UnlockProPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.myexpenses.misc.pro.annotations.UnlockProCompatibility import app.revanced.patches.myexpenses.misc.pro.fingerprints.IsEnabledFingerprint @@ -18,7 +20,7 @@ class UnlockProPatch : BytecodePatch( IsEnabledFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val method = IsEnabledFingerprint.result!!.mutableMethod method.addInstructions( 0, @@ -27,5 +29,7 @@ class UnlockProPatch : BytecodePatch( return v0 """ ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/netguard/broadcasts/removerestriction/resource/patch/RemoveBroadcastsRestrictionPatch.kt b/src/main/kotlin/app/revanced/patches/netguard/broadcasts/removerestriction/resource/patch/RemoveBroadcastsRestrictionPatch.kt index 90f196a504..8bd7f6b1e1 100644 --- a/src/main/kotlin/app/revanced/patches/netguard/broadcasts/removerestriction/resource/patch/RemoveBroadcastsRestrictionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/netguard/broadcasts/removerestriction/resource/patch/RemoveBroadcastsRestrictionPatch.kt @@ -3,6 +3,8 @@ package app.revanced.patches.netguard.broadcasts.removerestriction.resource.patc import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.netguard.broadcasts.removerestriction.resource.annotations.RemoveBroadcastsRestrictionCompatibility @@ -13,7 +15,7 @@ import org.w3c.dom.Element @Description("Enables starting/stopping NetGuard via broadcasts.") @RemoveBroadcastsRestrictionCompatibility class RemoveBroadcastsRestrictionPatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { context.xmlEditor["AndroidManifest.xml"].use { dom -> val applicationNode = dom .file @@ -30,5 +32,7 @@ class RemoveBroadcastsRestrictionPatch : ResourcePatch { } } } + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/nfctoolsse/misc/pro/fingerprints/IsLicenseRegisteredFingerprint.kt b/src/main/kotlin/app/revanced/patches/nfctoolsse/misc/pro/fingerprints/IsLicenseRegisteredFingerprint.kt index 914e0ca3cf..fd6089e398 100644 --- a/src/main/kotlin/app/revanced/patches/nfctoolsse/misc/pro/fingerprints/IsLicenseRegisteredFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/nfctoolsse/misc/pro/fingerprints/IsLicenseRegisteredFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.nfctoolsse.misc.pro.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object IsLicenseRegisteredFingerprint : MethodFingerprint( returnType = "Z", diff --git a/src/main/kotlin/app/revanced/patches/nfctoolsse/misc/pro/patch/UnlockProPatch.kt b/src/main/kotlin/app/revanced/patches/nfctoolsse/misc/pro/patch/UnlockProPatch.kt index ce45d1d372..7e9ca26000 100644 --- a/src/main/kotlin/app/revanced/patches/nfctoolsse/misc/pro/patch/UnlockProPatch.kt +++ b/src/main/kotlin/app/revanced/patches/nfctoolsse/misc/pro/patch/UnlockProPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.nfctoolsse.misc.pro.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.nfctoolsse.misc.pro.annotations.UnlockProCompatibility import app.revanced.patches.nfctoolsse.misc.pro.fingerprints.IsLicenseRegisteredFingerprint @@ -20,7 +22,7 @@ class UnlockProPatch : BytecodePatch( IsLicenseRegisteredFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { IsLicenseRegisteredFingerprint.result?.mutableMethod?.apply { addInstructions( 0, @@ -29,7 +31,9 @@ class UnlockProPatch : BytecodePatch( return v0 """ ) - } ?: throw IsLicenseRegisteredFingerprint.exception + } ?: return IsLicenseRegisteredFingerprint.toErrorResult() + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/nyx/misc/pro/patch/UnlockProPatch.kt b/src/main/kotlin/app/revanced/patches/nyx/misc/pro/patch/UnlockProPatch.kt index 130b53099b..3aebe83053 100644 --- a/src/main/kotlin/app/revanced/patches/nyx/misc/pro/patch/UnlockProPatch.kt +++ b/src/main/kotlin/app/revanced/patches/nyx/misc/pro/patch/UnlockProPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.nyx.misc.pro.annotations.UnlockProCompatibility import app.revanced.patches.nyx.misc.pro.fingerprints.CheckProFingerprint @@ -18,7 +20,7 @@ class UnlockProPatch : BytecodePatch( CheckProFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val method = CheckProFingerprint.result!!.mutableMethod method.addInstructions( 0, @@ -27,5 +29,7 @@ class UnlockProPatch : BytecodePatch( return v0 """ ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/photomath/detection/signature/fingerprints/CheckSignatureFingerprint.kt b/src/main/kotlin/app/revanced/patches/photomath/detection/signature/fingerprints/CheckSignatureFingerprint.kt index 3bb7e92f6f..df2445be7d 100644 --- a/src/main/kotlin/app/revanced/patches/photomath/detection/signature/fingerprints/CheckSignatureFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/photomath/detection/signature/fingerprints/CheckSignatureFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.photomath.detection.signature.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object CheckSignatureFingerprint : MethodFingerprint( returnType = "V", diff --git a/src/main/kotlin/app/revanced/patches/photomath/detection/signature/patch/SignatureDetectionPatch.kt b/src/main/kotlin/app/revanced/patches/photomath/detection/signature/patch/SignatureDetectionPatch.kt index f6bc11609f..5d2d5b03fb 100644 --- a/src/main/kotlin/app/revanced/patches/photomath/detection/signature/patch/SignatureDetectionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/photomath/detection/signature/patch/SignatureDetectionPatch.kt @@ -1,13 +1,15 @@ package app.revanced.patches.photomath.detection.signature.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.photomath.detection.signature.fingerprints.CheckSignatureFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Description("Disables detection of incorrect signature.") class SignatureDetectionPatch : BytecodePatch( @@ -15,13 +17,15 @@ class SignatureDetectionPatch : BytecodePatch( CheckSignatureFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { CheckSignatureFingerprint.result?.apply { val signatureCheckInstruction = mutableMethod.getInstruction(scanResult.patternScanResult!!.endIndex) val checkRegister = (signatureCheckInstruction as OneRegisterInstruction).registerA mutableMethod.replaceInstruction(signatureCheckInstruction.location.index, "const/4 v$checkRegister, 0x1") - } ?: throw CheckSignatureFingerprint.exception + } ?: throw CheckSignatureFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/fingerprints/IsPlusUnlockedFingerprint.kt b/src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/fingerprints/IsPlusUnlockedFingerprint.kt index 26dc4f0136..9f9dddffaf 100644 --- a/src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/fingerprints/IsPlusUnlockedFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/fingerprints/IsPlusUnlockedFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.photomath.misc.unlockplus.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object IsPlusUnlockedFingerprint : MethodFingerprint( returnType = "Z", diff --git a/src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/patch/UnlockPlusPatch.kt b/src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/patch/UnlockPlusPatch.kt index 6d76eb0ed2..b0dc015bdc 100644 --- a/src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/patch/UnlockPlusPatch.kt +++ b/src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/patch/UnlockPlusPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.photomath.misc.unlockplus.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.photomath.detection.signature.patch.SignatureDetectionPatch @@ -22,7 +24,7 @@ class UnlockPlusPatch : BytecodePatch( IsPlusUnlockedFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { IsPlusUnlockedFingerprint.result?.mutableMethod?.apply { addInstructions( 0, @@ -31,7 +33,9 @@ class UnlockPlusPatch : BytecodePatch( return v0 """ ) - } ?: throw IsPlusUnlockedFingerprint.exception + } ?: return IsPlusUnlockedFingerprint.toErrorResult() + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/pixiv/ads/fingerprints/IsNotPremiumFingerprint.kt b/src/main/kotlin/app/revanced/patches/pixiv/ads/fingerprints/IsNotPremiumFingerprint.kt index cd827cd416..453ec7fe30 100644 --- a/src/main/kotlin/app/revanced/patches/pixiv/ads/fingerprints/IsNotPremiumFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/pixiv/ads/fingerprints/IsNotPremiumFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.pixiv.ads.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object IsNotPremiumFingerprint : MethodFingerprint( diff --git a/src/main/kotlin/app/revanced/patches/pixiv/ads/patch/HideAdsPatch.kt b/src/main/kotlin/app/revanced/patches/pixiv/ads/patch/HideAdsPatch.kt index df9d3591f5..d2d975aa94 100644 --- a/src/main/kotlin/app/revanced/patches/pixiv/ads/patch/HideAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/pixiv/ads/patch/HideAdsPatch.kt @@ -1,10 +1,12 @@ package app.revanced.patches.pixiv.ads.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.* import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.pixiv.ads.fingerprints.IsNotPremiumFingerprint @@ -13,7 +15,7 @@ import app.revanced.patches.pixiv.ads.fingerprints.IsNotPremiumFingerprint @Description("Hides ads.") @Compatibility([Package("jp.pxv.android")]) class HideAdsPatch : BytecodePatch(listOf(IsNotPremiumFingerprint)) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // Always return false in the "isNotPremium" method which normally returns !this.accountManager.isPremium. // However, this is not the method that controls the user's premium status. // Instead, this method is used to determine whether ads should be shown. @@ -23,6 +25,8 @@ class HideAdsPatch : BytecodePatch(listOf(IsNotPremiumFingerprint)) { const/4 v0, 0x0 return v0 """ - ) ?: throw IsNotPremiumFingerprint.exception + ) ?: return IsNotPremiumFingerprint.toErrorResult() + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/reddit/ad/banner/patch/HideBannerPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/ad/banner/patch/HideBannerPatch.kt index e4fb8aa04f..11df0eded3 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/ad/banner/patch/HideBannerPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/ad/banner/patch/HideBannerPatch.kt @@ -3,12 +3,14 @@ package app.revanced.patches.reddit.ad.banner.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch @Name("Hide subreddit banner") @Description("Hides banner ads from comments on subreddits.") class HideBannerPatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { context.xmlEditor[RESOURCE_FILE_PATH].use { it.file.getElementsByTagName("merge").item(0).childNodes.apply { val attributes = arrayOf("height", "width") @@ -28,6 +30,8 @@ class HideBannerPatch : ResourcePatch { } } } + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/reddit/ad/comments/patch/HideCommentAdsPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/ad/comments/patch/HideCommentAdsPatch.kt index 372903e99e..7c307e0b45 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/ad/comments/patch/HideCommentAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/ad/comments/patch/HideCommentAdsPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.reddit.ad.comments.fingerprints.HideCommentAdsFingerprint @Name("Hide comment ads") @@ -12,7 +14,7 @@ import app.revanced.patches.reddit.ad.comments.fingerprints.HideCommentAdsFinger class HideCommentAdsPatch : BytecodePatch( listOf(HideCommentAdsFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val method = HideCommentAdsFingerprint.result!!.mutableMethod // Returns a blank object instead of the comment ad. method.addInstructions( @@ -23,5 +25,6 @@ class HideCommentAdsPatch : BytecodePatch( return-object v0 """ ) + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/reddit/ad/general/fingerprints/NewAdPostFingerprint.kt b/src/main/kotlin/app/revanced/patches/reddit/ad/general/fingerprints/NewAdPostFingerprint.kt index 5657bb988b..130aba52b6 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/ad/general/fingerprints/NewAdPostFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/ad/general/fingerprints/NewAdPostFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.reddit.ad.general.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object NewAdPostFingerprint : MethodFingerprint( opcodes = listOf(Opcode.INVOKE_VIRTUAL), diff --git a/src/main/kotlin/app/revanced/patches/reddit/ad/general/patch/HideAdsPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/ad/general/patch/HideAdsPatch.kt index 4ad4658382..3fb1c21402 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/ad/general/patch/HideAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/ad/general/patch/HideAdsPatch.kt @@ -6,6 +6,8 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.RequiresIntegrations @@ -14,11 +16,11 @@ import app.revanced.patches.reddit.ad.comments.patch.HideCommentAdsPatch import app.revanced.patches.reddit.ad.general.annotations.HideAdsCompatibility import app.revanced.patches.reddit.ad.general.fingerprints.AdPostFingerprint import app.revanced.patches.reddit.ad.general.fingerprints.NewAdPostFingerprint -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c -import com.android.tools.smali.dexlib2.iface.reference.FieldReference -import com.android.tools.smali.dexlib2.iface.reference.MethodReference +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.instruction.formats.Instruction22c +import org.jf.dexlib2.iface.reference.FieldReference +import org.jf.dexlib2.iface.reference.MethodReference @Patch @Name("Hide ads") @@ -29,7 +31,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference class HideAdsPatch : BytecodePatch( listOf(AdPostFingerprint, NewAdPostFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // region Filter promoted ads (does not work in popular or latest feed) AdPostFingerprint.result?.mutableMethod?.apply { @@ -76,6 +78,8 @@ class HideAdsPatch : BytecodePatch( } // endregion + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/AbstractSpoofClientPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/AbstractSpoofClientPatch.kt index 3121dcb132..972b6dd5a3 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/AbstractSpoofClientPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/AbstractSpoofClientPatch.kt @@ -1,14 +1,11 @@ package app.revanced.patches.reddit.customclients import android.os.Environment -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.OptionsContainer -import app.revanced.patcher.patch.PatchException -import app.revanced.patcher.patch.PatchOption +import app.revanced.patcher.patch.* import java.io.File abstract class AbstractSpoofClientPatch( @@ -20,13 +17,13 @@ abstract class AbstractSpoofClientPatch( addAll(clientIdFingerprints) userAgentFingerprints?.let(::addAll) }) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { if (options.clientId == null) { // Ensure device runs Android. try { Class.forName("android.os.Environment") } catch (e: ClassNotFoundException) { - throw PatchException("No client ID provided") + return PatchResultError("No client ID provided") } File(Environment.getExternalStorageDirectory(), "reddit_client_id_revanced.txt").also { @@ -34,23 +31,29 @@ abstract class AbstractSpoofClientPatch( val error = """ In order to use this patch, you need to provide a client ID. - You can do that by creating a file at ${it.absolutePath} with the client ID as its content. + You can do this by creating a file at ${it.absolutePath} with the client ID as its content. Alternatively, you can provide the client ID using patch options. You can get your client ID from https://www.reddit.com/prefs/apps. The application type has to be "Installed app" and the redirect URI has to be set to "$redirectUri". """.trimIndent() - throw PatchException(error) + return PatchResultError(error) }.let { options.clientId = it.readText().trim() } } fun List<MethodFingerprint>?.executePatch( - patch: List<MethodFingerprintResult>.(BytecodeContext) -> Unit - ) = this?.map { it.result ?: throw it.exception }?.patch(context) + patch: List<MethodFingerprintResult>.(BytecodeContext) -> PatchResult + ) { + when (val result = this?.map { it.result ?: throw it.toErrorResult() }?.patch(context)) { + is PatchResultError -> throw result + } + } clientIdFingerprints.executePatch { patchClientId(context) } userAgentFingerprints.executePatch { patchUserAgent(context) } + + return PatchResultSuccess() } /** @@ -59,7 +62,7 @@ abstract class AbstractSpoofClientPatch( * @param context The current [BytecodeContext]. * */ - abstract fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) + abstract fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult /** * Patch the user agent. The fingerprints are guaranteed to be in the same order as in [userAgentFingerprints]. @@ -67,7 +70,8 @@ abstract class AbstractSpoofClientPatch( * @param context The current [BytecodeContext]. */ // Not every client needs to patch the user agent. - open fun List<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext) {} + open fun List<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext): PatchResult = + PatchResultSuccess() companion object Options { open class SpoofClientOptionsContainer : OptionsContainer() { diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/baconreader/api/patch/SpoofClientPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/baconreader/api/patch/SpoofClientPatch.kt index 18f2a95390..39b197c49f 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/baconreader/api/patch/SpoofClientPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/baconreader/api/patch/SpoofClientPatch.kt @@ -7,11 +7,13 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch import app.revanced.patches.reddit.customclients.SpoofClientAnnotation import app.revanced.patches.reddit.customclients.baconreader.api.fingerprints.GetAuthorizationUrlFingerprint import app.revanced.patches.reddit.customclients.baconreader.api.fingerprints.RequestTokenFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @SpoofClientAnnotation @@ -28,7 +30,7 @@ class SpoofClientPatch : AbstractSpoofClientPatch( "http://baconreader.com/auth", Options, listOf(GetAuthorizationUrlFingerprint, RequestTokenFingerprint) ) { - override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) { + override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult { fun MethodFingerprintResult.patch(replacementString: String) { val clientIdIndex = scanResult.stringsScanResult!!.matches.first().index @@ -46,6 +48,8 @@ class SpoofClientPatch : AbstractSpoofClientPatch( // Patch client id for access token request. last().patch(clientId!!) + + return PatchResultSuccess() } companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer() diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/api/patch/SpoofClientPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/api/patch/SpoofClientPatch.kt index 52bef8513d..1f721e55f3 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/api/patch/SpoofClientPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/api/patch/SpoofClientPatch.kt @@ -6,6 +6,8 @@ import app.revanced.patcher.annotation.Package import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch import app.revanced.patches.reddit.customclients.SpoofClientAnnotation import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint @@ -18,7 +20,7 @@ import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints class SpoofClientPatch : AbstractSpoofClientPatch( "http://rubenmayayo.com", Options, listOf(GetClientIdFingerprint) ) { - override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) { + override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult { first().mutableMethod.addInstructions( 0, """ @@ -26,6 +28,8 @@ class SpoofClientPatch : AbstractSpoofClientPatch( return-object v0 """ ) + + return PatchResultSuccess() } companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer() diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/infinityforreddit/api/patch/SpoofClientPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/infinityforreddit/api/patch/SpoofClientPatch.kt index 180ff89317..88c3469816 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/infinityforreddit/api/patch/SpoofClientPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/infinityforreddit/api/patch/SpoofClientPatch.kt @@ -7,11 +7,13 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch import app.revanced.patches.reddit.customclients.SpoofClientAnnotation import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.GetHttpBasicAuthHeaderFingerprint import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.LoginActivityOnCreateFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @SpoofClientAnnotation @Description("Spoofs the client in order to allow logging in. " + @@ -23,7 +25,7 @@ class SpoofClientPatch : AbstractSpoofClientPatch( Options, listOf(GetHttpBasicAuthHeaderFingerprint, LoginActivityOnCreateFingerprint) ) { - override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) { + override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult { forEach { val clientIdIndex = it.scanResult.stringsScanResult!!.matches.first().index it.mutableMethod.apply { @@ -35,6 +37,8 @@ class SpoofClientPatch : AbstractSpoofClientPatch( ) } } + + return PatchResultSuccess() } companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer() diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/ads/fingerprints/IsAdFreeUserFingerprint.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/ads/fingerprints/IsAdFreeUserFingerprint.kt index 585a26e473..4c625220d2 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/ads/fingerprints/IsAdFreeUserFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/ads/fingerprints/IsAdFreeUserFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.reddit.customclients.joeyforreddit.ads.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object IsAdFreeUserFingerprint : MethodFingerprint( returnType = "Z", diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/ads/patch/DisableAdsPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/ads/patch/DisableAdsPatch.kt index ca3de93e2e..7b0c565da3 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/ads/patch/DisableAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/ads/patch/DisableAdsPatch.kt @@ -1,12 +1,14 @@ package app.revanced.patches.reddit.customclients.joeyforreddit.ads.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Package import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.reddit.customclients.joeyforreddit.ads.fingerprints.IsAdFreeUserFingerprint @@ -17,13 +19,15 @@ import app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy. @DependsOn([DisablePiracyDetectionPatch::class]) @Compatibility([Package("o.o.joey")]) class DisableAdsPatch : BytecodePatch(listOf(IsAdFreeUserFingerprint)) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { IsAdFreeUserFingerprint.result?.mutableMethod?.addInstructions( 0, """ const/4 v0, 0x1 return v0 """ - ) ?: throw IsAdFreeUserFingerprint.exception + ) ?: return IsAdFreeUserFingerprint.toErrorResult() + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/api/fingerprints/GetClientIdFingerprint.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/api/fingerprints/GetClientIdFingerprint.kt index f245a94973..861bb0dd73 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/api/fingerprints/GetClientIdFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/api/fingerprints/GetClientIdFingerprint.kt @@ -1,8 +1,8 @@ package app.revanced.patches.reddit.customclients.joeyforreddit.api.fingerprints import app.revanced.patcher.extensions.or -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint object GetClientIdFingerprint : MethodFingerprint( diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/api/patch/SpoofClientPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/api/patch/SpoofClientPatch.kt index a147e0e1eb..8bd8ce6d00 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/api/patch/SpoofClientPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/api/patch/SpoofClientPatch.kt @@ -6,6 +6,8 @@ import app.revanced.patcher.annotation.Package import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch import app.revanced.patches.reddit.customclients.SpoofClientAnnotation @@ -29,7 +31,7 @@ import app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy. class SpoofClientPatch : AbstractSpoofClientPatch( "https://127.0.0.1:65023/authorize_callback", Options, listOf(GetClientIdFingerprint) ) { - override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) { + override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult { first().mutableMethod.addInstructions( 0, """ @@ -37,6 +39,8 @@ class SpoofClientPatch : AbstractSpoofClientPatch( return-object v0 """ ) + + return PatchResultSuccess() } companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer() diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/detection/piracy/fingerprints/PiracyDetectionFingerprint.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/detection/piracy/fingerprints/PiracyDetectionFingerprint.kt index 930f22ed24..dfd1d4afc4 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/detection/piracy/fingerprints/PiracyDetectionFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/detection/piracy/fingerprints/PiracyDetectionFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object PiracyDetectionFingerprint : MethodFingerprint( returnType = "V", diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/detection/piracy/patch/DisablePiracyDetectionPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/detection/piracy/patch/DisablePiracyDetectionPatch.kt index 360fa7d792..b2935fa854 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/detection/piracy/patch/DisablePiracyDetectionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/detection/piracy/patch/DisablePiracyDetectionPatch.kt @@ -1,18 +1,22 @@ package app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy.fingerprints.PiracyDetectionFingerprint class DisablePiracyDetectionPatch : BytecodePatch(listOf(PiracyDetectionFingerprint)) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { PiracyDetectionFingerprint.result?.mutableMethod?.addInstruction( 0, """ return-void """ - ) ?: throw PiracyDetectionFingerprint.exception + ) ?: return PiracyDetectionFingerprint.toErrorResult() + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/redditisfun/api/fingerprints/GetUserAgentFingerprint.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/redditisfun/api/fingerprints/GetUserAgentFingerprint.kt index 54852443a0..24609d686c 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/redditisfun/api/fingerprints/GetUserAgentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/redditisfun/api/fingerprints/GetUserAgentFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object GetUserAgentFingerprint : MethodFingerprint( "Ljava/lang/String;", diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/redditisfun/api/patch/SpoofClientPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/redditisfun/api/patch/SpoofClientPatch.kt index 386c5da6e8..b5228a2a8f 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/redditisfun/api/patch/SpoofClientPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/redditisfun/api/patch/SpoofClientPatch.kt @@ -9,12 +9,14 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult.MethodFingerprintScanResult.StringsScanResult.StringMatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch import app.revanced.patches.reddit.customclients.SpoofClientAnnotation import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.BasicAuthorizationFingerprint import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.BuildAuthorizationStringFingerprint import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.GetUserAgentFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @SpoofClientAnnotation @Description("Spoofs the client in order to allow logging in. " + @@ -27,7 +29,7 @@ class SpoofClientPatch : AbstractSpoofClientPatch( listOf(BuildAuthorizationStringFingerprint, BasicAuthorizationFingerprint), listOf(GetUserAgentFingerprint) ) { - override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) { + override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult { /** * Replaces a one register instruction with a const-string instruction * at the index returned by [getReplacementIndex]. @@ -51,20 +53,23 @@ class SpoofClientPatch : AbstractSpoofClientPatch( // Path basic authorization. last().replaceWith("$clientId:") { last().index + 7 } + + return PatchResultSuccess() } - override fun List<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext) { - // Use a random user agent. - val randomName = (0..100000).random() - val userAgent = "android:app.revanced.$randomName:v1.0.0 (by /u/revanced)" + override fun List<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext): PatchResult { + // Use a random number as the user agent string. + val randomUserAgent = (0..100000).random() first().mutableMethod.addInstructions( 0, """ - const-string v0, "$userAgent" - return-object v0 - """ + const-string v0, "$randomUserAgent" + return-object v0 + """ ) + + return PatchResultSuccess() } companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer() diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/relayforreddit/api/patch/SpoofClientPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/relayforreddit/api/patch/SpoofClientPatch.kt index f4f6869eaf..9c4fdfe543 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/relayforreddit/api/patch/SpoofClientPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/relayforreddit/api/patch/SpoofClientPatch.kt @@ -7,13 +7,15 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch import app.revanced.patches.reddit.customclients.SpoofClientAnnotation import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetLoggedInBearerTokenFingerprint import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetLoggedOutBearerTokenFingerprint import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetRefreshTokenFingerprint import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.LoginActivityClientIdFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @SpoofClientAnnotation @Description("Spoofs the client in order to allow logging in. " + @@ -30,7 +32,7 @@ class SpoofClientPatch : AbstractSpoofClientPatch( GetRefreshTokenFingerprint ) ) { - override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) { + override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult { forEach { val clientIdIndex = it.scanResult.stringsScanResult!!.matches.first().index it.mutableMethod.apply { @@ -42,6 +44,8 @@ class SpoofClientPatch : AbstractSpoofClientPatch( ) } } + + return PatchResultSuccess() } companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer() diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/slide/api/patch/SpoofClientPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/slide/api/patch/SpoofClientPatch.kt index 5c187cb25d..b218291695 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/slide/api/patch/SpoofClientPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/slide/api/patch/SpoofClientPatch.kt @@ -6,6 +6,8 @@ import app.revanced.patcher.annotation.Package import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch import app.revanced.patches.reddit.customclients.SpoofClientAnnotation import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints.GetClientIdFingerprint @@ -18,7 +20,7 @@ import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints class SpoofClientPatch : AbstractSpoofClientPatch( "http://www.ccrama.me", Options, listOf(GetClientIdFingerprint) ) { - override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) { + override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult { first().mutableMethod.addInstructions( 0, """ @@ -26,6 +28,8 @@ class SpoofClientPatch : AbstractSpoofClientPatch( return-object v0 """ ) + + return PatchResultSuccess() } companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer() diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/ads/fingerprints/IsAdsEnabledFingerprint.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/ads/fingerprints/IsAdsEnabledFingerprint.kt index 2c150d1e5c..40c98bc2ba 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/ads/fingerprints/IsAdsEnabledFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/ads/fingerprints/IsAdsEnabledFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.reddit.customclients.syncforreddit.ads.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object IsAdsEnabledFingerprint : MethodFingerprint( returnType = "Z", diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/ads/patch/DisableAdsPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/ads/patch/DisableAdsPatch.kt index 91460a4200..367ca8f90d 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/ads/patch/DisableAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/ads/patch/DisableAdsPatch.kt @@ -1,10 +1,12 @@ package app.revanced.patches.reddit.customclients.syncforreddit.ads.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.* import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.reddit.customclients.syncforreddit.ads.fingerprints.IsAdsEnabledFingerprint @@ -15,7 +17,7 @@ import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy. @DependsOn([DisablePiracyDetectionPatch::class]) @Compatibility([Package("com.laurencedawson.reddit_sync")]) class DisableAdsPatch : BytecodePatch(listOf(IsAdsEnabledFingerprint)) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { IsAdsEnabledFingerprint.result?.mutableMethod?.apply { addInstructions( 0, @@ -24,7 +26,9 @@ class DisableAdsPatch : BytecodePatch(listOf(IsAdsEnabledFingerprint)) { return v0 """ ) - } ?: throw IsAdsEnabledFingerprint.exception + } ?: return IsAdsEnabledFingerprint.toErrorResult() + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/annoyances/startup/patch/DisableSyncForLemmyBottomSheetPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/annoyances/startup/patch/DisableSyncForLemmyBottomSheetPatch.kt index 41bc706bd6..e47e6ea013 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/annoyances/startup/patch/DisableSyncForLemmyBottomSheetPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/annoyances/startup/patch/DisableSyncForLemmyBottomSheetPatch.kt @@ -7,6 +7,8 @@ import app.revanced.patcher.annotation.Package import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.reddit.customclients.syncforreddit.annoyances.startup.fingerprints.MainActivityOnCreate @@ -21,11 +23,13 @@ import app.revanced.patches.reddit.customclients.syncforreddit.annoyances.startu ] ) class DisableSyncForLemmyBottomSheetPatch : BytecodePatch(listOf(MainActivityOnCreate)) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { MainActivityOnCreate.result?.mutableMethod?.apply { val showBottomSheetIndex = implementation!!.instructions.lastIndex - 1 removeInstruction(showBottomSheetIndex) } + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/api/patch/SpoofClientPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/api/patch/SpoofClientPatch.kt index 7c329de376..2f1ec7a1bb 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/api/patch/SpoofClientPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/api/patch/SpoofClientPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.reddit.customclients.syncforreddit.api.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Package @@ -10,15 +10,17 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch import app.revanced.patches.reddit.customclients.SpoofClientAnnotation import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetAuthorizationStringFingerprint import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetBearerTokenFingerprint import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.patch.DisablePiracyDetectionPatch -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.reference.StringReference +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.reference.StringReference import java.util.* @SpoofClientAnnotation @@ -36,7 +38,7 @@ import java.util.* class SpoofClientPatch : AbstractSpoofClientPatch( "http://redditsync/auth", Options, listOf(GetAuthorizationStringFingerprint) ) { - override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) { + override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext): PatchResult { forEach { fingerprintResult -> fingerprintResult.also { result -> GetBearerTokenFingerprint.also { it.resolve(context, result.classDef) }.result?.mutableMethod?.apply { @@ -48,7 +50,7 @@ class SpoofClientPatch : AbstractSpoofClientPatch( return-object v0 """ ) - } ?: throw GetBearerTokenFingerprint.exception + } ?: return GetBearerTokenFingerprint.toErrorResult() }.let { val occurrenceIndex = it.scanResult.stringsScanResult!!.matches.first().index @@ -69,6 +71,8 @@ class SpoofClientPatch : AbstractSpoofClientPatch( } } } + + return PatchResultSuccess() } companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer() diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/detection/piracy/fingerprints/PiracyDetectionFingerprint.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/detection/piracy/fingerprints/PiracyDetectionFingerprint.kt index 6251c8b29f..f420ce16b7 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/detection/piracy/fingerprints/PiracyDetectionFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/detection/piracy/fingerprints/PiracyDetectionFingerprint.kt @@ -2,9 +2,9 @@ package app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.ReferenceInstruction object PiracyDetectionFingerprint : MethodFingerprint( returnType = "V", diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/detection/piracy/patch/DisablePiracyDetectionPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/detection/piracy/patch/DisablePiracyDetectionPatch.kt index 5ce7fb0bf0..f0d7306034 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/detection/piracy/patch/DisablePiracyDetectionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/detection/piracy/patch/DisablePiracyDetectionPatch.kt @@ -4,11 +4,13 @@ import app.revanced.patcher.annotation.Description import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.fingerprints.PiracyDetectionFingerprint @Description("Disables detection of modified versions.") class DisablePiracyDetectionPatch : BytecodePatch(listOf(PiracyDetectionFingerprint)) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // Do not return an error if the fingerprint is not resolved. // This is fine because new versions of the target app do not need this patch. PiracyDetectionFingerprint.result?.mutableMethod?.apply { @@ -19,5 +21,7 @@ class DisablePiracyDetectionPatch : BytecodePatch(listOf(PiracyDetectionFingerpr """ ) } + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/reddit/layout/disablescreenshotpopup/patch/DisableScreenshotPopupPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/layout/disablescreenshotpopup/patch/DisableScreenshotPopupPatch.kt index f59c020781..740252f29a 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/layout/disablescreenshotpopup/patch/DisableScreenshotPopupPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/layout/disablescreenshotpopup/patch/DisableScreenshotPopupPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.reddit.layout.disablescreenshotpopup.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.reddit.layout.disablescreenshotpopup.annotations.DisableScreenshotPopupCompatibility import app.revanced.patches.reddit.layout.disablescreenshotpopup.fingerprints.DisableScreenshotPopupFingerprint @@ -17,8 +19,10 @@ import app.revanced.patches.reddit.layout.disablescreenshotpopup.fingerprints.Di class DisableScreenshotPopupPatch : BytecodePatch( listOf(DisableScreenshotPopupFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { DisableScreenshotPopupFingerprint.result?.mutableMethod?.addInstruction(0, "return-void") - ?: throw DisableScreenshotPopupFingerprint.exception + ?: return DisableScreenshotPopupFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/reddit/layout/premiumicon/patch/PremiumIconPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/layout/premiumicon/patch/PremiumIconPatch.kt index 6f4c62a1c3..8233d8115e 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/layout/premiumicon/patch/PremiumIconPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/layout/premiumicon/patch/PremiumIconPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.reddit.layout.premiumicon.annotations.PremiumIconCompatibility import app.revanced.patches.reddit.layout.premiumicon.fingerprints.PremiumIconFingerprint @@ -18,7 +20,7 @@ class PremiumIconPatch : BytecodePatch( PremiumIconFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val method = PremiumIconFingerprint.result!!.mutableMethod method.addInstructions( 0, @@ -27,5 +29,6 @@ class PremiumIconPatch : BytecodePatch( return v0 """ ) + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/reddit/misc/tracking/url/patch/SanitizeUrlQueryPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/misc/tracking/url/patch/SanitizeUrlQueryPatch.kt index 94404f0789..cb1735b856 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/misc/tracking/url/patch/SanitizeUrlQueryPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/misc/tracking/url/patch/SanitizeUrlQueryPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.reddit.misc.tracking.url.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.reddit.misc.tracking.url.annotations.SanitizeUrlQueryCompatibility import app.revanced.patches.reddit.misc.tracking.url.fingerprints.ShareLinkFormatterFingerprint @@ -17,12 +19,14 @@ import app.revanced.patches.reddit.misc.tracking.url.fingerprints.ShareLinkForma class SanitizeUrlQueryPatch : BytecodePatch( listOf(ShareLinkFormatterFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { ShareLinkFormatterFingerprint.result?.mutableMethod?.addInstructions( 0, "return-object p0" - ) ?: throw ShareLinkFormatterFingerprint.exception + ) ?: return ShareLinkFormatterFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/scbeasy/detection/debugging/patch/RemoveDebuggingDetectionPatch.kt b/src/main/kotlin/app/revanced/patches/scbeasy/detection/debugging/patch/RemoveDebuggingDetectionPatch.kt index 387caf2d21..026b31554f 100644 --- a/src/main/kotlin/app/revanced/patches/scbeasy/detection/debugging/patch/RemoveDebuggingDetectionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/scbeasy/detection/debugging/patch/RemoveDebuggingDetectionPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.scbeasy.detection.debugging.annotations.RemoveDebuggingDetectionCompatibility import app.revanced.patches.scbeasy.detection.debugging.fingerprints.DebuggingDetectionFingerprint @@ -16,7 +18,7 @@ import app.revanced.patches.scbeasy.detection.debugging.fingerprints.DebuggingDe class RemoveDebuggingDetectionPatch : BytecodePatch( listOf(DebuggingDetectionFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { DebuggingDetectionFingerprint.result!!.mutableMethod.addInstructions( 0, """ @@ -24,5 +26,6 @@ class RemoveDebuggingDetectionPatch : BytecodePatch( return v0 """ ) + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/shared/fingerprints/LayoutConstructorFingerprint.kt b/src/main/kotlin/app/revanced/patches/shared/fingerprints/LayoutConstructorFingerprint.kt deleted file mode 100644 index ad843e9f74..0000000000 --- a/src/main/kotlin/app/revanced/patches/shared/fingerprints/LayoutConstructorFingerprint.kt +++ /dev/null @@ -1,12 +0,0 @@ -package app.revanced.patches.shared.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags - -object LayoutConstructorFingerprint : MethodFingerprint( - returnType = "V", - accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, - parameters = emptyList(), - strings = listOf("1.0x") -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/shared/fingerprints/WatchWhileActivityFingerprint.kt b/src/main/kotlin/app/revanced/patches/shared/fingerprints/WatchWhileActivityFingerprint.kt index eab3705263..9aec2409af 100644 --- a/src/main/kotlin/app/revanced/patches/shared/fingerprints/WatchWhileActivityFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/shared/fingerprints/WatchWhileActivityFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.shared.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object WatchWhileActivityFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, diff --git a/src/main/kotlin/app/revanced/patches/shared/integrations/patch/AbstractIntegrationsPatch.kt b/src/main/kotlin/app/revanced/patches/shared/integrations/patch/AbstractIntegrationsPatch.kt index 378cfc30d3..bff3bd1997 100644 --- a/src/main/kotlin/app/revanced/patches/shared/integrations/patch/AbstractIntegrationsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/integrations/patch/AbstractIntegrationsPatch.kt @@ -5,11 +5,13 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint.RegisterResolver -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.ClassDef -import com.android.tools.smali.dexlib2.iface.Method +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.ClassDef +import org.jf.dexlib2.iface.Method @Description("Applies mandatory patches to implement the ReVanced integrations into the application.") abstract class AbstractIntegrationsPatch( @@ -38,7 +40,7 @@ abstract class AbstractIntegrationsPatch( strings, customFingerprint ) { - fun invoke(integrationsDescriptor: String) { + fun invoke(integrationsDescriptor: String): PatchResult { result?.mutableMethod?.let { method -> val contextRegister = contextRegisterResolver(method) @@ -47,7 +49,9 @@ abstract class AbstractIntegrationsPatch( "sput-object v$contextRegister, " + "$integrationsDescriptor->context:Landroid/content/Context;" ) - } ?: throw PatchException("Could not find hook target fingerprint.") + } ?: return PatchResultError("Could not find hook target fingerprint.") + + return PatchResultSuccess() } interface RegisterResolver : (Method) -> Int { @@ -55,11 +59,20 @@ abstract class AbstractIntegrationsPatch( } } - override fun execute(context: BytecodeContext) { - if (context.findClass(integrationsDescriptor) == null) throw PatchException( - "Integrations have not been merged yet. This patch can not succeed without merging the integrations." - ) + override fun execute(context: BytecodeContext): PatchResult { + if (context.findClass(integrationsDescriptor) == null) return MISSING_INTEGRATIONS + + for (hook in hooks) hook.invoke(integrationsDescriptor).let { + if (it is PatchResultError) return it + } - for (hook in hooks) hook.invoke(integrationsDescriptor) + return PatchResultSuccess() + } + + private companion object { + val MISSING_INTEGRATIONS = PatchResultError( + "Integrations have not been merged yet. " + + "This patch can not succeed without merging the integrations." + ) } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/shared/mapping/misc/patch/ResourceMappingPatch.kt b/src/main/kotlin/app/revanced/patches/shared/mapping/misc/patch/ResourceMappingPatch.kt index 62d1043c40..ea00c7832f 100644 --- a/src/main/kotlin/app/revanced/patches/shared/mapping/misc/patch/ResourceMappingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/mapping/misc/patch/ResourceMappingPatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.shared.mapping.misc.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import org.w3c.dom.Element import java.util.* @@ -17,7 +19,7 @@ class ResourceMappingPatch : ResourcePatch { private val threadPoolExecutor = Executors.newFixedThreadPool(THREAD_COUNT) } - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { // save the file in memory to concurrently read from val resourceXmlFile = context["res/values/public.xml"].readBytes() @@ -57,6 +59,8 @@ class ResourceMappingPatch : ResourcePatch { .awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS) resourceMappings = mappings + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/fix/verticalscroll/fingerprints/CanScrollVerticallyFingerprint.kt b/src/main/kotlin/app/revanced/patches/shared/misc/fix/verticalscroll/fingerprints/CanScrollVerticallyFingerprint.kt index f96e2d9d08..c58581081e 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/fix/verticalscroll/fingerprints/CanScrollVerticallyFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/fix/verticalscroll/fingerprints/CanScrollVerticallyFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.shared.misc.fix.verticalscroll.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object CanScrollVerticallyFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/fix/verticalscroll/patch/VerticalScrollPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/fix/verticalscroll/patch/VerticalScrollPatch.kt index cea86414e8..f33bb09b3c 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/fix/verticalscroll/patch/VerticalScrollPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/fix/verticalscroll/patch/VerticalScrollPatch.kt @@ -1,21 +1,23 @@ package app.revanced.patches.shared.misc.fix.verticalscroll.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.shared.misc.fix.verticalscroll.annotations.VerticalScrollCompatibility import app.revanced.patches.shared.misc.fix.verticalscroll.fingerprints.CanScrollVerticallyFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Description("Fixes issues with refreshing the feed when the first component is of type EmptyComponent.") @VerticalScrollCompatibility class VerticalScrollPatch : BytecodePatch( listOf(CanScrollVerticallyFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { CanScrollVerticallyFingerprint.result?.let { it.mutableMethod.apply { val moveResultIndex = it.scanResult.patternScanResult!!.endIndex @@ -27,6 +29,8 @@ class VerticalScrollPatch : BytecodePatch( "const/4 v$moveResultRegister, 0x0" ) } - } ?: throw CanScrollVerticallyFingerprint.exception + } ?: return CanScrollVerticallyFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/shared/settings/preference/BasePreference.kt b/src/main/kotlin/app/revanced/patches/shared/settings/preference/BasePreference.kt index 4fc84105d8..09fe4bc61e 100644 --- a/src/main/kotlin/app/revanced/patches/shared/settings/preference/BasePreference.kt +++ b/src/main/kotlin/app/revanced/patches/shared/settings/preference/BasePreference.kt @@ -12,7 +12,7 @@ import org.w3c.dom.Element * @param tag The tag of the preference. * @param summary The summary of the preference. */ -abstract class BasePreference( +internal abstract class BasePreference( val key: String?, val title: StringResource, val summary: StringResource? = null, diff --git a/src/main/kotlin/app/revanced/patches/shared/settings/preference/BaseResource.kt b/src/main/kotlin/app/revanced/patches/shared/settings/preference/BaseResource.kt index 682ccb33ae..61a9b35a29 100644 --- a/src/main/kotlin/app/revanced/patches/shared/settings/preference/BaseResource.kt +++ b/src/main/kotlin/app/revanced/patches/shared/settings/preference/BaseResource.kt @@ -9,7 +9,7 @@ import org.w3c.dom.Element * @param name The name of the resource. * @param tag The tag of the resource. */ -abstract class BaseResource( +internal abstract class BaseResource( val name: String, val tag: String ) { diff --git a/src/main/kotlin/app/revanced/patches/shared/settings/preference/DefaultBasePreference.kt b/src/main/kotlin/app/revanced/patches/shared/settings/preference/DefaultBasePreference.kt index 9371d48f8c..64d35878ca 100644 --- a/src/main/kotlin/app/revanced/patches/shared/settings/preference/DefaultBasePreference.kt +++ b/src/main/kotlin/app/revanced/patches/shared/settings/preference/DefaultBasePreference.kt @@ -12,7 +12,7 @@ import org.w3c.dom.Document * @param summary The summary of the preference. * @param default The default value of the preference. */ -abstract class DefaultBasePreference<T>( +internal abstract class DefaultBasePreference<T>( key: String?, title: StringResource, summary: StringResource? = null, diff --git a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/ArrayResource.kt b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/ArrayResource.kt index fa5e12f3ce..9db57cff00 100644 --- a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/ArrayResource.kt +++ b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/ArrayResource.kt @@ -10,7 +10,7 @@ import org.w3c.dom.Document * @param name The name of the array resource. * @param items The items of the array resource. */ -class ArrayResource( +internal class ArrayResource( name: String, val items: List<StringResource> ) : BaseResource(name, "string-array") { diff --git a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/ListPreference.kt b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/ListPreference.kt index 37181267fa..3df3c87e90 100644 --- a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/ListPreference.kt +++ b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/ListPreference.kt @@ -15,7 +15,7 @@ import org.w3c.dom.Document * @param summary The summary of the list preference. * @param default The default entry value of the list preference. */ -class ListPreference( +internal class ListPreference( key: String, title: StringResource, val entries: ArrayResource, diff --git a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/NonInteractivePreference.kt b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/NonInteractivePreference.kt index eb16067c23..c97913c2a1 100644 --- a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/NonInteractivePreference.kt +++ b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/NonInteractivePreference.kt @@ -15,7 +15,7 @@ import org.w3c.dom.Element * @param title The title of the preference. * @param summary The summary of the text preference. */ -class NonInteractivePreference( +internal class NonInteractivePreference( title: StringResource, summary: StringResource, ) : BasePreference(null, title, summary, "Preference") { diff --git a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/Preference.kt b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/Preference.kt index 463a1fce28..2ada5625d6 100644 --- a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/Preference.kt +++ b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/Preference.kt @@ -12,7 +12,7 @@ import org.w3c.dom.Document * @param summary The summary of the text preference. * @param intent The intent of the preference. */ -class Preference( +internal class Preference( key: String, title: StringResource, summary: StringResource, @@ -33,7 +33,7 @@ class Preference( }) } - class Intent( + internal class Intent( internal val targetPackage: String, internal val data: String, internal val targetClass: String diff --git a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/PreferenceCategory.kt b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/PreferenceCategory.kt index 633e8d7849..56e02f45d6 100644 --- a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/PreferenceCategory.kt +++ b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/PreferenceCategory.kt @@ -11,7 +11,7 @@ import org.w3c.dom.Document * @param title The title of the preference. * @param preferences Child preferences of this category. */ -open class PreferenceCategory( +internal open class PreferenceCategory( key: String, title: StringResource, var preferences: List<BasePreference>, diff --git a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/PreferenceScreen.kt b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/PreferenceScreen.kt index e0e435b23f..e6bf32d439 100644 --- a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/PreferenceScreen.kt +++ b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/PreferenceScreen.kt @@ -13,7 +13,7 @@ import org.w3c.dom.Document * @param preferences Child preferences of this screen. * @param summary The summary of the text preference. */ -open class PreferenceScreen( +internal open class PreferenceScreen( key: String, title: StringResource, var preferences: List<BasePreference>, diff --git a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/StringResource.kt b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/StringResource.kt index b3cd839723..7934b12704 100644 --- a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/StringResource.kt +++ b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/StringResource.kt @@ -11,7 +11,7 @@ import org.w3c.dom.Document * @param value The value of the string. * @param formatted If the string is formatted. If false, the attribute will be set. */ -class StringResource( +internal class StringResource( name: String, val value: String, val formatted: Boolean = true diff --git a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/SwitchPreference.kt b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/SwitchPreference.kt index a24b6dfa9c..5a9e6778ee 100644 --- a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/SwitchPreference.kt +++ b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/SwitchPreference.kt @@ -18,7 +18,7 @@ import org.w3c.dom.Element * @param userDialogMessage The message to show in a dialog when the user toggles the preference. * @param default The default value of the switch. */ -class SwitchPreference( +internal class SwitchPreference( key: String, title: StringResource, val summaryOn: StringResource, val summaryOff: StringResource, diff --git a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/TextPreference.kt b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/TextPreference.kt index aaac8c5c01..5895a5e6e1 100644 --- a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/TextPreference.kt +++ b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/TextPreference.kt @@ -13,7 +13,7 @@ import org.w3c.dom.Document * @param summary The summary of the text preference. * @param default The default value of the text preference. */ -class TextPreference( +internal class TextPreference( key: String?, title: StringResource, summary: StringResource?, diff --git a/src/main/kotlin/app/revanced/patches/shared/settings/resource/patch/AbstractSettingsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/shared/settings/resource/patch/AbstractSettingsResourcePatch.kt index 3819be0dd9..a86ed1beec 100644 --- a/src/main/kotlin/app/revanced/patches/shared/settings/resource/patch/AbstractSettingsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/settings/resource/patch/AbstractSettingsResourcePatch.kt @@ -1,8 +1,10 @@ package app.revanced.patches.shared.settings.resource.patch +import app.revanced.patcher.data.DomFileEditor import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch -import app.revanced.patcher.util.DomFileEditor import app.revanced.patches.shared.settings.preference.BasePreference import app.revanced.patches.shared.settings.preference.BaseResource import app.revanced.patches.shared.settings.preference.addPreference @@ -24,7 +26,7 @@ abstract class AbstractSettingsResourcePatch( private val preferenceFileName: String, private val sourceDirectory: String, ) : ResourcePatch, Closeable { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { /* * used for self-restart * TODO: do this only, when necessary @@ -49,6 +51,8 @@ abstract class AbstractSettingsResourcePatch( stringsEditor = context.xmlEditor["res/values/strings.xml"] arraysEditor = context.xmlEditor["res/values/arrays.xml"] revancedPreferencesEditor = context.xmlEditor["res/xml/$preferenceFileName.xml"] + + return PatchResultSuccess() } internal companion object { diff --git a/src/main/kotlin/app/revanced/patches/shared/settings/util/AbstractPreferenceScreen.kt b/src/main/kotlin/app/revanced/patches/shared/settings/util/AbstractPreferenceScreen.kt index 30402f5a73..a17b9c381b 100644 --- a/src/main/kotlin/app/revanced/patches/shared/settings/util/AbstractPreferenceScreen.kt +++ b/src/main/kotlin/app/revanced/patches/shared/settings/util/AbstractPreferenceScreen.kt @@ -6,7 +6,7 @@ import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen import app.revanced.patches.shared.settings.preference.impl.StringResource import java.io.Closeable -abstract class AbstractPreferenceScreen( +internal abstract class AbstractPreferenceScreen( private val root: MutableList<Screen> = mutableListOf() ) : Closeable { diff --git a/src/main/kotlin/app/revanced/patches/solidexplorer2/functionality/filesize/fingerprints/OnReadyFingerprint.kt b/src/main/kotlin/app/revanced/patches/solidexplorer2/functionality/filesize/fingerprints/OnReadyFingerprint.kt deleted file mode 100644 index 22e625b681..0000000000 --- a/src/main/kotlin/app/revanced/patches/solidexplorer2/functionality/filesize/fingerprints/OnReadyFingerprint.kt +++ /dev/null @@ -1,15 +0,0 @@ -package app.revanced.patches.solidexplorer2.functionality.filesize.fingerprints - -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode - -object OnReadyFingerprint : MethodFingerprint( - opcodes = listOf( - Opcode.CONST_WIDE_32, // Constant storing the 2MB limit - Opcode.CMP_LONG, - Opcode.IF_LEZ, - ), - customFingerprint = { methodDef, _ -> - methodDef.definingClass == "Lpl/solidexplorer/plugins/texteditor/TextEditor;" && methodDef.name == "onReady" - } -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/solidexplorer2/functionality/filesize/patch/RemoveFileSizeLimitPatch.kt b/src/main/kotlin/app/revanced/patches/solidexplorer2/functionality/filesize/patch/RemoveFileSizeLimitPatch.kt deleted file mode 100644 index 3fed6f5381..0000000000 --- a/src/main/kotlin/app/revanced/patches/solidexplorer2/functionality/filesize/patch/RemoveFileSizeLimitPatch.kt +++ /dev/null @@ -1,27 +0,0 @@ -package app.revanced.patches.solidexplorer2.functionality.filesize.patch - -import app.revanced.extensions.exception -import app.revanced.patcher.annotation.Compatibility -import app.revanced.patcher.annotation.Description -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.annotation.Package -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.getInstruction -import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.solidexplorer2.functionality.filesize.fingerprints.OnReadyFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.ThreeRegisterInstruction - -@Patch -@Name("Remove file size limit") -@Description("Allows opening files larger than 2 MB in the text editor.") -@Compatibility([Package("pl.solidexplorer2")]) -class RemoveFileSizeLimitPatch : BytecodePatch(listOf(OnReadyFingerprint)) { - override fun execute(context: BytecodeContext) = OnReadyFingerprint.result?.let { result -> - val cmpIndex = result.scanResult.patternScanResult!!.startIndex + 1 - val cmpResultRegister = result.mutableMethod.getInstruction<ThreeRegisterInstruction>(cmpIndex).registerA - - result.mutableMethod.replaceInstruction(cmpIndex, "const/4 v${cmpResultRegister}, 0x0") - } ?: throw OnReadyFingerprint.exception -} diff --git a/src/main/kotlin/app/revanced/patches/songpal/badge/fingerprints/CreateTabsFingerprint.kt b/src/main/kotlin/app/revanced/patches/songpal/badge/fingerprints/CreateTabsFingerprint.kt index b85e7464ad..59f82c3aa9 100644 --- a/src/main/kotlin/app/revanced/patches/songpal/badge/fingerprints/CreateTabsFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/songpal/badge/fingerprints/CreateTabsFingerprint.kt @@ -2,10 +2,10 @@ package app.revanced.patches.songpal.badge.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patches.songpal.badge.patch.BadgeTabPatch -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.reference.MethodReference +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.reference.MethodReference // Located @ ub.i0.h#p (9.5.0) object CreateTabsFingerprint : MethodFingerprint( diff --git a/src/main/kotlin/app/revanced/patches/songpal/badge/fingerprints/ShowNotificationFingerprint.kt b/src/main/kotlin/app/revanced/patches/songpal/badge/fingerprints/ShowNotificationFingerprint.kt index 02920a8ef7..d480430de4 100644 --- a/src/main/kotlin/app/revanced/patches/songpal/badge/fingerprints/ShowNotificationFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/songpal/badge/fingerprints/ShowNotificationFingerprint.kt @@ -2,11 +2,11 @@ package app.revanced.patches.songpal.badge.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patches.songpal.badge.fingerprints.ShowNotificationFingerprint.expectedReference -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.reference.MethodReference -import com.android.tools.smali.dexlib2.immutable.reference.ImmutableMethodReference +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.reference.MethodReference +import org.jf.dexlib2.immutable.reference.ImmutableMethodReference // Located @ com.sony.songpal.mdr.vim.activity.MdrRemoteBaseActivity.e#run (9.5.0) object ShowNotificationFingerprint : MethodFingerprint( diff --git a/src/main/kotlin/app/revanced/patches/songpal/badge/patch/BadgeTabPatch.kt b/src/main/kotlin/app/revanced/patches/songpal/badge/patch/BadgeTabPatch.kt index 9e00514e65..d4f7ffbdbf 100644 --- a/src/main/kotlin/app/revanced/patches/songpal/badge/patch/BadgeTabPatch.kt +++ b/src/main/kotlin/app/revanced/patches/songpal/badge/patch/BadgeTabPatch.kt @@ -1,12 +1,14 @@ package app.revanced.patches.songpal.badge.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.songpal.badge.annotations.BadgeCompatibility import app.revanced.patches.songpal.badge.fingerprints.CreateTabsFingerprint @@ -18,7 +20,7 @@ import app.revanced.patches.songpal.badge.fingerprints.CreateTabsFingerprint class BadgeTabPatch : BytecodePatch( listOf(CreateTabsFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { CreateTabsFingerprint.result?.mutableMethod?.apply { removeInstructions(0, 2) @@ -50,7 +52,9 @@ class BadgeTabPatch : BytecodePatch( """ ) - } ?: throw CreateTabsFingerprint.exception + } ?: return CreateTabsFingerprint.toErrorResult() + + return PatchResultSuccess() } companion object { diff --git a/src/main/kotlin/app/revanced/patches/songpal/badge/patch/RemoveNotificationBadgePatch.kt b/src/main/kotlin/app/revanced/patches/songpal/badge/patch/RemoveNotificationBadgePatch.kt index 3794339a85..59f626eb80 100644 --- a/src/main/kotlin/app/revanced/patches/songpal/badge/patch/RemoveNotificationBadgePatch.kt +++ b/src/main/kotlin/app/revanced/patches/songpal/badge/patch/RemoveNotificationBadgePatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.songpal.badge.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.songpal.badge.annotations.BadgeCompatibility import app.revanced.patches.songpal.badge.fingerprints.ShowNotificationFingerprint @@ -17,9 +19,11 @@ import app.revanced.patches.songpal.badge.fingerprints.ShowNotificationFingerpri class RemoveNotificationBadgePatch : BytecodePatch( listOf(ShowNotificationFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { ShowNotificationFingerprint.result?.mutableMethod?.apply { addInstructions(0, "return-void") - } ?: throw ShowNotificationFingerprint.exception + } ?: return ShowNotificationFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/spotify/layout/theme/patch/ThemePatch.kt b/src/main/kotlin/app/revanced/patches/spotify/layout/theme/patch/ThemePatch.kt index c90b93ff7e..356a2d9e8e 100644 --- a/src/main/kotlin/app/revanced/patches/spotify/layout/theme/patch/ThemePatch.kt +++ b/src/main/kotlin/app/revanced/patches/spotify/layout/theme/patch/ThemePatch.kt @@ -3,9 +3,7 @@ package app.revanced.patches.spotify.layout.theme.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.patch.OptionsContainer -import app.revanced.patcher.patch.PatchOption -import app.revanced.patcher.patch.ResourcePatch +import app.revanced.patcher.patch.* import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.spotify.layout.theme.annotations.ThemeCompatibility import org.w3c.dom.Element @@ -15,7 +13,7 @@ import org.w3c.dom.Element @Description("Applies a custom theme.") @ThemeCompatibility class ThemePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { context.xmlEditor["res/values/colors.xml"].use { editor -> val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element @@ -30,6 +28,8 @@ class ThemePatch : ResourcePatch { } } } + + return PatchResultSuccess() } companion object : OptionsContainer() { diff --git a/src/main/kotlin/app/revanced/patches/spotify/lite/ondemand/fingerprints/OnDemandFingerprint.kt b/src/main/kotlin/app/revanced/patches/spotify/lite/ondemand/fingerprints/OnDemandFingerprint.kt index 1295793448..099eaa438a 100644 --- a/src/main/kotlin/app/revanced/patches/spotify/lite/ondemand/fingerprints/OnDemandFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/spotify/lite/ondemand/fingerprints/OnDemandFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.spotify.lite.ondemand.fingerprints import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode @FuzzyPatternScanMethod(2) object OnDemandFingerprint : MethodFingerprint( diff --git a/src/main/kotlin/app/revanced/patches/spotify/lite/ondemand/patch/OnDemandPatch.kt b/src/main/kotlin/app/revanced/patches/spotify/lite/ondemand/patch/OnDemandPatch.kt index 7ab6ff29a2..0ee130dfbb 100644 --- a/src/main/kotlin/app/revanced/patches/spotify/lite/ondemand/patch/OnDemandPatch.kt +++ b/src/main/kotlin/app/revanced/patches/spotify/lite/ondemand/patch/OnDemandPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.spotify.lite.ondemand.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.spotify.lite.ondemand.annotations.OnDemandCompatibility import app.revanced.patches.spotify.lite.ondemand.fingerprints.OnDemandFingerprint @@ -19,11 +21,12 @@ class OnDemandPatch : BytecodePatch( OnDemandFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { OnDemandFingerprint.result?.apply { val insertIndex = scanResult.patternScanResult!!.endIndex - 1 // Spoof a premium account mutableMethod.addInstruction(insertIndex, "const/4 v0, 0x2") - } ?: throw OnDemandFingerprint.exception + } ?: return OnDemandFingerprint.toErrorResult() + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/spotify/premium_navbar_tab/patch/PremiumNavbarTabPatch.kt b/src/main/kotlin/app/revanced/patches/spotify/premium_navbar_tab/patch/PremiumNavbarTabPatch.kt index a8126057c2..5c3376d636 100644 --- a/src/main/kotlin/app/revanced/patches/spotify/premium_navbar_tab/patch/PremiumNavbarTabPatch.kt +++ b/src/main/kotlin/app/revanced/patches/spotify/premium_navbar_tab/patch/PremiumNavbarTabPatch.kt @@ -6,14 +6,16 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.spotify.premium_navbar_tab.annotations.PremiumNavbarTabCompatibility import app.revanced.patches.spotify.premium_navbar_tab.fingerprints.AddPremiumNavbarTabFingerprint import app.revanced.patches.spotify.premium_navbar_tab.fingerprints.AddPremiumNavbarTabParentFingerprint import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.WideLiteralInstruction +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.WideLiteralInstruction @Patch @Name("Hide premium navbar") @@ -25,7 +27,7 @@ class PremiumNavbarTabPatch : BytecodePatch( AddPremiumNavbarTabParentFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val parentResult = AddPremiumNavbarTabParentFingerprint.result!! AddPremiumNavbarTabFingerprint.resolve(context, parentResult.classDef) @@ -53,5 +55,7 @@ class PremiumNavbarTabPatch : BytecodePatch( if (--removeAmount == 0) break } + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/strava/subscription/fingerprints/GetSubscribedFingerprint.kt b/src/main/kotlin/app/revanced/patches/strava/subscription/fingerprints/GetSubscribedFingerprint.kt deleted file mode 100644 index a0f6ff393b..0000000000 --- a/src/main/kotlin/app/revanced/patches/strava/subscription/fingerprints/GetSubscribedFingerprint.kt +++ /dev/null @@ -1,11 +0,0 @@ -package app.revanced.patches.strava.subscription.fingerprints - -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode - -object GetSubscribedFingerprint : MethodFingerprint( - opcodes = listOf(Opcode.IGET_BOOLEAN), - customFingerprint = { methodDef, classDef -> - classDef.type.endsWith("SubscriptionDetailResponse;") && methodDef.name == "getSubscribed" - } -) diff --git a/src/main/kotlin/app/revanced/patches/strava/subscription/patch/UnlockSubscriptionPatch.kt b/src/main/kotlin/app/revanced/patches/strava/subscription/patch/UnlockSubscriptionPatch.kt deleted file mode 100644 index 42a462e348..0000000000 --- a/src/main/kotlin/app/revanced/patches/strava/subscription/patch/UnlockSubscriptionPatch.kt +++ /dev/null @@ -1,23 +0,0 @@ -package app.revanced.patches.strava.subscription.patch - -import app.revanced.extensions.exception -import app.revanced.patcher.annotation.Compatibility -import app.revanced.patcher.annotation.Description -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.annotation.Package -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.strava.subscription.fingerprints.GetSubscribedFingerprint - -@Patch -@Name("Unlock subscription features") -@Description("Unlocks \"Matched Runs\" and \"Segment Efforts\".") -@Compatibility([Package("com.strava", ["320.12"])]) -class UnlockSubscriptionPatch : BytecodePatch(listOf(GetSubscribedFingerprint)) { - override fun execute(context: BytecodeContext) = GetSubscribedFingerprint.result?.let { result -> - val isSubscribedIndex = result.scanResult.patternScanResult!!.startIndex - result.mutableMethod.replaceInstruction(isSubscribedIndex, "const/4 v0, 0x1") - } ?: throw GetSubscribedFingerprint.exception -} \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/ticktick/misc/themeunlock/patch/UnlockThemePatch.kt b/src/main/kotlin/app/revanced/patches/ticktick/misc/themeunlock/patch/UnlockThemePatch.kt index e7ff2319aa..c7e5023e6c 100644 --- a/src/main/kotlin/app/revanced/patches/ticktick/misc/themeunlock/patch/UnlockThemePatch.kt +++ b/src/main/kotlin/app/revanced/patches/ticktick/misc/themeunlock/patch/UnlockThemePatch.kt @@ -6,6 +6,8 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.ticktick.misc.themeunlock.annotations.UnlockThemesCompatibility import app.revanced.patches.ticktick.misc.themeunlock.fingerprints.CheckLockedThemesFingerprint @@ -21,7 +23,7 @@ class UnlockProPatch : BytecodePatch( SetThemeFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val lockedThemesMethod = CheckLockedThemesFingerprint.result!!.mutableMethod lockedThemesMethod.addInstructions( 0, @@ -33,5 +35,7 @@ class UnlockProPatch : BytecodePatch( val setThemeMethod = SetThemeFingerprint.result!!.mutableMethod setThemeMethod.removeInstructions(0, 10) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/tiktok/ad/patch/HideAdsPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/ad/patch/HideAdsPatch.kt index 975672dc6c..84fedb65c3 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/ad/patch/HideAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/ad/patch/HideAdsPatch.kt @@ -5,15 +5,17 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.tiktok.ad.annotations.HideAdsCompatibility import app.revanced.patches.tiktok.ad.fingerprints.ConvertHelpFeedItemListFingerprint import app.revanced.patches.tiktok.ad.fingerprints.FeedItemListCloneFingerprint -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction -import com.android.tools.smali.dexlib2.iface.reference.FieldReference +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction +import org.jf.dexlib2.iface.reference.FieldReference @Patch @Name("Hide ads") @@ -25,7 +27,7 @@ class HideAdsPatch : BytecodePatch( ConvertHelpFeedItemListFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { listOf( FeedItemListCloneFingerprint, ConvertHelpFeedItemListFingerprint @@ -46,7 +48,8 @@ class HideAdsPatch : BytecodePatch( ) return@forEach } - throw PatchException("Can not find required instruction.") + return PatchResultError("Can not find required instruction.") } + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/fingerprints/FeedApiServiceLIZFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/fingerprints/FeedApiServiceLIZFingerprint.kt index a305ff53dd..30854e0c34 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/fingerprints/FeedApiServiceLIZFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/fingerprints/FeedApiServiceLIZFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.tiktok.feedfilter.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object FeedApiServiceLIZFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.SYNTHETIC, diff --git a/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/patch/FeedFilterPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/patch/FeedFilterPatch.kt index d75b5032c7..21fb62f1f9 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/patch/FeedFilterPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/patch/FeedFilterPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.tiktok.feedfilter.annotations.FeedFilterCompatibility @@ -12,8 +14,8 @@ import app.revanced.patches.tiktok.feedfilter.fingerprints.FeedApiServiceLIZFing import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint import app.revanced.patches.tiktok.misc.settings.patch.SettingsPatch -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Patch @DependsOn([IntegrationsPatch::class, SettingsPatch::class]) @@ -26,7 +28,7 @@ class FeedFilterPatch : BytecodePatch( SettingsStatusLoadFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val method = FeedApiServiceLIZFingerprint.result!!.mutableMethod for ((index, instruction) in method.implementation!!.instructions.withIndex()) { if (instruction.opcode != Opcode.RETURN_OBJECT) continue @@ -42,5 +44,6 @@ class FeedFilterPatch : BytecodePatch( 0, "invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsStatus;->enableFeedFilter()V" ) + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/ACLCommonShareFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/ACLCommonShareFingerprint.kt index 457603c96b..d5219ff3cf 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/ACLCommonShareFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/ACLCommonShareFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.tiktok.interaction.downloads.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object ACLCommonShareFingerprint : MethodFingerprint( "I", diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/ACLCommonShareFingerprint2.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/ACLCommonShareFingerprint2.kt index 774ffd45ff..a0e29c6a2d 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/ACLCommonShareFingerprint2.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/ACLCommonShareFingerprint2.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags @Name("Acl common share get show type") @DownloadsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/ACLCommonShareFingerprint3.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/ACLCommonShareFingerprint3.kt index 3102f378b1..df0c093cd8 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/ACLCommonShareFingerprint3.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/ACLCommonShareFingerprint3.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags @Name("Acl common share get transcode") @DownloadsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/DownloadPathParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/DownloadPathParentFingerprint.kt index dd71a308bb..8daff09e4b 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/DownloadPathParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/DownloadPathParentFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.tiktok.interaction.downloads.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object DownloadPathParentFingerprint : MethodFingerprint( "V", diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/patch/DownloadsPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/patch/DownloadsPatch.kt index 50d954ab16..9fc217eaae 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/patch/DownloadsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/patch/DownloadsPatch.kt @@ -3,13 +3,16 @@ package app.revanced.patches.tiktok.interaction.downloads.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.data.toMethodWalker import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod @@ -21,10 +24,10 @@ import app.revanced.patches.tiktok.interaction.downloads.fingerprints.DownloadPa import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint import app.revanced.patches.tiktok.misc.settings.patch.SettingsPatch -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.reference.StringReference +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.reference.StringReference @Patch @DependsOn([IntegrationsPatch::class, SettingsPatch::class]) @@ -40,7 +43,7 @@ class DownloadsPatch : BytecodePatch( SettingsStatusLoadFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val method1 = ACLCommonShareFingerprint.result!!.mutableMethod method1.replaceInstructions( 0, @@ -86,7 +89,7 @@ class DownloadsPatch : BytecodePatch( targetOffset = index + 1 break } - if (targetOffset == -1) throw PatchException("Can not find download path uri method.") + if (targetOffset == -1) return PatchResultError("Can not find download path uri method.") //Change videos' download path. val downloadUriMethod = context .toMethodWalker(DownloadPathParentFingerprint.result!!.method) @@ -122,5 +125,6 @@ class DownloadsPatch : BytecodePatch( 0, "invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsStatus;->enableDownload()V" ) + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/fingerprints/ShouldShowSeekBarFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/fingerprints/ShouldShowSeekBarFingerprint.kt deleted file mode 100644 index d13cfe33ae..0000000000 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/fingerprints/ShouldShowSeekBarFingerprint.kt +++ /dev/null @@ -1,9 +0,0 @@ -package app.revanced.patches.tiktok.interaction.seekbar.fingerprints - -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint - -object ShouldShowSeekBarFingerprint : MethodFingerprint( - strings = listOf( - "can not show seekbar, state: 1, not in resume" - ), -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/patch/ShowSeekbarPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/patch/ShowSeekbarPatch.kt index 85bbe3378c..f0cf943595 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/patch/ShowSeekbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/patch/ShowSeekbarPatch.kt @@ -1,15 +1,18 @@ package app.revanced.patches.tiktok.interaction.seekbar.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions +import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.tiktok.interaction.seekbar.annotations.ShowSeekbarCompatibility import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.SetSeekBarShowTypeFingerprint -import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.ShouldShowSeekBarFingerprint +import org.jf.dexlib2.iface.instruction.formats.Instruction22t @Patch @Name("Show seekbar") @@ -18,21 +21,11 @@ import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.ShouldShowSe class ShowSeekbarPatch : BytecodePatch( listOf( SetSeekBarShowTypeFingerprint, - ShouldShowSeekBarFingerprint, ) ) { - override fun execute(context: BytecodeContext) { - ShouldShowSeekBarFingerprint.result?.mutableMethod?.apply { - addInstructions( - 0, - """ - const/4 v0, 0x1 - return v0 - """ - ) - } + override fun execute(context: BytecodeContext): PatchResult { SetSeekBarShowTypeFingerprint.result?.mutableMethod?.apply { - val typeRegister = implementation!!.registerCount - 1 + val typeRegister = getInstruction<Instruction22t>(1).registerB addInstructions( 0, @@ -40,7 +33,8 @@ class ShowSeekbarPatch : BytecodePatch( const/16 v$typeRegister, 0x64 """ ) - } ?: throw SetSeekBarShowTypeFingerprint.exception + } ?: return SetSeekBarShowTypeFingerprint.toErrorResult() + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/fingerprints/SpeedControlParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/fingerprints/SpeedControlParentFingerprint.kt index 21508a928a..2a395194b3 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/fingerprints/SpeedControlParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/fingerprints/SpeedControlParentFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.tiktok.interaction.speed.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object SpeedControlParentFingerprint : MethodFingerprint( returnType = "L", diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/patch/PlaybackSpeedPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/patch/PlaybackSpeedPatch.kt index 8e0fb52772..f0a1c9eece 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/patch/PlaybackSpeedPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/patch/PlaybackSpeedPatch.kt @@ -3,13 +3,16 @@ package app.revanced.patches.tiktok.interaction.speed.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.data.toMethodWalker import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patches.tiktok.interaction.speed.annotations.PlaybackSpeedCompatibility import app.revanced.patches.tiktok.interaction.speed.fingerprints.SpeedControlParentFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode @Patch @Name("Playback speed") @@ -20,7 +23,7 @@ class PlaybackSpeedPatch : BytecodePatch( SpeedControlParentFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val parentMethod = SpeedControlParentFingerprint.result!!.mutableMethod val parentMethodInstructions = parentMethod.implementation!!.instructions for ((index, instruction) in parentMethodInstructions.withIndex()) { @@ -38,5 +41,6 @@ class PlaybackSpeedPatch : BytecodePatch( ) break } + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/annotations/IntegrationsCompatibility.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/annotations/IntegrationsCompatibility.kt new file mode 100644 index 0000000000..4ece97d66b --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/annotations/IntegrationsCompatibility.kt @@ -0,0 +1,13 @@ +package app.revanced.patches.tiktok.misc.integrations.annotations + +import app.revanced.patcher.annotation.Compatibility +import app.revanced.patcher.annotation.Package + +@Compatibility( + [ + Package("com.ss.android.ugc.trill"), + Package("com.zhiliaoapp.musically") + ] +) +@Target(AnnotationTarget.CLASS) +internal annotation class IntegrationsCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/patch/IntegrationsPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/patch/IntegrationsPatch.kt index 9761c0f12a..8d777bc690 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/patch/IntegrationsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/patch/IntegrationsPatch.kt @@ -3,9 +3,11 @@ package app.revanced.patches.tiktok.misc.integrations.patch import app.revanced.patcher.annotation.Name import app.revanced.patcher.patch.annotations.RequiresIntegrations import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch +import app.revanced.patches.tiktok.misc.integrations.annotations.IntegrationsCompatibility import app.revanced.patches.tiktok.misc.integrations.fingerprints.InitFingerprint @Name("Integrations") +@IntegrationsCompatibility @RequiresIntegrations class IntegrationsPatch : AbstractIntegrationsPatch( "Lapp/revanced/tiktok/utils/ReVancedUtils;", diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/patch/DisableLoginRequirementPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/patch/DisableLoginRequirementPatch.kt index c34ead1521..51c02a321b 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/patch/DisableLoginRequirementPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/patch/DisableLoginRequirementPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.tiktok.misc.login.disablerequirement.annotations.DisableLoginRequirementCompatibility import app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints.MandatoryLoginServiceFingerprint @@ -20,7 +22,7 @@ class DisableLoginRequirementPatch : BytecodePatch( MandatoryLoginServiceFingerprint2 ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { listOf( MandatoryLoginServiceFingerprint, MandatoryLoginServiceFingerprint2 @@ -34,5 +36,6 @@ class DisableLoginRequirementPatch : BytecodePatch( """ ) } + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/fingerprints/GoogleAuthAvailableFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/fingerprints/GoogleAuthAvailableFingerprint.kt index ba1c009340..24dd8a7ded 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/fingerprints/GoogleAuthAvailableFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/fingerprints/GoogleAuthAvailableFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object GoogleAuthAvailableFingerprint : MethodFingerprint( returnType = "Z", diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/fingerprints/GoogleOneTapAuthAvailableFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/fingerprints/GoogleOneTapAuthAvailableFingerprint.kt index 253dbdf215..fb677fcb60 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/fingerprints/GoogleOneTapAuthAvailableFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/fingerprints/GoogleOneTapAuthAvailableFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object GoogleOneTapAuthAvailableFingerprint : MethodFingerprint( returnType = "Z", diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/patch/FixGoogleLoginPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/patch/FixGoogleLoginPatch.kt index d6916bad08..c1f31787a1 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/patch/FixGoogleLoginPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/patch/FixGoogleLoginPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.tiktok.misc.login.fixgoogle.annotations.FixGoogleLoginCompatibility import app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints.GoogleAuthAvailableFingerprint @@ -20,7 +22,7 @@ class FixGoogleLoginPatch : BytecodePatch( GoogleAuthAvailableFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { listOf( GoogleOneTapAuthAvailableFingerprint, GoogleAuthAvailableFingerprint @@ -35,5 +37,6 @@ class FixGoogleLoginPatch : BytecodePatch( ) } } + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/fingerprints/AddSettingsEntryFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/fingerprints/AddSettingsEntryFingerprint.kt index 25e3aa53bc..ca0e8129e5 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/fingerprints/AddSettingsEntryFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/fingerprints/AddSettingsEntryFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.tiktok.misc.settings.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object AddSettingsEntryFingerprint : MethodFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/patch/SettingsPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/patch/SettingsPatch.kt index dfa3c2368e..633cf1e31b 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/patch/SettingsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/patch/SettingsPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.tiktok.misc.settings.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext @@ -8,15 +8,17 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.ExternalLabel import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.tiktok.misc.settings.annotations.SettingsCompatibility import app.revanced.patches.tiktok.misc.settings.fingerprints.* -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction35c -import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.builder.instruction.BuilderInstruction35c +import org.jf.dexlib2.iface.instruction.formats.Instruction35c @Patch @DependsOn([IntegrationsPatch::class]) @@ -31,12 +33,12 @@ class SettingsPatch : BytecodePatch( SettingsEntryInfoFingerprint, ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // Find the class name of classes which construct a settings entry val settingsButtonClass = SettingsEntryFingerprint.result?.classDef?.type?.toClassName() - ?: throw SettingsEntryFingerprint.exception + ?: return SettingsEntryFingerprint.toErrorResult() val settingsButtonInfoClass = SettingsEntryInfoFingerprint.result?.classDef?.type?.toClassName() - ?: throw SettingsEntryInfoFingerprint.exception + ?: return SettingsEntryInfoFingerprint.toErrorResult() // Create a settings entry for 'revanced settings' and add it to settings fragment AddSettingsEntryFingerprint.result?.apply { @@ -64,7 +66,7 @@ class SettingsPatch : BytecodePatch( """ ) } - } ?: throw AddSettingsEntryFingerprint.exception + } ?: return AddSettingsEntryFingerprint.toErrorResult() // Initialize the settings menu once the replaced setting entry is clicked. AdPersonalizationActivityOnCreateFingerprint.result?.mutableMethod?.apply { @@ -85,7 +87,9 @@ class SettingsPatch : BytecodePatch( """, ExternalLabel("notrevanced", getInstruction(initializeSettingsIndex)) ) - } ?: throw AdPersonalizationActivityOnCreateFingerprint.exception + } ?: return AdPersonalizationActivityOnCreateFingerprint.toErrorResult() + + return PatchResultSuccess() } private fun String.toClassName(): String { diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/spoof/sim/patch/SpoofSimPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/spoof/sim/patch/SpoofSimPatch.kt index 3227faf11e..cc9d2987f6 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/spoof/sim/patch/SpoofSimPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/spoof/sim/patch/SpoofSimPatch.kt @@ -8,6 +8,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod @@ -15,10 +17,10 @@ import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint import app.revanced.patches.tiktok.misc.settings.patch.SettingsPatch import app.revanced.patches.tiktok.misc.spoof.sim.annotations.SpoofSimCompatibility -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c -import com.android.tools.smali.dexlib2.iface.reference.MethodReference +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.formats.Instruction35c +import org.jf.dexlib2.iface.reference.MethodReference @Patch(false) @DependsOn([IntegrationsPatch::class, SettingsPatch::class]) @@ -37,7 +39,7 @@ class SpoofSimPatch : BytecodePatch() { ) } - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // Find all api call to check sim information buildMap { context.classes.forEach { classDef -> @@ -87,6 +89,8 @@ class SpoofSimPatch : BytecodePatch() { "invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsStatus;->enableSimSpoof()V" ) } + + return PatchResultSuccess() } // Patch Android API and return fake sim information diff --git a/src/main/kotlin/app/revanced/patches/trakt/patch/UnlockProPatch.kt b/src/main/kotlin/app/revanced/patches/trakt/patch/UnlockProPatch.kt index 0d5254a028..d185635234 100644 --- a/src/main/kotlin/app/revanced/patches/trakt/patch/UnlockProPatch.kt +++ b/src/main/kotlin/app/revanced/patches/trakt/patch/UnlockProPatch.kt @@ -1,12 +1,14 @@ package app.revanced.patches.trakt.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.trakt.annotations.UnlockProCompatibility import app.revanced.patches.trakt.fingerprints.IsVIPEPFingerprint @@ -20,18 +22,20 @@ import app.revanced.patches.trakt.fingerprints.RemoteUserFingerprint class UnlockProPatch : BytecodePatch( listOf(RemoteUserFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { RemoteUserFingerprint.result?.classDef?.let { remoteUserClass -> arrayOf(IsVIPFingerprint, IsVIPEPFingerprint).onEach { fingerprint -> // Resolve both fingerprints on the same class. if (!fingerprint.resolve(context, remoteUserClass)) - throw fingerprint.exception + throw fingerprint.toErrorResult() }.forEach { fingerprint -> // Return true for both VIP check methods. fingerprint.result?.mutableMethod?.addInstructions(0, RETURN_TRUE_INSTRUCTIONS) - ?: throw fingerprint.exception + ?: return fingerprint.toErrorResult() } - } ?: throw RemoteUserFingerprint.exception + } ?: return RemoteUserFingerprint.toErrorResult() + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/twelvewidgets/unlock/patch/UnlockPaidWidgetsPatch.kt b/src/main/kotlin/app/revanced/patches/twelvewidgets/unlock/patch/UnlockPaidWidgetsPatch.kt index 665ba9f6ce..715eba4313 100644 --- a/src/main/kotlin/app/revanced/patches/twelvewidgets/unlock/patch/UnlockPaidWidgetsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/twelvewidgets/unlock/patch/UnlockPaidWidgetsPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.twelvewidgets.unlock.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.* import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.twelvewidgets.unlock.fingerprints.* @@ -23,7 +25,7 @@ class UnlockPaidWidgetsPatch : BytecodePatch( WeatherWidgetUnlockFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { listOf( AgendaDaysWidgetUnlockFingerprint, CalendarBigWidgetUnlockFingerprint, @@ -32,7 +34,7 @@ class UnlockPaidWidgetsPatch : BytecodePatch( ScreentimeSmallWidgetUnlockFingerprint, WeatherWidgetUnlockFingerprint ).map { fingerprint -> - fingerprint.result?.mutableMethod ?: throw fingerprint.exception + fingerprint.result?.mutableMethod ?: return fingerprint.toErrorResult() }.forEach { method -> method.apply { removeInstructions(4, 3) @@ -46,5 +48,7 @@ class UnlockPaidWidgetsPatch : BytecodePatch( ) } } + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/twitch/ad/audio/patch/AudioAdsPatch.kt b/src/main/kotlin/app/revanced/patches/twitch/ad/audio/patch/AudioAdsPatch.kt index 79c8539d17..c9f22061a0 100644 --- a/src/main/kotlin/app/revanced/patches/twitch/ad/audio/patch/AudioAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/twitch/ad/audio/patch/AudioAdsPatch.kt @@ -6,6 +6,8 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.ExternalLabel @@ -24,7 +26,7 @@ import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch class AudioAdsPatch : BytecodePatch( listOf(AudioAdsPresenterPlayFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // Block playAds call with(AudioAdsPresenterPlayFingerprint.result!!) { mutableMethod.addInstructionsWithLabels( @@ -57,5 +59,7 @@ class AudioAdsPatch : BytecodePatch( default = true, ) ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/twitch/ad/embedded/patch/EmbeddedAdsPatch.kt b/src/main/kotlin/app/revanced/patches/twitch/ad/embedded/patch/EmbeddedAdsPatch.kt index bc586883c9..1c61a7adb7 100644 --- a/src/main/kotlin/app/revanced/patches/twitch/ad/embedded/patch/EmbeddedAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/twitch/ad/embedded/patch/EmbeddedAdsPatch.kt @@ -6,7 +6,9 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.MethodFingerprintExtensions.name import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.settings.preference.impl.ArrayResource @@ -26,8 +28,8 @@ import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch class EmbeddedAdsPatch : BytecodePatch( listOf(CreateUsherClientFingerprint) ) { - override fun execute(context: BytecodeContext) { - val result = CreateUsherClientFingerprint.result ?: throw PatchException("${CreateUsherClientFingerprint.name} not found") + override fun execute(context: BytecodeContext): PatchResult { + val result = CreateUsherClientFingerprint.result ?: return PatchResultError("${CreateUsherClientFingerprint.name} not found") // Inject OkHttp3 application interceptor result.mutableMethod.addInstructions( @@ -68,5 +70,7 @@ class EmbeddedAdsPatch : BytecodePatch( SettingsPatch.addString("revanced_embedded_ads_service_unavailable", "%s is unavailable. Ads may show. Try switching to another ad block service in settings.") SettingsPatch.addString("revanced_embedded_ads_service_failed", "%s server returned an error. Ads may show. Try switching to another ad block service in settings.") + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/twitch/ad/video/patch/VideoAdsPatch.kt b/src/main/kotlin/app/revanced/patches/twitch/ad/video/patch/VideoAdsPatch.kt index 12ab6178ea..9f21b2589c 100644 --- a/src/main/kotlin/app/revanced/patches/twitch/ad/video/patch/VideoAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/twitch/ad/video/patch/VideoAdsPatch.kt @@ -1,12 +1,14 @@ package app.revanced.patches.twitch.ad.video.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.InstructionExtensions.getInstruction +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.ExternalLabel @@ -34,7 +36,7 @@ class VideoAdsPatch : AbstractAdPatch( GetReadyToShowAdFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { /* Amazon ads SDK */ context.blockMethods( "Lcom/amazon/ads/video/player/AdsManagerImpl;", @@ -95,7 +97,7 @@ class VideoAdsPatch : AbstractAdPatch( """, ExternalLabel(skipLabelName, mutableMethod.getInstruction(0)) ) - } ?: throw CheckAdEligibilityLambdaFingerprint.exception + } ?: return CheckAdEligibilityLambdaFingerprint.toErrorResult() GetReadyToShowAdFingerprint.result?.apply { val adFormatDeclined = "Ltv/twitch/android/shared/display/ads/theatre/StreamDisplayAdsPresenter\$Action\$AdFormatDeclined;" @@ -110,7 +112,7 @@ class VideoAdsPatch : AbstractAdPatch( """, ExternalLabel(skipLabelName, mutableMethod.getInstruction(0)) ) - } ?: throw GetReadyToShowAdFingerprint.exception + } ?: return GetReadyToShowAdFingerprint.toErrorResult() // Spoof showAds JSON field ContentConfigShowAdsFingerprint.result?.apply { @@ -121,7 +123,7 @@ class VideoAdsPatch : AbstractAdPatch( return v0 """ ) - } ?: throw ContentConfigShowAdsFingerprint.exception + } ?: return ContentConfigShowAdsFingerprint.toErrorResult() SettingsPatch.PreferenceScreen.ADS.CLIENT_SIDE.addPreferences( SwitchPreference( @@ -141,5 +143,7 @@ class VideoAdsPatch : AbstractAdPatch( default = true ) ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/twitch/chat/antidelete/fingerprints/DeletedMessageClickableSpanCtorFingerprint.kt b/src/main/kotlin/app/revanced/patches/twitch/chat/antidelete/fingerprints/DeletedMessageClickableSpanCtorFingerprint.kt index fbbf32d9d9..49e02dd7a1 100644 --- a/src/main/kotlin/app/revanced/patches/twitch/chat/antidelete/fingerprints/DeletedMessageClickableSpanCtorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/twitch/chat/antidelete/fingerprints/DeletedMessageClickableSpanCtorFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.twitch.chat.antidelete.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object DeletedMessageClickableSpanCtorFingerprint : MethodFingerprint( "V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, diff --git a/src/main/kotlin/app/revanced/patches/twitch/chat/antidelete/patch/ShowDeletedMessagesPatch.kt b/src/main/kotlin/app/revanced/patches/twitch/chat/antidelete/patch/ShowDeletedMessagesPatch.kt index caea459254..5ba5bfd87c 100644 --- a/src/main/kotlin/app/revanced/patches/twitch/chat/antidelete/patch/ShowDeletedMessagesPatch.kt +++ b/src/main/kotlin/app/revanced/patches/twitch/chat/antidelete/patch/ShowDeletedMessagesPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.twitch.chat.antidelete.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext @@ -8,6 +8,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.ExternalLabel @@ -39,7 +41,7 @@ class ShowDeletedMessagesPatch : BytecodePatch( if-eqz $register, :no_spoiler """ - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // Spoiler mode: Force set hasModAccess member to true in constructor DeletedMessageClickableSpanCtorFingerprint.result?.mutableMethod?.apply { addInstructionsWithLabels( @@ -51,11 +53,11 @@ class ShowDeletedMessagesPatch : BytecodePatch( """, ExternalLabel("no_spoiler", getInstruction(implementation!!.instructions.lastIndex)) ) - } ?: throw DeletedMessageClickableSpanCtorFingerprint.exception + } ?: return DeletedMessageClickableSpanCtorFingerprint.toErrorResult() // Spoiler mode: Disable setHasModAccess setter SetHasModAccessFingerprint.result?.mutableMethod?.addInstruction(0, "return-void") - ?: throw SetHasModAccessFingerprint.exception + ?: return SetHasModAccessFingerprint.toErrorResult() // Cross-out mode: Reformat span of deleted message ChatUtilCreateDeletedSpanFingerprint.result?.mutableMethod?.apply { @@ -69,7 +71,7 @@ class ShowDeletedMessagesPatch : BytecodePatch( """, ExternalLabel("no_reformat", getInstruction(0)) ) - } ?: throw ChatUtilCreateDeletedSpanFingerprint.exception + } ?: return ChatUtilCreateDeletedSpanFingerprint.toErrorResult() SettingsPatch.PreferenceScreen.CHAT.GENERAL.addPreferences( ListPreference( @@ -99,5 +101,7 @@ class ShowDeletedMessagesPatch : BytecodePatch( ) SettingsPatch.addString("revanced_deleted_msg", "message deleted") + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/twitch/chat/autoclaim/patch/AutoClaimChannelPointsPatch.kt b/src/main/kotlin/app/revanced/patches/twitch/chat/autoclaim/patch/AutoClaimChannelPointsPatch.kt index 3eeea60585..2947918469 100644 --- a/src/main/kotlin/app/revanced/patches/twitch/chat/autoclaim/patch/AutoClaimChannelPointsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/twitch/chat/autoclaim/patch/AutoClaimChannelPointsPatch.kt @@ -1,12 +1,14 @@ package app.revanced.patches.twitch.chat.autoclaim.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.ExternalLabel @@ -24,7 +26,7 @@ import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch class AutoClaimChannelPointPatch : BytecodePatch( listOf(CommunityPointsButtonViewDelegateFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.CHAT.GENERAL.addPreferences( SwitchPreference( "revanced_auto_claim_channel_points", @@ -60,6 +62,8 @@ class AutoClaimChannelPointPatch : BytecodePatch( """, ExternalLabel("auto_claim", getInstruction(lastIndex)) ) - } ?: throw CommunityPointsButtonViewDelegateFingerprint.exception + } ?: return CommunityPointsButtonViewDelegateFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/twitch/debug/patch/DebugModePatch.kt b/src/main/kotlin/app/revanced/patches/twitch/debug/patch/DebugModePatch.kt index a38e80db8e..6453739f6b 100644 --- a/src/main/kotlin/app/revanced/patches/twitch/debug/patch/DebugModePatch.kt +++ b/src/main/kotlin/app/revanced/patches/twitch/debug/patch/DebugModePatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.twitch.debug.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.settings.preference.impl.StringResource @@ -29,7 +31,7 @@ class DebugModePatch : BytecodePatch( ShouldShowDebugOptionsFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { listOf( IsDebugConfigEnabledFingerprint, IsOmVerificationEnabledFingerprint, @@ -44,7 +46,7 @@ class DebugModePatch : BytecodePatch( return v0 """ ) - } ?: throw it.exception + } ?: return it.toErrorResult() } SettingsPatch.PreferenceScreen.MISC.OTHER.addPreferences( @@ -65,5 +67,7 @@ class DebugModePatch : BytecodePatch( default = false, ) ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/twitch/misc/integrations/annotations/IntegrationsCompatibility.kt b/src/main/kotlin/app/revanced/patches/twitch/misc/integrations/annotations/IntegrationsCompatibility.kt new file mode 100644 index 0000000000..40778ece27 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/twitch/misc/integrations/annotations/IntegrationsCompatibility.kt @@ -0,0 +1,8 @@ +package app.revanced.patches.twitch.misc.integrations.annotations + +import app.revanced.patcher.annotation.Compatibility +import app.revanced.patcher.annotation.Package + +@Compatibility([Package("tv.twitch.android.app")]) +@Target(AnnotationTarget.CLASS) +internal annotation class IntegrationsCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/twitch/misc/integrations/fingerprints/InitFingerprint.kt b/src/main/kotlin/app/revanced/patches/twitch/misc/integrations/fingerprints/InitFingerprint.kt index 7eb3dfc2b3..fbb3997b7e 100644 --- a/src/main/kotlin/app/revanced/patches/twitch/misc/integrations/fingerprints/InitFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/twitch/misc/integrations/fingerprints/InitFingerprint.kt @@ -1,9 +1,11 @@ package app.revanced.patches.twitch.misc.integrations.fingerprints import app.revanced.patcher.annotation.Name +import app.revanced.patches.twitch.misc.integrations.annotations.IntegrationsCompatibility import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint @Name("Init fingerprint") +@IntegrationsCompatibility object InitFingerprint : IntegrationsFingerprint( customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("/TwitchApplication;") && diff --git a/src/main/kotlin/app/revanced/patches/twitch/misc/integrations/patch/IntegrationsPatch.kt b/src/main/kotlin/app/revanced/patches/twitch/misc/integrations/patch/IntegrationsPatch.kt index 21f7da9c88..1543c3dde4 100644 --- a/src/main/kotlin/app/revanced/patches/twitch/misc/integrations/patch/IntegrationsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/twitch/misc/integrations/patch/IntegrationsPatch.kt @@ -3,9 +3,11 @@ package app.revanced.patches.twitch.misc.integrations.patch import app.revanced.patcher.annotation.Name import app.revanced.patcher.patch.annotations.RequiresIntegrations import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch +import app.revanced.patches.twitch.misc.integrations.annotations.IntegrationsCompatibility import app.revanced.patches.twitch.misc.integrations.fingerprints.InitFingerprint @Name("Integrations") +@IntegrationsCompatibility @RequiresIntegrations class IntegrationsPatch : AbstractIntegrationsPatch( "Lapp/revanced/twitch/utils/ReVancedUtils;", diff --git a/src/main/kotlin/app/revanced/patches/twitch/misc/settings/bytecode/patch/SettingsPatch.kt b/src/main/kotlin/app/revanced/patches/twitch/misc/settings/bytecode/patch/SettingsPatch.kt index 8aec9bb52d..fdcdcc8a97 100644 --- a/src/main/kotlin/app/revanced/patches/twitch/misc/settings/bytecode/patch/SettingsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/twitch/misc/settings/bytecode/patch/SettingsPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.twitch.misc.settings.bytecode.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext @@ -10,6 +10,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.proxy.mutableTypes.MutableField.Companion.toMutable @@ -24,8 +26,8 @@ import app.revanced.patches.twitch.misc.settings.fingerprints.MenuGroupsUpdatedF import app.revanced.patches.twitch.misc.settings.fingerprints.SettingsActivityOnCreateFingerprint import app.revanced.patches.twitch.misc.settings.fingerprints.SettingsMenuItemEnumFingerprint import app.revanced.patches.twitch.misc.settings.resource.patch.SettingsResourcePatch -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.immutable.ImmutableField +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.immutable.ImmutableField import java.io.Closeable @Patch @@ -41,7 +43,7 @@ class SettingsPatch : BytecodePatch( MenuGroupsOnClickFingerprint ) ), Closeable { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // Hook onCreate to handle fragment creation SettingsActivityOnCreateFingerprint.result?.apply { val insertIndex = mutableMethod.implementation!!.instructions.size - 2 @@ -55,7 +57,7 @@ class SettingsPatch : BytecodePatch( """, ExternalLabel("no_rv_settings_init", mutableMethod.getInstruction(insertIndex)) ) - } ?: throw SettingsActivityOnCreateFingerprint.exception + } ?: return SettingsActivityOnCreateFingerprint.toErrorResult() // Create new menu item for settings menu SettingsMenuItemEnumFingerprint.result?.apply { @@ -65,7 +67,7 @@ class SettingsPatch : BytecodePatch( REVANCED_SETTINGS_MENU_ITEM_TITLE_RES, REVANCED_SETTINGS_MENU_ITEM_ICON_RES ) - } ?: throw SettingsMenuItemEnumFingerprint.exception + } ?: return SettingsMenuItemEnumFingerprint.toErrorResult() // Intercept settings menu creation and add new menu item MenuGroupsUpdatedFingerprint.result?.apply { @@ -77,7 +79,7 @@ class SettingsPatch : BytecodePatch( move-result-object p1 """ ) - } ?: throw MenuGroupsUpdatedFingerprint.exception + } ?: return MenuGroupsUpdatedFingerprint.toErrorResult() // Intercept onclick events for the settings menu MenuGroupsOnClickFingerprint.result?.apply { @@ -94,12 +96,14 @@ class SettingsPatch : BytecodePatch( """, ExternalLabel("no_rv_settings_onclick", mutableMethod.getInstruction(insertIndex)) ) - } ?: throw MenuGroupsOnClickFingerprint.exception + } ?: return MenuGroupsOnClickFingerprint.toErrorResult() addString("revanced_settings", "ReVanced Settings", false) addString("revanced_reboot_message", "Twitch needs to restart to apply your changes. Restart now?", false) addString("revanced_reboot", "Restart", false) addString("revanced_cancel", "Cancel", false) + + return PatchResultSuccess() } internal companion object { diff --git a/src/main/kotlin/app/revanced/patches/twitch/misc/settings/fingerprints/MenuGroupsOnClickFingerprint.kt b/src/main/kotlin/app/revanced/patches/twitch/misc/settings/fingerprints/MenuGroupsOnClickFingerprint.kt index 6868ec26e8..6bf971dd60 100644 --- a/src/main/kotlin/app/revanced/patches/twitch/misc/settings/fingerprints/MenuGroupsOnClickFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/twitch/misc/settings/fingerprints/MenuGroupsOnClickFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.twitch.misc.settings.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object MenuGroupsOnClickFingerprint : MethodFingerprint( "V", diff --git a/src/main/kotlin/app/revanced/patches/twitter/misc/dynamiccolor/patch/DynamicColorPatch.kt b/src/main/kotlin/app/revanced/patches/twitter/misc/dynamiccolor/patch/DynamicColorPatch.kt index 2ba9d29c92..190bd09409 100644 --- a/src/main/kotlin/app/revanced/patches/twitter/misc/dynamiccolor/patch/DynamicColorPatch.kt +++ b/src/main/kotlin/app/revanced/patches/twitter/misc/dynamiccolor/patch/DynamicColorPatch.kt @@ -3,7 +3,9 @@ package app.revanced.patches.twitter.misc.dynamiccolor.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.twitter.misc.dynamiccolor.annotations.DynamicColorCompatibility @@ -15,9 +17,9 @@ import java.nio.file.Files @Description("Replaces the default Twitter Blue with the users Material You palette.") @DynamicColorCompatibility class DynamicColorPatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { val resDirectory = context["res"] - if (!resDirectory.isDirectory) throw PatchException("The res folder can not be found.") + if (!resDirectory.isDirectory) return PatchResultError("The res folder can not be found.") val valuesV31Directory = resDirectory.resolve("values-v31") if (!valuesV31Directory.isDirectory) Files.createDirectories(valuesV31Directory.toPath()) @@ -77,5 +79,7 @@ class DynamicColorPatch : ResourcePatch { document.getElementsByTagName("resources").item(0).appendChild(colorElement) } } + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/twitter/misc/hook/json/fingerprints/JsonHookPatchFingerprint.kt b/src/main/kotlin/app/revanced/patches/twitter/misc/hook/json/fingerprints/JsonHookPatchFingerprint.kt index b128967b3b..732e7fb6fc 100644 --- a/src/main/kotlin/app/revanced/patches/twitter/misc/hook/json/fingerprints/JsonHookPatchFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/twitter/misc/hook/json/fingerprints/JsonHookPatchFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.twitter.misc.hook.json.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object JsonHookPatchFingerprint : MethodFingerprint( customFingerprint = { methodDef, _ -> methodDef.name == "<clinit>" }, diff --git a/src/main/kotlin/app/revanced/patches/twitter/misc/hook/json/patch/JsonHookPatch.kt b/src/main/kotlin/app/revanced/patches/twitter/misc/hook/json/patch/JsonHookPatch.kt index f5da4ddae2..18cad27977 100644 --- a/src/main/kotlin/app/revanced/patches/twitter/misc/hook/json/patch/JsonHookPatch.kt +++ b/src/main/kotlin/app/revanced/patches/twitter/misc/hook/json/patch/JsonHookPatch.kt @@ -8,7 +8,9 @@ import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.RequiresIntegrations import app.revanced.patches.twitter.misc.hook.json.fingerprints.JsonHookPatchFingerprint import app.revanced.patches.twitter.misc.hook.json.fingerprints.JsonInputStreamFingerprint @@ -22,14 +24,14 @@ import java.io.InvalidClassException class JsonHookPatch : BytecodePatch( listOf(LoganSquareFingerprint) ), Closeable { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { JsonHookPatchFingerprint.also { // Make sure the integrations are present. val jsonHookPatch = context.findClass { classDef -> classDef.type == JSON_HOOK_PATCH_CLASS_DESCRIPTOR } - ?: throw PatchException("Could not find integrations.") + ?: throw PatchResultError("Could not find integrations.") if (!it.resolve(context, jsonHookPatch.immutableClass)) - throw PatchException("Unexpected integrations.") + throw PatchResultError("Unexpected integrations.") }.let { hooks = JsonHookPatchHook(it) } // Conveniently find the type to hook a method in, via a named field. @@ -40,7 +42,7 @@ class JsonHookPatch : BytecodePatch( ?.type .let { type -> context.findClass { it.type == type }?.mutableClass - } ?: throw PatchException("Could not find required class.") + } ?: return PatchResultError("Could not find required class.") // Hook the methods first parameter. JsonInputStreamFingerprint @@ -53,7 +55,9 @@ class JsonHookPatch : BytecodePatch( invoke-static { p1 }, $JSON_HOOK_PATCH_CLASS_DESCRIPTOR->parseJsonHook(Ljava/io/InputStream;)Ljava/io/InputStream; move-result-object p1 """ - ) ?: throw PatchException("Could not find method to hook.") + ) ?: return PatchResultError("Could not find method to hook.") + + return PatchResultSuccess() } /** diff --git a/src/main/kotlin/app/revanced/patches/twitter/misc/hook/patch/BaseHookPatchPatch.kt b/src/main/kotlin/app/revanced/patches/twitter/misc/hook/patch/BaseHookPatchPatch.kt index e115d2c1c0..4b71bc2abb 100644 --- a/src/main/kotlin/app/revanced/patches/twitter/misc/hook/patch/BaseHookPatchPatch.kt +++ b/src/main/kotlin/app/revanced/patches/twitter/misc/hook/patch/BaseHookPatchPatch.kt @@ -2,9 +2,16 @@ package app.revanced.patches.twitter.misc.hook.patch import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.twitter.misc.hook.json.patch.JsonHookPatch abstract class BaseHookPatchPatch(private val hookClassDescriptor: String) : BytecodePatch() { - override fun execute(context: BytecodeContext) = + override fun execute(context: BytecodeContext) = try { JsonHookPatch.hooks.addHook(JsonHookPatch.Hook(context, hookClassDescriptor)) + + PatchResultSuccess() + } catch (ex: Exception) { + PatchResultError(ex) + } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/vsco/misc/pro/patch/UnlockProPatch.kt b/src/main/kotlin/app/revanced/patches/vsco/misc/pro/patch/UnlockProPatch.kt index 5df0ec811b..a96f53dc4e 100644 --- a/src/main/kotlin/app/revanced/patches/vsco/misc/pro/patch/UnlockProPatch.kt +++ b/src/main/kotlin/app/revanced/patches/vsco/misc/pro/patch/UnlockProPatch.kt @@ -1,10 +1,12 @@ package app.revanced.patches.vsco.misc.pro.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.* import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.vsco.misc.pro.fingerprints.RevCatSubscriptionFingerprint @@ -16,7 +18,7 @@ import app.revanced.patches.vsco.misc.pro.fingerprints.RevCatSubscriptionFingerp class UnlockProPatch : BytecodePatch( listOf(RevCatSubscriptionFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { RevCatSubscriptionFingerprint.result?.mutableMethod?.apply { // Set isSubscribed to true. addInstruction( @@ -25,6 +27,8 @@ class UnlockProPatch : BytecodePatch( const p1, 0x1 """ ) - } ?: throw RevCatSubscriptionFingerprint.exception + } ?: return RevCatSubscriptionFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/warnwetter/misc/firebasegetcert/patch/FirebaseGetCertPatch.kt b/src/main/kotlin/app/revanced/patches/warnwetter/misc/firebasegetcert/patch/FirebaseGetCertPatch.kt index e0dab0cbc4..c481655ceb 100644 --- a/src/main/kotlin/app/revanced/patches/warnwetter/misc/firebasegetcert/patch/FirebaseGetCertPatch.kt +++ b/src/main/kotlin/app/revanced/patches/warnwetter/misc/firebasegetcert/patch/FirebaseGetCertPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.warnwetter.misc.firebasegetcert.annotations.FirebaseGetCertPatchCompatibility import app.revanced.patches.warnwetter.misc.firebasegetcert.fingerprints.GetMessagingCertFingerprint import app.revanced.patches.warnwetter.misc.firebasegetcert.fingerprints.GetReqistrationCertFingerprint @@ -18,7 +20,7 @@ class FirebaseGetCertPatch : BytecodePatch( GetMessagingCertFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val spoofedInstruction = """ const-string v0, "0799DDF0414D3B3475E88743C91C0676793ED450" @@ -36,5 +38,7 @@ class FirebaseGetCertPatch : BytecodePatch( 0, spoofedInstruction ) + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/warnwetter/misc/promocode/patch/PromoCodeUnlockPatch.kt b/src/main/kotlin/app/revanced/patches/warnwetter/misc/promocode/patch/PromoCodeUnlockPatch.kt index 8fda000b75..4d8b84a405 100644 --- a/src/main/kotlin/app/revanced/patches/warnwetter/misc/promocode/patch/PromoCodeUnlockPatch.kt +++ b/src/main/kotlin/app/revanced/patches/warnwetter/misc/promocode/patch/PromoCodeUnlockPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.warnwetter.misc.firebasegetcert.patch.FirebaseGetCertPatch @@ -26,7 +28,7 @@ class PromoCodeUnlockPatch : BytecodePatch( ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val method = PromoCodeUnlockFingerprint.result!!.mutableMethod method.addInstructions( 0, @@ -35,6 +37,8 @@ class PromoCodeUnlockPatch : BytecodePatch( return v0 """ ) + + return PatchResultSuccess() } diff --git a/src/main/kotlin/app/revanced/patches/windyapp/misc/unlockpro/patch/UnlockProPatch.kt b/src/main/kotlin/app/revanced/patches/windyapp/misc/unlockpro/patch/UnlockProPatch.kt index bf1b720893..5827a324b4 100644 --- a/src/main/kotlin/app/revanced/patches/windyapp/misc/unlockpro/patch/UnlockProPatch.kt +++ b/src/main/kotlin/app/revanced/patches/windyapp/misc/unlockpro/patch/UnlockProPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.windyapp.misc.unlockpro.annotations.UnlockProCompatibility import app.revanced.patches.windyapp.misc.unlockpro.fingerprints.CheckProFingerprint @@ -18,7 +20,7 @@ class UnlockProPatch : BytecodePatch( CheckProFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val method = CheckProFingerprint.result!!.mutableMethod method.addInstructions( 0, @@ -27,5 +29,7 @@ class UnlockProPatch : BytecodePatch( return v0 """ ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/general/annotation/HideAdsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/general/annotation/HideAdsCompatibility.kt index ee7b198313..5f90c5019e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/general/annotation/HideAdsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/general/annotation/HideAdsCompatibility.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.ad.general.annotation import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideAdsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/general/bytecode/patch/HideAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/general/bytecode/patch/HideAdsPatch.kt index ea2eb2d072..db9b4045bb 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/general/bytecode/patch/HideAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/general/bytecode/patch/HideAdsPatch.kt @@ -6,6 +6,8 @@ import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.misc.fix.verticalscroll.patch.VerticalScrollPatch @@ -13,9 +15,8 @@ import app.revanced.patches.youtube.ad.general.annotation.HideAdsCompatibility import app.revanced.patches.youtube.ad.general.resource.patch.HideAdsResourcePatch import app.revanced.patches.youtube.ad.getpremium.bytecode.patch.HideGetPremiumPatch import app.revanced.patches.youtube.misc.fix.backtoexitgesture.patch.FixBackToExitGesturePatch -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction31i -import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c +import org.jf.dexlib2.iface.instruction.formats.Instruction31i +import org.jf.dexlib2.iface.instruction.formats.Instruction35c @Patch @@ -31,12 +32,12 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c @Description("Removes general ads.") @HideAdsCompatibility class HideAdsPatch : BytecodePatch() { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { context.classes.forEach { classDef -> classDef.methods.forEach { method -> with(method.implementation) { this?.instructions?.forEachIndexed { index, instruction -> - if (instruction.opcode != Opcode.CONST) + if (instruction.opcode != org.jf.dexlib2.Opcode.CONST) return@forEachIndexed // Instruction to store the id adAttribution into a register if ((instruction as Instruction31i).wideLiteral != HideAdsResourcePatch.adAttributionId) @@ -46,7 +47,7 @@ class HideAdsPatch : BytecodePatch() { // Call to get the view with the id adAttribution with(instructions.elementAt(insertIndex)) { - if (opcode != Opcode.INVOKE_VIRTUAL) + if (opcode != org.jf.dexlib2.Opcode.INVOKE_VIRTUAL) return@forEachIndexed // Hide the view @@ -65,5 +66,7 @@ class HideAdsPatch : BytecodePatch() { } } } + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/general/resource/patch/HideAdsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/general/resource/patch/HideAdsResourcePatch.kt index 7967f66d8f..b021d523ef 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/general/resource/patch/HideAdsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/general/resource/patch/HideAdsResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.ad.general.resource.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -20,7 +22,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch.P ) @HideAdsCompatibility class HideAdsResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { PreferenceScreen.ADS.addPreferences( SwitchPreference( "revanced_hide_general_ads", @@ -69,6 +71,8 @@ class HideAdsResourcePatch : ResourcePatch { LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR) adAttributionId = ResourceMappingPatch.resourceMappings.single { it.name == "ad_attribution" }.id + + return PatchResultSuccess() } internal companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/annotations/HideGetPremiumCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/annotations/HideGetPremiumCompatibility.kt index 7bbef97659..f17ebada9e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/annotations/HideGetPremiumCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/annotations/HideGetPremiumCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.ad.getpremium.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideGetPremiumCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/bytecode/fingerprints/GetPremiumViewFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/bytecode/fingerprints/GetPremiumViewFingerprint.kt index 9f578996f0..0f32e3e6a4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/bytecode/fingerprints/GetPremiumViewFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/bytecode/fingerprints/GetPremiumViewFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.ad.getpremium.bytecode.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object GetPremiumViewFingerprint : MethodFingerprint( accessFlags = AccessFlags.PROTECTED or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/bytecode/patch/HideGetPremiumVideoAdvertisementPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/bytecode/patch/HideGetPremiumVideoAdvertisementPatch.kt index 1748b6008a..1aed888953 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/bytecode/patch/HideGetPremiumVideoAdvertisementPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/bytecode/patch/HideGetPremiumVideoAdvertisementPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.youtube.ad.getpremium.bytecode.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.settings.preference.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.SwitchPreference @@ -13,13 +15,13 @@ import app.revanced.patches.youtube.ad.getpremium.annotations.HideGetPremiumComp import app.revanced.patches.youtube.ad.getpremium.bytecode.fingerprints.GetPremiumViewFingerprint import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction +import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @DependsOn([IntegrationsPatch::class, SettingsPatch::class]) @Name("Hide get premium") @HideGetPremiumCompatibility class HideGetPremiumPatch : BytecodePatch(listOf(GetPremiumViewFingerprint)) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.ADS.addPreferences( SwitchPreference( "revanced_hide_get_premium", @@ -62,7 +64,9 @@ class HideGetPremiumPatch : BytecodePatch(listOf(GetPremiumViewFingerprint)) { """ ) } - } ?: throw GetPremiumViewFingerprint.exception + } ?: return GetPremiumViewFingerprint.toErrorResult() + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/video/annotations/VideoAdsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/video/annotations/VideoAdsCompatibility.kt index 0ed6826e4a..9226b6f44e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/video/annotations/VideoAdsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/video/annotations/VideoAdsCompatibility.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.ad.video.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class VideoAdsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/video/patch/VideoAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/video/patch/VideoAdsPatch.kt index 1df08ae80e..b26d8b3ba6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/video/patch/VideoAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/video/patch/VideoAdsPatch.kt @@ -6,6 +6,8 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.ExternalLabel @@ -26,7 +28,7 @@ class VideoAdsPatch : BytecodePatch( LoadVideoAdsFingerprint, ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.ADS.addPreferences( SwitchPreference( "revanced_hide_video_ads", @@ -47,5 +49,7 @@ class VideoAdsPatch : BytecodePatch( """, ExternalLabel("show_video_ads", loadVideoAdsFingerprintMethod.getInstruction(0)) ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/annotation/CopyVideoUrlCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/annotation/CopyVideoUrlCompatibility.kt index de373a122e..93058c8969 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/annotation/CopyVideoUrlCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/annotation/CopyVideoUrlCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.interaction.copyvideourl.annotation import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class CopyVideoUrlCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/bytecode/patch/CopyVideoUrlBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/bytecode/patch/CopyVideoUrlBytecodePatch.kt index ba80eb1adc..a6db2560ce 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/bytecode/patch/CopyVideoUrlBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/bytecode/patch/CopyVideoUrlBytecodePatch.kt @@ -4,6 +4,8 @@ import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.interaction.copyvideourl.annotation.CopyVideoUrlCompatibility @@ -29,12 +31,14 @@ class CopyVideoUrlBytecodePatch : BytecodePatch() { ) } - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // Initialize buttons and inject visibility control BUTTONS_DESCRIPTORS.forEach { descriptor -> PlayerControlsBytecodePatch.initializeControl("$descriptor->initializeButton(Landroid/view/View;)V") PlayerControlsBytecodePatch.injectVisibilityCheckCall("$descriptor->changeVisibility(Z)V") } + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/resource/patch/CopyVideoUrlResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/resource/patch/CopyVideoUrlResourcePatch.kt index 48a265e8a4..74565636b0 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/resource/patch/CopyVideoUrlResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/resource/patch/CopyVideoUrlResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.interaction.copyvideourl.resource.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen @@ -14,7 +16,7 @@ import app.revanced.util.resources.ResourceUtils.mergeStrings @DependsOn([BottomControlsResourcePatch::class, SettingsPatch::class]) class CopyVideoUrlResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences( PreferenceScreen( "revanced_copy_video_url_preference_screen", @@ -47,5 +49,7 @@ class CopyVideoUrlResourcePatch : ResourcePatch { context.mergeStrings("copyvideourl/host/values/strings.xml") BottomControlsResourcePatch.addControls("copyvideourl/host/layout/${BottomControlsResourcePatch.TARGET_RESOURCE_NAME}") + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/annotation/ExternalDownloadsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/annotation/ExternalDownloadsCompatibility.kt index 4259448ade..be32f73c86 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/annotation/ExternalDownloadsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/annotation/ExternalDownloadsCompatibility.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.interaction.downloads.annotation import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class ExternalDownloadsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/bytecode/patch/ExternalDownloadsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/bytecode/patch/ExternalDownloadsBytecodePatch.kt index ccc9528118..1b7a82ac4a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/bytecode/patch/ExternalDownloadsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/bytecode/patch/ExternalDownloadsBytecodePatch.kt @@ -4,6 +4,8 @@ import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.interaction.downloads.annotation.ExternalDownloadsCompatibility @@ -21,7 +23,7 @@ class ExternalDownloadsBytecodePatch : BytecodePatch() { const val BUTTON_DESCRIPTOR = "Lapp/revanced/integrations/videoplayer/ExternalDownloadButton;" } - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { /* initialize the control */ @@ -35,5 +37,7 @@ class ExternalDownloadsBytecodePatch : BytecodePatch() { PlayerControlsBytecodePatch.injectVisibilityCheckCall( "$BUTTON_DESCRIPTOR->changeVisibility(Z)V") + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/resource/patch/ExternalDownloadsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/resource/patch/ExternalDownloadsResourcePatch.kt index d9040f05c1..e50b8cc9fb 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/resource/patch/ExternalDownloadsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/resource/patch/ExternalDownloadsResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.interaction.downloads.resource.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.settings.preference.impl.* @@ -13,7 +15,7 @@ import app.revanced.util.resources.ResourceUtils.mergeStrings @DependsOn([BottomControlsResourcePatch::class, SettingsPatch::class]) class ExternalDownloadsResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences( PreferenceScreen( "revanced_external_downloader_preference_screen", @@ -28,7 +30,7 @@ class ExternalDownloadsResourcePatch : ResourcePatch { TextPreference( "revanced_external_downloader_name", StringResource("revanced_external_downloader_name_title", "Downloader package name"), - StringResource("revanced_external_downloader_name_summary", "Package name of your installed external downloader app, such as NewPipe or Seal"), + StringResource("revanced_external_downloader_name_summary", "Package name of your installed external downloader app, such as NewPipe or PowerTube"), InputType.TEXT ) ), @@ -45,5 +47,7 @@ class ExternalDownloadsResourcePatch : ResourcePatch { // Add download button node BottomControlsResourcePatch.addControls("downloads/host/layout/${BottomControlsResourcePatch.TARGET_RESOURCE_NAME}") + + return PatchResultSuccess() } -} +} \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/annotation/SeekbarTappingCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/annotation/SeekbarTappingCompatibility.kt index ba941a7b36..cd1b8ca071 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/annotation/SeekbarTappingCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/annotation/SeekbarTappingCompatibility.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.interaction.seekbar.annotation import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class SeekbarTappingCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/fingerprints/AccessibilityPlayerProgressTimeFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/fingerprints/AccessibilityPlayerProgressTimeFingerprint.kt new file mode 100644 index 0000000000..8b2f5243f9 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/fingerprints/AccessibilityPlayerProgressTimeFingerprint.kt @@ -0,0 +1,12 @@ +package app.revanced.patches.youtube.interaction.seekbar.fingerprints + +import app.revanced.patcher.extensions.or +import app.revanced.patches.youtube.interaction.seekbar.patch.EnableSeekbarTappingResourcePatch +import app.revanced.util.patch.LiteralValueFingerprint +import org.jf.dexlib2.AccessFlags + +object AccessibilityPlayerProgressTimeFingerprint : LiteralValueFingerprint( + returnType = "L", + accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, + literal = EnableSeekbarTappingResourcePatch.accessibilityPlayerProgressTime +) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/fingerprints/OnTouchEventHandlerFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/fingerprints/OnTouchEventHandlerFingerprint.kt deleted file mode 100644 index 98a0d21472..0000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/fingerprints/OnTouchEventHandlerFingerprint.kt +++ /dev/null @@ -1,32 +0,0 @@ -package app.revanced.patches.youtube.interaction.seekbar.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode - -@FuzzyPatternScanMethod(3) -object OnTouchEventHandlerFingerprint : MethodFingerprint( - returnType = "Z", - accessFlags = AccessFlags.PUBLIC or AccessFlags.PUBLIC, - parameters = listOf("L"), - opcodes = listOf( - Opcode.INVOKE_VIRTUAL, // oMethodReference - Opcode.RETURN, - Opcode.IGET_OBJECT, - Opcode.IGET_BOOLEAN, - Opcode.IF_EQZ, - Opcode.INVOKE_VIRTUAL, - Opcode.RETURN, - Opcode.INT_TO_FLOAT, - Opcode.INT_TO_FLOAT, - Opcode.INVOKE_VIRTUAL, - Opcode.MOVE_RESULT, - Opcode.IF_NEZ, - Opcode.RETURN, - Opcode.INVOKE_VIRTUAL, - Opcode.INVOKE_VIRTUAL, // pMethodReference - ), - customFingerprint = { methodDef, _ -> methodDef.name == "onTouchEvent" } -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/fingerprints/SeekbarTappingFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/fingerprints/SeekbarTappingFingerprint.kt index 912514741d..3c8f3ed0b4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/fingerprints/SeekbarTappingFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/fingerprints/SeekbarTappingFingerprint.kt @@ -2,9 +2,9 @@ package app.revanced.patches.youtube.interaction.seekbar.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.NarrowLiteralInstruction +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction object SeekbarTappingFingerprint : MethodFingerprint( diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt index 78e27e802c..51a6b89ff7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt @@ -1,25 +1,25 @@ package app.revanced.patches.youtube.interaction.seekbar.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.ExternalLabel import app.revanced.patches.youtube.interaction.seekbar.annotation.SeekbarTappingCompatibility -import app.revanced.patches.youtube.interaction.seekbar.fingerprints.OnTouchEventHandlerFingerprint +import app.revanced.patches.youtube.interaction.seekbar.fingerprints.AccessibilityPlayerProgressTimeFingerprint import app.revanced.patches.youtube.interaction.seekbar.fingerprints.SeekbarTappingFingerprint import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.Method -import com.android.tools.smali.dexlib2.iface.instruction.NarrowLiteralInstruction -import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.reference.MethodReference +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.Method +import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction +import org.jf.dexlib2.iface.instruction.formats.Instruction35c @Patch @DependsOn([IntegrationsPatch::class, EnableSeekbarTappingResourcePatch::class]) @@ -27,23 +27,37 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference @Description("Enables tap-to-seek on the seekbar of the video player.") @SeekbarTappingCompatibility class EnableSeekbarTappingPatch : BytecodePatch( - listOf(OnTouchEventHandlerFingerprint, SeekbarTappingFingerprint) + listOf(AccessibilityPlayerProgressTimeFingerprint, SeekbarTappingFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // Find the required methods to tap the seekbar. - val seekbarTappingMethods = OnTouchEventHandlerFingerprint.result?.let { - val patternScanResult = it.scanResult.patternScanResult!! + val seekbarTappingMethods = + AccessibilityPlayerProgressTimeFingerprint.result?.classDef?.methods?.let { methods -> + buildMap { + // find the methods which tap the seekbar + methods.forEach { method -> + if (method.implementation == null) return@forEach - fun getReference(index: Int) = it.mutableMethod.getInstruction<ReferenceInstruction>(index) - .reference as MethodReference + val instructions = method.implementation!!.instructions - buildMap { - put("O", getReference(patternScanResult.endIndex)) - put("N", getReference(patternScanResult.startIndex)) + // The method has more than 7 instructions. + if (instructions.count() < 7) return@forEach + + // The 7th instruction has the opcode CONST_4. + val instruction = instructions.elementAt(6) + if (instruction.opcode != Opcode.CONST_4) return@forEach + + // the literal for this instruction has to be either 1 or 2. + val literal = (instruction as NarrowLiteralInstruction).narrowLiteral + + // Based on the literal, determine which method is which. + if (literal == 1) this["P"] = method + if (literal == 2) this["O"] = method + } + } } - } - seekbarTappingMethods ?: throw OnTouchEventHandlerFingerprint.exception + seekbarTappingMethods ?: return AccessibilityPlayerProgressTimeFingerprint.toErrorResult() SeekbarTappingFingerprint.result?.let { val insertIndex = it.scanResult.patternScanResult!!.endIndex - 1 @@ -54,11 +68,11 @@ class EnableSeekbarTappingPatch : BytecodePatch( val freeRegister = 0 val xAxisRegister = 2 + val pMethod = seekbarTappingMethods["P"]!! val oMethod = seekbarTappingMethods["O"]!! - val nMethod = seekbarTappingMethods["N"]!! - fun MethodReference.toInvokeInstructionString() = - "invoke-virtual { v$thisInstanceRegister, v$xAxisRegister }, $this" + fun Method.toInvokeInstructionString() = + "invoke-virtual { v$thisInstanceRegister, v$xAxisRegister }, $definingClass->$name(I)V" addInstructionsWithLabels( insertIndex, @@ -67,11 +81,13 @@ class EnableSeekbarTappingPatch : BytecodePatch( move-result v$freeRegister if-eqz v$freeRegister, :disabled ${oMethod.toInvokeInstructionString()} - ${nMethod.toInvokeInstructionString()} + ${pMethod.toInvokeInstructionString()} """, ExternalLabel("disabled", getInstruction(insertIndex)) ) } - } ?: throw SeekbarTappingFingerprint.exception + } ?: return SeekbarTappingFingerprint.toErrorResult() + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingResourcePatch.kt index 31e72ca220..29c62c377d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingResourcePatch.kt @@ -1,15 +1,19 @@ package app.revanced.patches.youtube.interaction.seekbar.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn +import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch import app.revanced.patches.shared.settings.preference.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.SwitchPreference import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -@DependsOn([SettingsPatch::class]) +@DependsOn([SettingsPatch::class, ResourceMappingPatch::class]) class EnableSeekbarTappingResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences( SwitchPreference( "revanced_seekbar_tapping", @@ -18,5 +22,15 @@ class EnableSeekbarTappingResourcePatch : ResourcePatch { StringResource("revanced_seekbar_tapping_summary_off", "Seekbar tapping is disabled") ) ) + + accessibilityPlayerProgressTime = ResourceMappingPatch.resourceMappings.find { + it.name == "accessibility_player_progress_time" + }?.id ?: return PatchResultError("Failed to find required resource") + + return PatchResultSuccess() + } + + internal companion object { + var accessibilityPlayerProgressTime = -1L } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/annotation/SwipeControlsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/annotation/SwipeControlsCompatibility.kt index 4ca221ebdb..ad2ec1770d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/annotation/SwipeControlsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/annotation/SwipeControlsCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.interaction.swipecontrols.annotation import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class SwipeControlsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/fingerprints/SwipeControlsHostActivityFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/fingerprints/SwipeControlsHostActivityFingerprint.kt index c2943eb527..ad6de5cc3b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/fingerprints/SwipeControlsHostActivityFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/fingerprints/SwipeControlsHostActivityFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.interaction.swipecontrols.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object SwipeControlsHostActivityFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/bytecode/SwipeControlsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/bytecode/SwipeControlsBytecodePatch.kt index 16a27bdf78..198fe8c479 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/bytecode/SwipeControlsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/bytecode/SwipeControlsBytecodePatch.kt @@ -1,13 +1,15 @@ package app.revanced.patches.youtube.interaction.swipecontrols.patch.bytecode import app.revanced.extensions.transformMethods -import app.revanced.extensions.traverseClassHierarchy import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patcher.util.TypeUtil.traverseClassHierarchy import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable import app.revanced.patches.shared.fingerprints.WatchWhileActivityFingerprint import app.revanced.patches.youtube.interaction.swipecontrols.annotation.SwipeControlsCompatibility @@ -15,8 +17,8 @@ import app.revanced.patches.youtube.interaction.swipecontrols.fingerprints.Swipe import app.revanced.patches.youtube.interaction.swipecontrols.patch.resource.SwipeControlsResourcePatch import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.immutable.ImmutableMethod +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.immutable.ImmutableMethod @Patch @Name("Swipe controls") @@ -35,7 +37,7 @@ class SwipeControlsBytecodePatch : BytecodePatch( SwipeControlsHostActivityFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { val wrapperClass = SwipeControlsHostActivityFingerprint.result!!.mutableClass val targetClass = WatchWhileActivityFingerprint.result!!.mutableClass @@ -59,5 +61,6 @@ class SwipeControlsBytecodePatch : BytecodePatch( ).toMutable() } } + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/resource/SwipeControlsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/resource/SwipeControlsResourcePatch.kt index 014397898f..5d67f72152 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/resource/SwipeControlsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/resource/SwipeControlsResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.interaction.swipecontrols.patch.resource import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.settings.preference.impl.* @@ -10,7 +12,7 @@ import app.revanced.util.resources.ResourceUtils.copyResources @DependsOn([SettingsPatch::class]) class SwipeControlsResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences( PreferenceScreen( "revanced_swipe_controls_preference_screen", @@ -100,5 +102,6 @@ class SwipeControlsResourcePatch : ResourcePatch { "ic_sc_volume_normal.xml" ) ) + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/annotations/AutoCaptionsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/annotations/AutoCaptionsCompatibility.kt index a0f3939825..81fb60d327 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/annotations/AutoCaptionsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/annotations/AutoCaptionsCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.autocaptions.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class AutoCaptionsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/StartVideoInformerFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/StartVideoInformerFingerprint.kt index 31fab1f21a..1b1cd10883 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/StartVideoInformerFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/StartVideoInformerFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.autocaptions.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object StartVideoInformerFingerprint : MethodFingerprint( "V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L", "L", "L", "L"), listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/SubtitleButtonControllerFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/SubtitleButtonControllerFingerprint.kt index b3b0462b2d..48d98f4f39 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/SubtitleButtonControllerFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/SubtitleButtonControllerFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.autocaptions.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object SubtitleButtonControllerFingerprint : MethodFingerprint( returnType = "V", @@ -19,5 +19,8 @@ object SubtitleButtonControllerFingerprint : MethodFingerprint( Opcode.CONST, Opcode.INVOKE_VIRTUAL, Opcode.IGET_OBJECT, - ) + ), + customFingerprint = { methodDef, _ -> + methodDef.definingClass.endsWith("SubtitleButtonController;") + } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/SubtitleTrackFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/SubtitleTrackFingerprint.kt index 4eae5dbca2..66ac4f6172 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/SubtitleTrackFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/SubtitleTrackFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.autocaptions.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object SubtitleTrackFingerprint : MethodFingerprint( "Z", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/patch/AutoCaptionsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/patch/AutoCaptionsPatch.kt index d7c40a8097..ae4048adae 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/patch/AutoCaptionsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/patch/AutoCaptionsPatch.kt @@ -6,6 +6,8 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.settings.preference.impl.StringResource @@ -27,7 +29,7 @@ class AutoCaptionsPatch : BytecodePatch( StartVideoInformerFingerprint, SubtitleButtonControllerFingerprint, SubtitleTrackFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_auto_captions", @@ -70,5 +72,7 @@ class AutoCaptionsPatch : BytecodePatch( nop """ ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/branding/header/patch/PremiumHeadingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/branding/header/patch/PremiumHeadingPatch.kt index c5f408d2ac..74c52a4bc8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/branding/header/patch/PremiumHeadingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/branding/header/patch/PremiumHeadingPatch.kt @@ -3,7 +3,9 @@ package app.revanced.patches.youtube.layout.branding.header.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.layout.branding.header.annotations.PremiumHeadingCompatibility @@ -16,9 +18,9 @@ import kotlin.io.path.exists @Description("Shows premium branding on the home screen.") @PremiumHeadingCompatibility class PremiumHeadingPatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { val resDirectory = context["res"] - if (!resDirectory.isDirectory) throw PatchException("The res folder can not be found.") + if (!resDirectory.isDirectory) return PatchResultError("The res folder can not be found.") val (original, replacement) = "yt_premium_wordmark_header" to "yt_wordmark_header" val modes = arrayOf("light", "dark") @@ -30,7 +32,7 @@ class PremiumHeadingPatch : ResourcePatch { val toPath = headingDirectory.resolve("${replacement}_$mode.png").toPath() if (!fromPath.exists()) - throw PatchException("The file $fromPath does not exist in the resources. Therefore, this patch can not succeed.") + return PatchResultError("The file $fromPath does not exist in the resources. Therefore, this patch can not succeed.") Files.copy( fromPath, toPath, @@ -38,5 +40,7 @@ class PremiumHeadingPatch : ResourcePatch { ) } } + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/patch/CustomBrandingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/patch/CustomBrandingPatch.kt index b4a69d2a4f..cc01995ae5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/patch/CustomBrandingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/patch/CustomBrandingPatch.kt @@ -3,9 +3,7 @@ package app.revanced.patches.youtube.layout.branding.icon.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.patch.OptionsContainer -import app.revanced.patcher.patch.PatchOption -import app.revanced.patcher.patch.ResourcePatch +import app.revanced.patcher.patch.* import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.layout.branding.icon.annotations.CustomBrandingCompatibility import app.revanced.util.resources.ResourceUtils @@ -13,12 +11,12 @@ import app.revanced.util.resources.ResourceUtils.copyResources import java.io.File import java.nio.file.Files -@Patch(false) +@Patch @Name("Custom branding") @Description("Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).") @CustomBrandingCompatibility class CustomBrandingPatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { fun copyResources(resourceGroups: List<ResourceUtils.ResourceGroup>) { iconPath?.let { iconPathString -> val iconPath = File(iconPathString) @@ -64,6 +62,8 @@ class CustomBrandingPatch : ResourcePatch { "android:label=\"$appName" ) ) + + return PatchResultSuccess() } companion object : OptionsContainer() { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/annotations/HideButtonsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/annotations/HideButtonsCompatibility.kt index 718e0b5620..1c521c5475 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/annotations/HideButtonsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/annotations/HideButtonsCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.buttons.action.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideButtonsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/patch/HideButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/patch/HideButtonsPatch.kt index 04eceb0406..855d4ecc8b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/patch/HideButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/patch/HideButtonsPatch.kt @@ -3,6 +3,8 @@ package app.revanced.patches.youtube.layout.buttons.action.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch @@ -20,7 +22,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch @Description("Adds the options to hide action buttons under a video.") @HideButtonsCompatibility class HideButtonsPatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( PreferenceScreen( "revanced_hide_buttons_preference_screen", @@ -32,30 +34,6 @@ class HideButtonsPatch : ResourcePatch { StringResource("revanced_hide_like_dislike_button_summary_on", "Like and dislike buttons are hidden"), StringResource("revanced_hide_like_dislike_button_summary_off", "Like and dislike buttons are shown") ), - SwitchPreference( - "revanced_hide_live_chat_button", - StringResource("revanced_hide_live_chat_button_title", "Hide live chat button"), - StringResource("revanced_hide_live_chat_button_summary_on", "Live chat button is hidden"), - StringResource("revanced_hide_live_chat_button_summary_off", "Live chat button is shown") - ), - SwitchPreference( - "revanced_hide_share_button", - StringResource("revanced_hide_share_button_title", "Hide share button"), - StringResource("revanced_hide_share_button_summary_on", "Share button is hidden"), - StringResource("revanced_hide_share_button_summary_off", "Share button is shown") - ), - SwitchPreference( - "revanced_hide_report_button", - StringResource("revanced_hide_report_button_title", "Hide report button"), - StringResource("revanced_hide_report_button_summary_on", "Report button is hidden"), - StringResource("revanced_hide_report_button_summary_off", "Report button is shown") - ), - SwitchPreference( - "revanced_hide_remix_button", - StringResource("revanced_hide_remix_button_title", "Hide remix button"), - StringResource("revanced_hide_remix_button_summary_on", "Remix button is hidden"), - StringResource("revanced_hide_remix_button_summary_off", "Remix button is shown") - ), SwitchPreference( "revanced_hide_download_button", StringResource("revanced_hide_download_button_title", "Hide download button"), @@ -63,28 +41,24 @@ class HideButtonsPatch : ResourcePatch { StringResource("revanced_hide_download_button_summary_off", "Download button is shown") ), SwitchPreference( - "revanced_hide_thanks_button", - StringResource("revanced_hide_thanks_button_title", "Hide thanks button"), - StringResource("revanced_hide_thanks_button_summary_on", "Thanks button is hidden"), - StringResource("revanced_hide_thanks_button_summary_off", "Thanks button is shown") + "revanced_hide_playlist_button", + StringResource("revanced_hide_playlist_button_title", "Hide playlist button"), + StringResource("revanced_hide_playlist_button_summary_on", "Playlist button is hidden"), + StringResource("revanced_hide_playlist_button_summary_off", "Playlist button is shown") ), SwitchPreference( "revanced_hide_clip_button", StringResource("revanced_hide_clip_button_title", "Hide clip button"), StringResource("revanced_hide_clip_button_summary_on", "Clip button is hidden"), StringResource("revanced_hide_clip_button_summary_off", "Clip button is shown"), + StringResource("revanced_hide_clip_button_user_dialog_message", + "Hiding the clip button might not work reliably. In the case it does not work, it can only be hidden by enabling \\'Hide all other action buttons\\'") ), SwitchPreference( - "revanced_hide_playlist_button", - StringResource("revanced_hide_playlist_button_title", "Hide save to playlist button"), - StringResource("revanced_hide_playlist_button_summary_on", "Save button is hidden"), - StringResource("revanced_hide_playlist_button_summary_off", "Save button is shown") - ), - SwitchPreference( - "revanced_hide_shop_button", - StringResource("revanced_hide_shop_button_title", "Hide shop button"), - StringResource("revanced_hide_shop_button_summary_on", "Shop button is hidden"), - StringResource("revanced_hide_shop_button_summary_off", "Shop button is shown") + "revanced_hide_action_buttons", + StringResource("revanced_hide_action_buttons_title", "Hide all other action buttons"), + StringResource("revanced_hide_action_buttons_summary_on", "Share, remix, thanks, shop, live chat buttons are hidden"), + StringResource("revanced_hide_action_buttons_summary_off", "Share, remix, thanks, shop, live chat buttons are shown") ) ), StringResource("revanced_hide_buttons_preference_screen_summary", "Hide or show buttons under videos") @@ -92,6 +66,8 @@ class HideButtonsPatch : ResourcePatch { ) LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR) + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/annotations/AutoplayButtonCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/annotations/AutoplayButtonCompatibility.kt index 1c3bcd4b5e..bb95ff0381 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/annotations/AutoplayButtonCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/annotations/AutoplayButtonCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.buttons.autoplay.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class AutoplayButtonCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/fingerprints/LayoutConstructorFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/fingerprints/LayoutConstructorFingerprint.kt new file mode 100644 index 0000000000..92d33ce317 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/fingerprints/LayoutConstructorFingerprint.kt @@ -0,0 +1,10 @@ +package app.revanced.patches.youtube.layout.buttons.autoplay.fingerprints + +import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint + +object LayoutConstructorFingerprint : MethodFingerprint( + strings = listOf("1.0x"), + customFingerprint = { methodDef, _ -> + methodDef.definingClass.endsWith("YouTubeControlsOverlay;") + } +) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/patch/HideAutoplayButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/patch/HideAutoplayButtonPatch.kt index 8857d85446..39ae7b3c52 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/patch/HideAutoplayButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/patch/HideAutoplayButtonPatch.kt @@ -1,13 +1,15 @@ package app.revanced.patches.youtube.layout.buttons.autoplay.patch import app.revanced.extensions.findIndexForIdResource -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.ExternalLabel @@ -15,13 +17,13 @@ import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch import app.revanced.patches.shared.settings.preference.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.SwitchPreference import app.revanced.patches.youtube.layout.buttons.autoplay.annotations.AutoplayButtonCompatibility -import app.revanced.patches.shared.fingerprints.LayoutConstructorFingerprint +import app.revanced.patches.youtube.layout.buttons.autoplay.fingerprints.LayoutConstructorFingerprint import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -import com.android.tools.smali.dexlib2.iface.instruction.Instruction -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.reference.MethodReference +import org.jf.dexlib2.iface.instruction.Instruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.reference.MethodReference @Patch @DependsOn([IntegrationsPatch::class, SettingsPatch::class, ResourceMappingPatch::class]) @@ -31,7 +33,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference class HideAutoplayButtonPatch : BytecodePatch( listOf(LayoutConstructorFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_autoplay_button", @@ -68,6 +70,8 @@ class HideAutoplayButtonPatch : BytecodePatch( """, ExternalLabel("hidden", jumpInstruction) ) - } ?: throw LayoutConstructorFingerprint.exception + } ?: return LayoutConstructorFingerprint.toErrorResult() + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/annotations/HideCaptionsButtonCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/annotations/HideCaptionsButtonCompatibility.kt index efa5572820..fc1e112a0a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/annotations/HideCaptionsButtonCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/annotations/HideCaptionsButtonCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.buttons.captions.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideCaptionsButtonCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/patch/HideCaptionsButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/patch/HideCaptionsButtonPatch.kt index 71d4a81f7d..62452075d5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/patch/HideCaptionsButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/patch/HideCaptionsButtonPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.settings.preference.impl.StringResource @@ -13,7 +15,7 @@ import app.revanced.patches.youtube.layout.autocaptions.fingerprints.SubtitleBut import app.revanced.patches.youtube.layout.buttons.captions.annotations.HideCaptionsButtonCompatibility import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode @Patch @DependsOn([IntegrationsPatch::class, SettingsPatch::class]) @@ -23,7 +25,7 @@ import com.android.tools.smali.dexlib2.Opcode class HideCaptionsButtonPatch : BytecodePatch(listOf( SubtitleButtonControllerFingerprint, )) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_captions_button", @@ -36,15 +38,17 @@ class HideCaptionsButtonPatch : BytecodePatch(listOf( val subtitleButtonControllerMethod = SubtitleButtonControllerFingerprint.result!!.mutableMethod // Due to previously applied patches, scanResult index cannot be used in this context - val insertIndex = subtitleButtonControllerMethod.implementation!!.instructions.indexOfFirst { + val igetBooleanIndex = subtitleButtonControllerMethod.implementation!!.instructions.indexOfFirst { it.opcode == Opcode.IGET_BOOLEAN - } + 1 + } subtitleButtonControllerMethod.addInstruction( - insertIndex, + igetBooleanIndex + 1, """ invoke-static {v0}, Lapp/revanced/integrations/patches/HideCaptionsButtonPatch;->hideCaptionsButton(Landroid/widget/ImageView;)V """ ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/cast/patch/HideCastButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/cast/patch/HideCastButtonPatch.kt index 74bc155b5f..966dfd7df0 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/cast/patch/HideCastButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/cast/patch/HideCastButtonPatch.kt @@ -5,7 +5,9 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.settings.preference.impl.StringResource @@ -20,7 +22,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch @Description("Hides the cast button in the video player.") @CastButtonCompatibility class HideCastButtonPatch : BytecodePatch() { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_cast_button", @@ -31,7 +33,7 @@ class HideCastButtonPatch : BytecodePatch() { ) val buttonClass = context.findClass("MediaRouteButton") - ?: throw PatchException("MediaRouteButton class not found.") + ?: return PatchResultError("MediaRouteButton class not found.") buttonClass.mutableClass.methods.find { it.name == "setVisibility" }?.apply { addInstructions( @@ -41,6 +43,8 @@ class HideCastButtonPatch : BytecodePatch() { move-result p1 """ ) - } ?: throw PatchException("setVisibility method not found.") + } ?: return PatchResultError("setVisibility method not found.") + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/annotations/NavigationButtonsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/annotations/NavigationButtonsCompatibility.kt index 7afcbdcaac..393ac1366b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/annotations/NavigationButtonsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/annotations/NavigationButtonsCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.buttons.navigation.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class NavigationButtonsCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/InitializeButtonsFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/InitializeButtonsFingerprint.kt index 4d435d9436..1b22411535 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/InitializeButtonsFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/InitializeButtonsFingerprint.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.layout.buttons.navigation.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patches.youtube.layout.buttons.navigation.patch.ResolvePivotBarFingerprintsPatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object InitializeButtonsFingerprint : LiteralValueFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarButtonsViewFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarButtonsViewFingerprint.kt index fd16748f1a..82fd7e1c63 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarButtonsViewFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarButtonsViewFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.buttons.navigation.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object PivotBarButtonsViewFingerprint : MethodFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarConstructorFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarConstructorFingerprint.kt index 6ada7f7bc2..4500faf65e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarConstructorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarConstructorFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.buttons.navigation.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object PivotBarConstructorFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarCreateButtonViewFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarCreateButtonViewFingerprint.kt index af06e00518..21635ef0f2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarCreateButtonViewFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarCreateButtonViewFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.buttons.navigation.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object PivotBarCreateButtonViewFingerprint : MethodFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarEnumFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarEnumFingerprint.kt index f07f618294..af6bb087ef 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarEnumFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/fingerprints/PivotBarEnumFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.buttons.navigation.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object PivotBarEnumFingerprint : MethodFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/patch/NavigationButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/patch/NavigationButtonsPatch.kt index fc708d6ef7..ef8fd1fa0e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/patch/NavigationButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/patch/NavigationButtonsPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.layout.buttons.navigation.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext @@ -8,6 +8,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen @@ -19,8 +21,8 @@ import app.revanced.patches.youtube.layout.buttons.navigation.utils.InjectionUti import app.revanced.patches.youtube.layout.buttons.navigation.utils.InjectionUtils.injectHook import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Patch @DependsOn( @@ -34,7 +36,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction @Description("Adds options to hide or change navigation buttons.") @NavigationButtonsCompatibility class NavigationButtonsPatch : BytecodePatch(listOf(AddCreateButtonViewFingerprint)) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( PreferenceScreen( "revanced_navigation_buttons_preference_screen", @@ -101,7 +103,7 @@ class NavigationButtonsPatch : BytecodePatch(listOf(AddCreateButtonViewFingerpri initializeButtonsResult.mutableClass ) ) - throw it.exception + return it.toErrorResult() } .map { it.result!!.scanResult.patternScanResult!! } @@ -150,7 +152,7 @@ class NavigationButtonsPatch : BytecodePatch(listOf(AddCreateButtonViewFingerpri """ ) } - } ?: throw AddCreateButtonViewFingerprint.exception + } ?: return AddCreateButtonViewFingerprint.toErrorResult() /* * Resolve fingerprints @@ -158,7 +160,7 @@ class NavigationButtonsPatch : BytecodePatch(listOf(AddCreateButtonViewFingerpri InitializeButtonsFingerprint.result!!.let { if (!PivotBarCreateButtonViewFingerprint.resolve(context, it.mutableMethod, it.mutableClass)) - throw PivotBarCreateButtonViewFingerprint.exception + return PivotBarCreateButtonViewFingerprint.toErrorResult() } PivotBarCreateButtonViewFingerprint.result!!.apply { @@ -178,6 +180,7 @@ class NavigationButtonsPatch : BytecodePatch(listOf(AddCreateButtonViewFingerpri mutableMethod.injectHook(hook, insertIndex) } + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/patch/ResolvePivotBarFingerprintsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/patch/ResolvePivotBarFingerprintsPatch.kt index eb7bfd40e3..74f89732c9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/patch/ResolvePivotBarFingerprintsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/patch/ResolvePivotBarFingerprintsPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.youtube.layout.buttons.navigation.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch import app.revanced.patches.youtube.layout.buttons.navigation.fingerprints.InitializeButtonsFingerprint @@ -16,10 +18,10 @@ import app.revanced.patches.youtube.layout.buttons.navigation.fingerprints.Pivot class ResolvePivotBarFingerprintsPatch : BytecodePatch( listOf(PivotBarConstructorFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // imageOnlyTabResourceId is used in InitializeButtonsFingerprint fingerprint ResourceMappingPatch.resourceMappings.find { it.type == "layout" && it.name == "image_only_tab" } - ?.let { imageOnlyTabResourceId = it.id } ?: throw PatchException("Failed to find resource") + ?.let { imageOnlyTabResourceId = it.id } ?: return PatchResultError("Failed to find resource") PivotBarConstructorFingerprint.result?.let { // Resolve InitializeButtonsFingerprint on the class of the method @@ -28,8 +30,9 @@ class ResolvePivotBarFingerprintsPatch : BytecodePatch( context, it.classDef ) - ) throw InitializeButtonsFingerprint.exception - } ?: throw PivotBarConstructorFingerprint.exception + ) return InitializeButtonsFingerprint.toErrorResult() + } ?: return PivotBarConstructorFingerprint.toErrorResult() + return PatchResultSuccess() } internal companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/utils/InjectionUtils.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/utils/InjectionUtils.kt index f97305c12c..4b0c9f4ca7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/utils/InjectionUtils.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/utils/InjectionUtils.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.layout.buttons.navigation.utils import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod -import com.android.tools.smali.dexlib2.Opcode.MOVE_RESULT_OBJECT -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.Opcode.MOVE_RESULT_OBJECT +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction internal object InjectionUtils { const val REGISTER_TEMPLATE_REPLACEMENT: String = "REGISTER_INDEX" diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/annotations/HidePlayerButtonsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/annotations/HidePlayerButtonsCompatibility.kt index e1a7726d2b..15330096ca 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/annotations/HidePlayerButtonsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/annotations/HidePlayerButtonsCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.buttons.player.hide.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HidePlayerButtonsCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/fingerprints/PlayerControlsVisibilityModelFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/fingerprints/PlayerControlsVisibilityModelFingerprint.kt index fd44dc9429..bf9d48e44d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/fingerprints/PlayerControlsVisibilityModelFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/fingerprints/PlayerControlsVisibilityModelFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.buttons.player.hide.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object PlayerControlsVisibilityModelFingerprint : MethodFingerprint( opcodes = listOf(Opcode.INVOKE_DIRECT_RANGE), diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/patch/HidePlayerButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/patch/HidePlayerButtonsPatch.kt index b719359bfa..5c90712952 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/patch/HidePlayerButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/patch/HidePlayerButtonsPatch.kt @@ -1,12 +1,14 @@ package app.revanced.patches.youtube.layout.buttons.player.hide.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.settings.preference.impl.StringResource @@ -15,7 +17,7 @@ import app.revanced.patches.youtube.layout.buttons.player.hide.annotations.HideP import app.revanced.patches.youtube.layout.buttons.player.hide.fingerprints.PlayerControlsVisibilityModelFingerprint import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction3rc +import org.jf.dexlib2.iface.instruction.formats.Instruction3rc @Patch @DependsOn([IntegrationsPatch::class, SettingsPatch::class]) @@ -30,7 +32,7 @@ class HidePlayerButtonsPatch : BytecodePatch( const val HAS_PREVIOUS = 6 } - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_player_buttons", @@ -67,6 +69,7 @@ class HidePlayerButtonsPatch : BytecodePatch( move-result v$hasPreviousParameterRegister """ ) - } ?: throw PlayerControlsVisibilityModelFingerprint.exception + } ?: return PlayerControlsVisibilityModelFingerprint.toErrorResult() + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/annotations/AlbumCardsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/annotations/AlbumCardsCompatibility.kt index cbb7db662a..889695eaab 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/annotations/AlbumCardsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/annotations/AlbumCardsCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.albumcards.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class AlbumCardsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/bytecode/fingerprints/AlbumCardsFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/bytecode/fingerprints/AlbumCardsFingerprint.kt index c7c808e2ea..6d8cad5c35 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/bytecode/fingerprints/AlbumCardsFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/bytecode/fingerprints/AlbumCardsFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.layout.hide.albumcards.bytecode.fingerprint import app.revanced.patcher.extensions.or import app.revanced.patches.youtube.layout.hide.albumcards.resource.patch.AlbumCardsResourcePatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object AlbumCardsFingerprint : LiteralValueFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/bytecode/patch/AlbumCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/bytecode/patch/AlbumCardsPatch.kt index 3b699b36fe..e4322b9e1b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/bytecode/patch/AlbumCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/bytecode/patch/AlbumCardsPatch.kt @@ -1,19 +1,21 @@ package app.revanced.patches.youtube.layout.hide.albumcards.bytecode.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.layout.hide.albumcards.annotations.AlbumCardsCompatibility import app.revanced.patches.youtube.layout.hide.albumcards.bytecode.fingerprints.AlbumCardsFingerprint import app.revanced.patches.youtube.layout.hide.albumcards.resource.patch.AlbumCardsResourcePatch import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Patch @DependsOn([IntegrationsPatch::class, AlbumCardsResourcePatch::class]) @@ -25,7 +27,7 @@ class AlbumCardsPatch : BytecodePatch( AlbumCardsFingerprint, ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { AlbumCardsFingerprint.result?.let { it.mutableMethod.apply { val checkCastAnchorIndex = it.scanResult.patternScanResult!!.endIndex @@ -41,6 +43,8 @@ class AlbumCardsPatch : BytecodePatch( "hideAlbumCard(Landroid/view/View;)V" ) } - } ?: throw AlbumCardsFingerprint.exception + } ?: return AlbumCardsFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/resource/patch/AlbumCardsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/resource/patch/AlbumCardsResourcePatch.kt index 2e22a4c5c6..3c3359f3eb 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/resource/patch/AlbumCardsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/resource/patch/AlbumCardsResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.layout.hide.albumcards.resource.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -14,7 +16,7 @@ class AlbumCardsResourcePatch : ResourcePatch { internal var albumCardId: Long = -1 } - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_album_cards", @@ -27,5 +29,7 @@ class AlbumCardsResourcePatch : ResourcePatch { albumCardId = ResourceMappingPatch.resourceMappings.single { it.type == "layout" && it.name == "album_card" }.id + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/annotations/BreakingNewsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/annotations/BreakingNewsCompatibility.kt index 47cee050b5..635820ab5b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/annotations/BreakingNewsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/annotations/BreakingNewsCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.breakingnews.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class BreakingNewsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/bytecode/fingerprints/BreakingNewsFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/bytecode/fingerprints/BreakingNewsFingerprint.kt index 2e5592d8c8..16ae7019d4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/bytecode/fingerprints/BreakingNewsFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/bytecode/fingerprints/BreakingNewsFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.layout.hide.breakingnews.bytecode.fingerpri import app.revanced.patcher.extensions.or import app.revanced.patches.youtube.layout.hide.breakingnews.resource.patch.BreakingNewsResourcePatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object BreakingNewsFingerprint : LiteralValueFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/bytecode/patch/BreakingNewsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/bytecode/patch/BreakingNewsPatch.kt index ee09bed14e..c9ababc1f7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/bytecode/patch/BreakingNewsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/bytecode/patch/BreakingNewsPatch.kt @@ -1,19 +1,21 @@ package app.revanced.patches.youtube.layout.hide.breakingnews.bytecode.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.layout.hide.breakingnews.annotations.BreakingNewsCompatibility import app.revanced.patches.youtube.layout.hide.breakingnews.bytecode.fingerprints.BreakingNewsFingerprint import app.revanced.patches.youtube.layout.hide.breakingnews.resource.patch.BreakingNewsResourcePatch import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Patch @DependsOn([IntegrationsPatch::class, BreakingNewsResourcePatch::class]) @@ -23,7 +25,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction class BreakingNewsPatch : BytecodePatch( listOf(BreakingNewsFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { BreakingNewsFingerprint.result?.let { val insertIndex = it.scanResult.patternScanResult!!.endIndex - 1 val moveResultIndex = insertIndex - 1 @@ -42,7 +44,9 @@ class BreakingNewsPatch : BytecodePatch( ) } - } ?: throw BreakingNewsFingerprint.exception + } ?: return BreakingNewsFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/resource/patch/BreakingNewsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/resource/patch/BreakingNewsResourcePatch.kt index 2a679a9658..9a9235a6f8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/resource/patch/BreakingNewsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/resource/patch/BreakingNewsResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.layout.hide.breakingnews.resource.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -14,7 +16,7 @@ class BreakingNewsResourcePatch : ResourcePatch { internal var horizontalCardListId: Long = -1 } - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_breaking_news", @@ -27,5 +29,7 @@ class BreakingNewsResourcePatch : ResourcePatch { horizontalCardListId = ResourceMappingPatch.resourceMappings.single { it.type == "layout" && it.name == "horizontal_card_list" }.id + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/annotations/HideCommentsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/annotations/HideCommentsCompatibility.kt index 3186af1d0f..6d8b3b3e3d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/annotations/HideCommentsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/annotations/HideCommentsCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.comments.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideCommentsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/patch/CommentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/patch/CommentsPatch.kt index 02054c4b29..cbee512211 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/patch/CommentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/patch/CommentsPatch.kt @@ -3,6 +3,8 @@ package app.revanced.patches.youtube.layout.hide.comments.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch @@ -19,7 +21,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch @HideCommentsCompatibility @DependsOn([SettingsPatch::class, LithoFilterPatch::class]) class CommentsPatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR) SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( @@ -43,6 +45,8 @@ class CommentsPatch : ResourcePatch { StringResource("revanced_comments_preference_screen_summary", "Manage the visibility of comments section components") ) ) + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/annotations/CrowdfundingBoxCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/annotations/CrowdfundingBoxCompatibility.kt index 0978625f63..fe6894aa3a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/annotations/CrowdfundingBoxCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/annotations/CrowdfundingBoxCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.crowdfundingbox.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class CrowdfundingBoxCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/bytecode/fingerprints/CrowdfundingBoxFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/bytecode/fingerprints/CrowdfundingBoxFingerprint.kt index 946b00beff..30dc121c3d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/bytecode/fingerprints/CrowdfundingBoxFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/bytecode/fingerprints/CrowdfundingBoxFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.layout.hide.crowdfundingbox.bytecode.finger import app.revanced.patcher.extensions.or import app.revanced.patches.youtube.layout.hide.crowdfundingbox.resource.patch.CrowdfundingBoxResourcePatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object CrowdfundingBoxFingerprint : LiteralValueFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/bytecode/patch/CrowdfundingBoxPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/bytecode/patch/CrowdfundingBoxPatch.kt index 1ebdb0eb67..df3d6d1fd4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/bytecode/patch/CrowdfundingBoxPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/bytecode/patch/CrowdfundingBoxPatch.kt @@ -1,19 +1,21 @@ package app.revanced.patches.youtube.layout.hide.crowdfundingbox.bytecode.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.layout.hide.crowdfundingbox.annotations.CrowdfundingBoxCompatibility import app.revanced.patches.youtube.layout.hide.crowdfundingbox.bytecode.fingerprints.CrowdfundingBoxFingerprint import app.revanced.patches.youtube.layout.hide.crowdfundingbox.resource.patch.CrowdfundingBoxResourcePatch import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction +import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @Patch @DependsOn([IntegrationsPatch::class, CrowdfundingBoxResourcePatch::class]) @@ -25,7 +27,7 @@ class CrowdfundingBoxPatch : BytecodePatch( CrowdfundingBoxFingerprint, ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { CrowdfundingBoxFingerprint.result?.let { it.mutableMethod.apply { val insertIndex = it.scanResult.patternScanResult!!.endIndex @@ -33,7 +35,9 @@ class CrowdfundingBoxPatch : BytecodePatch( addInstruction(insertIndex, "invoke-static {v$objectRegister}, $INTEGRATIONS_METHOD_DESCRIPTOR") } - } ?: throw CrowdfundingBoxFingerprint.exception + } ?: return CrowdfundingBoxFingerprint.toErrorResult() + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/resource/patch/CrowdfundingBoxResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/resource/patch/CrowdfundingBoxResourcePatch.kt index 4d0cc7c203..b6af990588 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/resource/patch/CrowdfundingBoxResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/resource/patch/CrowdfundingBoxResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.layout.hide.crowdfundingbox.resource.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -14,7 +16,7 @@ class CrowdfundingBoxResourcePatch : ResourcePatch { internal var crowdfundingBoxId: Long = -1 } - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_crowdfunding_box", @@ -27,5 +29,7 @@ class CrowdfundingBoxResourcePatch : ResourcePatch { crowdfundingBoxId = ResourceMappingPatch.resourceMappings.single { it.type == "layout" && it.name == "donation_companion" }.id + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/annotations/HideEndscreenCardsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/annotations/HideEndscreenCardsCompatibility.kt index f6017cf54f..2062758960 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/annotations/HideEndscreenCardsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/annotations/HideEndscreenCardsCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.endscreencards.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideEndscreenCardsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/fingerprints/LayoutCircleFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/fingerprints/LayoutCircleFingerprint.kt index f2de249858..5469dc111c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/fingerprints/LayoutCircleFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/fingerprints/LayoutCircleFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.fingerp import app.revanced.patches.youtube.layout.hide.endscreencards.resource.patch.HideEndscreenCardsResourcePatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object LayoutCircleFingerprint : LiteralValueFingerprint( returnType = "Landroid/view/View;", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/fingerprints/LayoutIconFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/fingerprints/LayoutIconFingerprint.kt index 13de055b35..90350f4c06 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/fingerprints/LayoutIconFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/fingerprints/LayoutIconFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.fingerp import app.revanced.patches.youtube.layout.hide.endscreencards.resource.patch.HideEndscreenCardsResourcePatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object LayoutIconFingerprint : LiteralValueFingerprint( returnType = "Landroid/view/View;", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/fingerprints/LayoutVideoFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/fingerprints/LayoutVideoFingerprint.kt index b7b54a5301..22c9b07b9e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/fingerprints/LayoutVideoFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/fingerprints/LayoutVideoFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.fingerp import app.revanced.patches.youtube.layout.hide.endscreencards.resource.patch.HideEndscreenCardsResourcePatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object LayoutVideoFingerprint : LiteralValueFingerprint( returnType = "Landroid/view/View;", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/patch/HideEndscreenCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/patch/HideEndscreenCardsPatch.kt index 43f7208ed6..acfd9113bf 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/patch/HideEndscreenCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/bytecode/patch/HideEndscreenCardsPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext @@ -8,6 +8,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.layout.hide.endscreencards.annotations.HideEndscreenCardsCompatibility @@ -16,7 +18,7 @@ import app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.fingerpr import app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.fingerprints.LayoutVideoFingerprint import app.revanced.patches.youtube.layout.hide.endscreencards.resource.patch.HideEndscreenCardsResourcePatch import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c +import org.jf.dexlib2.iface.instruction.formats.Instruction21c @Patch @DependsOn([IntegrationsPatch::class, HideEndscreenCardsResourcePatch::class]) @@ -30,9 +32,9 @@ class HideEndscreenCardsPatch : BytecodePatch( LayoutVideoFingerprint, ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { fun MethodFingerprint.injectHideCall() { - val layoutResult = result ?: throw exception + val layoutResult = result ?: throw toErrorResult() layoutResult.mutableMethod.apply { val insertIndex = layoutResult.scanResult.patternScanResult!!.endIndex + 1 val viewRegister = getInstruction<Instruction21c>(insertIndex - 1).registerA @@ -49,5 +51,7 @@ class HideEndscreenCardsPatch : BytecodePatch( LayoutIconFingerprint, LayoutVideoFingerprint ).forEach(MethodFingerprint::injectHideCall) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/resource/patch/HideEndscreenCardsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/resource/patch/HideEndscreenCardsResourcePatch.kt index 78c0253b97..577a7f1972 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/resource/patch/HideEndscreenCardsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/resource/patch/HideEndscreenCardsResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.layout.hide.endscreencards.resource.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -16,7 +18,7 @@ class HideEndscreenCardsResourcePatch : ResourcePatch { var layoutVideo: Long = -1 } - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_endscreen_cards", @@ -33,5 +35,7 @@ class HideEndscreenCardsResourcePatch : ResourcePatch { layoutCircle = findEndscreenResourceId("circle") layoutIcon = findEndscreenResourceId("icon") layoutVideo = findEndscreenResourceId("video") + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/annotations/HideFilterBar.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/annotations/HideFilterBar.kt index 8ff7bf4977..95aa29f64e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/annotations/HideFilterBar.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/annotations/HideFilterBar.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.filterbar.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideFilterBar \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/fingerprints/FilterBarHeightFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/fingerprints/FilterBarHeightFingerprint.kt index 2bea01f58a..7307754d03 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/fingerprints/FilterBarHeightFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/fingerprints/FilterBarHeightFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.layout.hide.filterbar.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patches.youtube.layout.hide.filterbar.patch.HideFilterBarResourcePatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object FilterBarHeightFingerprint : LiteralValueFingerprint( returnType = "V", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/fingerprints/RelatedChipCloudFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/fingerprints/RelatedChipCloudFingerprint.kt index fd811c1556..a5d47dbd39 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/fingerprints/RelatedChipCloudFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/fingerprints/RelatedChipCloudFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.layout.hide.filterbar.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patches.youtube.layout.hide.filterbar.patch.HideFilterBarResourcePatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object RelatedChipCloudFingerprint : LiteralValueFingerprint( returnType = "V", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/fingerprints/SearchResultsChipBarFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/fingerprints/SearchResultsChipBarFingerprint.kt index 866ec82f80..9dc8f93593 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/fingerprints/SearchResultsChipBarFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/fingerprints/SearchResultsChipBarFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.layout.hide.filterbar.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patches.youtube.layout.hide.filterbar.patch.HideFilterBarResourcePatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object SearchResultsChipBarFingerprint : LiteralValueFingerprint( returnType = "V", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/patch/HideFilterBarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/patch/HideFilterBarPatch.kt index 02c7fa0098..45d2f6ae9d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/patch/HideFilterBarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/patch/HideFilterBarPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.layout.hide.filterbar.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext @@ -8,14 +8,16 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.layout.hide.filterbar.annotations.HideFilterBar import app.revanced.patches.youtube.layout.hide.filterbar.fingerprints.FilterBarHeightFingerprint import app.revanced.patches.youtube.layout.hide.filterbar.fingerprints.RelatedChipCloudFingerprint import app.revanced.patches.youtube.layout.hide.filterbar.fingerprints.SearchResultsChipBarFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @Patch @Name("Hide filter bar") @@ -29,7 +31,7 @@ class HideFilterBarPatch : BytecodePatch( FilterBarHeightFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { FilterBarHeightFingerprint.patch<TwoRegisterInstruction> { register -> """ invoke-static { v$register }, $INTEGRATIONS_CLASS_DESCRIPTOR->hideInFeed(I)I @@ -48,6 +50,8 @@ class HideFilterBarPatch : BytecodePatch( move-result v$register """ } + + return PatchResultSuccess() } private companion object { @@ -76,6 +80,6 @@ class HideFilterBarPatch : BytecodePatch( addInstructions(insertIndex, instructions(register)) } - } ?: throw exception + } ?: throw toErrorResult() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/patch/HideFilterBarResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/patch/HideFilterBarResourcePatch.kt index 9360541b19..ab0e32411f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/patch/HideFilterBarResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/patch/HideFilterBarResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.layout.hide.filterbar.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -11,7 +13,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch @DependsOn([SettingsPatch::class, ResourceMappingPatch::class]) class HideFilterBarResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( PreferenceScreen( "revanced_hide_filter_bar_preference", @@ -76,6 +78,8 @@ class HideFilterBarResourcePatch : ResourcePatch { relatedChipCloudMarginId = "related_chip_cloud_reduced_margins".layoutResourceId("layout") filterBarHeightId = "filter_bar_height".layoutResourceId() barContainerHeightId = "bar_container_height".layoutResourceId() + + return PatchResultSuccess() } internal companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/annotations/HideFloatingMicrophoneButtonCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/annotations/HideFloatingMicrophoneButtonCompatibility.kt index 04d54c63ec..b5f04f78a0 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/annotations/HideFloatingMicrophoneButtonCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/annotations/HideFloatingMicrophoneButtonCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.floatingmicrophone.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideFloatingMicrophoneButtonCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/fingerprints/ShowFloatingMicrophoneButtonFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/fingerprints/ShowFloatingMicrophoneButtonFingerprint.kt index 16deabe29b..b471d6473f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/fingerprints/ShowFloatingMicrophoneButtonFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/fingerprints/ShowFloatingMicrophoneButtonFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.layout.hide.floatingmicrophone.fingerprints import app.revanced.patcher.extensions.or import app.revanced.util.patch.LiteralValueFingerprint import app.revanced.patches.youtube.layout.hide.floatingmicrophone.patch.HideFloatingMicrophoneButtonResourcePatch -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object ShowFloatingMicrophoneButtonFingerprint : LiteralValueFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/patch/HideFloatingMicrophoneButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/patch/HideFloatingMicrophoneButtonPatch.kt index 1f9e638678..5e8fd945fd 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/patch/HideFloatingMicrophoneButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/patch/HideFloatingMicrophoneButtonPatch.kt @@ -1,17 +1,19 @@ package app.revanced.patches.youtube.layout.hide.floatingmicrophone.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.layout.hide.floatingmicrophone.annotations.HideFloatingMicrophoneButtonCompatibility import app.revanced.patches.youtube.layout.hide.floatingmicrophone.fingerprints.ShowFloatingMicrophoneButtonFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction +import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @Patch @Name("Hide floating microphone button") @@ -21,7 +23,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction class HideFloatingMicrophoneButtonPatch : BytecodePatch( listOf(ShowFloatingMicrophoneButtonFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { ShowFloatingMicrophoneButtonFingerprint.result?.let { result -> with(result.mutableMethod) { val insertIndex = result.scanResult.patternScanResult!!.startIndex + 1 @@ -35,7 +37,9 @@ class HideFloatingMicrophoneButtonPatch : BytecodePatch( """ ) } - } ?: throw ShowFloatingMicrophoneButtonFingerprint.exception + } ?: return ShowFloatingMicrophoneButtonFingerprint.toErrorResult() + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/patch/HideFloatingMicrophoneButtonResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/patch/HideFloatingMicrophoneButtonResourcePatch.kt index 7dcb04ab82..e3e03d9807 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/patch/HideFloatingMicrophoneButtonResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/patch/HideFloatingMicrophoneButtonResourcePatch.kt @@ -1,7 +1,9 @@ package app.revanced.patches.youtube.layout.hide.floatingmicrophone.patch import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -13,7 +15,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch @DependsOn([SettingsPatch::class, ResourceMappingPatch::class]) @HideFloatingMicrophoneButtonCompatibility class HideFloatingMicrophoneButtonResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_floating_microphone_button", @@ -27,7 +29,8 @@ class HideFloatingMicrophoneButtonResourcePatch : ResourcePatch { ) fabButtonId = ResourceMappingPatch.resourceMappings.find { it.type == "id" && it.name == "fab" }?.id - ?: throw PatchException("Can not find required fab button resource id") + ?: return PatchResultError("Can not find required fab button resource id") + return PatchResultSuccess() } internal companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/annotations/HideLayoutComponentsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/annotations/HideLayoutComponentsCompatibility.kt index 962bbc66d8..a685bf3ee9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/annotations/HideLayoutComponentsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/annotations/HideLayoutComponentsCompatibility.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.layout.hide.general.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideLayoutComponentsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/fingerprints/ConvertElementToFlatBufferFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/fingerprints/ConvertElementToFlatBufferFingerprint.kt new file mode 100644 index 0000000000..a9ada6da1c --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/fingerprints/ConvertElementToFlatBufferFingerprint.kt @@ -0,0 +1,9 @@ +package app.revanced.patches.youtube.layout.hide.general.fingerprints + +import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint +import org.jf.dexlib2.Opcode + +object ConvertElementToFlatBufferFingerprint : MethodFingerprint( + strings = listOf("Failed to convert Element to Flatbuffers: %s"), + opcodes = listOf(Opcode.IGET_OBJECT) // Patched at this opcodes index +) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/fingerprints/ParseElementFromBufferFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/fingerprints/ParseElementFromBufferFingerprint.kt deleted file mode 100644 index 525346c578..0000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/fingerprints/ParseElementFromBufferFingerprint.kt +++ /dev/null @@ -1,10 +0,0 @@ -package app.revanced.patches.youtube.layout.hide.general.fingerprints - -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode - -object ParseElementFromBufferFingerprint : MethodFingerprint( - parameters = listOf("L","L","[B", "L","L"), - opcodes = listOf(Opcode.INVOKE_INTERFACE, Opcode.MOVE_RESULT_OBJECT), - strings = listOf("Failed to parse Element") -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/patch/HideLayoutComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/patch/HideLayoutComponentsPatch.kt index 8ca4278b22..640479490d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/patch/HideLayoutComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/patch/HideLayoutComponentsPatch.kt @@ -1,13 +1,15 @@ package app.revanced.patches.youtube.layout.hide.general.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.InstructionExtensions.getInstruction -import app.revanced.patcher.extensions.InstructionExtensions.getInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.ExternalLabel @@ -15,12 +17,10 @@ import app.revanced.patches.shared.settings.preference.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.SwitchPreference import app.revanced.patches.shared.settings.preference.impl.TextPreference import app.revanced.patches.youtube.layout.hide.general.annotations.HideLayoutComponentsCompatibility -import app.revanced.patches.youtube.layout.hide.general.fingerprints.ParseElementFromBufferFingerprint +import app.revanced.patches.youtube.layout.hide.general.fingerprints.ConvertElementToFlatBufferFingerprint import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch.PreferenceScreen -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction @Patch @Name("Hide layout components") @@ -28,9 +28,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction @DependsOn([LithoFilterPatch::class, SettingsPatch::class]) @HideLayoutComponentsCompatibility class HideLayoutComponentsPatch : BytecodePatch( - listOf(ParseElementFromBufferFingerprint) + listOf(ConvertElementToFlatBufferFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_gray_separator", @@ -251,28 +251,34 @@ class HideLayoutComponentsPatch : BytecodePatch( // region Mix playlists - ParseElementFromBufferFingerprint.result?.let { result -> - val returnEmptyComponentInstruction = result.mutableMethod.getInstructions() - .last { it.opcode == Opcode.INVOKE_STATIC } + ConvertElementToFlatBufferFingerprint.result?.let { + val returnEmptyComponentIndex = it.scanResult.stringsScanResult!!.matches.first().index + 2 - result.mutableMethod.apply { - val consumeByteBufferIndex = result.scanResult.patternScanResult!!.startIndex - val byteBufferRegister = getInstruction<FiveRegisterInstruction>(consumeByteBufferIndex).registerD + it.mutableMethod.apply { + // The last virtual register (not parameter). Used to store the byte array + // that may contain information about a mix playlist. + val freeRegister = (implementation!!.registerCount - 1) - parameterTypes.size - 1 + // Check if the byte array contains anything about a mix playlist. addInstructionsWithLabels( - result.scanResult.patternScanResult!!.startIndex, + it.scanResult.patternScanResult!!.startIndex, """ - invoke-static {v$byteBufferRegister}, $FILTER_CLASS_DESCRIPTOR->filterMixPlaylists([B)Z - move-result v0 # Conveniently same register happens to be free. - if-nez v0, :return_empty_component + invoke-static {v$freeRegister}, $FILTER_CLASS_DESCRIPTOR->filterMixPlaylists([B)Z + move-result v$freeRegister + if-nez v$freeRegister, :return_empty_component """, - ExternalLabel("return_empty_component", returnEmptyComponentInstruction) + ExternalLabel("return_empty_component", getInstruction(returnEmptyComponentIndex)) ) + + // Move the byte array to a free register. + addInstruction(0, "move-object/from16 v$freeRegister, p3") } - } ?: throw ParseElementFromBufferFingerprint.exception + } ?: return ConvertElementToFlatBufferFingerprint.toErrorResult() // endregion + + return PatchResultSuccess() } internal companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/annotations/HideInfocardsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/annotations/HideInfocardsCompatibility.kt index 2406c2ce23..520f038f63 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/annotations/HideInfocardsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/annotations/HideInfocardsCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.infocards.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideInfocardsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/fingerprints/InfocardsIncognitoFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/fingerprints/InfocardsIncognitoFingerprint.kt index 4e28fe256a..d59f8bff20 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/fingerprints/InfocardsIncognitoFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/fingerprints/InfocardsIncognitoFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.hide.infocards.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object InfocardsIncognitoFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/fingerprints/InfocardsIncognitoParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/fingerprints/InfocardsIncognitoParentFingerprint.kt index 34dbb54156..815b37d806 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/fingerprints/InfocardsIncognitoParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/fingerprints/InfocardsIncognitoParentFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.hide.infocards.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object InfocardsIncognitoParentFingerprint : MethodFingerprint( "Ljava/lang/String;", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/fingerprints/InfocardsMethodCallFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/fingerprints/InfocardsMethodCallFingerprint.kt index 9d84467175..48bef700aa 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/fingerprints/InfocardsMethodCallFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/fingerprints/InfocardsMethodCallFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.hide.infocards.fingerprints import app.revanced.util.patch.LiteralValueFingerprint import app.revanced.patches.youtube.layout.hide.infocards.resource.patch.HideInfocardsResourcePatch -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object InfocardsMethodCallFingerprint : LiteralValueFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/patch/HideInfoCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/patch/HideInfoCardsPatch.kt index c4eb750579..2d39ae8e54 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/patch/HideInfoCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/patch/HideInfoCardsPatch.kt @@ -8,6 +8,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWith import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.ExternalLabel @@ -17,9 +19,9 @@ import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.Infocards import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.InfocardsMethodCallFingerprint import app.revanced.patches.youtube.layout.hide.infocards.resource.patch.HideInfocardsResourcePatch import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction +import org.jf.dexlib2.iface.instruction.ReferenceInstruction @Patch @DependsOn([IntegrationsPatch::class, HideInfocardsResourcePatch::class]) @@ -32,7 +34,7 @@ class HideInfoCardsPatch : BytecodePatch( InfocardsMethodCallFingerprint, ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { InfocardsIncognitoFingerprint.also { it.resolve(context, InfocardsIncognitoParentFingerprint.result!!.classDef) }.result!!.mutableMethod.apply { @@ -66,5 +68,7 @@ class HideInfoCardsPatch : BytecodePatch( ) ) } + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/resource/patch/HideInfocardsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/resource/patch/HideInfocardsResourcePatch.kt index 27a1e48c0d..9b36d35f4f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/resource/patch/HideInfocardsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/resource/patch/HideInfocardsResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.layout.hide.infocards.resource.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -16,7 +18,7 @@ class HideInfocardsResourcePatch : ResourcePatch { var drawerResourceId: Long = -1 } - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_info_cards", @@ -29,5 +31,7 @@ class HideInfocardsResourcePatch : ResourcePatch { drawerResourceId = ResourceMappingPatch.resourceMappings.single { it.type == "id" && it.name == "info_cards_drawer_header" }.id + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/annotations/HideLoadMoreButtonCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/annotations/HideLoadMoreButtonCompatibility.kt index 821868a108..a9c4bcea73 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/annotations/HideLoadMoreButtonCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/annotations/HideLoadMoreButtonCompatibility.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.layout.hide.loadmorebutton.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideLoadMoreButtonCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/fingerprints/HideLoadMoreButtonFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/fingerprints/HideLoadMoreButtonFingerprint.kt index 258ba7d9e4..8a01d22247 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/fingerprints/HideLoadMoreButtonFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/fingerprints/HideLoadMoreButtonFingerprint.kt @@ -1,10 +1,15 @@ package app.revanced.patches.youtube.layout.hide.loadmorebutton.bytecode.fingerprints -import app.revanced.patches.youtube.layout.hide.loadmorebutton.resource.patch.HideLoadMoreButtonResourcePatch +import app.revanced.patcher.extensions.or import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.Opcode +import app.revanced.patches.youtube.layout.hide.loadmorebutton.resource.patch.HideLoadMoreButtonResourcePatch +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object HideLoadMoreButtonFingerprint : LiteralValueFingerprint( + returnType = "V", + accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, + parameters = listOf("L", "L", "L", "L"), opcodes = listOf( Opcode.CONST, Opcode.CONST_4, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/patch/HideLoadMoreButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/patch/HideLoadMoreButtonPatch.kt index 97c34561fc..3f0d69ee80 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/patch/HideLoadMoreButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/patch/HideLoadMoreButtonPatch.kt @@ -1,18 +1,20 @@ package app.revanced.patches.youtube.layout.hide.loadmorebutton.bytecode.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.layout.hide.loadmorebutton.bytecode.fingerprints.HideLoadMoreButtonFingerprint import app.revanced.patches.youtube.layout.hide.loadmorebutton.resource.patch.HideLoadMoreButtonResourcePatch import app.revanced.patches.youtube.layout.hide.loadmorebutton.annotations.HideLoadMoreButtonCompatibility -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Patch @Name("Hide load more button") @@ -20,7 +22,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction @DependsOn([HideLoadMoreButtonResourcePatch::class]) @HideLoadMoreButtonCompatibility class HideLoadMoreButtonPatch : BytecodePatch(listOf(HideLoadMoreButtonFingerprint)) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { HideLoadMoreButtonFingerprint.result?.let { it.mutableMethod.apply { val moveRegisterIndex = it.scanResult.patternScanResult!!.endIndex @@ -33,7 +35,9 @@ class HideLoadMoreButtonPatch : BytecodePatch(listOf(HideLoadMoreButtonFingerpri "$INTEGRATIONS_CLASS_DESCRIPTOR->hideLoadMoreButton(Landroid/view/View;)V" ) } - } ?: throw HideLoadMoreButtonFingerprint.exception + } ?: return HideLoadMoreButtonFingerprint.toErrorResult() + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/resource/patch/HideLoadMoreButtonResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/resource/patch/HideLoadMoreButtonResourcePatch.kt index b50779d26e..d74dd3d7a5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/resource/patch/HideLoadMoreButtonResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/resource/patch/HideLoadMoreButtonResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.layout.hide.loadmorebutton.resource.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -10,7 +12,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch @DependsOn([SettingsPatch::class, ResourceMappingPatch::class]) class HideLoadMoreButtonResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_load_more_button", @@ -23,6 +25,8 @@ class HideLoadMoreButtonResourcePatch : ResourcePatch { expandButtonDownId = ResourceMappingPatch.resourceMappings.single { it.type == "layout" && it.name == "expand_button_down" }.id + + return PatchResultSuccess() } internal companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/annotations/HideEmailAddressCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/annotations/HideEmailAddressCompatibility.kt index ba0bd1d31c..3d7193394a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/annotations/HideEmailAddressCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/annotations/HideEmailAddressCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.personalinformation.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideEmailAddressCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/bytecode/fingerprints/AccountSwitcherAccessibilityLabelFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/bytecode/fingerprints/AccountSwitcherAccessibilityLabelFingerprint.kt index 915aa5422b..372c21c5e2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/bytecode/fingerprints/AccountSwitcherAccessibilityLabelFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/bytecode/fingerprints/AccountSwitcherAccessibilityLabelFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.hide.personalinformation.bytecode.fi import app.revanced.util.patch.LiteralValueFingerprint import app.revanced.patches.youtube.layout.hide.personalinformation.resource.patch.HideEmailAddressResourcePatch -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object AccountSwitcherAccessibilityLabelFingerprint : LiteralValueFingerprint( returnType = "V", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/bytecode/patch/HideEmailAddressPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/bytecode/patch/HideEmailAddressPatch.kt index 2c2eabc2e4..1314b56c57 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/bytecode/patch/HideEmailAddressPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/bytecode/patch/HideEmailAddressPatch.kt @@ -1,19 +1,21 @@ package app.revanced.patches.youtube.layout.hide.personalinformation.bytecode.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.layout.hide.personalinformation.annotations.HideEmailAddressCompatibility import app.revanced.patches.youtube.layout.hide.personalinformation.bytecode.fingerprints.AccountSwitcherAccessibilityLabelFingerprint import app.revanced.patches.youtube.layout.hide.personalinformation.resource.patch.HideEmailAddressResourcePatch import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Patch @DependsOn([IntegrationsPatch::class, HideEmailAddressResourcePatch::class]) @@ -25,7 +27,7 @@ class HideEmailAddressPatch : BytecodePatch( AccountSwitcherAccessibilityLabelFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { AccountSwitcherAccessibilityLabelFingerprint.result?.let { it.mutableMethod.apply { val setVisibilityConstIndex = it.scanResult.patternScanResult!!.endIndex @@ -41,6 +43,8 @@ class HideEmailAddressPatch : BytecodePatch( """ ) } - } ?: throw AccountSwitcherAccessibilityLabelFingerprint.exception + } ?: return AccountSwitcherAccessibilityLabelFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/resource/patch/HideEmailAddressResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/resource/patch/HideEmailAddressResourcePatch.kt index bd6bf8c83a..dd9ed27158 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/resource/patch/HideEmailAddressResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/resource/patch/HideEmailAddressResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.layout.hide.personalinformation.resource.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -14,7 +16,7 @@ class HideEmailAddressResourcePatch : ResourcePatch { internal var accountSwitcherAccessibilityLabelId: Long = -1 } - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_email_address", @@ -27,5 +29,7 @@ class HideEmailAddressResourcePatch : ResourcePatch { accountSwitcherAccessibilityLabelId = ResourceMappingPatch.resourceMappings.single { it.type == "string" && it.name == "account_switcher_accessibility_label" }.id + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/annotations/HidePlayerFlyoutMenuItemsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/annotations/HidePlayerFlyoutMenuItemsCompatibility.kt index 3149b8d777..c9dcebc192 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/annotations/HidePlayerFlyoutMenuItemsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/annotations/HidePlayerFlyoutMenuItemsCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.player.flyoutmenupanel.annotati import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HidePlayerFlyoutMenuItemsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/patch/HidePlayerFlyoutMenuPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/patch/HidePlayerFlyoutMenuPatch.kt index 9099f58245..49848fd325 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/patch/HidePlayerFlyoutMenuPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/patch/HidePlayerFlyoutMenuPatch.kt @@ -3,6 +3,8 @@ package app.revanced.patches.youtube.layout.hide.player.flyoutmenupanel.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch @@ -19,7 +21,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch @DependsOn([LithoFilterPatch::class, SettingsPatch::class]) @HidePlayerFlyoutMenuItemsCompatibility class HidePlayerFlyoutMenuPatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( PreferenceScreen( KEY, @@ -91,6 +93,8 @@ class HidePlayerFlyoutMenuPatch : ResourcePatch { ) LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR) + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tablet/annotations/EnableTabletLayoutCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/overlay/annotations/HidePlayerOverlayPatchCompatibility.kt similarity index 57% rename from src/main/kotlin/app/revanced/patches/youtube/layout/tablet/annotations/EnableTabletLayoutCompatibility.kt rename to src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/overlay/annotations/HidePlayerOverlayPatchCompatibility.kt index 430281f605..9ca55f5234 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tablet/annotations/EnableTabletLayoutCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/overlay/annotations/HidePlayerOverlayPatchCompatibility.kt @@ -1,8 +1,8 @@ -package app.revanced.patches.youtube.layout.tablet.annotations +package app.revanced.patches.youtube.layout.hide.player.overlay.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package @Compatibility([Package("com.google.android.youtube")]) @Target(AnnotationTarget.CLASS) -internal annotation class EnableTabletLayoutCompatibility \ No newline at end of file +internal annotation class HidePlayerOverlayPatchCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/bytecode/fingerprints/CreatePlayerOverviewFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/overlay/bytecode/fingerprints/CreatePlayerOverviewFingerprint.kt similarity index 54% rename from src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/bytecode/fingerprints/CreatePlayerOverviewFingerprint.kt rename to src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/overlay/bytecode/fingerprints/CreatePlayerOverviewFingerprint.kt index ec617403ef..1325bee978 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/bytecode/fingerprints/CreatePlayerOverviewFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/overlay/bytecode/fingerprints/CreatePlayerOverviewFingerprint.kt @@ -1,11 +1,11 @@ -package app.revanced.patches.youtube.layout.player.overlay.bytecode.fingerprints +package app.revanced.patches.youtube.layout.hide.player.overlay.bytecode.fingerprints import app.revanced.extensions.containsConstantInstructionValue import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.youtube.layout.player.overlay.resource.patch.CustomPlayerOverlayOpacityResourcePatch -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import app.revanced.patches.youtube.layout.hide.player.overlay.resource.patch.HidePlayerOverlayResourcePatch +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object CreatePlayerOverviewFingerprint : MethodFingerprint( returnType = "V", @@ -17,6 +17,7 @@ object CreatePlayerOverviewFingerprint : MethodFingerprint( Opcode.CHECK_CAST ), customFingerprint = { methodDef, _ -> - methodDef.containsConstantInstructionValue(CustomPlayerOverlayOpacityResourcePatch.scrimOverlayId) + methodDef.definingClass.endsWith("YouTubeControlsOverlay;") + && methodDef.containsConstantInstructionValue(HidePlayerOverlayResourcePatch.scrimOverlayId) } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/overlay/bytecode/patch/HidePlayerOverlayPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/overlay/bytecode/patch/HidePlayerOverlayPatch.kt new file mode 100644 index 0000000000..d802ae3b1c --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/overlay/bytecode/patch/HidePlayerOverlayPatch.kt @@ -0,0 +1,48 @@ +package app.revanced.patches.youtube.layout.hide.player.overlay.bytecode.patch + +import app.revanced.extensions.indexOfFirstConstantInstructionValue +import app.revanced.extensions.toErrorResult +import app.revanced.patcher.annotation.Description +import app.revanced.patcher.annotation.Name +import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.extensions.InstructionExtensions.addInstruction +import app.revanced.patcher.extensions.InstructionExtensions.getInstruction +import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess +import app.revanced.patcher.patch.annotations.DependsOn +import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patches.youtube.layout.hide.player.overlay.annotations.HidePlayerOverlayPatchCompatibility +import app.revanced.patches.youtube.layout.hide.player.overlay.bytecode.fingerprints.CreatePlayerOverviewFingerprint +import app.revanced.patches.youtube.layout.hide.player.overlay.resource.patch.HidePlayerOverlayResourcePatch +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction + +@Patch +@Name("Hide player overlay") +@Description("Hides the dark background overlay from the player when player controls are visible.") +@DependsOn([HidePlayerOverlayResourcePatch::class]) +@HidePlayerOverlayPatchCompatibility +class HidePlayerOverlayPatch : BytecodePatch(listOf(CreatePlayerOverviewFingerprint)) { + override fun execute(context: BytecodeContext): PatchResult { + CreatePlayerOverviewFingerprint.result?.let { result -> + result.mutableMethod.apply { + val viewRegisterIndex = + indexOfFirstConstantInstructionValue(HidePlayerOverlayResourcePatch.scrimOverlayId) + 3 + val viewRegister = getInstruction<OneRegisterInstruction>(viewRegisterIndex).registerA + + val insertIndex = viewRegisterIndex + 1 + addInstruction( + insertIndex, + "invoke-static { v$viewRegister }, " + + "$INTEGRATIONS_CLASS_DESCRIPTOR->hidePlayerOverlay(Landroid/widget/ImageView;)V" + ) + } + } ?: return CreatePlayerOverviewFingerprint.toErrorResult() + + return PatchResultSuccess() + } + + private companion object { + const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/HidePlayerOverlayPatch;" + } +} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/overlay/resource/patch/HidePlayerOverlayResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/overlay/resource/patch/HidePlayerOverlayResourcePatch.kt new file mode 100644 index 0000000000..5f5710452e --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/overlay/resource/patch/HidePlayerOverlayResourcePatch.kt @@ -0,0 +1,35 @@ +package app.revanced.patches.youtube.layout.hide.player.overlay.resource.patch + +import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess +import app.revanced.patcher.patch.ResourcePatch +import app.revanced.patcher.patch.annotations.DependsOn +import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch +import app.revanced.patches.shared.settings.preference.impl.StringResource +import app.revanced.patches.shared.settings.preference.impl.SwitchPreference +import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch + +@DependsOn([SettingsPatch::class, ResourceMappingPatch::class]) +class HidePlayerOverlayResourcePatch : ResourcePatch { + override fun execute(context: ResourceContext): PatchResult { + SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( + SwitchPreference( + "revanced_hide_player_overlay", + StringResource("revanced_hide_player_overlay_title", "Hide background overlay in player"), + StringResource("revanced_hide_player_overlay_summary_on", "Background overlay is hidden"), + StringResource("revanced_hide_player_overlay_summary_off", "Background overlay is shown") + ) + ) + + scrimOverlayId = ResourceMappingPatch.resourceMappings.single { + it.type == "id" && it.name == "scrim_overlay" + }.id + + return PatchResultSuccess() + } + + internal companion object { + var scrimOverlayId: Long = -1 + } +} \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/annotations/HideSeekbarCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/annotations/HideSeekbarCompatibility.kt index a1fdebcc1b..784fa8611d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/annotations/HideSeekbarCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/annotations/HideSeekbarCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.seekbar.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideSeekbarCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/patch/HideSeekbarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/patch/HideSeekbarPatch.kt index dcdecd7227..9cc247aff8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/patch/HideSeekbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/patch/HideSeekbarPatch.kt @@ -6,6 +6,8 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.fingerprints.SeekbarFingerprint @@ -33,7 +35,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch class HideSeekbarPatch : BytecodePatch( listOf(SeekbarFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SeekbarPreferencesPatch.addPreferences( SwitchPreference( "revanced_hide_seekbar", @@ -63,5 +65,7 @@ class HideSeekbarPatch : BytecodePatch( nop """ ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/annotations/HideShortsComponentsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/annotations/HideShortsComponentsCompatibility.kt index 97c071786b..e434846d02 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/annotations/HideShortsComponentsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/annotations/HideShortsComponentsCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.shorts.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideShortsComponentsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/BottomNavigationBarFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/BottomNavigationBarFingerprint.kt index a5ca9d9c45..c53e79673d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/BottomNavigationBarFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/BottomNavigationBarFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.hide.shorts.bytecode.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object BottomNavigationBarFingerprint : MethodFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/CreateShortsButtonsFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/CreateShortsButtonsFingerprint.kt index 4412d87966..282737f7da 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/CreateShortsButtonsFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/CreateShortsButtonsFingerprint.kt @@ -1,13 +1,13 @@ package app.revanced.patches.youtube.layout.hide.shorts.bytecode.fingerprints import app.revanced.patcher.extensions.or -import app.revanced.patches.youtube.layout.hide.shorts.resource.patch.HideShortsComponentsResourcePatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import app.revanced.patches.youtube.layout.hide.shorts.resource.patch.HideShortsComponentsResourcePatch +import org.jf.dexlib2.AccessFlags object CreateShortsButtonsFingerprint : LiteralValueFingerprint( accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL, returnType = "V", parameters = listOf("Z", "Z", "L"), - literal = HideShortsComponentsResourcePatch.reelPlayerRightCellButtonHeight + literal = HideShortsComponentsResourcePatch.reelPlayerRightLargeIconSize ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/ReelConstructorFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/ReelConstructorFingerprint.kt index a9b195ba3c..467fa3c190 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/ReelConstructorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/ReelConstructorFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.layout.hide.shorts.bytecode.fingerprints import app.revanced.patcher.extensions.or import app.revanced.util.patch.LiteralValueFingerprint import app.revanced.patches.youtube.layout.hide.shorts.resource.patch.HideShortsComponentsResourcePatch -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object ReelConstructorFingerprint : LiteralValueFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/RenderBottomNavigationBarFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/RenderBottomNavigationBarFingerprint.kt index f20e9c62ca..216d7276a8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/RenderBottomNavigationBarFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/RenderBottomNavigationBarFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.hide.shorts.bytecode.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object RenderBottomNavigationBarFingerprint : MethodFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/SetPivotBarVisibilityFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/SetPivotBarVisibilityFingerprint.kt index fdd010b1ba..6c169f2aef 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/SetPivotBarVisibilityFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/fingerprints/SetPivotBarVisibilityFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.hide.shorts.bytecode.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object SetPivotBarVisibilityFingerprint : MethodFingerprint( parameters = listOf("Z"), diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/patch/HideShortsComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/patch/HideShortsComponentsPatch.kt index 04262324a4..859588f8f7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/patch/HideShortsComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/bytecode/patch/HideShortsComponentsPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.hide.shorts.bytecode.patch import app.revanced.extensions.findIndexForIdResource import app.revanced.extensions.injectHideViewCall -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext @@ -10,6 +10,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod @@ -19,9 +21,9 @@ import app.revanced.patches.youtube.layout.hide.shorts.bytecode.fingerprints.* import app.revanced.patches.youtube.layout.hide.shorts.resource.patch.HideShortsComponentsResourcePatch import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch -import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction +import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @Patch @DependsOn( @@ -44,7 +46,7 @@ class HideShortsComponentsPatch : BytecodePatch( SetPivotBarVisibilityParentFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR) // region Hide the Shorts shelf. @@ -61,7 +63,7 @@ class HideShortsComponentsPatch : BytecodePatch( "hideShortsShelf" ) } - } ?: throw ReelConstructorFingerprint.exception + } ?: return ReelConstructorFingerprint.toErrorResult() // endregion @@ -70,7 +72,7 @@ class HideShortsComponentsPatch : BytecodePatch( // Some Shorts buttons are views, hide them by setting their visibility to GONE. CreateShortsButtonsFingerprint.result?.let { ShortsButtons.values().forEach { button -> button.injectHideCall(it.mutableMethod) } - } ?: throw CreateShortsButtonsFingerprint.exception + } ?: return CreateShortsButtonsFingerprint.toErrorResult() // endregion @@ -79,7 +81,7 @@ class HideShortsComponentsPatch : BytecodePatch( // Hook to get the pivotBar view. SetPivotBarVisibilityParentFingerprint.result?.let { if (!SetPivotBarVisibilityFingerprint.resolve(context, it.classDef)) - throw SetPivotBarVisibilityFingerprint.exception + throw SetPivotBarVisibilityFingerprint.toErrorResult() SetPivotBarVisibilityFingerprint.result!!.let { result -> result.mutableMethod.apply { @@ -92,17 +94,17 @@ class HideShortsComponentsPatch : BytecodePatch( ) } } - } ?: throw SetPivotBarVisibilityParentFingerprint.exception + } ?: return SetPivotBarVisibilityParentFingerprint.toErrorResult() // Hook to hide the navigation bar when Shorts are being played. RenderBottomNavigationBarParentFingerprint.result?.let { if (!RenderBottomNavigationBarFingerprint.resolve(context, it.classDef)) - throw RenderBottomNavigationBarFingerprint.exception + throw RenderBottomNavigationBarFingerprint.toErrorResult() RenderBottomNavigationBarFingerprint.result!!.mutableMethod.apply { addInstruction(0, "invoke-static { }, $FILTER_CLASS_DESCRIPTOR->hideNavigationBar()V") } - } ?: throw RenderBottomNavigationBarParentFingerprint.exception + } ?: return RenderBottomNavigationBarParentFingerprint.toErrorResult() // Required to prevent a black bar from appearing at the bottom of the screen. BottomNavigationBarFingerprint.result?.let { @@ -117,9 +119,11 @@ class HideShortsComponentsPatch : BytecodePatch( "hideNavigationBar(Landroid/view/View;)Landroid/view/View;" ) } - } ?: throw BottomNavigationBarFingerprint.exception + } ?: return BottomNavigationBarFingerprint.toErrorResult() // endregion + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/resource/patch/HideShortsComponentsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/resource/patch/HideShortsComponentsResourcePatch.kt index bc81970551..fb06642405 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/resource/patch/HideShortsComponentsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/resource/patch/HideShortsComponentsResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.layout.hide.shorts.resource.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -11,7 +13,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch @DependsOn([SettingsPatch::class, ResourceMappingPatch::class]) class HideShortsComponentsResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( PreferenceScreen( "revanced_shorts_preference_screen", @@ -91,11 +93,13 @@ class HideShortsComponentsResourcePatch : ResourcePatch { fun String.getId() = ResourceMappingPatch.resourceMappings.single { it.name == this }.id reelMultipleItemShelfId = "reel_multiple_items_shelf".getId() - reelPlayerRightCellButtonHeight = "reel_player_right_cell_button_height".getId() + reelPlayerRightLargeIconSize = "reel_player_right_large_icon_size".getId() + + return PatchResultSuccess() } companion object { - var reelMultipleItemShelfId = -1L - var reelPlayerRightCellButtonHeight = -1L + var reelMultipleItemShelfId: Long = -1 + var reelPlayerRightLargeIconSize = -1L } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/annotations/HideTimeCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/annotations/HideTimeCompatibility.kt index bfc3ecbc7d..baa9be5ff3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/annotations/HideTimeCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/annotations/HideTimeCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.time.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideTimeCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/fingerprints/TimeCounterFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/fingerprints/TimeCounterFingerprint.kt index cfc85b69d9..2f43eb0aac 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/fingerprints/TimeCounterFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/fingerprints/TimeCounterFingerprint.kt @@ -1,24 +1,28 @@ package app.revanced.patches.youtube.layout.hide.time.fingerprints import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode -@FuzzyPatternScanMethod(1) object TimeCounterFingerprint : MethodFingerprint( - "V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf( + accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, + parameters = listOf(), + returnType = "V", + opcodes = listOf( + Opcode.SUB_LONG_2ADDR, + Opcode.INVOKE_STATIC, + Opcode.MOVE_RESULT_OBJECT, Opcode.IGET_OBJECT, Opcode.IGET_WIDE, - Opcode.CONST_WIDE_16, - Opcode.CMP_LONG, - Opcode.IF_LEZ, - Opcode.IGET_OBJECT, - Opcode.IF_EQZ, - Opcode.INVOKE_VIRTUAL, - Opcode.MOVE_RESULT, - Opcode.IF_EQZ, - Opcode.GOTO, - ) + Opcode.INVOKE_STATIC, + Opcode.MOVE_RESULT_OBJECT, + Opcode.INVOKE_INTERFACE, + Opcode.RETURN_VOID, + ), + customFingerprint = { _, classDef -> + // On older devices this fingerprint resolves very slowly. + // Speed this up by checking for the number of methods. + classDef.methods.count() == 14 + } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/patch/HideTimestampPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/patch/HideTimestampPatch.kt index a8efcdcba0..8753a78461 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/patch/HideTimestampPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/patch/HideTimestampPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.youtube.layout.hide.time.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.settings.preference.impl.StringResource @@ -25,7 +27,7 @@ class HideTimestampPatch : BytecodePatch( TimeCounterFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_timestamp", @@ -47,6 +49,8 @@ class HideTimestampPatch : BytecodePatch( nop """ ) - } ?: throw TimeCounterFingerprint.exception + } ?: return TimeCounterFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/annotations/HideWatermarkCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/annotations/HideWatermarkCompatibility.kt index 58cfdd922a..687b506545 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/annotations/HideWatermarkCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/annotations/HideWatermarkCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.hide.watermark.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HideWatermarkCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/fingerprints/HideWatermarkFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/fingerprints/HideWatermarkFingerprint.kt index 58aa588184..b34c9a99ab 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/fingerprints/HideWatermarkFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/fingerprints/HideWatermarkFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.hide.watermark.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object HideWatermarkFingerprint : MethodFingerprint ( "V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L", "L") diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/fingerprints/HideWatermarkParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/fingerprints/HideWatermarkParentFingerprint.kt index 003815c45c..444fadd524 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/fingerprints/HideWatermarkParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/fingerprints/HideWatermarkParentFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.hide.watermark.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object HideWatermarkParentFingerprint : MethodFingerprint ( "L", AccessFlags.PUBLIC or AccessFlags.FINAL, strings = listOf("player_overlay_in_video_programming") diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/patch/HideWatermarkPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/patch/HideWatermarkPatch.kt index e2b7f12f3d..c9e5694efe 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/patch/HideWatermarkPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/patch/HideWatermarkPatch.kt @@ -7,7 +7,9 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.settings.preference.impl.StringResource @@ -28,7 +30,7 @@ class HideWatermarkPatch : BytecodePatch( HideWatermarkParentFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_video_watermark", @@ -40,7 +42,7 @@ class HideWatermarkPatch : BytecodePatch( HideWatermarkFingerprint.resolve(context, HideWatermarkParentFingerprint.result!!.classDef) val result = HideWatermarkFingerprint.result - ?: throw PatchException("Required parent method could not be found.") + ?: return PatchResultError("Required parent method could not be found.") val method = result.mutableMethod val line = method.implementation!!.instructions.size - 5 @@ -53,5 +55,7 @@ class HideWatermarkPatch : BytecodePatch( move-result p2 """ ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/annotations/FullscreenPanelsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/annotations/FullscreenPanelsCompatibility.kt new file mode 100644 index 0000000000..11dbf8842f --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/annotations/FullscreenPanelsCompatibility.kt @@ -0,0 +1,8 @@ +package app.revanced.patches.youtube.layout.panels.fullscreen.remove.annotations + +import app.revanced.patcher.annotation.Compatibility +import app.revanced.patcher.annotation.Package + +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) +@Target(AnnotationTarget.CLASS) +internal annotation class FullscreenPanelsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/fingerprints/FullscreenViewAdderFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/fingerprints/FullscreenViewAdderFingerprint.kt index e69de29bb2..7d7429ca16 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/fingerprints/FullscreenViewAdderFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/fingerprints/FullscreenViewAdderFingerprint.kt @@ -0,0 +1,11 @@ +package app.revanced.patches.youtube.layout.panels.fullscreen.remove.fingerprints + + +import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint +import org.jf.dexlib2.Opcode + +object FullscreenViewAdderFingerprint : MethodFingerprint( + opcodes = listOf( + Opcode.IGET_BOOLEAN + ) +) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/fingerprints/FullscreenViewAdderParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/fingerprints/FullscreenViewAdderParentFingerprint.kt index e69de29bb2..9a1bb42194 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/fingerprints/FullscreenViewAdderParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/fingerprints/FullscreenViewAdderParentFingerprint.kt @@ -0,0 +1,20 @@ +package app.revanced.patches.youtube.layout.panels.fullscreen.remove.fingerprints + +import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint +import org.jf.dexlib2.Opcode + +object FullscreenViewAdderParentFingerprint : MethodFingerprint( + returnType = "V", + parameters = listOf("Landroid/content/Context;", "Landroid/view/View;"), + opcodes = listOf( + Opcode.GOTO, + Opcode.IGET_BOOLEAN, + Opcode.IF_EQ, + Opcode.GOTO, + Opcode.CONST_4, + Opcode.INVOKE_VIRTUAL, + ), + customFingerprint = { methodDef, _ -> + methodDef.definingClass.endsWith("FullscreenEngagementPanelOverlay;") + } +) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/patch/FullscreenPanelsRemoverPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/patch/FullscreenPanelsRemoverPatch.kt new file mode 100644 index 0000000000..ab36bb8850 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/fullscreen/remove/patch/FullscreenPanelsRemoverPatch.kt @@ -0,0 +1,63 @@ +package app.revanced.patches.youtube.layout.panels.fullscreen.remove.patch + +import app.revanced.patcher.annotation.Description +import app.revanced.patcher.annotation.Name +import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.extensions.InstructionExtensions.addInstructions +import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction +import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve +import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess +import app.revanced.patcher.patch.annotations.DependsOn +import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patches.shared.settings.preference.impl.StringResource +import app.revanced.patches.shared.settings.preference.impl.SwitchPreference +import app.revanced.patches.youtube.layout.panels.fullscreen.remove.annotations.FullscreenPanelsCompatibility +import app.revanced.patches.youtube.layout.panels.fullscreen.remove.fingerprints.FullscreenViewAdderFingerprint +import app.revanced.patches.youtube.layout.panels.fullscreen.remove.fingerprints.FullscreenViewAdderParentFingerprint +import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch +import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch + +@Patch +@Name("Disable fullscreen panels") +@DependsOn([IntegrationsPatch::class, SettingsPatch::class]) +@Description("Disables video description and comments panel in fullscreen view.") +@FullscreenPanelsCompatibility +class FullscreenPanelsRemoverPatch : BytecodePatch( + listOf( + FullscreenViewAdderParentFingerprint + ) +) { + override fun execute(context: BytecodeContext): PatchResult { + SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( + SwitchPreference( + "revanced_hide_fullscreen_panels", + StringResource("revanced_hide_fullscreen_panels_title", "Hide fullscreen panels"), + StringResource("revanced_hide_fullscreen_panels_summary_on", "Fullscreen panels are hidden"), + StringResource("revanced_hide_fullscreen_panels_summary_off", "Fullscreen panels are shown") + ) + ) + + val parentResult = FullscreenViewAdderParentFingerprint.result!! + FullscreenViewAdderFingerprint.resolve(context, parentResult.method, parentResult.classDef) + val result = FullscreenViewAdderParentFingerprint.result + ?: return PatchResultError("Fingerprint not resolved!") + + val method = result.mutableMethod + + val ifIndex = result.scanResult.patternScanResult!!.startIndex + 2 + + method.removeInstruction(ifIndex) + method.addInstructions( + ifIndex, + """ + invoke-static {}, Lapp/revanced/integrations/patches/FullscreenPanelsRemoverPatch;->getFullscreenPanelsVisibility()I + move-result p1 + """ + ) + + return PatchResultSuccess() + } +} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/annotations/PlayerPopupPanelsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/annotations/PlayerPopupPanelsCompatibility.kt index 78eb5708e2..e6da799021 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/annotations/PlayerPopupPanelsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/annotations/PlayerPopupPanelsCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.panels.popup.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class PlayerPopupPanelsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/fingerprints/EngagementPanelControllerFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/fingerprints/EngagementPanelControllerFingerprint.kt index ef20819a04..a2c94e6f49 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/fingerprints/EngagementPanelControllerFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/fingerprints/EngagementPanelControllerFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.panels.popup.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object EngagementPanelControllerFingerprint : MethodFingerprint( returnType = "L", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/patch/PlayerPopupPanelsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/patch/PlayerPopupPanelsPatch.kt index d9848d0dfa..1f5d4c7d03 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/patch/PlayerPopupPanelsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/patch/PlayerPopupPanelsPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.youtube.layout.panels.popup.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.settings.preference.impl.StringResource @@ -25,7 +27,7 @@ class PlayerPopupPanelsPatch : BytecodePatch( EngagementPanelControllerFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_hide_player_popup_panels", @@ -36,7 +38,7 @@ class PlayerPopupPanelsPatch : BytecodePatch( ) val engagementPanelControllerMethod = EngagementPanelControllerFingerprint - .result?.mutableMethod ?: throw EngagementPanelControllerFingerprint.exception + .result?.mutableMethod ?: return EngagementPanelControllerFingerprint.toErrorResult() engagementPanelControllerMethod.addInstructionsWithLabels( 0, @@ -51,5 +53,7 @@ class PlayerPopupPanelsPatch : BytecodePatch( nop """ ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/annotations/PlayerControlsBackgroundCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/annotations/PlayerControlsBackgroundCompatibility.kt index 2a6f35bbed..d7e6490f9b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/annotations/PlayerControlsBackgroundCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/annotations/PlayerControlsBackgroundCompatibility.kt @@ -2,6 +2,6 @@ package app.revanced.patches.youtube.layout.player.background.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class PlayerControlsBackgroundCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/patch/PlayerControlsBackgroundPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/patch/PlayerControlsBackgroundPatch.kt index 5096eb771f..c074af3975 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/patch/PlayerControlsBackgroundPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/patch/PlayerControlsBackgroundPatch.kt @@ -4,6 +4,8 @@ import app.revanced.extensions.doRecursively import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.layout.player.background.annotations.PlayerControlsBackgroundCompatibility @@ -14,7 +16,7 @@ import org.w3c.dom.Element @Description("Removes the background from the video player controls.") @PlayerControlsBackgroundCompatibility class PlayerControlsBackgroundPatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { context.xmlEditor[RESOURCE_FILE_PATH].use { editor -> editor.file.doRecursively node@{ node -> if (node !is Element) return@node @@ -24,6 +26,8 @@ class PlayerControlsBackgroundPatch : ResourcePatch { } } } + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/annotations/PlayerOverlayPatchCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/annotations/PlayerOverlayPatchCompatibility.kt deleted file mode 100644 index 71d89ce7e6..0000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/annotations/PlayerOverlayPatchCompatibility.kt +++ /dev/null @@ -1,8 +0,0 @@ -package app.revanced.patches.youtube.layout.player.overlay.annotations - -import app.revanced.patcher.annotation.Compatibility -import app.revanced.patcher.annotation.Package - -@Compatibility([Package("com.google.android.youtube")]) -@Target(AnnotationTarget.CLASS) -internal annotation class PlayerOverlayPatchCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/bytecode/patch/CustomPlayerOverlayOpacityPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/bytecode/patch/CustomPlayerOverlayOpacityPatch.kt deleted file mode 100644 index cbb46b92ab..0000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/bytecode/patch/CustomPlayerOverlayOpacityPatch.kt +++ /dev/null @@ -1,45 +0,0 @@ -package app.revanced.patches.youtube.layout.player.overlay.bytecode.patch - -import app.revanced.extensions.indexOfFirstConstantInstructionValue -import app.revanced.extensions.exception -import app.revanced.patcher.annotation.Description -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.addInstruction -import app.revanced.patcher.extensions.InstructionExtensions.getInstruction -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.annotations.DependsOn -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.youtube.layout.player.overlay.annotations.PlayerOverlayPatchCompatibility -import app.revanced.patches.youtube.layout.player.overlay.bytecode.fingerprints.CreatePlayerOverviewFingerprint -import app.revanced.patches.youtube.layout.player.overlay.resource.patch.CustomPlayerOverlayOpacityResourcePatch -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction - -@Patch -@Name("Custom player overlay opacity") -@Description("Change the opacity of the player background, when player controls are visible.") -@DependsOn([CustomPlayerOverlayOpacityResourcePatch::class]) -@PlayerOverlayPatchCompatibility -class CustomPlayerOverlayOpacityPatch : BytecodePatch(listOf(CreatePlayerOverviewFingerprint)) { - override fun execute(context: BytecodeContext) { - CreatePlayerOverviewFingerprint.result?.let { result -> - result.mutableMethod.apply { - val viewRegisterIndex = - indexOfFirstConstantInstructionValue(CustomPlayerOverlayOpacityResourcePatch.scrimOverlayId) + 3 - val viewRegister = - getInstruction<OneRegisterInstruction>(viewRegisterIndex).registerA - - val insertIndex = viewRegisterIndex + 1 - addInstruction( - insertIndex, - "invoke-static { v$viewRegister }, " + - "$INTEGRATIONS_CLASS_DESCRIPTOR->changeOpacity(Landroid/widget/ImageView;)V" - ) - } - } ?: throw CreatePlayerOverviewFingerprint.exception - } - - private companion object { - const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/CustomPlayerOverlayOpacityPatch;" - } -} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/resource/patch/CustomPlayerOverlayOpacityResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/resource/patch/CustomPlayerOverlayOpacityResourcePatch.kt deleted file mode 100644 index e868a8e209..0000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/resource/patch/CustomPlayerOverlayOpacityResourcePatch.kt +++ /dev/null @@ -1,38 +0,0 @@ -package app.revanced.patches.youtube.layout.player.overlay.resource.patch - -import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.patch.ResourcePatch -import app.revanced.patcher.patch.annotations.DependsOn -import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch -import app.revanced.patches.shared.settings.preference.impl.InputType -import app.revanced.patches.shared.settings.preference.impl.StringResource -import app.revanced.patches.shared.settings.preference.impl.TextPreference -import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch - -@DependsOn([SettingsPatch::class, ResourceMappingPatch::class]) -class CustomPlayerOverlayOpacityResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { - SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( - TextPreference( - "revanced_player_overlay_opacity", - StringResource( - "revanced_player_overlay_opacity_title", - "Player overlay opacity" - ), - StringResource( - "revanced_player_overlay_opacity_summary", - "Opacity value between 0-100, where 0 is transparent" - ), - InputType.NUMBER - ) - ) - - scrimOverlayId = ResourceMappingPatch.resourceMappings.single { - it.type == "id" && it.name == "scrim_overlay" - }.id - } - - internal companion object { - var scrimOverlayId = -1L - } -} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/annotations/ReturnYouTubeDislikeCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/annotations/ReturnYouTubeDislikeCompatibility.kt index 189902dbe7..5f3dd157e9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/annotations/ReturnYouTubeDislikeCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/annotations/ReturnYouTubeDislikeCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class ReturnYouTubeDislikeCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/DislikesOldLayoutTextViewFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/DislikesOldLayoutTextViewFingerprint.kt index 19557dde09..3ac14b345e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/DislikesOldLayoutTextViewFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/DislikesOldLayoutTextViewFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints import app.revanced.patcher.extensions.or import app.revanced.util.patch.LiteralValueFingerprint import app.revanced.patches.youtube.layout.returnyoutubedislike.resource.patch.ReturnYouTubeDislikeResourcePatch -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object DislikesOldLayoutTextViewFingerprint : LiteralValueFingerprint( returnType = "V", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/ShortsTextViewFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/ShortsTextViewFingerprint.kt index 1009acbd57..1c78732d58 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/ShortsTextViewFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/ShortsTextViewFingerprint.kt @@ -1,12 +1,12 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints +import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object ShortsTextViewFingerprint : MethodFingerprint( - // 18.29.38 method is public final visibility, but in 18.23.35 and older it's protected final. - // If 18.23.35 is dropped then accessFlags should be specified here. + accessFlags = AccessFlags.PROTECTED or AccessFlags.FINAL, returnType = "V", parameters = listOf("L", "L"), opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentAtomicReferenceFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentAtomicReferenceFingerprint.kt index 069ec8bb60..c5955c0f28 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentAtomicReferenceFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentAtomicReferenceFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode /** * Resolves against the same method that [TextComponentContextFingerprint] resolves to. @@ -13,17 +13,19 @@ object TextComponentAtomicReferenceFingerprint : MethodFingerprint( accessFlags = AccessFlags.PROTECTED or AccessFlags.FINAL, parameters = listOf("L"), opcodes = listOf( - Opcode.MOVE_OBJECT, // Register A and B is context, use B as context, reuse A as free register - Opcode.INVOKE_VIRTUAL, // Register C is atomic reference - Opcode.MOVE_RESULT_OBJECT, // Register A is char sequence - Opcode.MOVE_OBJECT, + Opcode.MOVE_OBJECT_FROM16, // available unused register + Opcode.MOVE_OBJECT_FROM16, + Opcode.MOVE_OBJECT_FROM16, + Opcode.MOVE_OBJECT_FROM16, + Opcode.INVOKE_VIRTUAL, // CharSequence atomic reference + Opcode.MOVE_RESULT_OBJECT, Opcode.CHECK_CAST, - Opcode.MOVE_OBJECT, - Opcode.INVOKE_INTERFACE, // Insert hook here + Opcode.MOVE_OBJECT, // CharSequence reference, and control flow label. Insert code here. + null, // invoke-interface or invoke-virtual Opcode.MOVE_RESULT, Opcode.IF_EQZ, - Opcode.INVOKE_INTERFACE, + null, // invoke-interface or invoke-virtual Opcode.MOVE_RESULT_OBJECT, - Opcode.GOTO + Opcode.GOTO, ) ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentConstructorFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentConstructorFingerprint.kt index 8fbd4e33bd..5f5c188443 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentConstructorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentConstructorFingerprint.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object TextComponentConstructorFingerprint : MethodFingerprint( accessFlags = AccessFlags.CONSTRUCTOR or AccessFlags.PRIVATE, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentContextFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentContextFingerprint.kt index 9c2e7d7e78..7e4d3141f9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentContextFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentContextFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode /** * Resolves against the same class that [TextComponentConstructorFingerprint] resolves to. diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/patch/ReturnYouTubeDislikePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/patch/ReturnYouTubeDislikePatch.kt index 34c22181f7..f55afa7674 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/patch/ReturnYouTubeDislikePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/patch/ReturnYouTubeDislikePatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext @@ -13,7 +13,9 @@ import app.revanced.patcher.extensions.MethodFingerprintExtensions.name import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.layout.returnyoutubedislike.annotations.ReturnYouTubeDislikeCompatibility @@ -22,10 +24,10 @@ import app.revanced.patches.youtube.layout.returnyoutubedislike.resource.patch.R import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch import app.revanced.patches.youtube.video.videoid.patch.VideoIdPatch -import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction +import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @Patch @DependsOn( @@ -49,7 +51,7 @@ class ReturnYouTubeDislikePatch : BytecodePatch( RemoveLikeFingerprint, ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // region Inject newVideoLoaded event handler to update dislikes when a new video is loaded. VideoIdPatch.injectCall("$INTEGRATIONS_CLASS_DESCRIPTOR->newVideoLoaded(Ljava/lang/String;)V") @@ -71,7 +73,7 @@ class ReturnYouTubeDislikePatch : BytecodePatch( invoke-static {v0}, $INTEGRATIONS_CLASS_DESCRIPTOR->sendVote(I)V """ ) - } ?: throw PatchException("Failed to find ${fingerprint.name} method.") + } ?: return PatchResultError("Failed to find ${fingerprint.name} method.") } // endregion @@ -83,61 +85,50 @@ class ReturnYouTubeDislikePatch : BytecodePatch( // since the underlying (likes only) text did not change. // This hook handles all situations, as it's where the created Spans are stored and later reused. TextComponentContextFingerprint.also { - if (!it.resolve(context, TextComponentConstructorFingerprint.result!!.classDef)) - throw it.exception + it.resolve( + context, + TextComponentConstructorFingerprint.result!!.classDef + ) }.result?.also { result -> if (!TextComponentAtomicReferenceFingerprint.resolve(context, result.method, result.classDef)) - throw TextComponentAtomicReferenceFingerprint.exception + throw TextComponentAtomicReferenceFingerprint.toErrorResult() }?.let { textComponentContextFingerprintResult -> val conversionContextIndex = textComponentContextFingerprintResult .scanResult.patternScanResult!!.startIndex val atomicReferenceStartIndex = TextComponentAtomicReferenceFingerprint.result!! .scanResult.patternScanResult!!.startIndex - val insertIndex = atomicReferenceStartIndex + 6 + val insertIndex = atomicReferenceStartIndex + 7 textComponentContextFingerprintResult.mutableMethod.apply { // Get the conversion context obfuscated field name, and the registers for the AtomicReference and CharSequence val conversionContextFieldReference = getInstruction<ReferenceInstruction>(conversionContextIndex).reference - // Reuse the free register to make room for the atomic reference register. - val freeRegister = + // any free register + val contextRegister = getInstruction<TwoRegisterInstruction>(atomicReferenceStartIndex).registerB val atomicReferenceRegister = - getInstruction<FiveRegisterInstruction>(atomicReferenceStartIndex + 1).registerC + getInstruction<FiveRegisterInstruction>(atomicReferenceStartIndex + 4).registerC - val moveCharSequenceInstruction = getInstruction<TwoRegisterInstruction>(insertIndex - 1) - val charSequenceSourceRegister = moveCharSequenceInstruction.registerB - val charSequenceTargetRegister = moveCharSequenceInstruction.registerA + val moveCharSequenceInstruction = getInstruction<TwoRegisterInstruction>(insertIndex) + val charSequenceRegister = moveCharSequenceInstruction.registerB - // In order to preserve the atomic reference register, because it is overwritten, - // use another free register to store it. - replaceInstruction( - atomicReferenceStartIndex + 2, - "move-result-object v$freeRegister" - ) - replaceInstruction( - atomicReferenceStartIndex + 3, - "move-object v$charSequenceSourceRegister, v$freeRegister" - ) - - // Move the current instance to the free register, and get the conversion context from it. - replaceInstruction(insertIndex - 1, "move-object/from16 v$freeRegister, p0") + // Insert as first instructions at the control flow label. + // Must replace the existing instruction to preserve the label, and then insert the remaining instructions. + replaceInstruction(insertIndex, "move-object/from16 v$contextRegister, p0") addInstructions( - insertIndex, + insertIndex + 1, """ - # Move context to free register - iget-object v$freeRegister, v$freeRegister, $conversionContextFieldReference - invoke-static {v$freeRegister, v$atomicReferenceRegister, v$charSequenceSourceRegister}, $INTEGRATIONS_CLASS_DESCRIPTOR->onLithoTextLoaded(Ljava/lang/Object;Ljava/util/concurrent/atomic/AtomicReference;Ljava/lang/CharSequence;)Ljava/lang/CharSequence; - move-result-object v$freeRegister - # Replace the original char sequence with the modified one. - move-object v${charSequenceTargetRegister}, v${freeRegister} + iget-object v$contextRegister, v$contextRegister, $conversionContextFieldReference # copy obfuscated context field into free register + invoke-static {v$contextRegister, v$atomicReferenceRegister, v$charSequenceRegister}, $INTEGRATIONS_CLASS_DESCRIPTOR->onLithoTextLoaded(Ljava/lang/Object;Ljava/util/concurrent/atomic/AtomicReference;Ljava/lang/CharSequence;)Ljava/lang/CharSequence; + move-result-object v$charSequenceRegister + move-object v${moveCharSequenceInstruction.registerA}, v${charSequenceRegister} # original instruction at the insertion point """ ) } - } ?: throw TextComponentContextFingerprint.exception + } ?: return TextComponentContextFingerprint.toErrorResult() // endregion @@ -177,7 +168,7 @@ class ReturnYouTubeDislikePatch : BytecodePatch( """ ) } - } ?: throw ShortsTextViewFingerprint.exception + } ?: return ShortsTextViewFingerprint.toErrorResult() // endregion @@ -195,9 +186,11 @@ class ReturnYouTubeDislikePatch : BytecodePatch( "invoke-static {v$resourceIdentifierRegister, v$textViewRegister}, $INTEGRATIONS_CLASS_DESCRIPTOR->setOldUILayoutDislikes(ILandroid/widget/TextView;)V" ) } - } ?: throw DislikesOldLayoutTextViewFingerprint.exception + } ?: return DislikesOldLayoutTextViewFingerprint.toErrorResult() // endregion + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/resource/patch/ReturnYouTubeDislikeResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/resource/patch/ReturnYouTubeDislikeResourcePatch.kt index 304623ced6..75cd1915a6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/resource/patch/ReturnYouTubeDislikeResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/resource/patch/ReturnYouTubeDislikeResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike.resource.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -15,7 +17,7 @@ class ReturnYouTubeDislikeResourcePatch : ResourcePatch { internal var oldUIDislikeId: Long = -1 } - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.addPreference( Preference( StringResource("revanced_ryd_settings_title", "Return YouTube Dislike"), @@ -29,5 +31,7 @@ class ReturnYouTubeDislikeResourcePatch : ResourcePatch { oldUIDislikeId = ResourceMappingPatch.resourceMappings.single { it.type == "id" && it.name == "dislike_button" }.id + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/annotations/WideSearchbarCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/annotations/WideSearchbarCompatibility.kt index c171c6d9ea..1fe97fe007 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/annotations/WideSearchbarCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/annotations/WideSearchbarCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.searchbar.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class WideSearchbarCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/fingerprints/CreateSearchSuggestionsFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/fingerprints/CreateSearchSuggestionsFingerprint.kt index 4c00d24f4e..bef00e2f3a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/fingerprints/CreateSearchSuggestionsFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/fingerprints/CreateSearchSuggestionsFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.searchbar.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object CreateSearchSuggestionsFingerprint : MethodFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/fingerprints/SetWordmarkHeaderFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/fingerprints/SetWordmarkHeaderFingerprint.kt index d2f56c0d77..836b1aa86b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/fingerprints/SetWordmarkHeaderFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/fingerprints/SetWordmarkHeaderFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.searchbar.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object SetWordmarkHeaderFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/patch/WideSearchbarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/patch/WideSearchbarPatch.kt index 21dc3495f7..d31a5a25e4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/patch/WideSearchbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/patch/WideSearchbarPatch.kt @@ -1,12 +1,15 @@ package app.revanced.patches.youtube.layout.searchbar.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.data.toMethodWalker import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod @@ -28,7 +31,7 @@ class WideSearchbarPatch : BytecodePatch( SetWordmarkHeaderFingerprint, CreateSearchSuggestionsFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_wide_searchbar", @@ -38,7 +41,7 @@ class WideSearchbarPatch : BytecodePatch( ) ) - val result = CreateSearchSuggestionsFingerprint.result ?: throw CreateSearchSuggestionsFingerprint.exception + val result = CreateSearchSuggestionsFingerprint.result ?: return CreateSearchSuggestionsFingerprint.toErrorResult() // patch methods mapOf( @@ -47,6 +50,8 @@ class WideSearchbarPatch : BytecodePatch( ).forEach { (fingerprint, callIndex) -> context.walkMutable(callIndex, fingerprint).injectSearchBarHook() } + + return PatchResultSuccess() } private companion object { @@ -60,7 +65,7 @@ class WideSearchbarPatch : BytecodePatch( fun BytecodeContext.walkMutable(index: Int, fromFingerprint: MethodFingerprint) = fromFingerprint.result?.let { toMethodWalker(it.method).nextMethod(index, true).getMethod() as MutableMethod - } ?: throw fromFingerprint.exception + } ?: throw fromFingerprint.toErrorResult() /** diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/fingerprints/PlayerSeekbarColorFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/fingerprints/PlayerSeekbarColorFingerprint.kt index 67851084ab..0c325dd868 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/fingerprints/PlayerSeekbarColorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/fingerprints/PlayerSeekbarColorFingerprint.kt @@ -4,7 +4,7 @@ import app.revanced.extensions.containsConstantInstructionValue import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patches.youtube.layout.seekbar.resource.SeekbarColorResourcePatch -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object PlayerSeekbarColorFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/fingerprints/SetSeekbarClickedColorFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/fingerprints/SetSeekbarClickedColorFingerprint.kt index 43eb358d57..1ebccca759 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/fingerprints/SetSeekbarClickedColorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/fingerprints/SetSeekbarClickedColorFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.seekbar.bytecode.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object SetSeekbarClickedColorFingerprint : MethodFingerprint( opcodes = listOf(Opcode.CONST_HIGH16), diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/fingerprints/ShortsSeekbarColorFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/fingerprints/ShortsSeekbarColorFingerprint.kt index 738e9e4333..eea70852a6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/fingerprints/ShortsSeekbarColorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/fingerprints/ShortsSeekbarColorFingerprint.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.layout.seekbar.bytecode.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patches.youtube.layout.seekbar.resource.SeekbarColorResourcePatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object ShortsSeekbarColorFingerprint : LiteralValueFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/patch/SeekbarColorBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/patch/SeekbarColorBytecodePatch.kt index 065b894b85..156203606e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/patch/SeekbarColorBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/bytecode/patch/SeekbarColorBytecodePatch.kt @@ -1,12 +1,15 @@ package app.revanced.patches.youtube.layout.seekbar.bytecode.patch import app.revanced.extensions.indexOfFirstConstantInstructionValue -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.data.toMethodWalker import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patches.youtube.layout.seekbar.annotations.SeekbarColorCompatibility @@ -17,8 +20,8 @@ import app.revanced.patches.youtube.layout.seekbar.resource.SeekbarColorResource import app.revanced.patches.youtube.layout.theme.bytecode.patch.LithoColorHookPatch import app.revanced.patches.youtube.layout.theme.bytecode.patch.LithoColorHookPatch.Companion.lithoColorOverrideHook import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @Description("Hide or set a custom seekbar color") @DependsOn([IntegrationsPatch::class, LithoColorHookPatch::class, SeekbarColorResourcePatch::class]) @@ -26,7 +29,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction class SeekbarColorBytecodePatch : BytecodePatch( listOf(PlayerSeekbarColorFingerprint, ShortsSeekbarColorFingerprint, SetSeekbarClickedColorFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { fun MutableMethod.addColorChangeInstructions(resourceId: Long) { var registerIndex = indexOfFirstConstantInstructionValue(resourceId) + 2 var colorRegister = getInstruction<OneRegisterInstruction>(registerIndex).registerA @@ -42,11 +45,11 @@ class SeekbarColorBytecodePatch : BytecodePatch( PlayerSeekbarColorFingerprint.result?.mutableMethod?.apply { addColorChangeInstructions(SeekbarColorResourcePatch.inlineTimeBarColorizedBarPlayedColorDarkId) addColorChangeInstructions(SeekbarColorResourcePatch.inlineTimeBarPlayedNotHighlightedColorId) - } ?: throw PlayerSeekbarColorFingerprint.exception + } ?: return PlayerSeekbarColorFingerprint.toErrorResult() ShortsSeekbarColorFingerprint.result?.mutableMethod?.apply { addColorChangeInstructions(SeekbarColorResourcePatch.reelTimeBarPlayedColorId) - } ?: throw ShortsSeekbarColorFingerprint.exception + } ?: return ShortsSeekbarColorFingerprint.toErrorResult() SetSeekbarClickedColorFingerprint.result?.let { result -> result.mutableMethod.let { @@ -67,9 +70,11 @@ class SeekbarColorBytecodePatch : BytecodePatch( ) } } - } ?: throw SetSeekbarClickedColorFingerprint.exception + } ?: return SetSeekbarClickedColorFingerprint.toErrorResult() lithoColorOverrideHook(INTEGRATIONS_CLASS_DESCRIPTOR, "getLithoColor") + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/resource/SeekbarColorResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/resource/SeekbarColorResourcePatch.kt index 6991daaa4b..c120165657 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/resource/SeekbarColorResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/resource/SeekbarColorResourcePatch.kt @@ -1,8 +1,7 @@ package app.revanced.patches.youtube.layout.seekbar.resource import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.patch.PatchException -import app.revanced.patcher.patch.ResourcePatch +import app.revanced.patcher.patch.* import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch @@ -11,11 +10,11 @@ import org.w3c.dom.Element @DependsOn([SettingsPatch::class, ResourceMappingPatch::class]) class SeekbarColorResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { fun findColorResource(resourceName: String): Long { return ResourceMappingPatch.resourceMappings .find { it.type == "color" && it.name == resourceName }?.id - ?: throw PatchException("Could not find color resource: $resourceName") + ?: throw PatchResultError("Could not find color resource: $resourceName") } reelTimeBarPlayedColorId = @@ -30,7 +29,7 @@ class SeekbarColorResourcePatch : ResourcePatch { val layerList = editor.file.getElementsByTagName("layer-list").item(0) as Element val progressNode = layerList.getElementsByTagName("item").item(1) as Element if (!progressNode.getAttributeNode("android:id").value.endsWith("progress")) { - throw PatchException("Could not find progress bar") + return PatchResultError("Could not find progress bar") } val scaleNode = progressNode.getElementsByTagName("scale").item(0) as Element val shapeNode = scaleNode.getElementsByTagName("shape").item(0) as Element @@ -38,6 +37,8 @@ class SeekbarColorResourcePatch : ResourcePatch { "app.revanced.integrations.patches.theme.ProgressBarDrawable") scaleNode.replaceChild(replacementNode, shapeNode) } + + return PatchResultSuccess() } companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/resource/SeekbarPreferencesPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/resource/SeekbarPreferencesPatch.kt index 84599bf6ec..17a3f168e2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/resource/SeekbarPreferencesPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/seekbar/resource/SeekbarPreferencesPatch.kt @@ -12,9 +12,11 @@ import java.io.Closeable @DependsOn([SettingsPatch::class, ResourceMappingPatch::class]) class SeekbarPreferencesPatch : ResourcePatch, Closeable { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { // Nothing to do here. All work is done in close method. + + return PatchResultSuccess() } override fun close() { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/annotations/SponsorBlockCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/annotations/SponsorBlockCompatibility.kt index 6262c3b174..7eefbbd531 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/annotations/SponsorBlockCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/annotations/SponsorBlockCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.sponsorblock.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class SponsorBlockCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/fingerprints/AppendTimeFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/fingerprints/AppendTimeFingerprint.kt index 18d2497cb9..950c74602b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/fingerprints/AppendTimeFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/fingerprints/AppendTimeFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object AppendTimeFingerprint : MethodFingerprint( "V", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/fingerprints/ControlsOverlayFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/fingerprints/ControlsOverlayFingerprint.kt index 934386bc18..a537a12f25 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/fingerprints/ControlsOverlayFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/fingerprints/ControlsOverlayFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object ControlsOverlayFingerprint : MethodFingerprint( returnType = "V", @@ -19,6 +19,9 @@ object ControlsOverlayFingerprint : MethodFingerprint( Opcode.INVOKE_VIRTUAL, Opcode.MOVE_RESULT_OBJECT, Opcode.CHECK_CAST, - Opcode.NEW_INSTANCE - ) + Opcode.NEW_INSTANCE, + ), + customFingerprint = { methodDef, _ -> + methodDef.definingClass == "Lcom/google/android/apps/youtube/app/player/overlay/YouTubeControlsOverlay;" + } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/fingerprints/RectangleFieldInvalidatorFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/fingerprints/RectangleFieldInvalidatorFingerprint.kt index 623c760f3c..9aa72efba3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/fingerprints/RectangleFieldInvalidatorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/fingerprints/RectangleFieldInvalidatorFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.reference.MethodReference +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.reference.MethodReference object RectangleFieldInvalidatorFingerprint : MethodFingerprint( "V", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt index 88d4489d4e..84450c9b04 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/bytecode/patch/SponsorBlockBytecodePatch.kt @@ -1,20 +1,22 @@ package app.revanced.patches.youtube.layout.sponsorblock.bytecode.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.data.toMethodWalker import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod -import app.revanced.patches.shared.fingerprints.LayoutConstructorFingerprint import app.revanced.patches.shared.fingerprints.SeekbarFingerprint import app.revanced.patches.shared.fingerprints.SeekbarOnDrawFingerprint import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -30,12 +32,12 @@ import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerCon import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch import app.revanced.patches.youtube.video.information.patch.VideoInformationPatch import app.revanced.patches.youtube.video.videoid.patch.VideoIdPatch -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.* -import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c -import com.android.tools.smali.dexlib2.iface.reference.FieldReference -import com.android.tools.smali.dexlib2.iface.reference.MethodReference -import com.android.tools.smali.dexlib2.iface.reference.StringReference +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.* +import org.jf.dexlib2.iface.instruction.formats.Instruction35c +import org.jf.dexlib2.iface.reference.FieldReference +import org.jf.dexlib2.iface.reference.MethodReference +import org.jf.dexlib2.iface.reference.StringReference @Patch @DependsOn( @@ -57,16 +59,23 @@ class SponsorBlockBytecodePatch : BytecodePatch( listOf( SeekbarFingerprint, AppendTimeFingerprint, - LayoutConstructorFingerprint, + ControlsOverlayFingerprint, AutoRepeatParentFingerprint, ) ) { - override fun execute(context: BytecodeContext) { - LayoutConstructorFingerprint.result?.let { - if (!ControlsOverlayFingerprint.resolve(context, it.classDef)) - throw ControlsOverlayFingerprint.exception - } ?: throw LayoutConstructorFingerprint.exception + private companion object { + const val INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR = + "Lapp/revanced/integrations/sponsorblock/SegmentPlaybackController;" + const val INTEGRATIONS_CREATE_SEGMENT_BUTTON_CONTROLLER_CLASS_DESCRIPTOR = + "Lapp/revanced/integrations/sponsorblock/ui/CreateSegmentButtonController;" + const val INTEGRATIONS_VOTING_BUTTON_CONTROLLER_CLASS_DESCRIPTOR = + "Lapp/revanced/integrations/sponsorblock/ui/VotingButtonController;" + const val INTEGRATIONS_SPONSORBLOCK_VIEW_CONTROLLER_CLASS_DESCRIPTOR = + "Lapp/revanced/integrations/sponsorblock/ui/SponsorBlockViewController;" + } + + override fun execute(context: BytecodeContext): PatchResult { /* * Hook the video time methods */ @@ -219,7 +228,7 @@ class SponsorBlockBytecodePatch : BytecodePatch( "invoke-static {v$frameLayoutRegister}, $INTEGRATIONS_SPONSORBLOCK_VIEW_CONTROLLER_CLASS_DESCRIPTOR->initialize(Landroid/view/ViewGroup;)V" ) } - } ?: throw ControlsOverlayFingerprint.exception + } ?: return ControlsOverlayFingerprint.toErrorResult() // get rectangle field name RectangleFieldInvalidatorFingerprint.resolve(context, seekbarSignatureResult.classDef) @@ -252,31 +261,22 @@ class SponsorBlockBytecodePatch : BytecodePatch( ) } } - } ?: throw PatchException("Could not find the method which contains the replaceMeWith* strings") + } ?: return PatchResultError("Could not find the method which contains the replaceMeWith* strings") // The vote and create segment buttons automatically change their visibility when appropriate, // but if buttons are showing when the end of the video is reached then they will not automatically hide. // Add a hook to forcefully hide when the end of the video is reached. - AutoRepeatParentFingerprint.result ?: throw AutoRepeatParentFingerprint.exception + AutoRepeatParentFingerprint.result ?: return AutoRepeatParentFingerprint.toErrorResult() AutoRepeatFingerprint.also { it.resolve(context, AutoRepeatParentFingerprint.result!!.classDef) }.result?.mutableMethod?.addInstruction( 0, "invoke-static {}, $INTEGRATIONS_SPONSORBLOCK_VIEW_CONTROLLER_CLASS_DESCRIPTOR->endOfVideoReached()V" - ) ?: throw AutoRepeatFingerprint.exception + ) ?: return AutoRepeatFingerprint.toErrorResult() // TODO: isSBChannelWhitelisting implementation - } - private companion object { - const val INTEGRATIONS_SEGMENT_PLAYBACK_CONTROLLER_CLASS_DESCRIPTOR = - "Lapp/revanced/integrations/sponsorblock/SegmentPlaybackController;" - const val INTEGRATIONS_CREATE_SEGMENT_BUTTON_CONTROLLER_CLASS_DESCRIPTOR = - "Lapp/revanced/integrations/sponsorblock/ui/CreateSegmentButtonController;" - const val INTEGRATIONS_VOTING_BUTTON_CONTROLLER_CLASS_DESCRIPTOR = - "Lapp/revanced/integrations/sponsorblock/ui/VotingButtonController;" - const val INTEGRATIONS_SPONSORBLOCK_VIEW_CONTROLLER_CLASS_DESCRIPTOR = - "Lapp/revanced/integrations/sponsorblock/ui/SponsorBlockViewController;" + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/resource/patch/SponsorBlockResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/resource/patch/SponsorBlockResourcePatch.kt index 65d8a2deb6..d579bbea68 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/resource/patch/SponsorBlockResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/resource/patch/SponsorBlockResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.layout.sponsorblock.resource.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -15,7 +17,7 @@ import app.revanced.util.resources.ResourceUtils.mergeStrings @DependsOn([SettingsPatch::class, ResourceMappingPatch::class]) class SponsorBlockResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.addPreference( Preference( StringResource("revanced_sponsorblock_settings_title", "SponsorBlock"), @@ -89,5 +91,7 @@ class SponsorBlockResourcePatch : ResourcePatch { break } }.close() // close afterwards + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/annotations/SpoofAppVersionCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/annotations/SpoofAppVersionCompatibility.kt index 41aa7c70ee..04740e6fbb 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/annotations/SpoofAppVersionCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/annotations/SpoofAppVersionCompatibility.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.layout.spoofappversion.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class SpoofAppVersionCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/bytecode/fingerprints/SpoofAppVersionFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/bytecode/fingerprints/SpoofAppVersionFingerprint.kt index 901f34d459..8a5736f128 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/bytecode/fingerprints/SpoofAppVersionFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/bytecode/fingerprints/SpoofAppVersionFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.spoofappversion.bytecode.fingerprint import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object SpoofAppVersionFingerprint : MethodFingerprint( "L", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L"), listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/bytecode/patch/SpoofAppVersionPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/bytecode/patch/SpoofAppVersionPatch.kt index 135676df06..d2fb20c422 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/bytecode/patch/SpoofAppVersionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/bytecode/patch/SpoofAppVersionPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.youtube.layout.spoofappversion.bytecode.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.settings.preference.impl.ArrayResource @@ -16,7 +18,7 @@ import app.revanced.patches.youtube.layout.spoofappversion.annotations.SpoofAppV import app.revanced.patches.youtube.layout.spoofappversion.bytecode.fingerprints.SpoofAppVersionFingerprint import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Patch @DependsOn([IntegrationsPatch::class, SettingsPatch::class]) @@ -28,7 +30,7 @@ class SpoofAppVersionPatch : BytecodePatch( SpoofAppVersionFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_spoof_app_version", @@ -77,7 +79,9 @@ class SpoofAppVersionPatch : BytecodePatch( move-result-object v$buildOverrideNameRegister """ ) - } ?: throw SpoofAppVersionFingerprint.exception + } ?: return SpoofAppVersionFingerprint.toErrorResult() + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/annotations/StartupShortsResetCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/annotations/StartupShortsResetCompatibility.kt index 845d136637..9b2022792f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/annotations/StartupShortsResetCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/annotations/StartupShortsResetCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.startupshortsreset.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class StartupShortsResetCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/fingerprints/UserWasInShortsFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/fingerprints/UserWasInShortsFingerprint.kt index 486087b8fd..a994a26d6e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/fingerprints/UserWasInShortsFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/fingerprints/UserWasInShortsFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.layout.startupshortsreset.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode @FuzzyPatternScanMethod(3) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/patch/DisableShortsOnStartupPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/patch/DisableShortsOnStartupPatch.kt index b4f11b481b..13f3553465 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/patch/DisableShortsOnStartupPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/patch/DisableShortsOnStartupPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.settings.preference.impl.StringResource @@ -24,7 +26,7 @@ class DisableShortsOnStartupPatch : BytecodePatch( UserWasInShortsFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_disable_resuming_shorts_player", @@ -49,5 +51,7 @@ class DisableShortsOnStartupPatch : BytecodePatch( nop """ ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tablet/fingerprints/GetFormFactorFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tablet/fingerprints/GetFormFactorFingerprint.kt deleted file mode 100644 index da57606793..0000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tablet/fingerprints/GetFormFactorFingerprint.kt +++ /dev/null @@ -1,25 +0,0 @@ -package app.revanced.patches.youtube.layout.tablet.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode - -object GetFormFactorFingerprint : MethodFingerprint( - accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC, - returnType = "L", - parameters = listOf("Landroid/content/Context;", "Ljava/util/List;"), - opcodes = listOf( - Opcode.SGET_OBJECT, - Opcode.INVOKE_VIRTUAL, - Opcode.MOVE_RESULT_OBJECT, - Opcode.INVOKE_VIRTUAL, - Opcode.MOVE_RESULT, - Opcode.IF_EQZ, - Opcode.SGET_OBJECT, - Opcode.RETURN_OBJECT, - Opcode.INVOKE_STATIC, - Opcode.MOVE_RESULT_OBJECT, - Opcode.RETURN_OBJECT - ) -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tablet/patch/EnableTabletLayoutPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tablet/patch/EnableTabletLayoutPatch.kt deleted file mode 100644 index 95bbc1c47f..0000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tablet/patch/EnableTabletLayoutPatch.kt +++ /dev/null @@ -1,56 +0,0 @@ -package app.revanced.patches.youtube.layout.tablet.patch - -import app.revanced.extensions.exception -import app.revanced.patcher.annotation.Description -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels -import app.revanced.patcher.extensions.InstructionExtensions.getInstruction -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.annotations.DependsOn -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patcher.util.smali.ExternalLabel -import app.revanced.patches.shared.settings.preference.impl.StringResource -import app.revanced.patches.shared.settings.preference.impl.SwitchPreference -import app.revanced.patches.youtube.layout.tablet.annotations.EnableTabletLayoutCompatibility -import app.revanced.patches.youtube.layout.tablet.fingerprints.GetFormFactorFingerprint -import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch - -@Patch -@DependsOn([IntegrationsPatch::class, SettingsPatch::class]) -@Name("Enable tablet layout") -@Description("Spoofs the device form factor to a tablet which enables the tablet layout.") -@EnableTabletLayoutCompatibility -class EnableTabletLayoutPatch : BytecodePatch(listOf(GetFormFactorFingerprint)) { - override fun execute(context: BytecodeContext) { - SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( - SwitchPreference( - "revanced_tablet_layout", - StringResource("revanced_tablet_layout_enabled_title", "Enable tablet layout"), - StringResource("revanced_tablet_layout_summary_on", "Tablet layout is enabled"), - StringResource("revanced_tablet_layout_summary_off", "Tablet layout is disabled"), - StringResource("revanced_tablet_layout_user_dialog_message", "Community posts do not show up on tablet layouts") - ) - ) - - GetFormFactorFingerprint.result?.let { - it.mutableMethod.apply { - val returnLargeFormFactorIndex = it.scanResult.patternScanResult!!.endIndex - 4 - - addInstructionsWithLabels( - 0, - """ - invoke-static {}, Lapp/revanced/integrations/patches/EnableTabletLayoutPatch;->enableTabletLayout()Z - move-result v0 - if-nez v0, :is_large_form_factor - """, - ExternalLabel( - "is_large_form_factor", - getInstruction(returnLargeFormFactorIndex) - ) - ) - } - } ?: GetFormFactorFingerprint.exception - } -} diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/annotations/TabletMiniPlayerCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/annotations/TabletMiniPlayerCompatibility.kt index 2bc544b04c..4284c94d0f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/annotations/TabletMiniPlayerCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/annotations/TabletMiniPlayerCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.tabletminiplayer.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class TabletMiniPlayerCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerDimensionsCalculatorParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerDimensionsCalculatorParentFingerprint.kt index ad90d3fe87..735c554625 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerDimensionsCalculatorParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerDimensionsCalculatorParentFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object MiniPlayerDimensionsCalculatorParentFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideFingerprint.kt index 73f593506c..f2210f76bc 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideFingerprint.kt @@ -2,11 +2,22 @@ package app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object MiniPlayerOverrideFingerprint : MethodFingerprint( - returnType = "L", - accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, - parameters = listOf("L"), - strings = listOf("appName") + "Z", AccessFlags.STATIC or AccessFlags.PUBLIC, + listOf("Landroid/content/Context;"), + opcodes = listOf( + Opcode.INVOKE_STATIC, + Opcode.MOVE_RESULT, + Opcode.CONST_4, + Opcode.IF_EQ, + Opcode.CONST_4, + Opcode.IF_EQ, + Opcode.CONST_4, // override this value + Opcode.RETURN, + Opcode.CONST_4, // override this value + Opcode.RETURN + ), ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideNoContextFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideNoContextFingerprint.kt index 68d9773e73..aba50b3d4b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideNoContextFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideNoContextFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object MiniPlayerOverrideNoContextFingerprint : MethodFingerprint( "Z", AccessFlags.FINAL or AccessFlags.PRIVATE, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideParentFingerprint.kt new file mode 100644 index 0000000000..df53522353 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerOverrideParentFingerprint.kt @@ -0,0 +1,7 @@ +package app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints + +import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint + +object MiniPlayerOverrideParentFingerprint : MethodFingerprint( + strings = listOf("Unset or unknown Input OneOf case for dynamic input") +) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerResponseModelSizeCheckFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerResponseModelSizeCheckFingerprint.kt index 0cf96c996b..45cede93b2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerResponseModelSizeCheckFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/fingerprints/MiniPlayerResponseModelSizeCheckFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object MiniPlayerResponseModelSizeCheckFingerprint : MethodFingerprint( "L", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/patch/TabletMiniPlayerPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/patch/TabletMiniPlayerPatch.kt index 9e4cfe8dd0..c642800de7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/patch/TabletMiniPlayerPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/patch/TabletMiniPlayerPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.layout.tabletminiplayer.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext @@ -8,21 +8,20 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patches.shared.settings.preference.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.SwitchPreference import app.revanced.patches.youtube.layout.tabletminiplayer.annotations.TabletMiniPlayerCompatibility -import app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints.MiniPlayerDimensionsCalculatorParentFingerprint -import app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints.MiniPlayerOverrideFingerprint -import app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints.MiniPlayerOverrideNoContextFingerprint -import app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints.MiniPlayerResponseModelSizeCheckFingerprint +import app.revanced.patches.youtube.layout.tabletminiplayer.fingerprints.* import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Patch @DependsOn([IntegrationsPatch::class, SettingsPatch::class]) @@ -33,10 +32,10 @@ class TabletMiniPlayerPatch : BytecodePatch( listOf( MiniPlayerDimensionsCalculatorParentFingerprint, MiniPlayerResponseModelSizeCheckFingerprint, - MiniPlayerOverrideFingerprint + MiniPlayerOverrideParentFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( "revanced_tablet_miniplayer", @@ -47,7 +46,7 @@ class TabletMiniPlayerPatch : BytecodePatch( ) // First resolve the fingerprints via the parent fingerprint. - MiniPlayerDimensionsCalculatorParentFingerprint.result ?: throw MiniPlayerDimensionsCalculatorParentFingerprint.exception + MiniPlayerDimensionsCalculatorParentFingerprint.result ?: return MiniPlayerDimensionsCalculatorParentFingerprint.toErrorResult() val miniPlayerClass = MiniPlayerDimensionsCalculatorParentFingerprint.result!!.classDef /* @@ -63,38 +62,40 @@ class TabletMiniPlayerPatch : BytecodePatch( /** same register used to return **/ ) + /* + * Method with context parameter. + */ + MiniPlayerOverrideParentFingerprint.result?.let { + if (!MiniPlayerOverrideFingerprint.resolve(context, it.classDef)) + throw MiniPlayerOverrideFingerprint.toErrorResult() + } ?: return MiniPlayerOverrideParentFingerprint.toErrorResult() + /* * Override every return instruction with the proxy call. */ - MiniPlayerOverrideFingerprint.result?.let { result -> - result.mutableMethod.let { method -> - val appNameStringIndex = result.scanResult.stringsScanResult!!.matches.first().index + 2 - context.toMethodWalker(method).nextMethod(appNameStringIndex, true) - .getMethod() as MutableMethod - }.apply { - implementation!!.let { implementation -> - val returnIndices = implementation.instructions - .withIndex() - .filter { (_, instruction) -> instruction.opcode == Opcode.RETURN } - .map { (index, _) -> index } - - if (returnIndices.isEmpty()) throw PatchException("No return instructions found.") - - // This method clobbers register p0 to return the value, calculate to override. - val returnedRegister = implementation.registerCount - parameters.size - - // Hook the returned register on every return instruction. - returnIndices.forEach { index -> insertOverride(index, returnedRegister) } - } - } + MiniPlayerOverrideFingerprint.result!!.mutableMethod.apply { + implementation!!.let { implementation -> + val returnIndices = implementation.instructions + .withIndex() + .filter { (_, instruction) -> instruction.opcode == Opcode.RETURN } + .map { (index, _) -> index } + + if (returnIndices.isEmpty()) throw PatchResultError("No return instructions found.") - return@let - } ?: throw MiniPlayerOverrideFingerprint.exception + // This method clobbers register p0 to return the value, calculate to override. + val returnedRegister = implementation.registerCount - parameters.size + + // Hook the returned register on every return instruction. + returnIndices.forEach { index -> insertOverride(index, returnedRegister) } + } + } /* * Size check return value override. */ MiniPlayerResponseModelSizeCheckFingerprint.addProxyCall() + + return PatchResultSuccess() } // Helper methods. diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/fingerprints/LithoThemeFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/fingerprints/LithoThemeFingerprint.kt index 9d2d301caa..70d9f9ea64 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/fingerprints/LithoThemeFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/fingerprints/LithoThemeFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.theme.bytecode.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object LithoThemeFingerprint : MethodFingerprint( returnType = "V", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/patch/LithoColorHookPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/patch/LithoColorHookPatch.kt index c253da7892..0bd734f312 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/patch/LithoColorHookPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/patch/LithoColorHookPatch.kt @@ -1,11 +1,13 @@ package app.revanced.patches.youtube.layout.theme.bytecode.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patches.youtube.layout.theme.annotations.ThemeCompatibility import app.revanced.patches.youtube.layout.theme.bytecode.fingerprints.LithoThemeFingerprint @@ -14,12 +16,14 @@ import app.revanced.patches.youtube.layout.theme.bytecode.fingerprints.LithoThem @Description("Adds a hook to set color of Litho components.") @ThemeCompatibility class LithoColorHookPatch : BytecodePatch(listOf(LithoThemeFingerprint)) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { LithoThemeFingerprint.result?.let { insertionIndex = it.scanResult.patternScanResult!!.endIndex - 1 colorRegister = "p1" insertionMethod = it.mutableMethod - } ?: throw LithoThemeFingerprint.exception + } ?: return LithoThemeFingerprint.toErrorResult() + + return PatchResultSuccess() } companion object { private var insertionIndex : Int = -1 diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/patch/ThemeBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/patch/ThemeBytecodePatch.kt index eb2c81c0d9..c12180e232 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/patch/ThemeBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/patch/ThemeBytecodePatch.kt @@ -17,8 +17,10 @@ import app.revanced.patches.youtube.layout.theme.resource.ThemeResourcePatch @ThemeCompatibility class ThemeBytecodePatch : BytecodePatch() { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { LithoColorHookPatch.lithoColorOverrideHook(INTEGRATIONS_CLASS_DESCRIPTOR, "getValue") + + return PatchResultSuccess() } companion object : OptionsContainer() { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/resource/ThemeResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/resource/ThemeResourcePatch.kt index cf96bbdf69..ecdbbb1924 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/resource/ThemeResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/resource/ThemeResourcePatch.kt @@ -1,7 +1,9 @@ package app.revanced.patches.youtube.layout.theme.resource import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -17,7 +19,7 @@ import org.w3c.dom.Element @DependsOn([SettingsPatch::class, ResourceMappingPatch::class, SeekbarPreferencesPatch::class]) class ThemeResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SeekbarPreferencesPatch.addPreferences( SwitchPreference( "revanced_seekbar_custom_color", @@ -83,11 +85,13 @@ class ThemeResourcePatch : ResourcePatch { return@editSplashScreen } } - throw PatchException("Failed to modify launch screen") + return PatchResultError("Failed to modify launch screen") } } } + + return PatchResultSuccess() } private fun addColorResource( diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/CronetURLRequestCallbackOnFailureFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/CronetURLRequestCallbackOnFailureFingerprint.kt deleted file mode 100644 index 4a1cd03cef..0000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/CronetURLRequestCallbackOnFailureFingerprint.kt +++ /dev/null @@ -1,14 +0,0 @@ -package app.revanced.patches.youtube.layout.thumbnails.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags - -object CronetURLRequestCallbackOnFailureFingerprint : MethodFingerprint( - returnType = "V", - accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, - parameters = listOf("Lorg/chromium/net/UrlRequest;", "Lorg/chromium/net/UrlResponseInfo;", "Lorg/chromium/net/CronetException;"), - customFingerprint = { methodDef, _ -> - methodDef.name == "onFailed" - } -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/CronetURLRequestCallbackOnResponseStartedFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/CronetURLRequestCallbackOnResponseStartedFingerprint.kt deleted file mode 100644 index 8786cd6d30..0000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/CronetURLRequestCallbackOnResponseStartedFingerprint.kt +++ /dev/null @@ -1,21 +0,0 @@ -package app.revanced.patches.youtube.layout.thumbnails.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags - -// Acts as a parent fingerprint. -object CronetURLRequestCallbackOnResponseStartedFingerprint : MethodFingerprint( - returnType = "V", - accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, - parameters = listOf("Lorg/chromium/net/UrlRequest;", "Lorg/chromium/net/UrlResponseInfo;"), - strings = listOf( - "Content-Length", - "Content-Type", - "identity", - "application/x-protobuf" - ), - customFingerprint = { methodDef, _ -> - methodDef.name == "onResponseStarted" - } -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/CronetURLRequestCallbackOnSucceededFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/CronetURLRequestCallbackOnSucceededFingerprint.kt deleted file mode 100644 index 335a791163..0000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/CronetURLRequestCallbackOnSucceededFingerprint.kt +++ /dev/null @@ -1,14 +0,0 @@ -package app.revanced.patches.youtube.layout.thumbnails.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags - -object CronetURLRequestCallbackOnSucceededFingerprint : MethodFingerprint( - returnType = "V", - accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, - parameters = listOf("Lorg/chromium/net/UrlRequest;", "Lorg/chromium/net/UrlResponseInfo;"), - customFingerprint = { methodDef, _ -> - methodDef.name == "onSucceeded" - } -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/MessageDigestImageUrlFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/MessageDigestImageUrlFingerprint.kt deleted file mode 100644 index d7d8b780b0..0000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/MessageDigestImageUrlFingerprint.kt +++ /dev/null @@ -1,10 +0,0 @@ -package app.revanced.patches.youtube.layout.thumbnails.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags - -object MessageDigestImageUrlFingerprint : MethodFingerprint( - accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, - parameters = listOf("Ljava/lang/String;", "L") -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/MessageDigestImageUrlParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/MessageDigestImageUrlParentFingerprint.kt deleted file mode 100644 index 461bdb266f..0000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/fingerprints/MessageDigestImageUrlParentFingerprint.kt +++ /dev/null @@ -1,12 +0,0 @@ -package app.revanced.patches.youtube.layout.thumbnails.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags - -object MessageDigestImageUrlParentFingerprint : MethodFingerprint( - accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, - returnType = "Ljava/lang/String;", - parameters = listOf(), - strings = listOf("@#&=*+-_.,:!?()/~'%;\$"), -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/patch/AlternativeThumbnailsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/patch/AlternativeThumbnailsPatch.kt deleted file mode 100644 index b841660112..0000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/patch/AlternativeThumbnailsPatch.kt +++ /dev/null @@ -1,153 +0,0 @@ -package app.revanced.patches.youtube.layout.thumbnails.patch - -import app.revanced.extensions.exception -import app.revanced.patcher.annotation.Description -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.addInstruction -import app.revanced.patcher.extensions.InstructionExtensions.addInstructions -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.annotations.DependsOn -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod -import app.revanced.patches.shared.settings.preference.impl.* -import app.revanced.patches.youtube.layout.thumbnails.annotations.AlternativeThumbnailsCompatibility -import app.revanced.patches.youtube.layout.thumbnails.fingerprints.* -import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch - -@Patch -@DependsOn([IntegrationsPatch::class, SettingsPatch::class]) -@Name("Alternative thumbnails") -@AlternativeThumbnailsCompatibility -@Description("Adds options to replace video thumbnails with still image captures of the video.") -class AlternativeThumbnailsPatch : BytecodePatch( - listOf(MessageDigestImageUrlParentFingerprint, CronetURLRequestCallbackOnResponseStartedFingerprint) -) { - override fun execute(context: BytecodeContext) { - SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( - PreferenceScreen( - "revanced_alt_thumbnails_preference_screen", - StringResource("revanced_alt_thumbnails_preference_screen_title", "Alternative thumbnails"), - listOf( - SwitchPreference( - "revanced_alt_thumbnail", - StringResource("revanced_alt_thumbnail_title", "Enable alternative thumbnails"), - StringResource("revanced_alt_thumbnail_summary_on", "YouTube video stills shown"), - StringResource("revanced_alt_thumbnail_summary_off", "Original YouTube thumbnails shown") - ), - ListPreference( - "revanced_alt_thumbnail_type", - StringResource("revanced_alt_thumbnail_type_title", "Video time to take the still from"), - ArrayResource( - "revanced_alt_thumbnail_type_entries", - listOf( - StringResource("revanced_alt_thumbnail_type_entry_1", "Beginning of video"), - StringResource("revanced_alt_thumbnail_type_entry_2", "Middle of video"), - StringResource("revanced_alt_thumbnail_type_entry_3", "End of video"), - ) - ), - ArrayResource( - "revanced_alt_thumbnail_type_entry_values", - listOf( - StringResource("revanced_alt_thumbnail_type_entry_value_1", "1"), - StringResource("revanced_alt_thumbnail_type_entry_value_2", "2"), - StringResource("revanced_alt_thumbnail_type_entry_value_3", "3"), - ) - ) - ), - SwitchPreference( - "revanced_alt_thumbnail_fast_quality", - StringResource("revanced_alt_thumbnail_fast_quality_title", "Use fast alternative thumbnails"), - StringResource("revanced_alt_thumbnail_fast_quality_summary_on", "Using medium quality stills. Thumbnails will load faster, but live streams, unreleased, or very old videos may show blank thumbnails"), - StringResource("revanced_alt_thumbnail_fast_quality_summary_off", "Using high quality stills") - ), - NonInteractivePreference( - StringResource("revanced_alt_thumbnail_about_title", "About"), - StringResource("revanced_alt_thumbnail_about_summary", "Alternative thumbnails are still images from the beginning/middle/end of each video. No external API is used, as these images are built into YouTube") - ) - ), - StringResource("revanced_alt_thumbnails_preference_screen_summary", "Video thumbnail settings") - ) - ) - - MessageDigestImageUrlParentFingerprint.result - ?: throw MessageDigestImageUrlParentFingerprint.exception - MessageDigestImageUrlFingerprint.resolve(context, MessageDigestImageUrlParentFingerprint.result!!.classDef) - MessageDigestImageUrlFingerprint.result?.apply { - loadImageUrlMethod = mutableMethod - } ?: throw MessageDigestImageUrlFingerprint.exception - addImageUrlHook(INTEGRATIONS_CLASS_DESCRIPTOR, true) - - - CronetURLRequestCallbackOnResponseStartedFingerprint.result - ?: throw CronetURLRequestCallbackOnResponseStartedFingerprint.exception - CronetURLRequestCallbackOnSucceededFingerprint.resolve( - context, - CronetURLRequestCallbackOnResponseStartedFingerprint.result!!.classDef - ) - CronetURLRequestCallbackOnSucceededFingerprint.result?.apply { - loadImageSuccessCallbackMethod = mutableMethod - } ?: throw CronetURLRequestCallbackOnSucceededFingerprint.exception - addImageUrlSuccessCallbackHook(INTEGRATIONS_CLASS_DESCRIPTOR) - - - CronetURLRequestCallbackOnFailureFingerprint.resolve( - context, - CronetURLRequestCallbackOnResponseStartedFingerprint.result!!.classDef - ) - CronetURLRequestCallbackOnFailureFingerprint.result?.apply { - loadImageErrorCallbackMethod = mutableMethod - } ?: throw CronetURLRequestCallbackOnFailureFingerprint.exception - } - - internal companion object { - private const val INTEGRATIONS_CLASS_DESCRIPTOR = - "Lapp/revanced/integrations/patches/AlternativeThumbnailsPatch;" - - private lateinit var loadImageUrlMethod: MutableMethod - private var loadImageUrlIndex = 0 - - private lateinit var loadImageSuccessCallbackMethod: MutableMethod - private var loadImageSuccessCallbackIndex = 0 - - private lateinit var loadImageErrorCallbackMethod: MutableMethod - private var loadImageErrorCallbackIndex = 0 - - /** - * @param highPriority If the hook should be called before all other hooks. - */ - fun addImageUrlHook(targetMethodClass: String, highPriority: Boolean) { - loadImageUrlMethod.addInstructions( - if (highPriority) 0 else loadImageUrlIndex, """ - invoke-static { p1 }, $targetMethodClass->overrideImageURL(Ljava/lang/String;)Ljava/lang/String; - move-result-object p1 - """ - ) - loadImageUrlIndex += 2 - } - - /** - * If a connection completed, which includes normal 200 responses but also includes - * status 404 and other error like http responses. - */ - fun addImageUrlSuccessCallbackHook(targetMethodClass: String) { - loadImageSuccessCallbackMethod.addInstruction( - loadImageSuccessCallbackIndex++, - "invoke-static { p2 }, $targetMethodClass->handleCronetSuccess(Lorg/chromium/net/UrlResponseInfo;)V" - ) - } - - /** - * If a connection outright failed to complete any connection. - */ - fun addImageUrlErrorCallbackHook(targetMethodClass: String) { - loadImageErrorCallbackMethod.addInstruction( - loadImageErrorCallbackIndex++, - "invoke-static { p2, p3 }, $targetMethodClass->handleCronetFailure(Lorg/chromium/net/UrlResponseInfo;Ljava/io/IOException;)V" - ) - } - - } -} diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/annotations/AutoRepeatCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/annotations/AutoRepeatCompatibility.kt index 812c6a414e..b4b62674c7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/annotations/AutoRepeatCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/annotations/AutoRepeatCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.autorepeat.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class AutoRepeatCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/fingerprints/AutoRepeatFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/fingerprints/AutoRepeatFingerprint.kt index 204b3c7c4f..c784ba8a00 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/fingerprints/AutoRepeatFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/fingerprints/AutoRepeatFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.autorepeat.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object AutoRepeatFingerprint : MethodFingerprint( "V", diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/fingerprints/AutoRepeatParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/fingerprints/AutoRepeatParentFingerprint.kt index b08e57915e..81d6b00832 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/fingerprints/AutoRepeatParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/fingerprints/AutoRepeatParentFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.autorepeat.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object AutoRepeatParentFingerprint : MethodFingerprint( "V", diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/patch/AutoRepeatPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/patch/AutoRepeatPatch.kt index dfdacc2464..42c2df571c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/patch/AutoRepeatPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/patch/AutoRepeatPatch.kt @@ -7,7 +7,9 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWith import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.settings.preference.impl.StringResource @@ -28,7 +30,7 @@ class AutoRepeatPatch : BytecodePatch( AutoRepeatParentFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.MISC.addPreferences( SwitchPreference( "revanced_auto_repeat", @@ -40,7 +42,7 @@ class AutoRepeatPatch : BytecodePatch( //Get Result from the ParentFingerprint which is the playMethod we need to get. val parentResult = AutoRepeatParentFingerprint.result - ?: throw PatchException("ParentFingerprint did not resolve.") + ?: return PatchResultError("ParentFingerprint did not resolve.") //this one needs to be called when app/revanced/integrations/patches/AutoRepeatPatch;->shouldAutoRepeat() returns true val playMethod = parentResult.mutableMethod @@ -50,7 +52,7 @@ class AutoRepeatPatch : BytecodePatch( //This is the method we search for val result = AutoRepeatFingerprint.result - ?: throw PatchException("FingerPrint did not resolve.") + ?: return PatchResultError("FingerPrint did not resolve.") val method = result.mutableMethod //Instructions to add to the smali code @@ -65,7 +67,7 @@ class AutoRepeatPatch : BytecodePatch( //Get the implementation so we can do a check for null and get instructions size. val implementation = method.implementation - ?: throw PatchException("No Method Implementation found!") + ?: return PatchResultError("No Method Implementation found!") //Since addInstructions needs an index which starts counting at 0 and size starts counting at 1, //we have to remove 1 to get the latest instruction @@ -78,5 +80,6 @@ class AutoRepeatPatch : BytecodePatch( method.addInstructionsWithLabels(index, instructions) //Everything worked as expected, return Success + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/bottomsheet/hook/fingerprints/CreateBottomSheetFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/bottomsheet/hook/fingerprints/CreateBottomSheetFingerprint.kt index c60cbdc6d9..6a005a36ba 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/bottomsheet/hook/fingerprints/CreateBottomSheetFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/bottomsheet/hook/fingerprints/CreateBottomSheetFingerprint.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.misc.bottomsheet.hook.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patches.youtube.misc.bottomsheet.hook.patch.BottomSheetHookResourcePatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object CreateBottomSheetFingerprint : LiteralValueFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/bottomsheet/hook/patch/BottomSheetHookPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/bottomsheet/hook/patch/BottomSheetHookPatch.kt index 2084360aec..73c27a5bdc 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/bottomsheet/hook/patch/BottomSheetHookPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/bottomsheet/hook/patch/BottomSheetHookPatch.kt @@ -1,20 +1,22 @@ package app.revanced.patches.youtube.misc.bottomsheet.hook.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.youtube.misc.bottomsheet.hook.fingerprints.CreateBottomSheetFingerprint import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @DependsOn([IntegrationsPatch::class, BottomSheetHookResourcePatch::class]) class BottomSheetHookPatch : BytecodePatch( listOf(CreateBottomSheetFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { CreateBottomSheetFingerprint.result?.let { it.mutableMethod.apply { val returnLinearLayoutIndex = implementation!!.instructions.lastIndex @@ -29,7 +31,9 @@ class BottomSheetHookPatch : BytecodePatch( ) } } - } ?: throw CreateBottomSheetFingerprint.exception + } ?: return CreateBottomSheetFingerprint.toErrorResult() + + return PatchResultSuccess() } internal companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/bottomsheet/hook/patch/BottomSheetHookResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/bottomsheet/hook/patch/BottomSheetHookResourcePatch.kt index 14b434d6ae..bfb244df0e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/bottomsheet/hook/patch/BottomSheetHookResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/bottomsheet/hook/patch/BottomSheetHookResourcePatch.kt @@ -1,16 +1,20 @@ package app.revanced.patches.youtube.misc.bottomsheet.hook.patch import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @DependsOn([ResourceMappingPatch::class]) class BottomSheetHookResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { bottomSheetMargins = ResourceMappingPatch.resourceMappings.find { it.name == "bottom_sheet_margins" }?.id - ?: throw PatchException("Could not find resource") + ?: return PatchResultError("Could not find resource") + + return PatchResultSuccess() } internal companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/debugging/patch/DebuggingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/debugging/patch/DebuggingPatch.kt index 1a1e45dd85..8993ae107f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/debugging/patch/DebuggingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/debugging/patch/DebuggingPatch.kt @@ -3,6 +3,8 @@ package app.revanced.patches.youtube.misc.debugging.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch @@ -18,7 +20,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch @Description("Adds debugging options.") @DebuggingCompatibility class DebuggingPatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.MISC.addPreferences( app.revanced.patches.shared.settings.preference.impl.PreferenceScreen( "revanced_debug_preference_screen", @@ -30,15 +32,6 @@ class DebuggingPatch : ResourcePatch { StringResource("revanced_debug_summary_on", "Debug logs are enabled"), StringResource("revanced_debug_summary_off", "Debug logs are disabled") ), - SwitchPreference( - "revanced_debug_protobuffer", - StringResource( - "revanced_debug_protobuffer_title", - "Log protocol buffer" - ), - StringResource("revanced_debug_protobuffer_summary_on", "Debug logs include proto buffer"), - StringResource("revanced_debug_protobuffer_summary_off", "Debug logs do not include proto buffer") - ), SwitchPreference( "revanced_debug_stacktrace", StringResource( @@ -65,5 +58,7 @@ class DebuggingPatch : ResourcePatch { StringResource("revanced_debug_preference_screen_summary", "Enable or disable debugging options") ) ) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/annotation/FixBackToExitGestureCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/annotation/FixBackToExitGestureCompatibility.kt index 22073dc1e3..bce548f112 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/annotation/FixBackToExitGestureCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/annotation/FixBackToExitGestureCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.fix.backtoexitgesture.annotation import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class FixBackToExitGestureCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/OnBackPressedFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/OnBackPressedFingerprint.kt index 424a80cf49..52fee3beb5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/OnBackPressedFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/OnBackPressedFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object OnBackPressedFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/RecyclerViewScrollingFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/RecyclerViewScrollingFingerprint.kt index c44ebe9c3f..73c5faeeb7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/RecyclerViewScrollingFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/RecyclerViewScrollingFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object RecyclerViewScrollingFingerprint : MethodFingerprint( accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/RecyclerViewTopScrollingFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/RecyclerViewTopScrollingFingerprint.kt index a5b2447592..994436544f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/RecyclerViewTopScrollingFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/RecyclerViewTopScrollingFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object RecyclerViewTopScrollingFingerprint : MethodFingerprint( "V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/RecyclerViewTopScrollingParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/RecyclerViewTopScrollingParentFingerprint.kt index ff6804c9f0..b891aa4ae2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/RecyclerViewTopScrollingParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/fingerprints/RecyclerViewTopScrollingParentFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object RecyclerViewTopScrollingParentFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/patch/FixBackToExitGesturePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/patch/FixBackToExitGesturePatch.kt index 19265655ba..152f9853ed 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/patch/FixBackToExitGesturePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/backtoexitgesture/patch/FixBackToExitGesturePatch.kt @@ -1,12 +1,15 @@ package app.revanced.patches.youtube.misc.fix.backtoexitgesture.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.youtube.misc.fix.backtoexitgesture.annotation.FixBackToExitGestureCompatibility import app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints.OnBackPressedFingerprint import app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints.RecyclerViewScrollingFingerprint @@ -22,12 +25,12 @@ class FixBackToExitGesturePatch : BytecodePatch( OnBackPressedFingerprint, ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { RecyclerViewTopScrollingFingerprint.apply { resolve( context, RecyclerViewTopScrollingParentFingerprint.result?.classDef - ?: throw RecyclerViewTopScrollingParentFingerprint.exception + ?: return RecyclerViewTopScrollingParentFingerprint.toErrorResult() ) } @@ -41,7 +44,15 @@ class FixBackToExitGesturePatch : BytecodePatch( OnBackPressedFingerprint to IntegrationsMethod( "p0", "onBackPressed", "Lcom/google/android/apps/youtube/app/watchwhile/WatchWhileActivity;" ) - ).forEach { (fingerprint, target) -> fingerprint.injectCall(target) } + ).forEach { (fingerprint, target) -> + try { + fingerprint.injectCall(target) + } catch (error: PatchResultError) { + return error + } + } + + return PatchResultSuccess() } private companion object { @@ -68,6 +79,6 @@ class FixBackToExitGesturePatch : BytecodePatch( mutableMethod.addInstruction( scanResult.patternScanResult!!.endIndex, targetMethod.toString() ) - } ?: throw this.exception + } ?: throw this.toErrorResult() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/annotations/ClientSpoofCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/annotations/ClientSpoofCompatibility.kt index 476bba5a53..24c49518a6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/annotations/ClientSpoofCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/annotations/ClientSpoofCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.fix.playback.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class ClientSpoofCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/ProtobufParameterBuilderFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/ProtobufParameterBuilderFingerprint.kt index 46568f1f49..3b61b09dde 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/ProtobufParameterBuilderFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/ProtobufParameterBuilderFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.misc.fix.playback.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object ProtobufParameterBuilderFingerprint : MethodFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/ScrubbedPreviewLayoutFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/ScrubbedPreviewLayoutFingerprint.kt index aa3375e38e..0246694ee7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/ScrubbedPreviewLayoutFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/ScrubbedPreviewLayoutFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.misc.fix.playback.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patches.youtube.misc.fix.playback.patch.SpoofSignatureVerificationResourcePatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object ScrubbedPreviewLayoutFingerprint : LiteralValueFingerprint( accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/StoryboardThumbnailFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/StoryboardThumbnailFingerprint.kt index 15466014de..51e824d0d5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/StoryboardThumbnailFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/StoryboardThumbnailFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.misc.fix.playback.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode /** * Resolves using the class found in [StoryboardThumbnailParentFingerprint]. diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/StoryboardThumbnailParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/StoryboardThumbnailParentFingerprint.kt index d9ec11c7df..ae50aae996 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/StoryboardThumbnailParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/StoryboardThumbnailParentFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.fix.playback.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags /** * Here lies code that creates the seekbar thumbnails. diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/UserAgentHeaderBuilderFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/UserAgentHeaderBuilderFingerprint.kt index 127f7a23d0..ab71b605fc 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/UserAgentHeaderBuilderFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/fingerprints/UserAgentHeaderBuilderFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.misc.fix.playback.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object UserAgentHeaderBuilderFingerprint : MethodFingerprint( parameters = listOf("L", "L", "L"), diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/ClientSpoofPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/ClientSpoofPatch.kt index 5d8f76736b..605b2319d1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/ClientSpoofPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/ClientSpoofPatch.kt @@ -1,17 +1,19 @@ package app.revanced.patches.youtube.misc.fix.playback.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.misc.fix.playback.annotations.ClientSpoofCompatibility import app.revanced.patches.youtube.misc.fix.playback.fingerprints.UserAgentHeaderBuilderFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction +import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction @Patch @Name("Client spoof") @@ -21,7 +23,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction class ClientSpoofPatch : BytecodePatch( listOf(UserAgentHeaderBuilderFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { UserAgentHeaderBuilderFingerprint.result?.let { result -> val insertIndex = result.scanResult.patternScanResult!!.endIndex result.mutableMethod.apply { @@ -30,7 +32,9 @@ class ClientSpoofPatch : BytecodePatch( addInstruction(insertIndex, "const-string v$packageNameRegister, \"$ORIGINAL_PACKAGE_NAME\"") } - } ?: throw UserAgentHeaderBuilderFingerprint.exception + } ?: return UserAgentHeaderBuilderFingerprint.toErrorResult() + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/SpoofSignatureVerificationPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/SpoofSignatureVerificationPatch.kt index a7b74c007a..f87c1683b1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/SpoofSignatureVerificationPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/SpoofSignatureVerificationPatch.kt @@ -1,14 +1,17 @@ package app.revanced.patches.youtube.misc.fix.playback.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.data.toMethodWalker import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patches.youtube.misc.fix.playback.fingerprints.ProtobufParameterBuilderFingerprint @@ -17,7 +20,7 @@ import app.revanced.patches.youtube.misc.fix.playback.fingerprints.StoryboardThu import app.revanced.patches.youtube.misc.fix.playback.fingerprints.StoryboardThumbnailParentFingerprint import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.instruction.ReferenceInstruction @Name("Spoof signature verification") @Description("Spoofs the client to prevent playback issues.") @@ -33,7 +36,7 @@ class SpoofSignatureVerificationPatch : BytecodePatch( ScrubbedPreviewLayoutFingerprint, ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // hook parameter ProtobufParameterBuilderFingerprint.result?.let { @@ -52,14 +55,14 @@ class SpoofSignatureVerificationPatch : BytecodePatch( """ ) } - } ?: throw ProtobufParameterBuilderFingerprint.exception + } ?: return ProtobufParameterBuilderFingerprint.toErrorResult() // When signature spoofing is enabled, the seekbar when tapped does not show // the video time, chapter names, or the video thumbnail. // Changing the value returned of this method forces all of these to show up, // except the thumbnails are blank, which is handled with the patch below. - StoryboardThumbnailParentFingerprint.result ?: throw StoryboardThumbnailParentFingerprint.exception + StoryboardThumbnailParentFingerprint.result ?: return StoryboardThumbnailParentFingerprint.toErrorResult() StoryboardThumbnailFingerprint.resolve(context, StoryboardThumbnailParentFingerprint.result!!.classDef) StoryboardThumbnailFingerprint.result?.apply { val endIndex = scanResult.patternScanResult!!.endIndex @@ -81,7 +84,7 @@ class SpoofSignatureVerificationPatch : BytecodePatch( return v0 """ ) - } ?: throw StoryboardThumbnailFingerprint.exception + } ?: return StoryboardThumbnailFingerprint.toErrorResult() // Seekbar thumbnail now show up but are always a blank image. @@ -99,7 +102,9 @@ class SpoofSignatureVerificationPatch : BytecodePatch( """ ) } - } ?: throw ScrubbedPreviewLayoutFingerprint.exception + } ?: return ScrubbedPreviewLayoutFingerprint.toErrorResult() + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/SpoofSignatureVerificationResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/SpoofSignatureVerificationResourcePatch.kt index 56a9f7bea6..b82dcfd956 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/SpoofSignatureVerificationResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/patch/SpoofSignatureVerificationResourcePatch.kt @@ -1,17 +1,20 @@ package app.revanced.patches.youtube.misc.fix.playback.patch import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch import app.revanced.patches.shared.settings.preference.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.SwitchPreference +import app.revanced.patches.youtube.misc.fix.playback.fingerprints.* import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch @DependsOn([SettingsPatch::class, ResourceMappingPatch::class]) class SpoofSignatureVerificationResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.MISC.addPreferences( SwitchPreference( "revanced_spoof_signature_verification", @@ -20,17 +23,19 @@ class SpoofSignatureVerificationResourcePatch : ResourcePatch { "App signature spoofed\\n\\n" + "Side effects include:\\n" + "• Ambient mode may not work\\n" - + "• Downloading videos may not work\\n" - + "• Seekbar thumbnails are always hidden"), - StringResource("revanced_spoof_signature_verification_summary_off", "App signature not spoofed\\n\\nVideo playback may not work"), + + "• Seekbar thumbnails are hidden\\n" + + "• Downloading videos may not work"), + StringResource("revanced_spoof_signature_verification_summary_off", "App signature not spoofed"), StringResource("revanced_spoof_signature_verification_user_dialog_message", - "Turning off this setting will cause video playback issues.") + "Turning off this setting may cause playback issues.") ) ) scrubbedPreviewThumbnailResourceId = ResourceMappingPatch.resourceMappings.single { it.type == "id" && it.name == "thumbnail" }.id + + return PatchResultSuccess() } companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/annotations/AlternativeThumbnailsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/annotations/IntegrationsCompatibility.kt similarity index 53% rename from src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/annotations/AlternativeThumbnailsCompatibility.kt rename to src/main/kotlin/app/revanced/patches/youtube/misc/integrations/annotations/IntegrationsCompatibility.kt index aa26a419b7..9de9f53c36 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/annotations/AlternativeThumbnailsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/annotations/IntegrationsCompatibility.kt @@ -1,8 +1,8 @@ -package app.revanced.patches.youtube.layout.thumbnails.annotations +package app.revanced.patches.youtube.misc.integrations.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) -internal annotation class AlternativeThumbnailsCompatibility +internal annotation class IntegrationsCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/APIPlayerServiceFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/APIPlayerServiceFingerprint.kt index e391444ccf..87607a7707 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/APIPlayerServiceFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/APIPlayerServiceFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.integrations.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags /** * For embedded playback. diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/EmbeddedPlayerControlsOverlayFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/EmbeddedPlayerControlsOverlayFingerprint.kt index aa75270eeb..80e4774604 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/EmbeddedPlayerControlsOverlayFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/EmbeddedPlayerControlsOverlayFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.integrations.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags /** * For embedded playback inside Google Play store (and probably other situations as well). diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/EmbeddedPlayerFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/EmbeddedPlayerFingerprint.kt index 790bc6c8f5..7661564709 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/EmbeddedPlayerFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/EmbeddedPlayerFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.integrations.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags /** * For embedded playback inside the Google app (such as the in app 'discover' tab). diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/RemoteEmbedFragmentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/RemoteEmbedFragmentFingerprint.kt index 5541679462..e719289ffc 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/RemoteEmbedFragmentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/RemoteEmbedFragmentFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.integrations.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags /** * For embedded playback. Likely covers Google Play store and other Google products. diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/RemoteEmbeddedPlayerFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/RemoteEmbeddedPlayerFingerprint.kt index a7ef3632e8..6a16bf2679 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/RemoteEmbeddedPlayerFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/RemoteEmbeddedPlayerFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.integrations.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags /** * For embedded playback inside 3rd party android app (such as 3rd party Reddit apps). diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/StandalonePlayerActivityFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/StandalonePlayerActivityFingerprint.kt index bb99582044..9d2eb4c073 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/StandalonePlayerActivityFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/fingerprints/StandalonePlayerActivityFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.integrations.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags /** * Old API activity to embed YouTube into 3rd party Android apps. diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/patch/IntegrationsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/patch/IntegrationsPatch.kt index 492264e900..e3b5a031c9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/patch/IntegrationsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/patch/IntegrationsPatch.kt @@ -3,9 +3,17 @@ package app.revanced.patches.youtube.misc.integrations.patch import app.revanced.patcher.annotation.Name import app.revanced.patcher.patch.annotations.RequiresIntegrations import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch -import app.revanced.patches.youtube.misc.integrations.fingerprints.* +import app.revanced.patches.youtube.misc.integrations.annotations.IntegrationsCompatibility +import app.revanced.patches.youtube.misc.integrations.fingerprints.EmbeddedPlayerControlsOverlayFingerprint +import app.revanced.patches.youtube.misc.integrations.fingerprints.EmbeddedPlayerFingerprint +import app.revanced.patches.youtube.misc.integrations.fingerprints.ApplicationInitFingerprint +import app.revanced.patches.youtube.misc.integrations.fingerprints.RemoteEmbedFragmentFingerprint +import app.revanced.patches.youtube.misc.integrations.fingerprints.RemoteEmbeddedPlayerFingerprint +import app.revanced.patches.youtube.misc.integrations.fingerprints.APIPlayerServiceFingerprint +import app.revanced.patches.youtube.misc.integrations.fingerprints.StandalonePlayerActivityFingerprint @Name("Integrations") +@IntegrationsCompatibility @RequiresIntegrations class IntegrationsPatch : AbstractIntegrationsPatch( "Lapp/revanced/integrations/utils/ReVancedUtils;", diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/annotations/OpenLinksExternallyCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/annotations/OpenLinksExternallyCompatibility.kt similarity index 65% rename from src/main/kotlin/app/revanced/patches/youtube/misc/links/annotations/OpenLinksExternallyCompatibility.kt rename to src/main/kotlin/app/revanced/patches/youtube/misc/links/open/annotations/OpenLinksExternallyCompatibility.kt index 1dd405c092..233b8ce6af 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/links/annotations/OpenLinksExternallyCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/annotations/OpenLinksExternallyCompatibility.kt @@ -1,8 +1,8 @@ -package app.revanced.patches.youtube.misc.links.annotations +package app.revanced.patches.youtube.misc.links.open.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class OpenLinksExternallyCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/fingerprints/BindSessionServiceFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/fingerprints/BindSessionServiceFingerprint.kt new file mode 100644 index 0000000000..b1d1082792 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/fingerprints/BindSessionServiceFingerprint.kt @@ -0,0 +1,17 @@ +package app.revanced.patches.youtube.misc.links.open.fingerprints + +import app.revanced.patcher.extensions.or +import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode + +object BindSessionServiceFingerprint : MethodFingerprint( + returnType = "L", + accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, + opcodes = listOf( + Opcode.IPUT_OBJECT, + Opcode.NEW_INSTANCE, + Opcode.CONST_STRING + ), + strings = listOf("android.support.customtabs.action.CustomTabsService") +) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/fingerprints/GetCustomTabPackageNameFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/fingerprints/GetCustomTabPackageNameFingerprint.kt new file mode 100644 index 0000000000..78b7955664 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/fingerprints/GetCustomTabPackageNameFingerprint.kt @@ -0,0 +1,18 @@ +package app.revanced.patches.youtube.misc.links.open.fingerprints + +import app.revanced.patcher.extensions.or +import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode + +object GetCustomTabPackageNameFingerprint : MethodFingerprint( + returnType = "L", + accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC, + opcodes = listOf( + Opcode.CHECK_CAST, + Opcode.NEW_INSTANCE, + Opcode.INVOKE_DIRECT, + Opcode.CONST_STRING + ), + strings = listOf("android.support.customtabs.action.CustomTabsService") +) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/fingerprints/InitializeCustomTabSupportFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/fingerprints/InitializeCustomTabSupportFingerprint.kt new file mode 100644 index 0000000000..b9f80a60b5 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/fingerprints/InitializeCustomTabSupportFingerprint.kt @@ -0,0 +1,18 @@ +package app.revanced.patches.youtube.misc.links.open.fingerprints + +import app.revanced.patcher.extensions.or +import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode + +object InitializeCustomTabSupportFingerprint : MethodFingerprint( + returnType = "V", + accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, + opcodes = listOf( + Opcode.CHECK_CAST, + Opcode.NEW_INSTANCE, + Opcode.INVOKE_DIRECT, + Opcode.CONST_STRING + ), + strings = listOf("android.support.customtabs.action.CustomTabsService") +) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/patch/OpenLinksExternallyPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/patch/OpenLinksExternallyPatch.kt new file mode 100644 index 0000000000..bc51991736 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/links/open/patch/OpenLinksExternallyPatch.kt @@ -0,0 +1,63 @@ +package app.revanced.patches.youtube.misc.links.open.patch + +import app.revanced.extensions.toErrorResult +import app.revanced.patcher.annotation.Description +import app.revanced.patcher.annotation.Name +import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.extensions.InstructionExtensions.addInstructions +import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess +import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patches.shared.settings.preference.impl.StringResource +import app.revanced.patches.shared.settings.preference.impl.SwitchPreference +import app.revanced.patches.youtube.misc.links.open.annotations.OpenLinksExternallyCompatibility +import app.revanced.patches.youtube.misc.links.open.fingerprints.BindSessionServiceFingerprint +import app.revanced.patches.youtube.misc.links.open.fingerprints.GetCustomTabPackageNameFingerprint +import app.revanced.patches.youtube.misc.links.open.fingerprints.InitializeCustomTabSupportFingerprint +import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch +import org.jf.dexlib2.iface.instruction.formats.Instruction21c + +@Patch +@Name("Open links externally") +@Description("Open links outside of the app directly in your browser.") +@OpenLinksExternallyCompatibility +class OpenLinksExternallyPatch : BytecodePatch( + listOf( + GetCustomTabPackageNameFingerprint, + BindSessionServiceFingerprint, + InitializeCustomTabSupportFingerprint + ) +) { + override fun execute(context: BytecodeContext): PatchResult { + SettingsPatch.PreferenceScreen.MISC.addPreferences( + SwitchPreference( + "revanced_external_browser", + StringResource("revanced_external_browser_title", "Open links in browser"), + StringResource("revanced_external_browser_summary_on", "Opening links externally"), + StringResource("revanced_external_browser_summary_off", "Opening links in app") + ) + ) + + arrayOf( + GetCustomTabPackageNameFingerprint, + BindSessionServiceFingerprint, + InitializeCustomTabSupportFingerprint + ).forEach { + val result = it.result ?: return it.toErrorResult() + val insertIndex = result.scanResult.patternScanResult!!.endIndex + 1 + with(result.mutableMethod) { + val register = (implementation!!.instructions[insertIndex - 1] as Instruction21c).registerA + addInstructions( + insertIndex, + """ + invoke-static {v$register}, Lapp/revanced/integrations/patches/OpenLinksExternallyPatch;->enableExternalBrowser(Ljava/lang/String;)Ljava/lang/String; + move-result-object v$register + """ + ) + } + } + + return PatchResultSuccess() + } +} \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/patch/OpenLinksExternallyPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/patch/OpenLinksExternallyPatch.kt deleted file mode 100644 index 347b5ba413..0000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/links/patch/OpenLinksExternallyPatch.kt +++ /dev/null @@ -1,63 +0,0 @@ -package app.revanced.patches.youtube.misc.links.patch - -import app.revanced.patcher.annotation.Description -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.addInstructions -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod -import app.revanced.patches.shared.settings.preference.impl.StringResource -import app.revanced.patches.shared.settings.preference.impl.SwitchPreference -import app.revanced.patches.youtube.misc.links.annotations.OpenLinksExternallyCompatibility -import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -import app.revanced.util.patch.AbstractTransformInstructionsPatch -import com.android.tools.smali.dexlib2.iface.ClassDef -import com.android.tools.smali.dexlib2.iface.Method -import com.android.tools.smali.dexlib2.iface.instruction.Instruction -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.reference.StringReference - -@Patch -@Name("Open links externally") -@Description("Open links outside of the app directly in your browser.") -@OpenLinksExternallyCompatibility -class OpenLinksExternallyPatch : AbstractTransformInstructionsPatch<Pair<Int, Int>>( -) { - override fun filterMap( - classDef: ClassDef, method: Method, instruction: Instruction, instructionIndex: Int - ): Pair<Int, Int>? { - if (instruction !is ReferenceInstruction) return null - val reference = instruction.reference as? StringReference ?: return null - - if (reference.string != "android.support.customtabs.action.CustomTabsService") return null - - return instructionIndex to (instruction as OneRegisterInstruction).registerA - } - - override fun transform(mutableMethod: MutableMethod, entry: Pair<Int, Int>) { - val (intentStringIndex, register) = entry - - // Hook the intent string. - mutableMethod.addInstructions( - intentStringIndex + 1, - """ - invoke-static {v$register}, Lapp/revanced/integrations/patches/OpenLinksExternallyPatch;->getIntent(Ljava/lang/String;)Ljava/lang/String; - move-result-object v$register - """ - ) - } - - override fun execute(context: BytecodeContext) { - SettingsPatch.PreferenceScreen.MISC.addPreferences( - SwitchPreference( - "revanced_external_browser", - StringResource("revanced_external_browser_title", "Open links in browser"), - StringResource("revanced_external_browser_summary_on", "Opening links externally"), - StringResource("revanced_external_browser_summary_off", "Opening links in app") - ) - ) - - super.execute(context) - } -} \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ComponentContextParserFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ComponentContextParserFingerprint.kt index 5fa5401dc7..b0fad80b96 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ComponentContextParserFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ComponentContextParserFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.misc.litho.filter.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object ComponentContextParserFingerprint : MethodFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/EmptyComponentBuilderFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/EmptyComponentBuilderFingerprint.kt index 7d29ce2424..7c77b9f96c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/EmptyComponentBuilderFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/EmptyComponentBuilderFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.misc.litho.filter.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object EmptyComponentBuilderFingerprint : MethodFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/LithoFilterFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/LithoFilterFingerprint.kt index 9d1df7cf49..9839efc310 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/LithoFilterFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/LithoFilterFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.litho.filter.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object LithoFilterFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.CONSTRUCTOR, diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ProtobufBufferReferenceFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ProtobufBufferReferenceFingerprint.kt index abe792753f..aeecb9e2a2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ProtobufBufferReferenceFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ProtobufBufferReferenceFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.misc.litho.filter.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object ProtobufBufferReferenceFingerprint : MethodFingerprint( returnType = "V", diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ReadComponentIdentifierFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ReadComponentIdentifierFingerprint.kt index c7f8966c12..b78e48af14 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ReadComponentIdentifierFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ReadComponentIdentifierFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.misc.litho.filter.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object ReadComponentIdentifierFingerprint : MethodFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/patch/LithoFilterPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/patch/LithoFilterPatch.kt index 99b2474e20..6ad8cfffb5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/patch/LithoFilterPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/patch/LithoFilterPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.misc.litho.filter.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction @@ -9,17 +9,23 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWith import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction +import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn +import app.revanced.patcher.util.proxy.mutableTypes.MutableField.Companion.toMutable import app.revanced.patcher.util.smali.ExternalLabel import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.litho.filter.fingerprints.* -import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.Instruction -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction +import org.jf.dexlib2.iface.instruction.Instruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.immutable.ImmutableField import java.io.Closeable @DependsOn([IntegrationsPatch::class]) @@ -35,47 +41,59 @@ class LithoFilterPatch : BytecodePatch( * Additionally, the method contains a reference to the components identifier. * The identifier is used to filter components by their identifier. * - * The protobuf buffer is passed along from a different injection point before the filtering occurs. - * The buffer is a large byte array that represents the component tree. + * In addition to that, a static field is added to the class of this method. (See protobufBufferField). + * This field holds a reference to the protobuf buffer object. + * The field is being set in another method that holds a reference to the protobuf buffer object. + * The object contains a large byte array that represents the component tree. * This byte array is searched for strings that indicate the current component. * * The following pseudo code shows how the patch works: * - * class SomeOtherClass { - * // Called before ComponentContextParser.parseBytesToComponentContext method. - * public void someOtherMethod(ByteBuffer byteBuffer) { - * IntegrationsClass.setProtoBuffer(byteBuffer); // Inserted by this patch. - * ... - * } - * } - * * class ComponentContextParser { + * public static ByteBuffer buffer; // Inserted by this patch. * * public ComponentContext parseBytesToComponentContext(...) { * ... - * if (IntegrationsClass.filter(identifier, pathBuilder)); // Inserted by this patch. + * if (filter(identifier, pathBuilder, buffer)); // Inserted by this patch. * return emptyComponent; * ... * } * } + * + * class SomeOtherClass { + * // Called before ComponentContextParser.parseBytesToComponentContext method. + * public void someOtherMethod(ByteBuffer byteBuffer) { + * ComponentContextParser.buffer = byteBuffer; // Inserted by this patch. + * ... + * } + * } */ - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { ComponentContextParserFingerprint.result?.also { arrayOf( EmptyComponentBuilderFingerprint, ReadComponentIdentifierFingerprint ).forEach { fingerprint -> if (fingerprint.resolve(context, it.mutableMethod, it.mutableClass)) return@forEach - throw fingerprint.exception + return fingerprint.toErrorResult() } }?.let { bytesToComponentContextMethod -> - - // region Pass the buffer into Integrations. - + // region Add a static field that holds a reference to the protobuf buffer object. + val protobufBufferField = ImmutableField( + bytesToComponentContextMethod.mutableClass.type, + "buffer", + "Ljava/nio/ByteBuffer;", + AccessFlags.PUBLIC or AccessFlags.STATIC, + null, + null, + null + ).toMutable() + bytesToComponentContextMethod.mutableClass.staticFields.add(protobufBufferField) + + // Set the field with the reference to the protobuf buffer object. ProtobufBufferReferenceFingerprint.result - ?.mutableMethod?.addInstruction(0, - " invoke-static { p2 }, $INTEGRATIONS_CLASS_DESCRIPTOR->setProtoBuffer(Ljava/nio/ByteBuffer;)V") - ?: throw ProtobufBufferReferenceFingerprint.exception + ?.mutableMethod?.addInstruction(0, "sput-object p2, $protobufBufferField") + ?: return ProtobufBufferReferenceFingerprint.toErrorResult() // endregion @@ -117,13 +135,17 @@ class LithoFilterPatch : BytecodePatch( // region Patch the method. // Insert the instructions that are responsible - // to return an EmptyComponent instead of the original component if the filter method returns true. + // to return an EmptyComponent instead of the original component if the filter method returns false. addInstructionsWithLabels( insertHookIndex, """ + # Register "free1" holds the protobuf buffer object + + sget-object v$free1, $protobufBufferField + # Invoke the filter method. - invoke-static { v$identifierRegister, v$stringBuilderRegister }, $INTEGRATIONS_CLASS_DESCRIPTOR->filter(Ljava/lang/String;Ljava/lang/StringBuilder;)Z + invoke-static { v$stringBuilderRegister, v$identifierRegister, v$free1 }, $FILTER_METHOD_DESCRIPTOR move-result v$free1 if-eqz v$free1, :unfiltered @@ -141,7 +163,7 @@ class LithoFilterPatch : BytecodePatch( } // endregion - } ?: throw ComponentContextParserFingerprint.exception + } ?: return ComponentContextParserFingerprint.toErrorResult() LithoFilterFingerprint.result?.mutableMethod?.apply { removeInstructions(2, 4) // Remove dummy filter. @@ -157,7 +179,9 @@ class LithoFilterPatch : BytecodePatch( """ ) } - } ?: throw LithoFilterFingerprint.exception + } ?: return LithoFilterFingerprint.toErrorResult() + + return PatchResultSuccess() } override fun close() = LithoFilterFingerprint.result!! @@ -173,7 +197,9 @@ class LithoFilterPatch : BytecodePatch( private val Instruction.descriptor get() = (this as ReferenceInstruction).reference.toString() - const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/components/LithoFilterPatch;" + private const val FILTER_METHOD_DESCRIPTOR = + "Lapp/revanced/integrations/patches/components/LithoFilterPatch;" + + "->filter(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/nio/ByteBuffer;)Z" internal lateinit var addFilter: (String) -> Unit private set diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/annotations/MicroGPatchCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/annotations/MicroGPatchCompatibility.kt index 479c201ca6..30383fbf33 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/annotations/MicroGPatchCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/annotations/MicroGPatchCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.microg.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class MicroGPatchCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/GooglePlayUtilityFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/GooglePlayUtilityFingerprint.kt index 5276b8fbe7..ebca7a6ba3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/GooglePlayUtilityFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/GooglePlayUtilityFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.microg.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object GooglePlayUtilityFingerprint : MethodFingerprint( returnType = "I", diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/ServiceCheckFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/ServiceCheckFingerprint.kt index 64083f0f04..8c98f055a6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/ServiceCheckFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/fingerprints/ServiceCheckFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.microg.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object ServiceCheckFingerprint : MethodFingerprint( returnType = "V", diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/bytecode/MicroGBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/bytecode/MicroGBytecodePatch.kt index 59296187a4..0833b12a48 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/bytecode/MicroGBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/bytecode/MicroGBytecodePatch.kt @@ -4,6 +4,8 @@ import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.fingerprints.WatchWhileActivityFingerprint @@ -38,7 +40,7 @@ class MicroGBytecodePatch : BytecodePatch( WatchWhileActivityFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // apply common microG patch MicroGBytecodeHelper.patchBytecode( context, arrayOf( @@ -63,5 +65,7 @@ class MicroGBytecodePatch : BytecodePatch( // inject the notice for MicroG MicroGBytecodeHelper.injectNotice(WatchWhileActivityFingerprint) + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/resource/MicroGResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/resource/MicroGResourcePatch.kt index 0c07e4ab7d..14bb6b6192 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/resource/MicroGResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/resource/MicroGResourcePatch.kt @@ -1,6 +1,8 @@ package app.revanced.patches.youtube.misc.microg.patch.resource import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.settings.preference.impl.Preference @@ -18,7 +20,7 @@ import app.revanced.util.microg.MicroGResourceHelper @DependsOn([SettingsResourcePatch::class]) class MicroGResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.addPreference( Preference( StringResource("microg_settings", "MicroG Settings"), @@ -45,5 +47,7 @@ class MicroGResourcePatch : ResourcePatch { // add strings MicroGResourceHelper.addStrings(context) + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/annotations/MinimizedPlaybackCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/annotations/MinimizedPlaybackCompatibility.kt index 31f431b0ab..782a7709c5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/annotations/MinimizedPlaybackCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/annotations/MinimizedPlaybackCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.minimizedplayback.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class MinimizedPlaybackCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/KidsMinimizedPlaybackPolicyControllerFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/KidsMinimizedPlaybackPolicyControllerFingerprint.kt index 1a24e194a5..9763d18d3f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/KidsMinimizedPlaybackPolicyControllerFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/KidsMinimizedPlaybackPolicyControllerFingerprint.kt @@ -2,33 +2,24 @@ package app.revanced.patches.youtube.misc.minimizedplayback.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.NarrowLiteralInstruction +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object KidsMinimizedPlaybackPolicyControllerFingerprint : MethodFingerprint( returnType = "V", accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, - parameters = listOf("I", "L", "L"), + parameters = listOf("I", "L", "L"), opcodes = listOf( - Opcode.CONST_4, - Opcode.IF_NE, + Opcode.IF_EQZ, Opcode.SGET_OBJECT, Opcode.IF_NE, - Opcode.IGET, Opcode.CONST_4, - Opcode.IF_NE, - Opcode.IGET_OBJECT, - Opcode.SGET_OBJECT, - Opcode.IF_EQ, - Opcode.GOTO, - Opcode.IGET_OBJECT, - Opcode.INVOKE_VIRTUAL, - Opcode.RETURN_VOID + Opcode.IPUT_BOOLEAN, + Opcode.IF_EQZ, + Opcode.IGET, + Opcode.INVOKE_STATIC ), customFingerprint = { methodDef, _ -> - methodDef.implementation!!.instructions.any { - ((it as? NarrowLiteralInstruction)?.narrowLiteral == 5) - } + methodDef.definingClass.endsWith("MinimizedPlaybackPolicyController;") } ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackManagerFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackManagerFingerprint.kt index c72bc2333c..dbb7e1e45d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackManagerFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackManagerFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.misc.minimizedplayback.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object MinimizedPlaybackManagerFingerprint : MethodFingerprint( "Z", diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackSettingsFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackSettingsFingerprint.kt index f428c2be24..a184fe77d5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackSettingsFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackSettingsFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.misc.minimizedplayback.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object MinimizedPlaybackSettingsFingerprint : MethodFingerprint( returnType = "Ljava/lang/String;", diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackSettingsParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackSettingsParentFingerprint.kt index f7d8cf59b6..180547a2e2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackSettingsParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/fingerprints/MinimizedPlaybackSettingsParentFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.minimizedplayback.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags /** * Class fingerprint for [MinimizedPlaybackSettingsFingerprint] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/patch/MinimizedPlaybackPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/patch/MinimizedPlaybackPatch.kt index 7c3cd333f4..d9c8b8ef8e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/patch/MinimizedPlaybackPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/patch/MinimizedPlaybackPatch.kt @@ -1,13 +1,16 @@ package app.revanced.patches.youtube.misc.minimizedplayback.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.data.toMethodWalker import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod @@ -21,8 +24,8 @@ import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.Minimize import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.MinimizedPlaybackSettingsParentFingerprint import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.reference.MethodReference +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.reference.MethodReference @Patch @Name("Minimized playback") @@ -36,7 +39,7 @@ class MinimizedPlaybackPatch : BytecodePatch( KidsMinimizedPlaybackPolicyControllerFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // TODO: remove this empty preference sometime after mid 2023 SettingsPatch.PreferenceScreen.MISC.addPreferences( NonInteractivePreference( @@ -54,10 +57,10 @@ class MinimizedPlaybackPatch : BytecodePatch( return v0 """ ) - } ?: throw MinimizedPlaybackManagerFingerprint.exception + } ?: return MinimizedPlaybackManagerFingerprint.toErrorResult() // Enable minimized playback option in YouTube settings - MinimizedPlaybackSettingsParentFingerprint.result ?: throw MinimizedPlaybackSettingsParentFingerprint.exception + MinimizedPlaybackSettingsParentFingerprint.result ?: return MinimizedPlaybackSettingsParentFingerprint.toErrorResult() MinimizedPlaybackSettingsFingerprint.resolve(context, MinimizedPlaybackSettingsParentFingerprint.result!!.classDef) MinimizedPlaybackSettingsFingerprint.result?.apply { val booleanCalls = method.implementation!!.instructions.withIndex() @@ -75,7 +78,7 @@ class MinimizedPlaybackPatch : BytecodePatch( return v0 """ ) - } ?: throw MinimizedPlaybackSettingsFingerprint.exception + } ?: return MinimizedPlaybackSettingsFingerprint.toErrorResult() // Force allowing background play for videos labeled for kids. // Some regions and YouTube accounts do not require this patch. @@ -84,7 +87,9 @@ class MinimizedPlaybackPatch : BytecodePatch( 0, "return-void" ) - } ?: throw KidsMinimizedPlaybackPolicyControllerFingerprint.exception + } ?: return KidsMinimizedPlaybackPolicyControllerFingerprint.toErrorResult() + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/annotation/PlayerControlsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/annotation/PlayerControlsCompatibility.kt index 6178b01f06..311f48506d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/annotation/PlayerControlsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/annotation/PlayerControlsCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.playercontrols.annotation import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class PlayerControlsCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/bytecode/patch/PlayerControlsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/bytecode/patch/PlayerControlsBytecodePatch.kt index 095a510dec..2658d45024 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/bytecode/patch/PlayerControlsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/bytecode/patch/PlayerControlsBytecodePatch.kt @@ -1,39 +1,32 @@ package app.revanced.patches.youtube.misc.playercontrols.bytecode.patch -import app.revanced.extensions.exception import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn -import app.revanced.patches.shared.fingerprints.LayoutConstructorFingerprint import app.revanced.patches.youtube.misc.playercontrols.annotation.PlayerControlsCompatibility import app.revanced.patches.youtube.misc.playercontrols.fingerprints.BottomControlsInflateFingerprint import app.revanced.patches.youtube.misc.playercontrols.fingerprints.PlayerControlsVisibilityFingerprint import app.revanced.patches.youtube.misc.playercontrols.resource.patch.BottomControlsResourcePatch -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Name("Player controls bytecode patch") @DependsOn([BottomControlsResourcePatch::class]) @Description("Manages the code for the player controls of the YouTube player.") @PlayerControlsCompatibility class PlayerControlsBytecodePatch : BytecodePatch( - listOf( - LayoutConstructorFingerprint, - BottomControlsInflateFingerprint - ) + listOf(PlayerControlsVisibilityFingerprint, BottomControlsInflateFingerprint) ) { - override fun execute(context: BytecodeContext) { - LayoutConstructorFingerprint.result?.let { - if (!PlayerControlsVisibilityFingerprint.resolve(context, it.classDef)) - throw LayoutConstructorFingerprint.exception - } ?: throw LayoutConstructorFingerprint.exception - + override fun execute(context: BytecodeContext): PatchResult { showPlayerControlsFingerprintResult = PlayerControlsVisibilityFingerprint.result!! inflateFingerprintResult = BottomControlsInflateFingerprint.result!! + + return PatchResultSuccess() } internal companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/BottomControlsInflateFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/BottomControlsInflateFingerprint.kt index 6f340c2d4d..63864aa56c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/BottomControlsInflateFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/BottomControlsInflateFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.misc.playercontrols.fingerprints import app.revanced.patcher.extensions.or import app.revanced.util.patch.LiteralValueFingerprint import app.revanced.patches.youtube.misc.playercontrols.resource.patch.BottomControlsResourcePatch -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object BottomControlsInflateFingerprint : LiteralValueFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL or AccessFlags.SYNTHETIC, diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/PlayerControlsVisibilityFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/PlayerControlsVisibilityFingerprint.kt index 1f6951a0be..db64aaaa4a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/PlayerControlsVisibilityFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/fingerprints/PlayerControlsVisibilityFingerprint.kt @@ -2,10 +2,13 @@ package app.revanced.patches.youtube.misc.playercontrols.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object PlayerControlsVisibilityFingerprint : MethodFingerprint( accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL, returnType = "V", - parameters = listOf("Z", "Z") + parameters = listOf("Z", "Z"), + customFingerprint = { methodDef, _ -> + methodDef.definingClass.endsWith("YouTubeControlsOverlay;") + } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/resource/patch/BottomControlsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/resource/patch/BottomControlsResourcePatch.kt index 9d57a11290..0df6883fb5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/resource/patch/BottomControlsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playercontrols/resource/patch/BottomControlsResourcePatch.kt @@ -1,7 +1,9 @@ package app.revanced.patches.youtube.misc.playercontrols.resource.patch -import app.revanced.patcher.util.DomFileEditor +import app.revanced.patcher.data.DomFileEditor import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -9,12 +11,14 @@ import java.io.Closeable @DependsOn([ResourceMappingPatch::class]) class BottomControlsResourcePatch : ResourcePatch, Closeable { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { resourceContext = context targetXmlEditor = context.xmlEditor[TARGET_RESOURCE] bottomUiContainerResourceId = ResourceMappingPatch.resourceMappings .single { it.type == "id" && it.name == "bottom_ui_container_stub" }.id + + return PatchResultSuccess() } companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playeroverlay/annotation/PlayerOverlaysHookCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playeroverlay/annotation/PlayerOverlaysHookCompatibility.kt index b6b4ce0e10..f65f81708d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playeroverlay/annotation/PlayerOverlaysHookCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playeroverlay/annotation/PlayerOverlaysHookCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.playeroverlay.annotation import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class PlayerOverlaysHookCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playeroverlay/patch/PlayerOverlaysHookPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playeroverlay/patch/PlayerOverlaysHookPatch.kt index 406c694e84..f78b879f15 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playeroverlay/patch/PlayerOverlaysHookPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playeroverlay/patch/PlayerOverlaysHookPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.playeroverlay.annotation.PlayerOverlaysHookCompatibility @@ -19,12 +21,13 @@ class PlayerOverlaysHookPatch : BytecodePatch( PlayerOverlaysOnFinishInflateFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // hook YouTubePlayerOverlaysLayout.onFinishInflate() val method = PlayerOverlaysOnFinishInflateFingerprint.result!!.mutableMethod method.addInstruction( method.implementation!!.instructions.size - 2, "invoke-static { p0 }, Lapp/revanced/integrations/patches/PlayerOverlaysHookPatch;->YouTubePlayerOverlaysLayout_onFinishInflateHook(Ljava/lang/Object;)V" ) + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/annotation/PlayerTypeHookCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/annotation/PlayerTypeHookCompatibility.kt index 70d2f8a08a..8630c376b2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/annotation/PlayerTypeHookCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/annotation/PlayerTypeHookCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.misc.playertype.annotation import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class PlayerTypeHookCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/fingerprint/PlayerTypeFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/fingerprint/PlayerTypeFingerprint.kt index dc252f97b8..c6588b82f5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/fingerprint/PlayerTypeFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/fingerprint/PlayerTypeFingerprint.kt @@ -2,16 +2,34 @@ package app.revanced.patches.youtube.misc.playertype.fingerprint import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object PlayerTypeFingerprint : MethodFingerprint( returnType = "V", accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, parameters = listOf("L"), opcodes = listOf( + Opcode.INVOKE_VIRTUAL, + Opcode.IGET_OBJECT, Opcode.IF_NE, + Opcode.RETURN_VOID, + Opcode.IPUT_OBJECT, + Opcode.INVOKE_DIRECT, + Opcode.INVOKE_VIRTUAL, + Opcode.INVOKE_VIRTUAL, + Opcode.INVOKE_VIRTUAL, + Opcode.MOVE_RESULT, + Opcode.IF_EQZ, + Opcode.CONST_4, + Opcode.INVOKE_STATIC, + Opcode.RETURN_VOID, + Opcode.CONST_4, + Opcode.INVOKE_STATIC, + Opcode.INVOKE_VIRTUAL, Opcode.RETURN_VOID ), - customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("/YouTubePlayerOverlaysLayout;") } + customFingerprint = { methodDef, _ -> + methodDef.definingClass.endsWith("YouTubePlayerOverlaysLayout;") + } ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/fingerprint/VideoStateFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/fingerprint/VideoStateFingerprint.kt index 1fb9e7f0ae..259915bcaf 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/fingerprint/VideoStateFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/fingerprint/VideoStateFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.misc.playertype.fingerprint import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object VideoStateFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, @@ -17,5 +17,8 @@ object VideoStateFingerprint : MethodFingerprint( Opcode.IF_EQZ, Opcode.IF_EQZ, Opcode.IGET_OBJECT, // obfuscated parameter field name - ) + ), + customFingerprint = { methodDef, _ -> + methodDef.definingClass.endsWith("YouTubeControlsOverlay;") + } ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/patch/PlayerTypeHookPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/patch/PlayerTypeHookPatch.kt index c64ddfccdc..ddf02cbdff 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/patch/PlayerTypeHookPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/playertype/patch/PlayerTypeHookPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.misc.playertype.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext @@ -8,29 +8,37 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch +import app.revanced.patches.youtube.misc.playertype.annotation.PlayerTypeHookCompatibility import app.revanced.patches.youtube.misc.playertype.fingerprint.PlayerTypeFingerprint import app.revanced.patches.youtube.misc.playertype.fingerprint.VideoStateFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.instruction.ReferenceInstruction @Name("Player type hook") @Description("Hook to get the current player type and video playback state.") +@PlayerTypeHookCompatibility @DependsOn([IntegrationsPatch::class]) class PlayerTypeHookPatch : BytecodePatch( listOf(PlayerTypeFingerprint, VideoStateFingerprint) ) { - override fun execute(context: BytecodeContext) { - PlayerTypeFingerprint.result?.mutableMethod?.addInstruction( - 0, - "invoke-static {p1}, $INTEGRATIONS_CLASS_DESCRIPTOR->setPlayerType(Ljava/lang/Enum;)V" - ) ?: throw PlayerTypeFingerprint.exception + override fun execute(context: BytecodeContext): PatchResult { + + PlayerTypeFingerprint.result?.let { + it.mutableMethod.apply { + addInstruction( + 0, + "invoke-static {p1}, $INTEGRATIONS_CLASS_DESCRIPTOR->setPlayerType(Ljava/lang/Enum;)V" + ) + } + } ?: return PlayerTypeFingerprint.toErrorResult() VideoStateFingerprint.result?.let { it.mutableMethod.apply { val endIndex = it.scanResult.patternScanResult!!.endIndex val videoStateFieldName = getInstruction<ReferenceInstruction>(endIndex).reference - addInstructions( 0, """ @@ -39,7 +47,9 @@ class PlayerTypeHookPatch : BytecodePatch( """ ) } - } ?: throw VideoStateFingerprint.exception + } ?: return VideoStateFingerprint.toErrorResult() + + return PatchResultSuccess() } companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/LicenseActivityFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/LicenseActivityFingerprint.kt index ab6fea8f1d..05dfba24f9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/LicenseActivityFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/LicenseActivityFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.settings.bytecode.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object LicenseActivityFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/SetThemeFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/SetThemeFingerprint.kt index f4e81b8478..77e5485686 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/SetThemeFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/SetThemeFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.misc.settings.bytecode.fingerprints import app.revanced.patcher.extensions.or import app.revanced.util.patch.LiteralValueFingerprint import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsResourcePatch -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object SetThemeFingerprint : LiteralValueFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsPatch.kt index 6f3db49fd7..9bc4f46489 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.misc.settings.bytecode.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext @@ -9,6 +9,8 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.settings.preference.impl.Preference import app.revanced.patches.shared.settings.util.AbstractPreferenceScreen @@ -16,9 +18,9 @@ import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.LicenseActivityFingerprint import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.SetThemeFingerprint import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsResourcePatch -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -import com.android.tools.smali.dexlib2.util.MethodUtil +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.util.MethodUtil import java.io.Closeable @DependsOn([IntegrationsPatch::class, SettingsResourcePatch::class]) @@ -27,7 +29,7 @@ import java.io.Closeable class SettingsPatch : BytecodePatch( listOf(LicenseActivityFingerprint, SetThemeFingerprint) ), Closeable { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // TODO: Remove this when it is only required at one place. fun getSetThemeInstructionString( registers: String = "v0", @@ -55,7 +57,7 @@ class SettingsPatch : BytecodePatch( addInstruction(returnIndex + 1, "return-object v0") } } - } ?: throw SetThemeFingerprint.exception + } ?: return SetThemeFingerprint.toErrorResult() // Modify the license activity and remove all existing layout code. @@ -86,6 +88,8 @@ class SettingsPatch : BytecodePatch( } } + + return PatchResultSuccess() } internal companion object { @@ -119,7 +123,7 @@ class SettingsPatch : BytecodePatch( /** * Preference screens patches should add their settings to. */ - object PreferenceScreen : AbstractPreferenceScreen() { + internal object PreferenceScreen : AbstractPreferenceScreen() { val ADS = Screen("ads", "Ads", "Ad related settings") val INTERACTIONS = Screen("interactions", "Interaction", "Settings related to interactions") val LAYOUT = Screen("layout", "Layout", "Settings related to the layout") diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/resource/patch/SettingsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/resource/patch/SettingsResourcePatch.kt index e2a447c057..3b3683511d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/resource/patch/SettingsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/resource/patch/SettingsResourcePatch.kt @@ -1,8 +1,10 @@ package app.revanced.patches.youtube.misc.settings.resource.patch +import app.revanced.patcher.data.DomFileEditor import app.revanced.patcher.data.ResourceContext +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn -import app.revanced.patcher.util.DomFileEditor import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch import app.revanced.patches.shared.settings.preference.addPreference import app.revanced.patches.shared.settings.preference.impl.* @@ -19,7 +21,7 @@ class SettingsResourcePatch : AbstractSettingsResourcePatch( "revanced_prefs", "settings" ) { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { super.execute(context) // Used for a fingerprint from SettingsPatch. @@ -86,6 +88,8 @@ class SettingsResourcePatch : AbstractSettingsResourcePatch( ) context.mergeStrings("settings/host/values/strings.xml") + + return PatchResultSuccess() } diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/zoomhaptics/patch/ZoomHapticsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/zoomhaptics/patch/ZoomHapticsPatch.kt index ad801b4378..719aa0013e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/zoomhaptics/patch/ZoomHapticsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/zoomhaptics/patch/ZoomHapticsPatch.kt @@ -6,6 +6,8 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.smali.ExternalLabel @@ -23,7 +25,7 @@ import app.revanced.patches.youtube.misc.zoomhaptics.fingerprints.ZoomHapticsFin class ZoomHapticsPatch : BytecodePatch( listOf(ZoomHapticsFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.MISC.addPreferences( SwitchPreference( "revanced_disable_zoom_haptics", @@ -45,5 +47,7 @@ class ZoomHapticsPatch : BytecodePatch( """, ExternalLabel("vibrate", zoomHapticsFingerprintMethod.getInstruction(0)) ) + + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/annotations/HDRBrightnessCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/annotations/HDRBrightnessCompatibility.kt index 7d104ee5cb..85bb22dcfc 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/annotations/HDRBrightnessCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/annotations/HDRBrightnessCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.video.hdrbrightness.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class HDRBrightnessCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/fingerprints/HDRBrightnessFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/fingerprints/HDRBrightnessFingerprint.kt index 80db39acf7..0db80f8807 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/fingerprints/HDRBrightnessFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/fingerprints/HDRBrightnessFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.video.hdrbrightness.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object HDRBrightnessFingerprint : MethodFingerprint( "V", diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/patch/HDRBrightnessPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/patch/HDRBrightnessPatch.kt index be339f03ac..69de869687 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/patch/HDRBrightnessPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/patch/HDRBrightnessPatch.kt @@ -5,6 +5,8 @@ import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.settings.preference.impl.StringResource @@ -13,9 +15,9 @@ import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch import app.revanced.patches.youtube.video.hdrbrightness.annotations.HDRBrightnessCompatibility import app.revanced.patches.youtube.video.hdrbrightness.fingerprints.HDRBrightnessFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction -import com.android.tools.smali.dexlib2.iface.reference.FieldReference +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction +import org.jf.dexlib2.iface.reference.FieldReference @Patch @Name("HDR auto brightness") @@ -25,7 +27,7 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference class HDRBrightnessPatch : BytecodePatch( listOf(HDRBrightnessFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.VIDEO.addPreferences( SwitchPreference( "revanced_hdr_auto_brightness", @@ -53,5 +55,7 @@ class HDRBrightnessPatch : BytecodePatch( """ ) } + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/information/annotation/VideoInformationCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/video/information/annotation/VideoInformationCompatibility.kt index 46cc4a5e02..1b52f4df0a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/information/annotation/VideoInformationCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/information/annotation/VideoInformationCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.video.information.annotation import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class VideoInformationCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/OnPlaybackSpeedItemClickFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/OnPlaybackSpeedItemClickFingerprint.kt index cdb5fd1727..81de6a392f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/OnPlaybackSpeedItemClickFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/OnPlaybackSpeedItemClickFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.video.information.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object OnPlaybackSpeedItemClickFingerprint : MethodFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/PlayerControllerSetTimeReferenceFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/PlayerControllerSetTimeReferenceFingerprint.kt index 578bb6a282..628421a01d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/PlayerControllerSetTimeReferenceFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/PlayerControllerSetTimeReferenceFingerprint.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.video.information.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object PlayerControllerSetTimeReferenceFingerprint : MethodFingerprint( opcodes = listOf(Opcode.INVOKE_DIRECT_RANGE, Opcode.IGET_OBJECT), diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/VideoLengthFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/VideoLengthFingerprint.kt index 6dbeef1918..89d4d16c6e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/VideoLengthFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/information/fingerprints/VideoLengthFingerprint.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.video.information.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode object VideoLengthFingerprint : MethodFingerprint( opcodes = listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/information/patch/VideoInformationPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/information/patch/VideoInformationPatch.kt index ea744ef5b3..3b3a3dcae9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/information/patch/VideoInformationPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/information/patch/VideoInformationPatch.kt @@ -1,15 +1,18 @@ package app.revanced.patches.youtube.video.information.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.data.toMethodWalker import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable @@ -18,16 +21,16 @@ import app.revanced.patches.youtube.video.information.annotation.VideoInformatio import app.revanced.patches.youtube.video.information.fingerprints.* import app.revanced.patches.youtube.video.speed.remember.patch.RememberPlaybackSpeedPatch import app.revanced.patches.youtube.video.videoid.patch.VideoIdPatch -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.builder.BuilderInstruction -import com.android.tools.smali.dexlib2.builder.MutableMethodImplementation -import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.immutable.ImmutableMethod -import com.android.tools.smali.dexlib2.immutable.ImmutableMethodParameter -import com.android.tools.smali.dexlib2.util.MethodUtil +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.builder.BuilderInstruction +import org.jf.dexlib2.builder.MutableMethodImplementation +import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.immutable.ImmutableMethod +import org.jf.dexlib2.immutable.ImmutableMethodParameter +import org.jf.dexlib2.util.MethodUtil @Name("Video information") @Description("Hooks YouTube to get information about the current playing video.") @@ -41,7 +44,7 @@ class VideoInformationPatch : BytecodePatch( OnPlaybackSpeedItemClickFingerprint, ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { with(PlayerInitFingerprint.result!!) { playerInitMethod = mutableClass.methods.first { MethodUtil.isConstructor(it) } @@ -133,9 +136,11 @@ class VideoInformationPatch : BytecodePatch( getReference(speedSelectionMethodInstructions, 1, Opcode.IGET) setPlaybackSpeedMethodReference = getReference(speedSelectionMethodInstructions, 2, Opcode.IGET) - } ?: throw OnPlaybackSpeedItemClickFingerprint.exception + } ?: return OnPlaybackSpeedItemClickFingerprint.toErrorResult() userSelectedPlaybackSpeedHook(INTEGRATIONS_CLASS_DESCRIPTOR, "userSelectedPlaybackSpeed") + + return PatchResultSuccess() } companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/quality/annotations/RememberVideoQualityCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/annotations/RememberVideoQualityCompatibility.kt index 96834b575d..deb0185e90 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/quality/annotations/RememberVideoQualityCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/annotations/RememberVideoQualityCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.video.quality.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class RememberVideoQualityCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/NewVideoQualityChangedFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/NewVideoQualityChangedFingerprint.kt index c37910da70..f1dcf0a5bb 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/NewVideoQualityChangedFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/NewVideoQualityChangedFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.video.quality.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object NewVideoQualityChangedFingerprint : MethodFingerprint( returnType = "L", diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/SetQualityByIndexMethodClassFieldReferenceFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/SetQualityByIndexMethodClassFieldReferenceFingerprint.kt index aa76503fa9..a4707a492a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/SetQualityByIndexMethodClassFieldReferenceFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/SetQualityByIndexMethodClassFieldReferenceFingerprint.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.video.quality.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode /** * Resolves with the class found in [VideoQualitySetterFingerprint]. diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/VideoQualitySetterFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/VideoQualitySetterFingerprint.kt index 01dc3cf62f..ab95b0b5bd 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/VideoQualitySetterFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/VideoQualitySetterFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.video.quality.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object VideoQualitySetterFingerprint : MethodFingerprint( "V", diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/quality/patch/RememberVideoQualityPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/patch/RememberVideoQualityPatch.kt index a90246bd74..6cf2e89790 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/quality/patch/RememberVideoQualityPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/patch/RememberVideoQualityPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.video.quality.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext @@ -9,7 +9,9 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.settings.preference.impl.ArrayResource @@ -24,9 +26,9 @@ import app.revanced.patches.youtube.video.quality.fingerprints.NewVideoQualityCh import app.revanced.patches.youtube.video.quality.fingerprints.SetQualityByIndexMethodClassFieldReferenceFingerprint import app.revanced.patches.youtube.video.quality.fingerprints.VideoQualityItemOnClickParentFingerprint import app.revanced.patches.youtube.video.quality.fingerprints.VideoQualitySetterFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction -import com.android.tools.smali.dexlib2.iface.reference.FieldReference +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction +import org.jf.dexlib2.iface.reference.FieldReference @Patch @DependsOn([IntegrationsPatch::class, VideoInformationPatch::class, SettingsPatch::class]) @@ -40,7 +42,7 @@ class RememberVideoQualityPatch : BytecodePatch( NewVideoQualityChangedFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // This is bloated as each value has it's own String key/value // ideally the entries would be raw values (and not a key to a String resource) val entries = listOf( @@ -117,7 +119,7 @@ class RememberVideoQualityPatch : BytecodePatch( // Inject a call to set the remembered quality once a video loads. VideoQualitySetterFingerprint.result?.also { if (!SetQualityByIndexMethodClassFieldReferenceFingerprint.resolve(context, it.classDef)) - throw PatchException("Could not resolve fingerprint to find setQualityByIndex method") + return PatchResultError("Could not resolve fingerprint to find setQualityByIndex method") }?.let { // This instruction refers to the field with the type that contains the setQualityByIndex method. val instructions = SetQualityByIndexMethodClassFieldReferenceFingerprint.result!! @@ -137,7 +139,7 @@ class RememberVideoQualityPatch : BytecodePatch( // Get the name of the setQualityByIndex method. val setQualityByIndexMethod = setQualityByIndexMethodClass.methods .find { method -> method.parameterTypes.first() == "I" } - ?: throw PatchException("Could not find setQualityByIndex method") + ?: return PatchResultError("Could not find setQualityByIndex method") it.mutableMethod.addInstructions( 0, @@ -158,7 +160,7 @@ class RememberVideoQualityPatch : BytecodePatch( move-result p2 """, ) - } ?: throw VideoQualitySetterFingerprint.exception + } ?: return VideoQualitySetterFingerprint.toErrorResult() // Inject a call to remember the selected quality. @@ -172,8 +174,8 @@ class RememberVideoQualityPatch : BytecodePatch( 0, "invoke-static {p$listItemIndexParameter}, $INTEGRATIONS_CLASS_DESCRIPTOR->userChangedQuality(I)V" ) - } ?: throw PatchException("Failed to find onItemClick method") - } ?: throw VideoQualityItemOnClickParentFingerprint.exception + } ?: return PatchResultError("Failed to find onItemClick method") + } ?: return VideoQualityItemOnClickParentFingerprint.toErrorResult() // Remember video quality if not using old layout menu. @@ -187,8 +189,10 @@ class RememberVideoQualityPatch : BytecodePatch( "invoke-static {v$qualityRegister}, $INTEGRATIONS_CLASS_DESCRIPTOR->userChangedQualityInNewFlyout(I)V" ) } - } ?: throw NewVideoQualityChangedFingerprint.exception + } ?: return NewVideoQualityChangedFingerprint.toErrorResult() + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeed.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeed.kt index 895e43fa82..5eb3a30a78 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeed.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeed.kt @@ -4,6 +4,8 @@ import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.video.speed.custom.patch.CustomPlaybackSpeedPatch @@ -15,6 +17,7 @@ import app.revanced.patches.youtube.video.speed.remember.patch.RememberPlaybackS @DependsOn([CustomPlaybackSpeedPatch::class, RememberPlaybackSpeedPatch::class]) @PlaybackSpeedCompatibility class PlaybackSpeed : BytecodePatch() { - override fun execute(context: BytecodeContext) { // All patches this patch depends on succeed. + override fun execute(context: BytecodeContext): PatchResult { + return PatchResultSuccess() // All patches this patch depends on succeed. } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedCompatibility.kt index 6a91ac7b85..2181dc9187 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.video.speed import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class PlaybackSpeedCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/SpeedArrayGeneratorFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/SpeedArrayGeneratorFingerprint.kt index 734ef993e0..ba9982988d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/SpeedArrayGeneratorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/SpeedArrayGeneratorFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.video.speed.custom.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object SpeedArrayGeneratorFingerprint : MethodFingerprint( returnType = "[L", diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/SpeedLimiterFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/SpeedLimiterFingerprint.kt index 8e615f8544..30c315de82 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/SpeedLimiterFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/fingerprints/SpeedLimiterFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtube.video.speed.custom.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object SpeedLimiterFingerprint : MethodFingerprint( "V", diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/patch/CustomPlaybackSpeedPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/patch/CustomPlaybackSpeedPatch.kt index befcebc3b5..f3c08a83af 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/patch/CustomPlaybackSpeedPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/custom/patch/CustomPlaybackSpeedPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.video.speed.custom.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext @@ -11,24 +11,24 @@ import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.util.proxy.mutableTypes.MutableField.Companion.toMutable -import app.revanced.patches.shared.settings.preference.impl.InputType -import app.revanced.patches.shared.settings.preference.impl.StringResource -import app.revanced.patches.shared.settings.preference.impl.TextPreference +import app.revanced.patches.shared.settings.preference.impl.* import app.revanced.patches.youtube.misc.bottomsheet.hook.patch.BottomSheetHookPatch import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch import app.revanced.patches.youtube.video.speed.custom.fingerprints.* -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.iface.instruction.NarrowLiteralInstruction -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -import com.android.tools.smali.dexlib2.iface.reference.FieldReference -import com.android.tools.smali.dexlib2.iface.reference.MethodReference -import com.android.tools.smali.dexlib2.immutable.ImmutableField +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.reference.FieldReference +import org.jf.dexlib2.iface.reference.MethodReference +import org.jf.dexlib2.immutable.ImmutableField @Name("Custom playback speed") @Description("Adds custom playback speed options.") @@ -42,7 +42,7 @@ class CustomPlaybackSpeedPatch : BytecodePatch( ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.VIDEO.addPreferences( TextPreference( key = "revanced_custom_playback_speeds", @@ -64,7 +64,7 @@ class CustomPlaybackSpeedPatch : BytecodePatch( val sizeCallIndex = arrayGenMethodImpl.instructions .indexOfFirst { ((it as? ReferenceInstruction)?.reference as? MethodReference)?.name == "size" } - if (sizeCallIndex == -1) throw PatchException("Couldn't find call to size()") + if (sizeCallIndex == -1) return PatchResultError("Couldn't find call to size()") val sizeCallResultRegister = (arrayGenMethodImpl.instructions.elementAt(sizeCallIndex + 1) as OneRegisterInstruction).registerA @@ -156,7 +156,7 @@ class CustomPlaybackSpeedPatch : BytecodePatch( // This is later called on the field INSTANCE. val showOldPlaybackSpeedMenuMethod = ShowOldPlaybackSpeedMenuFingerprint.also { if (!it.resolve(context, result.classDef)) - throw ShowOldPlaybackSpeedMenuFingerprint.exception + throw ShowOldPlaybackSpeedMenuFingerprint.toErrorResult() }.result!!.method.toString() // Insert the call to the "showOldPlaybackSpeedMenu" method on the field INSTANCE. @@ -171,10 +171,12 @@ class CustomPlaybackSpeedPatch : BytecodePatch( invoke-virtual { v0 }, $showOldPlaybackSpeedMenuMethod """ ) - } ?: throw ShowOldPlaybackSpeedMenuIntegrationsFingerprint.exception - } ?: throw GetOldPlaybackSpeedsFingerprint.exception + } ?: return ShowOldPlaybackSpeedMenuIntegrationsFingerprint.toErrorResult() + } ?: return GetOldPlaybackSpeedsFingerprint.toErrorResult() // endregion + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/speed/remember/patch/RememberPlaybackSpeedPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/remember/patch/RememberPlaybackSpeedPatch.kt index 5b274d461c..620e743994 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/speed/remember/patch/RememberPlaybackSpeedPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/remember/patch/RememberPlaybackSpeedPatch.kt @@ -1,12 +1,14 @@ package app.revanced.patches.youtube.video.speed.remember.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.util.smali.ExternalLabel import app.revanced.patches.shared.settings.preference.impl.ArrayResource @@ -18,7 +20,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch import app.revanced.patches.youtube.video.information.patch.VideoInformationPatch import app.revanced.patches.youtube.video.speed.custom.patch.CustomPlaybackSpeedPatch import app.revanced.patches.youtube.video.speed.remember.fingerprint.InitializePlaybackSpeedValuesFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction +import org.jf.dexlib2.iface.instruction.ReferenceInstruction @Name("Remember playback speed") @Description("Adds the ability to remember the playback speed you chose in the playback speed flyout.") @@ -28,7 +30,7 @@ class RememberPlaybackSpeedPatch : BytecodePatch( InitializePlaybackSpeedValuesFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.VIDEO.addPreferences( SwitchPreference( "revanced_remember_playback_speed_last_selected", @@ -103,7 +105,9 @@ class RememberPlaybackSpeedPatch : BytecodePatch( """.trimIndent(), ExternalLabel("do_not_override", mutableMethod.getInstruction(0)) ) - } ?: throw InitializePlaybackSpeedValuesFingerprint.exception + } ?: return InitializePlaybackSpeedValuesFingerprint.toErrorResult() + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoid/annotation/VideoIdCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/annotation/VideoIdCompatibility.kt index b26c05ef04..a5fa69c6fc 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoid/annotation/VideoIdCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/annotation/VideoIdCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.video.videoid.annotation import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class VideoIdCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoid/fingerprint/VideoIdFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/fingerprint/VideoIdFingerprint.kt index dcb8df5cb4..3f4a0e2371 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoid/fingerprint/VideoIdFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/fingerprint/VideoIdFingerprint.kt @@ -2,15 +2,14 @@ package app.revanced.patches.youtube.video.videoid.fingerprint import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object VideoIdFingerprint : MethodFingerprint( returnType = "V", accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, parameters = listOf("L"), opcodes = listOf( - Opcode.MOVE_RESULT_OBJECT, Opcode.IF_EQZ, Opcode.INVOKE_VIRTUAL, Opcode.MOVE_RESULT_OBJECT, @@ -24,5 +23,8 @@ object VideoIdFingerprint : MethodFingerprint( Opcode.MOVE_RESULT_OBJECT, Opcode.INVOKE_INTERFACE, Opcode.MOVE_RESULT_OBJECT - ) + ), + customFingerprint = { methodDef, _ -> + methodDef.definingClass.endsWith("SubtitlesOverlayPresenter;") + } ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoid/fingerprint/VideoIdFingerprintBackgroundPlay.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/fingerprint/VideoIdFingerprintBackgroundPlay.kt index 23de434cf7..6f7da47b4a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoid/fingerprint/VideoIdFingerprintBackgroundPlay.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/fingerprint/VideoIdFingerprintBackgroundPlay.kt @@ -2,28 +2,15 @@ package app.revanced.patches.youtube.video.videoid.fingerprint import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object VideoIdFingerprintBackgroundPlay : MethodFingerprint( returnType = "V", accessFlags = AccessFlags.DECLARED_SYNCHRONIZED or AccessFlags.FINAL or AccessFlags.PUBLIC, parameters = listOf("L"), - opcodes = listOf( - Opcode.MONITOR_EXIT, - Opcode.RETURN_VOID, - Opcode.INVOKE_VIRTUAL, - Opcode.MOVE_RESULT_OBJECT, - Opcode.NEW_ARRAY, - Opcode.SGET_OBJECT, - Opcode.APUT_OBJECT, - Opcode.INVOKE_VIRTUAL, - Opcode.MOVE_RESULT, - Opcode.IF_EQZ, - Opcode.INVOKE_VIRTUAL, - Opcode.MOVE_RESULT_OBJECT, - Opcode.IF_EQZ, - Opcode.INVOKE_INTERFACE, - Opcode.MOVE_RESULT_OBJECT, - ), + opcodes = listOf(Opcode.INVOKE_INTERFACE), + customFingerprint = { methodDef, _ -> + methodDef.definingClass.endsWith("PlaybackLifecycleMonitor;") + } ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoid/patch/VideoIdPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/patch/VideoIdPatch.kt index adf5a6153d..8f7b190243 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoid/patch/VideoIdPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoid/patch/VideoIdPatch.kt @@ -1,20 +1,21 @@ package app.revanced.patches.youtube.video.videoid.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.video.videoid.annotation.VideoIdCompatibility import app.revanced.patches.youtube.video.videoid.fingerprint.VideoIdFingerprint import app.revanced.patches.youtube.video.videoid.fingerprint.VideoIdFingerprintBackgroundPlay -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Name("Video id hook") @Description("Hooks to detect when the video id changes") @@ -23,34 +24,30 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction class VideoIdPatch : BytecodePatch( listOf(VideoIdFingerprint, VideoIdFingerprintBackgroundPlay) ) { - override fun execute(context: BytecodeContext) { - /** - * Supplies the method and register index of the video id register. - * - * @param consumer Consumer that receives the method, insert index and video id register index. - */ - fun MethodFingerprint.setFields(consumer: (MutableMethod, Int, Int) -> Unit) = result?.let { result -> - val videoIdRegisterIndex = result.scanResult.patternScanResult!!.endIndex - - result.mutableMethod.let { - val videoIdRegister = it.getInstruction<OneRegisterInstruction>(videoIdRegisterIndex).registerA - val insertIndex = videoIdRegisterIndex + 1 - consumer(it, insertIndex, videoIdRegister) + override fun execute(context: BytecodeContext): PatchResult { + VideoIdFingerprint.result?.let { result -> + val videoIdRegisterInstructionIndex = result.scanResult.patternScanResult!!.endIndex + result.mutableMethod.also { + insertMethod = it + }.apply { + videoIdRegister = getInstruction<OneRegisterInstruction>(videoIdRegisterInstructionIndex).registerA + insertIndex = videoIdRegisterInstructionIndex + 1 } - } ?: throw VideoIdFingerprint.exception + } ?: return VideoIdFingerprint.toErrorResult() + + VideoIdFingerprintBackgroundPlay.result?.let { result -> + val endIndex = result.scanResult.patternScanResult!!.endIndex - VideoIdFingerprint.setFields { method, insertIndex, videoIdRegister -> - insertMethod = method - VideoIdPatch.insertIndex = insertIndex - VideoIdPatch.videoIdRegister = videoIdRegister - } + result.mutableMethod.also { + backgroundPlaybackMethod = it + }.apply { + backgroundPlaybackVideoIdRegister = getInstruction<OneRegisterInstruction>(endIndex + 1).registerA + backgroundPlaybackInsertIndex = endIndex + 2 + } + } ?: return VideoIdFingerprintBackgroundPlay.toErrorResult() - VideoIdFingerprintBackgroundPlay.setFields { method, insertIndex, videoIdRegister -> - backgroundPlaybackMethod = method - backgroundPlaybackInsertIndex = insertIndex - backgroundPlaybackVideoIdRegister = videoIdRegister - } + return PatchResultSuccess() } companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/annotations/OldVideoQualityMenuCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/annotations/OldVideoQualityMenuCompatibility.kt index 85c8948825..5fe280f941 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/annotations/OldVideoQualityMenuCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/annotations/OldVideoQualityMenuCompatibility.kt @@ -3,6 +3,6 @@ package app.revanced.patches.youtube.video.videoqualitymenu.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package -@Compatibility([Package("com.google.android.youtube", arrayOf("18.20.39", "18.23.35", "18.29.38", "18.32.39"))]) +@Compatibility([Package("com.google.android.youtube", arrayOf("18.20.39", "18.23.35"))]) @Target(AnnotationTarget.CLASS) internal annotation class OldVideoQualityMenuCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/fingerprints/VideoQualityMenuViewInflateFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/fingerprints/VideoQualityMenuViewInflateFingerprint.kt index 989aa0deb2..4e2424a33e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/fingerprints/VideoQualityMenuViewInflateFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/fingerprints/VideoQualityMenuViewInflateFingerprint.kt @@ -3,8 +3,8 @@ package app.revanced.patches.youtube.video.videoqualitymenu.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patches.youtube.video.videoqualitymenu.patch.OldVideoQualityMenuResourcePatch import app.revanced.util.patch.LiteralValueFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object VideoQualityMenuViewInflateFingerprint : LiteralValueFingerprint( accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/patch/OldVideoQualityMenuPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/patch/OldVideoQualityMenuPatch.kt index e10cca26fe..ed50f07d24 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/patch/OldVideoQualityMenuPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/patch/OldVideoQualityMenuPatch.kt @@ -6,6 +6,8 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.misc.bottomsheet.hook.patch.BottomSheetHookPatch @@ -13,7 +15,7 @@ import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch import app.revanced.patches.youtube.video.videoqualitymenu.annotations.OldVideoQualityMenuCompatibility import app.revanced.patches.youtube.video.videoqualitymenu.fingerprints.VideoQualityMenuViewInflateFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Patch @DependsOn([ @@ -28,7 +30,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction class OldVideoQualityMenuPatch : BytecodePatch( listOf(VideoQualityMenuViewInflateFingerprint) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // region Patch for the old type of the video quality menu. VideoQualityMenuViewInflateFingerprint.result?.let { @@ -55,6 +57,8 @@ class OldVideoQualityMenuPatch : BytecodePatch( LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR) // endregion + + return PatchResultSuccess() } private companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/patch/OldVideoQualityMenuResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/patch/OldVideoQualityMenuResourcePatch.kt index 5c21965d06..c74137a22e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/patch/OldVideoQualityMenuResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/patch/OldVideoQualityMenuResourcePatch.kt @@ -1,7 +1,9 @@ package app.revanced.patches.youtube.video.videoqualitymenu.patch import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultError +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch @@ -11,7 +13,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch @DependsOn([SettingsPatch::class, ResourceMappingPatch::class]) class OldVideoQualityMenuResourcePatch : ResourcePatch { - override fun execute(context: ResourceContext) { + override fun execute(context: ResourceContext): PatchResult { SettingsPatch.PreferenceScreen.VIDEO.addPreferences( SwitchPreference( "revanced_show_old_video_quality_menu", @@ -22,10 +24,12 @@ class OldVideoQualityMenuResourcePatch : ResourcePatch { ) fun findResource(name: String) = ResourceMappingPatch.resourceMappings.find { it.name == name }?.id - ?: throw PatchException("Could not find resource") + ?: throw PatchResultError("Could not find resource") // Used for the old type of the video quality menu. videoQualityBottomSheetListFragmentTitle = findResource("video_quality_bottom_sheet_list_fragment_title") + + return PatchResultSuccess() } internal companion object { diff --git a/src/main/kotlin/app/revanced/patches/youtubevanced/ad/general/fingerprints/ContainsAdFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtubevanced/ad/general/fingerprints/ContainsAdFingerprint.kt index 1ed40c6add..3d77a14474 100644 --- a/src/main/kotlin/app/revanced/patches/youtubevanced/ad/general/fingerprints/ContainsAdFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtubevanced/ad/general/fingerprints/ContainsAdFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.youtubevanced.ad.general.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object ContainsAdFingerprint:MethodFingerprint( returnType = "Z", diff --git a/src/main/kotlin/app/revanced/patches/youtubevanced/ad/general/patch/HideAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtubevanced/ad/general/patch/HideAdsPatch.kt index bf96a84493..439a44a2f7 100644 --- a/src/main/kotlin/app/revanced/patches/youtubevanced/ad/general/patch/HideAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtubevanced/ad/general/patch/HideAdsPatch.kt @@ -1,18 +1,20 @@ package app.revanced.patches.youtubevanced.ad.general.patch -import app.revanced.extensions.exception +import app.revanced.extensions.toErrorResult import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.shared.misc.fix.verticalscroll.patch.VerticalScrollPatch import app.revanced.patches.youtubevanced.ad.general.annotations.HideAdsCompatibility import app.revanced.patches.youtubevanced.ad.general.fingerprints.ContainsAdFingerprint -import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c +import org.jf.dexlib2.iface.instruction.formats.Instruction21c @Patch @Name("Hide ads") @@ -24,7 +26,7 @@ class HideAdsPatch : BytecodePatch( ContainsAdFingerprint ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { ContainsAdFingerprint.result?.let { result -> result.mutableMethod.apply { val insertIndex = result.scanResult.patternScanResult!!.endIndex + 1 @@ -54,6 +56,8 @@ class HideAdsPatch : BytecodePatch( ) } } - } ?: throw ContainsAdFingerprint.exception + } ?: return ContainsAdFingerprint.toErrorResult() + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/patches/yuka/misc/unlockpremium/fingerprints/IsPremiumFingerprint.kt b/src/main/kotlin/app/revanced/patches/yuka/misc/unlockpremium/fingerprints/IsPremiumFingerprint.kt index 06b4a3770c..4835c40483 100644 --- a/src/main/kotlin/app/revanced/patches/yuka/misc/unlockpremium/fingerprints/IsPremiumFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/yuka/misc/unlockpremium/fingerprints/IsPremiumFingerprint.kt @@ -2,8 +2,8 @@ package app.revanced.patches.yuka.misc.unlockpremium.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.AccessFlags +import org.jf.dexlib2.Opcode object IsPremiumFingerprint : MethodFingerprint( returnType = "Z", diff --git a/src/main/kotlin/app/revanced/patches/yuka/misc/unlockpremium/fingerprints/YukaUserConstructorFingerprint.kt b/src/main/kotlin/app/revanced/patches/yuka/misc/unlockpremium/fingerprints/YukaUserConstructorFingerprint.kt index 5d9d2237b2..67aba37200 100644 --- a/src/main/kotlin/app/revanced/patches/yuka/misc/unlockpremium/fingerprints/YukaUserConstructorFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/yuka/misc/unlockpremium/fingerprints/YukaUserConstructorFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.patches.yuka.misc.unlockpremium.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.AccessFlags +import org.jf.dexlib2.AccessFlags object YukaUserConstructorFingerprint : MethodFingerprint( returnType = "V", diff --git a/src/main/kotlin/app/revanced/patches/yuka/misc/unlockpremium/patch/UnlockPremiunPatch.kt b/src/main/kotlin/app/revanced/patches/yuka/misc/unlockpremium/patch/UnlockPremiunPatch.kt index 3c5aaf45d4..e409dd081e 100644 --- a/src/main/kotlin/app/revanced/patches/yuka/misc/unlockpremium/patch/UnlockPremiunPatch.kt +++ b/src/main/kotlin/app/revanced/patches/yuka/misc/unlockpremium/patch/UnlockPremiunPatch.kt @@ -6,6 +6,8 @@ import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.yuka.misc.unlockpremium.annotations.UnlockPremiumCompatibility import app.revanced.patches.yuka.misc.unlockpremium.fingerprints.IsPremiumFingerprint @@ -21,7 +23,7 @@ class UnlockPremiunPatch : BytecodePatch( ) ) { - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { IsPremiumFingerprint.resolve(context,YukaUserConstructorFingerprint.result!!.classDef) val method = IsPremiumFingerprint.result!!.mutableMethod method.addInstructions( @@ -31,6 +33,7 @@ class UnlockPremiunPatch : BytecodePatch( return v0 """ ) + return PatchResultSuccess() } } \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/util/microg/MicroGBytecodeHelper.kt b/src/main/kotlin/app/revanced/util/microg/MicroGBytecodeHelper.kt index d6d1bb9e04..ccc57627be 100644 --- a/src/main/kotlin/app/revanced/util/microg/MicroGBytecodeHelper.kt +++ b/src/main/kotlin/app/revanced/util/microg/MicroGBytecodeHelper.kt @@ -1,22 +1,22 @@ package app.revanced.util.microg -import app.revanced.extensions.exception import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint +import app.revanced.patcher.patch.PatchResultError import app.revanced.patcher.util.proxy.mutableTypes.MutableClass import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.util.microg.Constants.ACTIONS import app.revanced.util.microg.Constants.AUTHORITIES import app.revanced.util.microg.Constants.MICROG_VENDOR import app.revanced.util.microg.Constants.PERMISSIONS -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction21c -import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c -import com.android.tools.smali.dexlib2.iface.reference.StringReference -import com.android.tools.smali.dexlib2.immutable.reference.ImmutableStringReference +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.builder.instruction.BuilderInstruction21c +import org.jf.dexlib2.iface.instruction.formats.Instruction21c +import org.jf.dexlib2.iface.reference.StringReference +import org.jf.dexlib2.immutable.reference.ImmutableStringReference /** * Helper class for applying bytecode patches needed for the microg-support patches. @@ -219,25 +219,25 @@ internal object MicroGBytecodeHelper { */ private fun List<MethodFingerprint>.returnEarly() { this.forEach { fingerprint -> - fingerprint.result?.let { result -> - val stringInstructions = when (result.method.returnType.first()) { - 'L' -> """ + if (fingerprint.result == null) throw PatchResultError(fingerprint.toString()) + val result = fingerprint.result!! + val stringInstructions = when (result.method.returnType.first()) { + 'L' -> """ const/4 v0, 0x0 return-object v0 """ - 'V' -> "return-void" - 'I' -> """ + 'V' -> "return-void" + 'I' -> """ const/4 v0, 0x0 return v0 """ - else -> throw Exception("This case should never happen.") - } - result.mutableMethod.addInstructions( - 0, stringInstructions - ) - } ?: throw fingerprint.exception + else -> throw Exception("This case should never happen.") + } + result.mutableMethod.addInstructions( + 0, stringInstructions + ) } } } diff --git a/src/main/kotlin/app/revanced/util/patch/AbstractTransformInstructionsPatch.kt b/src/main/kotlin/app/revanced/util/patch/AbstractTransformInstructionsPatch.kt index 54123cb3b1..a8354c6bd3 100644 --- a/src/main/kotlin/app/revanced/util/patch/AbstractTransformInstructionsPatch.kt +++ b/src/main/kotlin/app/revanced/util/patch/AbstractTransformInstructionsPatch.kt @@ -3,12 +3,14 @@ package app.revanced.util.patch import app.revanced.extensions.findMutableMethodOf import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod -import com.android.tools.smali.dexlib2.iface.ClassDef -import com.android.tools.smali.dexlib2.iface.Method -import com.android.tools.smali.dexlib2.iface.instruction.Instruction +import org.jf.dexlib2.iface.ClassDef +import org.jf.dexlib2.iface.Method +import org.jf.dexlib2.iface.instruction.Instruction -abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() { +internal abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() { abstract fun filterMap( classDef: ClassDef, @@ -26,7 +28,7 @@ abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() { } } - override fun execute(context: BytecodeContext) { + override fun execute(context: BytecodeContext): PatchResult { // Find all methods to patch buildMap { context.classes.forEach { classDef -> @@ -60,5 +62,7 @@ abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() { } } } + + return PatchResultSuccess() } } diff --git a/src/main/kotlin/app/revanced/util/patch/LiteralValueFingerprint.kt b/src/main/kotlin/app/revanced/util/patch/LiteralValueFingerprint.kt index 86c3b98e52..ec977e062b 100644 --- a/src/main/kotlin/app/revanced/util/patch/LiteralValueFingerprint.kt +++ b/src/main/kotlin/app/revanced/util/patch/LiteralValueFingerprint.kt @@ -2,7 +2,7 @@ package app.revanced.util.patch import app.revanced.extensions.containsConstantInstructionValue import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import com.android.tools.smali.dexlib2.Opcode +import org.jf.dexlib2.Opcode abstract class LiteralValueFingerprint( returnType: String? = null, diff --git a/src/main/kotlin/app/revanced/util/patch/MethodCall.kt b/src/main/kotlin/app/revanced/util/patch/MethodCall.kt index 48a38ad07e..9bd1bd447c 100644 --- a/src/main/kotlin/app/revanced/util/patch/MethodCall.kt +++ b/src/main/kotlin/app/revanced/util/patch/MethodCall.kt @@ -2,15 +2,15 @@ package app.revanced.util.patch import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.ClassDef -import com.android.tools.smali.dexlib2.iface.instruction.Instruction -import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c -import com.android.tools.smali.dexlib2.iface.reference.MethodReference +import org.jf.dexlib2.Opcode +import org.jf.dexlib2.iface.ClassDef +import org.jf.dexlib2.iface.instruction.Instruction +import org.jf.dexlib2.iface.instruction.formats.Instruction35c +import org.jf.dexlib2.iface.reference.MethodReference -typealias Instruction35cInfo = Triple<IMethodCall, Instruction35c, Int> +internal typealias Instruction35cInfo = Triple<IMethodCall, Instruction35c, Int> -interface IMethodCall { +internal interface IMethodCall { val definedClassName: String val methodName: String val methodParams: Array<String> @@ -62,14 +62,14 @@ interface IMethodCall { } } -inline fun <reified E> fromMethodReference(methodReference: MethodReference) +internal inline fun <reified E> fromMethodReference(methodReference: MethodReference) where E : Enum<E>, E : IMethodCall = enumValues<E>().firstOrNull { search -> search.definedClassName == methodReference.definingClass && search.methodName == methodReference.name && methodReference.parameterTypes.toTypedArray().contentEquals(search.methodParams) } -inline fun <reified E> filterMapInstruction35c( +internal inline fun <reified E> filterMapInstruction35c( integrationsClassDescriptorPrefix: String, classDef: ClassDef, instruction: Instruction, diff --git a/src/main/kotlin/app/revanced/util/resources/ResourceUtils.kt b/src/main/kotlin/app/revanced/util/resources/ResourceUtils.kt index 0cb67a06ff..be6a774866 100644 --- a/src/main/kotlin/app/revanced/util/resources/ResourceUtils.kt +++ b/src/main/kotlin/app/revanced/util/resources/ResourceUtils.kt @@ -1,22 +1,20 @@ package app.revanced.util.resources +import app.revanced.patcher.data.DomFileEditor import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.util.DomFileEditor import app.revanced.patches.shared.settings.preference.impl.StringResource import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch import org.w3c.dom.Node import java.nio.file.Files import java.nio.file.StandardCopyOption -@Suppress("MemberVisibilityCanBePrivate") -object ResourceUtils { +internal object ResourceUtils { /** * Merge strings. This manages [StringResource]s automatically. - * * @param host The hosting xml resource. Needs to be a valid strings.xml resource. */ - fun ResourceContext.mergeStrings(host: String) { + internal fun ResourceContext.mergeStrings(host: String) { this.iterateXmlNodeChildren(host, "resources") { // TODO: figure out why this is needed if (!it.hasAttributes()) return@iterateXmlNodeChildren @@ -33,11 +31,10 @@ object ResourceUtils { /** * Copy resources from the current class loader to the resource directory. - * * @param sourceResourceDirectory The source resource directory name. * @param resources The resources to copy. */ - fun ResourceContext.copyResources(sourceResourceDirectory: String, vararg resources: ResourceGroup) { + internal fun ResourceContext.copyResources(sourceResourceDirectory: String, vararg resources: ResourceGroup) { val classLoader = ResourceUtils.javaClass.classLoader val targetResourceDirectory = this["res"] @@ -57,7 +54,7 @@ object ResourceUtils { * @param resourceDirectoryName The name of the directory of the resource. * @param resources A list of resource names. */ - class ResourceGroup(val resourceDirectoryName: String, vararg val resources: String) + internal class ResourceGroup(val resourceDirectoryName: String, vararg val resources: String) /** * Iterate through the children of a node by its tag. @@ -65,7 +62,7 @@ object ResourceUtils { * @param targetTag The target xml node. * @param callback The callback to call when iterating over the nodes. */ - fun ResourceContext.iterateXmlNodeChildren( + internal fun ResourceContext.iterateXmlNodeChildren( resource: String, targetTag: String, callback: (node: Node) -> Unit
shields
https://github.com/badges/shields
6ef8d3869a67566e6c0d32d1a900aa3f90b52b3c
dependabot[bot]
2023-08-11 20:02:28
chore(deps-dev): bump eslint-plugin-jsdoc from 46.4.5 to 46.4.6 (#9457)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 46.4.5 to 46.4.6. - [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases) - [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc) - [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v46.4.5...v46.4.6) ---
chore(deps-dev): bump eslint-plugin-jsdoc from 46.4.5 to 46.4.6 (#9457) Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 46.4.5 to 46.4.6. - [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases) - [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc) - [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v46.4.5...v46.4.6) --- updated-dependencies: - dependency-name: eslint-plugin-jsdoc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
diff --git a/package-lock.json b/package-lock.json index 5078691f2ec39..b7111cc4adfd5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -83,7 +83,7 @@ "eslint-plugin-cypress": "^2.14.0", "eslint-plugin-icedfrisby": "^0.1.0", "eslint-plugin-import": "^2.28.0", - "eslint-plugin-jsdoc": "^46.4.5", + "eslint-plugin-jsdoc": "^46.4.6", "eslint-plugin-mocha": "^10.1.0", "eslint-plugin-no-extension-in-require": "^0.2.0", "eslint-plugin-node": "^11.1.0", @@ -3297,12 +3297,12 @@ } }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.39.4", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.39.4.tgz", - "integrity": "sha512-Jvw915fjqQct445+yron7Dufix9A+m9j1fCJYlCo1FWlRvTxa3pjJelxdSTdaLWcTwRU6vbL+NYjO4YuNIS5Qg==", + "version": "0.40.1", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.40.1.tgz", + "integrity": "sha512-YORCdZSusAlBrFpZ77pJjc5r1bQs5caPWtAu+WWmiSo+8XaUzseapVrfAtiRFbQWnrBxxLLEwF6f6ZG/UgCQCg==", "dev": true, "dependencies": { - "comment-parser": "1.3.1", + "comment-parser": "1.4.0", "esquery": "^1.5.0", "jsdoc-type-pratt-parser": "~4.0.0" }, @@ -8149,9 +8149,9 @@ } }, "node_modules/comment-parser": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.1.tgz", - "integrity": "sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.0.tgz", + "integrity": "sha512-QLyTNiZ2KDOibvFPlZ6ZngVsZ/0gYnE6uTXi5aoDg8ed3AkJAz4sEje3Y8a29hQ1s6A99MZXe47fLAXQ1rTqaw==", "dev": true, "engines": { "node": ">= 12.0.0" @@ -11499,14 +11499,14 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "46.4.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.4.5.tgz", - "integrity": "sha512-HjTuxqDYplAQFu29F3MHFCDDBgeqOxPXI6TyBhL0u2rr4XntJ0z3C9PmJvpjFscKdHwkZDN/0l1QCG0QwyRi4g==", + "version": "46.4.6", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.4.6.tgz", + "integrity": "sha512-z4SWYnJfOqftZI+b3RM9AtWL1vF/sLWE/LlO9yOKDof9yN2+n3zOdOJTGX/pRE/xnPsooOLG2Rq6e4d+XW3lNw==", "dev": true, "dependencies": { - "@es-joy/jsdoccomment": "~0.39.4", + "@es-joy/jsdoccomment": "~0.40.1", "are-docs-informative": "^0.0.2", - "comment-parser": "1.3.1", + "comment-parser": "1.4.0", "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", "esquery": "^1.5.0", diff --git a/package.json b/package.json index ef4bedaac3e2e..aa92c65cac678 100644 --- a/package.json +++ b/package.json @@ -170,7 +170,7 @@ "eslint-plugin-cypress": "^2.14.0", "eslint-plugin-icedfrisby": "^0.1.0", "eslint-plugin-import": "^2.28.0", - "eslint-plugin-jsdoc": "^46.4.5", + "eslint-plugin-jsdoc": "^46.4.6", "eslint-plugin-mocha": "^10.1.0", "eslint-plugin-no-extension-in-require": "^0.2.0", "eslint-plugin-node": "^11.1.0",
node
https://github.com/nodejs/node
78913393fa67fdae7a3a87ccf82093b814edcaf8
Sam Roberts
2019-03-10 05:19:01
test: rewrite ocsp test to run in parallel
Run tests in parallel and use common.mustCall() and mustNotCall() instead of process.exit() to ensure test assertions are run.
test: rewrite ocsp test to run in parallel Run tests in parallel and use common.mustCall() and mustNotCall() instead of process.exit() to ensure test assertions are run. PR-URL: https://github.com/nodejs/node/pull/26460 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
diff --git a/test/parallel/test-tls-ocsp-callback.js b/test/parallel/test-tls-ocsp-callback.js index 2670fefd3dcf72..d374ebdf63fb2c 100644 --- a/test/parallel/test-tls-ocsp-callback.js +++ b/test/parallel/test-tls-ocsp-callback.js @@ -36,21 +36,20 @@ const assert = require('assert'); const SSL_OP_NO_TICKET = require('crypto').constants.SSL_OP_NO_TICKET; const pfx = fixtures.readKey('agent1.pfx'); +const key = fixtures.readKey('agent1-key.pem'); +const cert = fixtures.readKey('agent1-cert.pem'); +const ca = fixtures.readKey('ca1-cert.pem'); function test(testOptions, cb) { - - const key = fixtures.readKey('agent1-key.pem'); - const cert = fixtures.readKey('agent1-cert.pem'); - const ca = fixtures.readKey('ca1-cert.pem'); const options = { key, cert, ca: [ca] }; - let requestCount = 0; - let clientSecure = 0; - let ocspCount = 0; - let ocspResponse; + const requestCount = testOptions.response ? 0 : 1; + + if (!testOptions.ocsp) + assert.strictEqual(testOptions.response, undefined); if (testOptions.pfx) { delete options.key; @@ -59,7 +58,7 @@ function test(testOptions, cb) { options.passphrase = testOptions.passphrase; } - const server = tls.createServer(options, function(cleartext) { + const server = tls.createServer(options, common.mustCall((cleartext) => { cleartext.on('error', function(er) { // We're ok with getting ECONNRESET in this test, but it's // timing-dependent, and thus unreliable. Any other errors @@ -67,74 +66,48 @@ function test(testOptions, cb) { if (er.code !== 'ECONNRESET') throw er; }); - ++requestCount; cleartext.end(); - }); - server.on('OCSPRequest', function(cert, issuer, callback) { - ++ocspCount; - assert.ok(Buffer.isBuffer(cert)); - assert.ok(Buffer.isBuffer(issuer)); - - // Just to check that async really works there - setTimeout(function() { - callback(null, - testOptions.response ? Buffer.from(testOptions.response) : null); - }, 100); - }); + }, requestCount)); + + if (!testOptions.ocsp) + server.on('OCSPRequest', common.mustNotCall()); + else + server.on('OCSPRequest', common.mustCall((cert, issuer, callback) => { + assert.ok(Buffer.isBuffer(cert)); + assert.ok(Buffer.isBuffer(issuer)); + + // Callback a little later to ensure that async really works. + return setTimeout(callback, 100, null, testOptions.response ? + Buffer.from(testOptions.response) : null); + })); + server.listen(0, function() { const client = tls.connect({ port: this.address().port, - requestOCSP: testOptions.ocsp !== false, - secureOptions: testOptions.ocsp === false ? - SSL_OP_NO_TICKET : 0, + requestOCSP: testOptions.ocsp, + secureOptions: testOptions.ocsp ? 0 : SSL_OP_NO_TICKET, rejectUnauthorized: false - }, function() { - clientSecure++; - }); - client.on('OCSPResponse', function(resp) { - ocspResponse = resp; - if (resp) + }, common.mustCall(() => { }, requestCount)); + + client.on('OCSPResponse', common.mustCall((resp) => { + if (testOptions.response) { + assert.strictEqual(resp.toString(), testOptions.response); client.destroy(); - }); - client.on('close', function() { - server.close(cb); - }); - }); + } else { + assert.strictEqual(resp, null); + } + }, testOptions.ocsp === false ? 0 : 1)); - process.on('exit', function() { - if (testOptions.ocsp === false) { - assert.strictEqual(requestCount, clientSecure); - assert.strictEqual(requestCount, 1); - return; - } - - if (testOptions.response) { - assert.strictEqual(ocspResponse.toString(), testOptions.response); - } else { - assert.strictEqual(ocspResponse, null); - } - assert.strictEqual(requestCount, testOptions.response ? 0 : 1); - assert.strictEqual(clientSecure, requestCount); - assert.strictEqual(ocspCount, 1); + client.on('close', common.mustCall(() => { + server.close(cb); + })); }); } -const tests = [ - { response: false }, - { response: 'hello world' }, - { ocsp: false } -]; +test({ ocsp: true, response: false }); +test({ ocsp: true, response: 'hello world' }); +test({ ocsp: false }); if (!common.hasFipsCrypto) { - tests.push({ pfx: pfx, passphrase: 'sample', response: 'hello pfx' }); + test({ ocsp: true, response: 'hello pfx', pfx: pfx, passphrase: 'sample' }); } - -function runTests(i) { - if (i === tests.length) return; - - test(tests[i], common.mustCall(function() { - runTests(i + 1); - })); -} - -runTests(0);