diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 3f57be9..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "root": true, - "parser": "@typescript-eslint/parser", - "ignorePatterns": [ "dist", "browser" ], - "plugins": [ - "@typescript-eslint", - "simple-import-sort", - "unused-imports", - "import-alias" - ], - "rules": { - "no-restricted-syntax": [ "error", { - "selector": "AwaitExpression:not(:function *)", - "message": "Hermes does not support top-level await, and SWC cannot transform it." - } ], - "quotes": [ "error", "double", { "avoidEscape": true } ], - "jsx-quotes": [ "error", "prefer-double" ], - "no-mixed-spaces-and-tabs": "error", - "indent": [ "error", 4, { "SwitchCase": 1 } ], - "arrow-parens": [ "error", "as-needed" ], - "eol-last": [ "error", "always" ], - "func-call-spacing": [ "error", "never" ], - "no-multi-spaces": "error", - "no-trailing-spaces": "error", - "no-whitespace-before-property": "error", - "semi": [ "error", "always" ], - "semi-style": [ "error", "last" ], - "space-in-parens": [ "error", "never" ], - "block-spacing": [ "error", "always" ], - "object-curly-spacing": [ "error", "always" ], - "eqeqeq": [ "error", "always", { "null": "ignore" } ], - "spaced-comment": [ "error", "always", { "markers": [ "!" ] } ], - "yoda": "error", - "prefer-destructuring": [ "error", { "object": true, "array": false } ], - "operator-assignment": [ "error", "always" ], - "no-useless-computed-key": "error", - "no-unneeded-ternary": [ "error", { "defaultAssignment": false } ], - "no-invalid-regexp": "error", - "no-constant-condition": [ "error", { "checkLoops": false } ], - "no-duplicate-imports": "error", - "no-extra-semi": "error", - "dot-notation": "error", - "no-useless-escape": [ "error" ], - "no-fallthrough": "error", - "for-direction": "error", - "no-async-promise-executor": "error", - "no-cond-assign": "error", - "no-dupe-else-if": "error", - "no-duplicate-case": "error", - "no-irregular-whitespace": "error", - "no-loss-of-precision": "error", - "no-misleading-character-class": "error", - "no-prototype-builtins": "error", - "no-regex-spaces": "error", - "no-shadow-restricted-names": "error", - "no-unexpected-multiline": "error", - "no-unsafe-optional-chaining": "error", - "no-useless-backreference": "error", - "use-isnan": "error", - "prefer-const": "error", - "prefer-spread": "error", - "simple-import-sort/imports": "error", - "simple-import-sort/exports": "error", - "unused-imports/no-unused-imports": "error", - "import-alias/import-alias": [ - "error", - { - "relativeDepth": 0, - "aliases": [ - { "alias": "@metro", "matcher": "^src/lib/metro" }, - { "alias": "@core", "matcher": "^src/core" }, - { "alias": "@ui", "matcher": "^src/lib/ui" }, - { "alias": "@types", "matcher": "^src/lib/utils/types.ts" }, - { "alias": "@lib", "matcher": "^src/lib" } - ] - } - ] - } -} diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index ec4bb38..a5d6ffa 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1 +1,5 @@ -blank_issues_enabled: false \ No newline at end of file +blank_issues_enabled: false +contact_links: + - name: ๐Ÿ—จ Discussions + url: https://discord.gg/ddcQf3s2Uq + about: Have something unspecific to Revenge in mind? Join us on Discord! diff --git a/.github/config.yml b/.github/config.yml new file mode 100644 index 0000000..38a6cf1 --- /dev/null +++ b/.github/config.yml @@ -0,0 +1,2 @@ +firstPRMergeComment: > + Thank you for contributing to Revenge. Join us on [Discord](https://discord.gg/ddcQf3s2Uq) to receive a role for your contribution. \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..cffc32b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: Release +on: + push: + branches: [main, dev] + +jobs: + release: + name: Release + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: latest + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Release + run: pnpx semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RELEASE_BRANCH: ${{ github.ref_name }} diff --git a/.releaserc.js b/.releaserc.js new file mode 100644 index 0000000..ca2d876 --- /dev/null +++ b/.releaserc.js @@ -0,0 +1,53 @@ +export default { + branches: [ + "main", + { + name: "dev", + prerelease: true, + }, + ], + plugins: [ + [ + "@semantic-release/commit-analyzer", + { + releaseRules: [ + { type: "build", scope: "Needs bump", release: "patch" }, + ], + }, + ], + "@semantic-release/release-notes-generator", + "@semantic-release/changelog", + [ + "@semantic-release/git", + { + assets: ["README.md", "CHANGELOG.md"], + message: + "chore: Release ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}", + }, + ], + [ + "@semantic-release/exec", + { + prepareCmd: `pnpm build --release-branch ${process.env.RELEASE_BRANCH} --build-minify`, + }, + ], + [ + "@semantic-release/github", + { + assets: [ + { + path: "dist/*.js", + }, + ], + successComment: false, + }, + ], + [ + "@saithodev/semantic-release-backmerge", + { + backmergeBranches: [{ from: "main", to: "dev" }], + clearWorkspace: true, + }, + ], + ], +}; diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..90818ea --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,321 @@ +## [1.7.4](https://github.com/revenge-mod/revenge-bundle/compare/v1.7.3...v1.7.4) (2025-05-19) + + +### Bug Fixes + +* **core/patches/wrapSafeAreaProvider:** remove broken patch ([dfb0367](https://github.com/revenge-mod/revenge-bundle/commit/dfb036740a3789f171f16c2aca6f8db2de602d79)) + +## [1.7.3](https://github.com/revenge-mod/revenge-bundle/compare/v1.7.2...v1.7.3) (2025-05-19) + + +### Bug Fixes + +* **metro/common:** polyfill `url` ([59ffa77](https://github.com/revenge-mod/revenge-bundle/commit/59ffa77a3aff59181d9dee169f91bda8e31c4400)) + +## [1.7.2](https://github.com/revenge-mod/revenge-bundle/compare/v1.7.1...v1.7.2) (2025-02-27) + + +### Bug Fixes + +* **metro:** Blacklist IntlMessagesProxy exports ([e2a05a7](https://github.com/revenge-mod/revenge-bundle/commit/e2a05a77eef57d5eeea7204e93941278c4ed3340)) +* **settings:** update tab index lookup approach ([821cbf0](https://github.com/revenge-mod/revenge-bundle/commit/821cbf01f2b16d8ba454fdbcf41efcb754607152)) + +## [1.7.2-dev.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.7.1...v1.7.2-dev.1) (2025-02-27) + + +### Bug Fixes + +* **metro:** Blacklist IntlMessagesProxy exports ([e2a05a7](https://github.com/revenge-mod/revenge-bundle/commit/e2a05a77eef57d5eeea7204e93941278c4ed3340)) +* **settings:** update tab index lookup approach ([821cbf0](https://github.com/revenge-mod/revenge-bundle/commit/821cbf01f2b16d8ba454fdbcf41efcb754607152)) + +## [1.7.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.7.0...v1.7.1) (2025-02-14) + + +### Bug Fixes + +* **settings:** update tab index lookup approach ([93c17e8](https://github.com/revenge-mod/revenge-bundle/commit/93c17e8e0c8597104d147d94da71078d6e368135)) + +## [1.7.1-dev.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.7.0...v1.7.1-dev.1) (2025-02-14) + + +### Bug Fixes + +* **settings:** update tab index lookup approach ([93c17e8](https://github.com/revenge-mod/revenge-bundle/commit/93c17e8e0c8597104d147d94da71078d6e368135)) + +# [1.7.0](https://github.com/revenge-mod/revenge-bundle/compare/v1.6.0...v1.7.0) (2025-02-02) + + +### Bug Fixes + +* Adapt to change of `window.modules` being a Map ([78c303b](https://github.com/revenge-mod/revenge-bundle/commit/78c303b5f5eae283b082f96ef5923f2eac110e7c)), closes [#120](https://github.com/revenge-mod/revenge-bundle/issues/120) +* failsafe panel UI settings patching ([46a2c6e](https://github.com/revenge-mod/revenge-bundle/commit/46a2c6eaa16ca57f23f55881977f24ceb51e0d8b)) +* **issue-template:** declare no plugin request [skip ci] ([87cfc74](https://github.com/revenge-mod/revenge-bundle/commit/87cfc742f65397297bd23d2950739ea1387c218c)) +* **lib/api/native/modules:** add more native module fallbacks ([#102](https://github.com/revenge-mod/revenge-bundle/issues/102)) ([6f95203](https://github.com/revenge-mod/revenge-bundle/commit/6f95203dfa5beb3b48a9cc6061e712acd0ca8fb3)), closes [#99](https://github.com/revenge-mod/revenge-bundle/issues/99) +* **metro/patchNativeComponentRegistry:** return component name if fail ([26b7615](https://github.com/revenge-mod/revenge-bundle/commit/26b7615f84ea32302771323de1a8c252dfd2b7d1)) +* **native:** update native modules name ([99c1266](https://github.com/revenge-mod/revenge-bundle/commit/99c12660f4857abe33ddc5b7056242b5c0ea8bcc)) +* only show plugin browser on dev mode ([0817e53](https://github.com/revenge-mod/revenge-bundle/commit/0817e533de7537eec47d52b4fe385ae0f65ef5cd)) +* pass IconComponent for settings section ([e80ab84](https://github.com/revenge-mod/revenge-bundle/commit/e80ab84b7cfe20acefc95954fb54b588eae89b7c)) +* pass IconComponent for settings section ([e56ec77](https://github.com/revenge-mod/revenge-bundle/commit/e56ec778e0ab44611d27297d9ce258c43a70ac8f)) +* **plugins:** filter out internal fields when loading plugins ([e141a62](https://github.com/revenge-mod/revenge-bundle/commit/e141a62dd06761d93f4ea957c32a7d4294253214)) +* **plugins:** race condition when enabling plugin ([85c10af](https://github.com/revenge-mod/revenge-bundle/commit/85c10aff12866d0f491bb6560464c46b3323077a)) +* readd semantic fallback for spec 2 themes ([0fd2107](https://github.com/revenge-mod/revenge-bundle/commit/0fd2107473c35334cc8ff2a548021469dadbbeb4)) +* set bottom inset for floating buttons ([6f52993](https://github.com/revenge-mod/revenge-bundle/commit/6f52993838573cd133f128c1c0b8507524140a00)) +* **themes:** use alternative way to patch chat background ([5ec4150](https://github.com/revenge-mod/revenge-bundle/commit/5ec41500b5c498d0ff45114af692961b0d1d574e)), closes [#123](https://github.com/revenge-mod/revenge-bundle/issues/123) +* **theme:** update validation logic ([c3cbc78](https://github.com/revenge-mod/revenge-bundle/commit/c3cbc78e13d5679f5ae0f9a79a8a24b0764a0d4f)) +* **ui/reporter/ErrorBoundaryScreen:** move comment to a single line ([657c8eb](https://github.com/revenge-mod/revenge-bundle/commit/657c8ebd78df946a1aacd75c50e50b63920ebc2f)) +* update file existence check to use object for prefix ([85cbac7](https://github.com/revenge-mod/revenge-bundle/commit/85cbac714a40d4afc273e9d710608c9094942412)) +* wrap ErrorBoundaryScreen with SafeAreaProvider ([5e3f9b7](https://github.com/revenge-mod/revenge-bundle/commit/5e3f9b72361159da57c072cafed44424184d57f5)) + + +### Features + +* adopt dev metro ([cc87948](https://github.com/revenge-mod/revenge-bundle/commit/cc879485ac7d720c04191453865c677351b86f8c)) +* **themes:** port more stuff from 'dev' ([0eb28e4](https://github.com/revenge-mod/revenge-bundle/commit/0eb28e41b7243fcae952ded5a7c44c274103d753)) +* **ui/plugins:** Bunny plugin sheet impl ([c168237](https://github.com/revenge-mod/revenge-bundle/commit/c168237fc97bcf34353d6bf391f360cbccdbed84)) +* **ui:** allow adding repository ([b5611d3](https://github.com/revenge-mod/revenge-bundle/commit/b5611d3cf185fd22b0a9adcffe3e473c3df7ca49)) +* **ui:** update icons in About page ([ad9e05c](https://github.com/revenge-mod/revenge-bundle/commit/ad9e05c2034cbf82a2784bde7c50a4f40f70e03c)) + + +### Performance Improvements + +* **themes:** Draft rawColors normalization since writing directly is insanely slow for some reason ([e77e663](https://github.com/revenge-mod/revenge-bundle/commit/e77e6639d4a4d44f2f0cd0a9df708ea4f879d17b)) + +# [1.7.0-dev.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.6.0...v1.7.0-dev.1) (2025-02-02) + + +### Bug Fixes + +* Adapt to change of `window.modules` being a Map ([78c303b](https://github.com/revenge-mod/revenge-bundle/commit/78c303b5f5eae283b082f96ef5923f2eac110e7c)), closes [#120](https://github.com/revenge-mod/revenge-bundle/issues/120) +* failsafe panel UI settings patching ([46a2c6e](https://github.com/revenge-mod/revenge-bundle/commit/46a2c6eaa16ca57f23f55881977f24ceb51e0d8b)) +* **issue-template:** declare no plugin request [skip ci] ([87cfc74](https://github.com/revenge-mod/revenge-bundle/commit/87cfc742f65397297bd23d2950739ea1387c218c)) +* **lib/api/native/modules:** add more native module fallbacks ([#102](https://github.com/revenge-mod/revenge-bundle/issues/102)) ([6f95203](https://github.com/revenge-mod/revenge-bundle/commit/6f95203dfa5beb3b48a9cc6061e712acd0ca8fb3)), closes [#99](https://github.com/revenge-mod/revenge-bundle/issues/99) +* **metro/patchNativeComponentRegistry:** return component name if fail ([26b7615](https://github.com/revenge-mod/revenge-bundle/commit/26b7615f84ea32302771323de1a8c252dfd2b7d1)) +* **native:** update native modules name ([99c1266](https://github.com/revenge-mod/revenge-bundle/commit/99c12660f4857abe33ddc5b7056242b5c0ea8bcc)) +* only show plugin browser on dev mode ([0817e53](https://github.com/revenge-mod/revenge-bundle/commit/0817e533de7537eec47d52b4fe385ae0f65ef5cd)) +* pass IconComponent for settings section ([e80ab84](https://github.com/revenge-mod/revenge-bundle/commit/e80ab84b7cfe20acefc95954fb54b588eae89b7c)) +* pass IconComponent for settings section ([e56ec77](https://github.com/revenge-mod/revenge-bundle/commit/e56ec778e0ab44611d27297d9ce258c43a70ac8f)) +* **plugins:** filter out internal fields when loading plugins ([e141a62](https://github.com/revenge-mod/revenge-bundle/commit/e141a62dd06761d93f4ea957c32a7d4294253214)) +* **plugins:** race condition when enabling plugin ([85c10af](https://github.com/revenge-mod/revenge-bundle/commit/85c10aff12866d0f491bb6560464c46b3323077a)) +* readd semantic fallback for spec 2 themes ([0fd2107](https://github.com/revenge-mod/revenge-bundle/commit/0fd2107473c35334cc8ff2a548021469dadbbeb4)) +* set bottom inset for floating buttons ([6f52993](https://github.com/revenge-mod/revenge-bundle/commit/6f52993838573cd133f128c1c0b8507524140a00)) +* **themes:** use alternative way to patch chat background ([5ec4150](https://github.com/revenge-mod/revenge-bundle/commit/5ec41500b5c498d0ff45114af692961b0d1d574e)), closes [#123](https://github.com/revenge-mod/revenge-bundle/issues/123) +* **theme:** update validation logic ([c3cbc78](https://github.com/revenge-mod/revenge-bundle/commit/c3cbc78e13d5679f5ae0f9a79a8a24b0764a0d4f)) +* **ui/reporter/ErrorBoundaryScreen:** move comment to a single line ([657c8eb](https://github.com/revenge-mod/revenge-bundle/commit/657c8ebd78df946a1aacd75c50e50b63920ebc2f)) +* update file existence check to use object for prefix ([85cbac7](https://github.com/revenge-mod/revenge-bundle/commit/85cbac714a40d4afc273e9d710608c9094942412)) +* wrap ErrorBoundaryScreen with SafeAreaProvider ([5e3f9b7](https://github.com/revenge-mod/revenge-bundle/commit/5e3f9b72361159da57c072cafed44424184d57f5)) + + +### Features + +* adopt dev metro ([cc87948](https://github.com/revenge-mod/revenge-bundle/commit/cc879485ac7d720c04191453865c677351b86f8c)) +* **themes:** port more stuff from 'dev' ([0eb28e4](https://github.com/revenge-mod/revenge-bundle/commit/0eb28e41b7243fcae952ded5a7c44c274103d753)) +* **ui/plugins:** Bunny plugin sheet impl ([c168237](https://github.com/revenge-mod/revenge-bundle/commit/c168237fc97bcf34353d6bf391f360cbccdbed84)) +* **ui:** allow adding repository ([b5611d3](https://github.com/revenge-mod/revenge-bundle/commit/b5611d3cf185fd22b0a9adcffe3e473c3df7ca49)) +* **ui:** update icons in About page ([ad9e05c](https://github.com/revenge-mod/revenge-bundle/commit/ad9e05c2034cbf82a2784bde7c50a4f40f70e03c)) + + +### Performance Improvements + +* **themes:** Draft rawColors normalization since writing directly is insanely slow for some reason ([e77e663](https://github.com/revenge-mod/revenge-bundle/commit/e77e6639d4a4d44f2f0cd0a9df708ea4f879d17b)) + +# [1.6.0](https://github.com/revenge-mod/revenge-bundle/compare/v1.5.4...v1.6.0) (2025-01-23) + + +### Features + +* support 263+ clients ([f1ba456](https://github.com/revenge-mod/revenge-bundle/commit/f1ba456474a85cbc291bdb320a16721bd6108483)) + +# [1.6.0-dev.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.5.4...v1.6.0-dev.1) (2025-01-22) + + +### Features + +* support 263+ clients ([f1ba456](https://github.com/revenge-mod/revenge-bundle/commit/f1ba456474a85cbc291bdb320a16721bd6108483)) + +## [1.5.4](https://github.com/revenge-mod/revenge-bundle/compare/v1.5.3...v1.5.4) (2024-12-26) + + +### Bug Fixes + +* change `Bunny` to `Revenge` in `ErrorBoundary` content ([89f1b18](https://github.com/revenge-mod/revenge-bundle/commit/89f1b18ebb8995f9b26e3eaa83223cea54c0bc3d)) +* **lib/ui/settings:** fix icon not showing up ([2fc7715](https://github.com/revenge-mod/revenge-bundle/commit/2fc7715fa4494c0b105a6399edc4877a155d3512)) +* **ui/components/ErrorBoundaryScreen:** minor misspelling & update branding ([#57](https://github.com/revenge-mod/revenge-bundle/issues/57)) ([a71dd7d](https://github.com/revenge-mod/revenge-bundle/commit/a71dd7d0eb4c5e5003ff9743bcceab43ba2897c3)) + +## [1.5.4-dev.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.5.3...v1.5.4-dev.1) (2024-12-26) + + +### Bug Fixes + +* change `Bunny` to `Revenge` in `ErrorBoundary` content ([89f1b18](https://github.com/revenge-mod/revenge-bundle/commit/89f1b18ebb8995f9b26e3eaa83223cea54c0bc3d)) +* **lib/ui/settings:** fix icon not showing up ([2fc7715](https://github.com/revenge-mod/revenge-bundle/commit/2fc7715fa4494c0b105a6399edc4877a155d3512)) +* **ui/components/ErrorBoundaryScreen:** minor misspelling & update branding ([#57](https://github.com/revenge-mod/revenge-bundle/issues/57)) ([a71dd7d](https://github.com/revenge-mod/revenge-bundle/commit/a71dd7d0eb4c5e5003ff9743bcceab43ba2897c3)) + +## [1.5.3-dev.3](https://github.com/revenge-mod/revenge-bundle/compare/v1.5.3-dev.2...v1.5.3-dev.3) (2024-12-26) + + +### Bug Fixes + +* change `Bunny` to `Revenge` in `ErrorBoundary` content ([89f1b18](https://github.com/revenge-mod/revenge-bundle/commit/89f1b18ebb8995f9b26e3eaa83223cea54c0bc3d)) + +## [1.5.3-dev.2](https://github.com/revenge-mod/revenge-bundle/compare/v1.5.3-dev.1...v1.5.3-dev.2) (2024-12-26) + + +### Bug Fixes + +* **ui/components/ErrorBoundaryScreen:** minor misspelling & update branding ([#57](https://github.com/revenge-mod/revenge-bundle/issues/57)) ([a71dd7d](https://github.com/revenge-mod/revenge-bundle/commit/a71dd7d0eb4c5e5003ff9743bcceab43ba2897c3)) + +## [1.5.3](https://github.com/revenge-mod/revenge-bundle/compare/v1.5.2...v1.5.3) (2024-12-05) + + +* backport iOS invalid element type crash fix ([afacfa0](https://github.com/revenge-mod/revenge-bundle/commit/afacfa06480f60d461840a211c09abb363dc8546)) + +## [1.5.3-dev.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.5.2...v1.5.3-dev.1) (2024-11-24) + + +### Bug Fixes + +* **lib/ui/settings:** fix icon not showing up ([2fc7715](https://github.com/revenge-mod/revenge-bundle/commit/2fc7715fa4494c0b105a6399edc4877a155d3512)) + +## [1.5.2](https://github.com/revenge-mod/revenge-bundle/compare/v1.5.1...v1.5.2) (2024-11-13) + + +### Bug Fixes + +* **lib/api/native/modules:** add new MMKVManager fallback ([a68f137](https://github.com/revenge-mod/revenge-bundle/commit/a68f1375437e164196745ad01d1997aa9ff1e67b)) + +## [1.5.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.5.0...v1.5.1) (2024-11-04) + + +### Bug Fixes + +* **lib/api/native/modules:** add more native module fallbacks ([825a404](https://github.com/revenge-mod/revenge-bundle/commit/825a404cae335572aeaa713697383b7d14eca25f)) + +# [1.5.0](https://github.com/revenge-mod/revenge-bundle/compare/v1.4.0...v1.5.0) (2024-10-26) + + +### Features + +* wrap `App` in `SafeAreaProvider` ([ea1aec9](https://github.com/revenge-mod/revenge-bundle/commit/ea1aec9638f0a17e67ff38bf7d79655d19835f70)) + +# [1.4.0](https://github.com/revenge-mod/revenge-bundle/compare/v1.3.1...v1.4.0) (2024-10-26) + + +### Bug Fixes + +* actually fix improper FAB insets ([e987723](https://github.com/revenge-mod/revenge-bundle/commit/e9877234befc837126f4a24b23c837e7ed8f6b5b)) + + +### Features + +* port ErrorBoundary from dev ([f447910](https://github.com/revenge-mod/revenge-bundle/commit/f44791049a762fbce777b03e9d930fba0c0c6570)) +* **settings/pages/Developer:** show assets types, mark non-previewable assets in AssetBrowser ([b7aacf7](https://github.com/revenge-mod/revenge-bundle/commit/b7aacf734e665a7af613aa5eaae8507ea31be5cd)) + +# [1.4.0-dev.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.3.1...v1.4.0-dev.1) (2024-10-26) + + +### Bug Fixes + +* actually fix improper FAB insets ([e987723](https://github.com/revenge-mod/revenge-bundle/commit/e9877234befc837126f4a24b23c837e7ed8f6b5b)) + + +### Features + +* port ErrorBoundary from dev ([f447910](https://github.com/revenge-mod/revenge-bundle/commit/f44791049a762fbce777b03e9d930fba0c0c6570)) +* **settings/pages/Developer:** show assets types, mark non-previewable assets in AssetBrowser ([b7aacf7](https://github.com/revenge-mod/revenge-bundle/commit/b7aacf734e665a7af613aa5eaae8507ea31be5cd)) + +## [1.3.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.3.0...v1.3.1) (2024-10-23) + + +### Bug Fixes + +* wrap only `FloatingActionButton` in `SafeAreaView` for `AddonPage` ([42a8268](https://github.com/revenge-mod/revenge-bundle/commit/42a8268630800d268b31f3750c3fa69d965acabc)) + +# [1.3.0](https://github.com/revenge-mod/revenge-bundle/compare/v1.2.0...v1.3.0) (2024-10-23) + + +### Bug Fixes + +* wrap `addonpage` in `safeareaview` ([724fc1e](https://github.com/revenge-mod/revenge-bundle/commit/724fc1e135850d9439abcba03df1cd288ca3593b)) + + +### Features + +* improve fonts management ux ([b30e33d](https://github.com/revenge-mod/revenge-bundle/commit/b30e33d2c6be9d5fefc26903fecbf8fcccc0df42)) +* show error when failing to import font entries ([9511f17](https://github.com/revenge-mod/revenge-bundle/commit/9511f174498dfa5758ad60a2e918220a685849e0)) + +# [1.3.0-dev.2](https://github.com/revenge-mod/revenge-bundle/compare/v1.3.0-dev.1...v1.3.0-dev.2) (2024-10-22) + + +### Bug Fixes + +* wrap `addonpage` in `safeareaview` ([724fc1e](https://github.com/revenge-mod/revenge-bundle/commit/724fc1e135850d9439abcba03df1cd288ca3593b)) + +# [1.3.0-dev.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.2.0...v1.3.0-dev.1) (2024-10-21) + + +### Features + +* improve fonts management ux ([b30e33d](https://github.com/revenge-mod/revenge-bundle/commit/b30e33d2c6be9d5fefc26903fecbf8fcccc0df42)) +* show error when failing to import font entries ([9511f17](https://github.com/revenge-mod/revenge-bundle/commit/9511f174498dfa5758ad60a2e918220a685849e0)) + +# [1.2.0](https://github.com/revenge-mod/revenge-bundle/compare/v1.1.2...v1.2.0) (2024-10-20) + + +### Bug Fixes + +* **badges:** check if user is null ([a0c2ca7](https://github.com/revenge-mod/revenge-bundle/commit/a0c2ca7837c4585ead0e630d4475c354671fb8fd)) +* downgrade dependencies to fix build issue ([b803053](https://github.com/revenge-mod/revenge-bundle/commit/b803053e28c77529d62179b75c22c2365869d020)) +* Fix old settings menu and make some improvements to it ([#90](https://github.com/revenge-mod/revenge-bundle/issues/90)) ([e240509](https://github.com/revenge-mod/revenge-bundle/commit/e2405093eea5268d0afe88ded8735db7b5dfef43)) +* load core plugins ([ed52f33](https://github.com/revenge-mod/revenge-bundle/commit/ed52f332da8a189eb1141e1f2c17f50c50562d1a)) +* remove debug traces ([863466e](https://github.com/revenge-mod/revenge-bundle/commit/863466e48a741ede369a7032554191eac81e0905)) +* remove parent from emitter callback ([fe937a4](https://github.com/revenge-mod/revenge-bundle/commit/fe937a4ab5631a0bb23706794511598770015e09)) +* **types:** fix typescript [skip ci] ([61f9b65](https://github.com/revenge-mod/revenge-bundle/commit/61f9b6510b18032e4e91b7b2c87315d8ce6dea85)) +* wrong imports ([87ba67e](https://github.com/revenge-mod/revenge-bundle/commit/87ba67e8c2a3cec6c9b03312937dfa3f5adde0f8)) + + +### Features + +* **coreplugins:** add badges ([e3df56d](https://github.com/revenge-mod/revenge-bundle/commit/e3df56dc58c8c6078269ef800d6ad899ddfa52d3)) +* **metro:** expose common components & custom jsx runtime ([019fdc2](https://github.com/revenge-mod/revenge-bundle/commit/019fdc28b345e8b6f07cb96562f5e26c112da4cf)) +* Rebrand to Revenge ([#51](https://github.com/revenge-mod/revenge-bundle/issues/51)) ([0a61404](https://github.com/revenge-mod/revenge-bundle/commit/0a614041327fa1232331676c40a8cd60839276ba)) +* **storage:** port storage api from dev ([122c3a1](https://github.com/revenge-mod/revenge-bundle/commit/122c3a11e9f173c9c2ad9cd20d18926220428e8b)) +* **ui:** ponyfill AlertModal's `extraContent` prop for older versions ([ad65247](https://github.com/revenge-mod/revenge-bundle/commit/ad6524772b9dd98f36b640b8fba2d36e2d6a7f2b)), closes [#91](https://github.com/revenge-mod/revenge-bundle/issues/91) +* **ui:** simplify some components ([4d88183](https://github.com/revenge-mod/revenge-bundle/commit/4d881835a63a64602dc0edc0332ee0097d28a601)) +* **ui:** simplify unproxied notice ([1d4dfd3](https://github.com/revenge-mod/revenge-bundle/commit/1d4dfd311f4818d961b8667811bce7ecc0989152)) + +# [1.2.0-dev.3](https://github.com/revenge-mod/revenge-bundle/compare/v1.2.0-dev.2...v1.2.0-dev.3) (2024-10-19) + + +### Bug Fixes + +* downgrade dependencies to fix build issue ([b803053](https://github.com/revenge-mod/revenge-bundle/commit/b803053e28c77529d62179b75c22c2365869d020)) + +# [1.2.0-dev.2](https://github.com/revenge-mod/revenge-bundle/compare/v1.2.0-dev.1...v1.2.0-dev.2) (2024-10-19) + + +### Bug Fixes + +* wrong imports ([87ba67e](https://github.com/revenge-mod/revenge-bundle/commit/87ba67e8c2a3cec6c9b03312937dfa3f5adde0f8)) + +# [1.2.0-dev.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.1.2...v1.2.0-dev.1) (2024-10-19) + + +### Bug Fixes + +* **badges:** check if user is null ([a0c2ca7](https://github.com/revenge-mod/revenge-bundle/commit/a0c2ca7837c4585ead0e630d4475c354671fb8fd)) +* Fix old settings menu and make some improvements to it ([#90](https://github.com/revenge-mod/revenge-bundle/issues/90)) ([e240509](https://github.com/revenge-mod/revenge-bundle/commit/e2405093eea5268d0afe88ded8735db7b5dfef43)) +* load core plugins ([ed52f33](https://github.com/revenge-mod/revenge-bundle/commit/ed52f332da8a189eb1141e1f2c17f50c50562d1a)) +* remove debug traces ([863466e](https://github.com/revenge-mod/revenge-bundle/commit/863466e48a741ede369a7032554191eac81e0905)) +* remove parent from emitter callback ([fe937a4](https://github.com/revenge-mod/revenge-bundle/commit/fe937a4ab5631a0bb23706794511598770015e09)) +* **types:** fix typescript [skip ci] ([61f9b65](https://github.com/revenge-mod/revenge-bundle/commit/61f9b6510b18032e4e91b7b2c87315d8ce6dea85)) + + +### Features + +* **coreplugins:** add badges ([e3df56d](https://github.com/revenge-mod/revenge-bundle/commit/e3df56dc58c8c6078269ef800d6ad899ddfa52d3)) +* **metro:** expose common components & custom jsx runtime ([019fdc2](https://github.com/revenge-mod/revenge-bundle/commit/019fdc28b345e8b6f07cb96562f5e26c112da4cf)) +* Rebrand to Revenge ([#51](https://github.com/revenge-mod/revenge-bundle/issues/51)) ([0a61404](https://github.com/revenge-mod/revenge-bundle/commit/0a614041327fa1232331676c40a8cd60839276ba)) +* **storage:** port storage api from dev ([122c3a1](https://github.com/revenge-mod/revenge-bundle/commit/122c3a11e9f173c9c2ad9cd20d18926220428e8b)) +* **ui:** ponyfill AlertModal's `extraContent` prop for older versions ([ad65247](https://github.com/revenge-mod/revenge-bundle/commit/ad6524772b9dd98f36b640b8fba2d36e2d6a7f2b)), closes [#91](https://github.com/revenge-mod/revenge-bundle/issues/91) +* **ui:** simplify some components ([4d88183](https://github.com/revenge-mod/revenge-bundle/commit/4d881835a63a64602dc0edc0332ee0097d28a601)) +* **ui:** simplify unproxied notice ([1d4dfd3](https://github.com/revenge-mod/revenge-bundle/commit/1d4dfd311f4818d961b8667811bce7ecc0989152)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..c53be83 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# ๐Ÿ‘‹ Contribution guidelines + +This document describes how to contribute to Revenge bundle. + +## ๐Ÿ“– Resources to help you get started + +* [Issues](https://github.com/revenge-mod/revenge-bundle/issues) are where we keep track of bugs and feature requests + +## ๐Ÿ™ Submitting a feature request + +Features can be requested by opening an issue using the +[Feature request issue template](https://github.com/revenge-mod/revenge-bundle/issues/new?assignees=&labels=Feature+request&projects=&template=feature_request.yml&title=feat%3A+). + +> **Note** +> Requests can be accepted or rejected at the discretion of maintainers of Revenge bundle. +> Good motivation has to be provided for a request to be accepted. + +## ๐Ÿž Submitting a bug report + +If you encounter a bug while using Revenge bundle, open an issue using the +[Bug report issue template](https://github.com/revenge-mod/revenge-bundle/issues/new?assignees=&labels=Bug+report&projects=&template=bug_report.yml&title=bug%3A+). + +## ๐Ÿ“ How to contribute + +1. Before contributing, it is recommended to open an issue to discuss your change + with the maintainers of Revenge bundle. This will help you determine whether your change is acceptable + and whether it is worth your time to implement it +2. Development happens on the `dev` branch. Fork the repository and create your branch from `dev` +3. Commit your changes +4. Submit a pull request to the `dev` branch of the repository and reference issues + that your pull request closes in the description of your pull request +5. Our team will review your pull request and provide feedback. Once your pull request is approved, + it will be merged into the `dev` branch and will be included in the next release of Revenge bundle + +โค๏ธ Thank you for considering contributing to Revenge bundle diff --git a/assets/logo/logo-dark.svg b/assets/logo/logo-dark.svg new file mode 100644 index 0000000..cb34519 --- /dev/null +++ b/assets/logo/logo-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/logo/logo-light.svg b/assets/logo/logo-light.svg new file mode 100644 index 0000000..b16e22f --- /dev/null +++ b/assets/logo/logo-light.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/wordmark/wordmark+slogan-dark.svg b/assets/wordmark/wordmark+slogan-dark.svg new file mode 100644 index 0000000..2f3c148 --- /dev/null +++ b/assets/wordmark/wordmark+slogan-dark.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/wordmark/wordmark+slogan-light.svg b/assets/wordmark/wordmark+slogan-light.svg new file mode 100644 index 0000000..eefd512 --- /dev/null +++ b/assets/wordmark/wordmark+slogan-light.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/docs/2_building.md b/docs/2_building.md new file mode 100644 index 0000000..9050d9e --- /dev/null +++ b/docs/2_building.md @@ -0,0 +1,29 @@ +## Building +1. Install a Revenge loader with config support (any mentioned in the [Installing](#installing) section). +2. Go to **Settings** > **General** and enable **Developer Settings**. +3. Clone the repository + + ```sh + git clone https://github.com/revenge-mod/revenge-bundle.git + ``` + +4. Install dependencies + + ``` + pnpm i + ``` + +5. Build Revenge's code + + ``` + pnpm build + ``` + +6. In the newly created `dist` directory, run a HTTP server. I recommend [http-server](https://www.npmjs.com/package/http-server). +7. Go to **Settings** > **Developer** enabled earlier. Enable `Load from custom URL` and input the IP address and port of the server (e.g. `http://192.168.1.236:4040/revenge.js`) in the new input box labeled `Revenge URL`. +8. Restart Discord. Upon reload, you should notice that your device will download Revenge's bundled code from your server, rather than GitHub. +9. Make your changes, rebuild, reload, go wild! + +Alternatively, you can directly *serve* the bundled code by running `pnpm serve`. `revenge.js` will be served on your local address under the port 4040. You will then insert `http://:4040/revenge.js` as a custom URL and reload. Whenever you restart your mobile client, the script will rebuild the bundle as your client fetches it. + +If the bundle keeps being cached and not updated, you can instead tap the **Settings** > **Developer** > **Clear JS bundle** option which will prompt you to reload. diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..ac3cc11 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,13 @@ +# ๐Ÿ‘Š Revenge + +This documentation explains how to use [Revenge](https://github.com/revenge-mod/revenge-bundle). + +## ๐Ÿ“– Table of contents + +TODO. + +## โญ๏ธ Start here + +The next page will tell you about the prerequisites for using Revenge. + +Continue: [๐Ÿ’ผ Prerequisites](0_prerequisites.md) \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..e71303f --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,125 @@ +import typescriptEslint from "@typescript-eslint/eslint-plugin"; +import simpleImportSort from "eslint-plugin-simple-import-sort"; +import unusedImports from "eslint-plugin-unused-imports"; +import importAlias from "eslint-plugin-import-alias"; +import tsParser from "@typescript-eslint/parser"; + +export default [{ + ignores: ["**/dist", "**/browser"], +}, { + plugins: { + "@typescript-eslint": typescriptEslint, + "simple-import-sort": simpleImportSort, + "unused-imports": unusedImports, + "import-alias": importAlias, + }, + + languageOptions: { + parser: tsParser, + }, + + rules: { + "no-restricted-syntax": ["error", { + selector: "AwaitExpression:not(:function *)", + message: "Hermes does not support top-level await, and SWC cannot transform it.", + }], + + quotes: ["error", "double", { + avoidEscape: true, + }], + + "jsx-quotes": ["error", "prefer-double"], + "no-mixed-spaces-and-tabs": "error", + + indent: ["error", 4, { + SwitchCase: 1, + }], + + "arrow-parens": ["error", "as-needed"], + "eol-last": ["error", "always"], + "func-call-spacing": ["error", "never"], + "no-multi-spaces": "error", + "no-trailing-spaces": "error", + "no-whitespace-before-property": "error", + semi: ["error", "always"], + "semi-style": ["error", "last"], + "space-in-parens": ["error", "never"], + "block-spacing": ["error", "always"], + "object-curly-spacing": ["error", "always"], + + eqeqeq: ["error", "always", { + null: "ignore", + }], + + "spaced-comment": ["error", "always", { + markers: ["!"], + }], + + yoda: "error", + + "prefer-destructuring": ["error", { + object: true, + array: false, + }], + + "operator-assignment": ["error", "always"], + "no-useless-computed-key": "error", + + "no-unneeded-ternary": ["error", { + defaultAssignment: false, + }], + + "no-invalid-regexp": "error", + + "no-constant-condition": ["error", { + checkLoops: false, + }], + + "no-duplicate-imports": "error", + "no-extra-semi": "error", + "dot-notation": "error", + "no-useless-escape": ["error"], + "no-fallthrough": "error", + "for-direction": "error", + "no-async-promise-executor": "error", + "no-cond-assign": "error", + "no-dupe-else-if": "error", + "no-duplicate-case": "error", + "no-irregular-whitespace": "error", + "no-loss-of-precision": "error", + "no-misleading-character-class": "error", + "no-prototype-builtins": "error", + "no-regex-spaces": "error", + "no-shadow-restricted-names": "error", + "no-unexpected-multiline": "error", + "no-unsafe-optional-chaining": "error", + "no-useless-backreference": "error", + "use-isnan": "error", + "prefer-const": "error", + "prefer-spread": "error", + "simple-import-sort/imports": "error", + "simple-import-sort/exports": "error", + "unused-imports/no-unused-imports": "error", + + "import-alias/import-alias": ["error", { + relativeDepth: 0, + + aliases: [{ + alias: "@metro", + matcher: "^src/lib/metro", + }, { + alias: "@core", + matcher: "^src/core", + }, { + alias: "@ui", + matcher: "^src/lib/ui", + }, { + alias: "@types", + matcher: "^src/lib/utils/types.ts", + }, { + alias: "@lib", + matcher: "^src/lib", + }], + }], + }, +}]; \ No newline at end of file diff --git a/src/assets/icons/revenge.png b/src/assets/icons/revenge.png new file mode 100644 index 0000000..f9032bf Binary files /dev/null and b/src/assets/icons/revenge.png differ diff --git a/src/core/vendetta/api.tsx b/src/core/vendetta/api.tsx index 678dfa7..4da8718 100644 --- a/src/core/vendetta/api.tsx +++ b/src/core/vendetta/api.tsx @@ -34,7 +34,7 @@ export async function createVdPluginObject(plugin: VendettaPlugin) { // Wrapping this with wrapSync is NOT an option. storage: await createStorage>(storage.createMMKVBackend(plugin.id)), }, - logger: new LoggerClass(`Revenge ยป ${plugin.manifest.name}`), + logger: new LoggerClass(`Kettu ยป ${plugin.manifest.name}`), }; } diff --git a/src/core/vendetta/plugins.ts b/src/core/vendetta/plugins.ts index 4ef27a5..4026b36 100644 --- a/src/core/vendetta/plugins.ts +++ b/src/core/vendetta/plugins.ts @@ -98,7 +98,7 @@ export const VdPluginManager = { // Wrapping this with wrapSync is NOT an option. storage: await createStorage>(createMMKVBackend(plugin.id)), }, - logger: new LoggerClass(`Revenge ยป ${plugin.manifest.name}`), + logger: new LoggerClass(`Kettu ยป ${plugin.manifest.name}`), }; const pluginString = `vendetta=>{return ${plugin.js}}\n//# sourceURL=${plugin.id}`; diff --git a/src/lib/utils/logger.ts b/src/lib/utils/logger.ts index 1a26505..b6dfd31 100644 --- a/src/lib/utils/logger.ts +++ b/src/lib/utils/logger.ts @@ -12,4 +12,4 @@ export interface Logger { } export const LoggerClass = findByNameLazy("Logger"); -export const logger: Logger = new LoggerClass("Bunny"); +export const logger: Logger = new LoggerClass("Kettu");