Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(new features): adds features, read pr for details #9

Open
wants to merge 61 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
3d8ebe4
bad code
sadan4 Aug 15, 2024
e1f9400
create draft commit
sadan4 Aug 18, 2024
50b6dae
add formatter
sadan4 Aug 19, 2024
940e9a3
add module diffing
sadan4 Aug 20, 2024
add041a
start work on webview
sadan4 Aug 21, 2024
d824542
non-ui part of client side reporter done
sadan4 Aug 21, 2024
0a850d1
delete unneeded files
sadan4 Aug 21, 2024
e74de09
things
sadan4 Aug 21, 2024
6b41f9a
webview works
sadan4 Aug 22, 2024
cf9be30
oops
sadan4 Aug 22, 2024
17c8e54
start working on webview commands
sadan4 Aug 24, 2024
d22471f
Add the stuff
cheesesamwich Aug 26, 2024
2f880f0
remove dummy data
sadan4 Aug 26, 2024
d46a10f
Merge pull request #1 from cheesesamwich/main
sadan4 Aug 26, 2024
e6e4cb9
add types to webview, fix csp, fix some bad logic, change a bit of th…
sadan4 Aug 27, 2024
8363424
add broken finds to it
sadan4 Aug 27, 2024
39482a6
how in gods name did this get comitted
sadan4 Aug 27, 2024
afd1195
guh
sadan4 Aug 28, 2024
22eeab1
guh
sadan4 Aug 28, 2024
7e6c5d3
guh guh
sadan4 Aug 30, 2024
dbcfe59
remove setting
sadan4 Aug 30, 2024
cf88029
guh
sadan4 Aug 30, 2024
141e94e
use esbuild for webview
sadan4 Aug 30, 2024
01491be
i love esbuild
sadan4 Aug 30, 2024
9d71423
oops
sadan4 Aug 30, 2024
8a3870f
general cleanup
sadan4 Aug 30, 2024
f22d11c
update gitingorte
sadan4 Aug 30, 2024
3ad7c5a
add postinstall script
sadan4 Aug 30, 2024
2965f29
cleanup build for webview fix the hide button
sadan4 Aug 31, 2024
36f4d21
add/update eslint
sadan4 Sep 2, 2024
9eb99c1
update eslint
sadan4 Sep 2, 2024
b0939bd
add LSP for webpack modules
sadan4 Sep 25, 2024
f6039b7
module cache
sadan4 Nov 14, 2024
98e8bc6
start
sadan4 Nov 14, 2024
1813614
more horror code
sadan4 Nov 14, 2024
2268b93
more horror ocde
sadan4 Nov 15, 2024
f0b10ca
guh
sadan4 Nov 15, 2024
62cdf39
more work(still horrorcode)
sadan4 Jan 6, 2025
e8ade4f
things
sadan4 Jan 7, 2025
46af1c9
make cursed ui
sadan4 Jan 7, 2025
65e3ef7
things
sadan4 Jan 7, 2025
86edc0c
finish up module exprot scanning
sadan4 Jan 8, 2025
5b32d97
things
sadan4 Jan 8, 2025
efab315
finish up references
sadan4 Jan 9, 2025
b2824cb
Update README.md
sadan4 Jan 9, 2025
e192d99
Update README.md
sadan4 Jan 9, 2025
6499fc2
fixup some code
sadan4 Jan 9, 2025
507d45f
refactor (#2)
sadan4 Jan 14, 2025
0973ef4
diagnostics for patches and finds (#3)
sadan4 Jan 14, 2025
6fdc65a
minor bugfixes
sadan4 Jan 30, 2025
3d19a63
remove code
sadan4 Jan 31, 2025
8898861
guh
sadan4 Jan 31, 2025
73c9974
start work
sadan4 Jan 31, 2025
1a17b9e
more work
sadan4 Feb 3, 2025
8d2bcf3
remove unused commands, and make control flow sane
sadan4 Feb 3, 2025
45e4725
Merge branch 'dev' into feat/patchHelper-v2
sadan4 Feb 3, 2025
6aa62f9
live patch helper works (needs more testing)
sadan4 Feb 4, 2025
b8b330c
remove horror tabs
sadan4 Feb 4, 2025
43edc3c
fix
sadan4 Feb 4, 2025
19dd437
Squash merge dev into main
sadan4 Feb 5, 2025
c62d3ef
the great console log purge
sadan4 Feb 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
17 changes: 0 additions & 17 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dist
src/webview/dist
node_modules
.vscode-test/
*.vsix
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint"
"dbaeumer.vscode-eslint",
"connor4312.esbuild-problem-matchers"
]
}
7 changes: 6 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
"preLaunchTask": "${defaultBuildTask}",
"pauseForSourceMap": true,
"resolveSourceMapLocations": [
"${workspaceFolder}/**",
"!**/node_modules/**"
]
},
{
"name": "Extension Tests",
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"dist": true
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
"typescript.tsc.autoDetect": "off",
"typescript.tsdk": "node_modules/typescript/lib"
}
5 changes: 4 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
"problemMatcher": "$esbuild-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
"reveal": "never",
"revealProblems": "never"
},

"group": {
"kind": "build",
"isDefault": true
}

}
]
}
3 changes: 2 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ src/**
pnpm-lock.yaml
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
eslint.config.mjs
**/*.map
**/*.ts
scripts/**
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@
# 0.1.3

- Now also supports plugin definitions stored in variables, like `const p: PluginDef = { ... }`

# 0.2.0

TODO: write notes
54 changes: 53 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,57 @@ To use it you also need to compile Vencord with DEV (aka `pnpm build --watch` or
![image](https://user-images.githubusercontent.com/45497981/224377149-b1569eac-9411-4f55-849a-950ba5b06f37.png)


https://user-images.githubusercontent.com/45497981/224446924-6e272d78-2c30-41a2-a41e-f71286b5f220.mp4
# Dev Companion

## Features

- Testing Patches
- Diffing Patches
- Extracting Webpack Modules
- From Patches
- From Finds
- Disable/Enable Plugin buttons above the definePlugin export
- Automatically run the reporter and have a gui with with the results
- Webpack LSP that lets you jump around extracted webpack files
- See where exports from a webpack module are used
- Cache discords modules locally

## Images/Videos of the Features

### Webpack LSP

https://github.com/user-attachments/assets/7d4ab157-0751-4a59-8e0e-1a3607a3247d

### Reporter Gui

https://github.com/user-attachments/assets/71c45fda-5161-43b0-8b2d-6e5fae8267d2

### Testing Patches

https://github.com/user-attachments/assets/99a9157e-89bb-45c7-b780-ffac30cdf4d0

### Diffing Patches
#### Only works for patches that are currently applied and have not errored
#### Shows every patch to that webpack module, not just yours

https://github.com/user-attachments/assets/958f4b61-4390-47fa-9dd3-6fc888dc844d

### Extracting Webpack Modules
#### Use the toggle in the plugin setting to default to the extracted module or the unpatched module if the module is patched

https://github.com/user-attachments/assets/bbe308c8-af9a-4141-b387-9dcf175cfd25

### Disable/Enable Plugins
#### There is a plugin setting to set auto-reload after a plugin is toggled

https://github.com/user-attachments/assets/56de9c1d-fb6d-4665-aff0-6429f80d1f15

### Module Cache
#### To enable the side bar, use the settings in vscode

https://github.com/user-attachments/assets/950230e6-64e5-4bbf-86bf-384ac0b3857d

### Jumping to References

https://github.com/user-attachments/assets/e82291c4-bad3-479c-bfd0-8810d07faab9

3 changes: 3 additions & 0 deletions assets/oneko.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
100 changes: 100 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// @ts-check

import stylistic from "@stylistic/eslint-plugin";

import simpleImportSort from "eslint-plugin-simple-import-sort";
import unusedImports from "eslint-plugin-unused-imports";
import tseslint from "typescript-eslint";
export default tseslint.config(
{ ignores: ["dist", "src/webview"] },
{
files: ["src/**/*.{tsx,ts,mts,mjs,js,jsx}", "eslint.config.mjs"],
plugins: {
"@stylistic": stylistic,
"@typescript-eslint": tseslint.plugin,
"simple-import-sort": simpleImportSort,
"unused-imports": unusedImports
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
tsconfigRootDir: import.meta.dirname
}
},
rules: {

// Style Rules
"@stylistic/jsx-quotes": ["error", "prefer-double"],
"@stylistic/quotes": ["error", "double", { "avoidEscape": true }],
"@stylistic/no-mixed-spaces-and-tabs": "error",
"@stylistic/arrow-parens": ["error", "as-needed"],
"@stylistic/eol-last": ["error", "always"],
"@stylistic/no-multi-spaces": "error",
"@stylistic/no-trailing-spaces": "error",
"@stylistic/no-whitespace-before-property": "error",
"@stylistic/semi": ["error", "always"],
"@stylistic/semi-style": ["error", "last"],
"@stylistic/space-in-parens": ["error", "never"],
"@stylistic/block-spacing": ["error", "always"],
"@stylistic/object-curly-spacing": ["error", "always"],
"@stylistic/spaced-comment": ["error", "always", { "markers": ["!"] }],
"@stylistic/no-extra-semi": "error",

// TS Rules
"@stylistic/func-call-spacing": ["error", "never"],

// ESLint Rules
"yoda": "error",
"eqeqeq": ["error", "always", { "null": "ignore" }],
"prefer-destructuring": ["error", {
"VariableDeclarator": { "array": false, "object": true },
"AssignmentExpression": { "array": false, "object": 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",
"dot-notation": "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",
// unused imports
"no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": ["warn", {
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
}],
// Plugin Rules
"simple-import-sort/imports": ["error", {
groups: [
["^@.+$"],
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$", "^\\.\\.(?!/?$)", "^\\.\\./?$"],
[
"^(assert|buffer|child_process|cluster|console|constants|crypto|dgram|dns|domain|events|fs|http|https|module|net|os|path|punycode|querystring|readline|repl|stream|string_decoder|sys|timers|tls|tty|url|util|vm|zlib|freelist|v8|process|async_hooks|http2|perf_hooks)(/.*|$)"
],
]
}],
"simple-import-sort/exports": "error",
}
}
);
Loading