-
Notifications
You must be signed in to change notification settings - Fork 370
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(devtools): implement header modifier #4978
Conversation
|
Summary
🤖[deprecated] Generated by Copilot at 4a14bab
This pull request adds a new feature to the devtools client, which allows users to modify request headers for debugging purposes. It implements a custom webpack plugin to create a service worker file that modifies headers based on rules stored in IndexedDB. It also adds a new header modifier tab to the devtools client, which provides a UI for editing and managing the rules and the service worker. It updates the package.json, tsconfig.json, and eslint files to support the new feature. It refactors the rpc module to split the server and client logic into separate files. It adds some utility functions and interfaces for the header modifier feature.
Details
🤖[deprecated] Generated by Copilot at 4a14bab
idb-keyval
package (link, link)ServiceWorkerCompilerPlugin
to create the service worker file from thesrc/service.worker.ts
file, and inject the version from thepackage.json
file (link, link, link, link, link)navigator.serviceWorker
API to register, unregister, and query the service worker, and expose some functions and state for the client components (link, link, link)rpc/index.ts
file (link, link)assert
function to the utils module, which checks for falsy values and throws an error, and use theasserts
type predicate to narrow the types (link, link)module.exports
object in the.eslintrc.js
file, using the import syntax from theeslint
package (link)outDir
property to thetsconfig.json
file, and include the plugins folder in the compilation (link, link)@rspack/core
package as a devDependency, and reorder the devDependencies in alphabetical order (link, link)Related Issue
Checklist
pnpm run change
.