Allow for the Intercepters to be treated as a plugin (Pretender, MSW)
See original GitHub issueCurrently the interceptor is Pretender and it is pretty hardcoded. The intent is to isolate the Interceptor code into its own configuration, then move it to its own package to allow for other interceptors to be specified.
Currently the main entry point to the interceptor code is on the server (the get, put, post, etc methods) and the server is the this
then the routes are configured. The goal would be to move these methods to the interceptor code and off the server.
Tasks
- Move Pretender to its own config. Allow for a way to provide an alternate interceptor. Provide full backward compatibility and make Pretender the default interceptor. https://github.com/miragejs/miragejs/pull/1036
- Move the pretender code to its own package. (currently in progress see mirage-pretender)
- Create a package that allows MSW to be used as an interceptor with Mirage. (Currently in progress see mirage-msw)
- Remove the Pretender code from MirageJS and require the user to choose the interceptor (Pretender, MSW, or none). This will be a breaking change in MirageJS.
- Move the interceptor creation methods (get, put, post, etc) to the interceptor config and make the interceptor config the
this
when theroutes
function is run. The Mirage Server will be supplied as a property on the config. For most users this should not be a breaking change, but more advanced uses this could be.
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:6 (2 by maintainers)
Top Results From Across the Web
mswjs/interceptors: Low-level HTTP/HTTPS/XHR ... - GitHub
The class extension allows to fully utilize Node.js internals instead of polyfilling them, which results in more resilient mocks. What this library does....
Read more >Interceptors - ActiveMQ - The Apache Software Foundation!
A plugin is an instance of the interface BrokerPlugin which allows a plugin to add itself into the broker interceptor chain, typically using...
Read more >Untitled
Risultati genoa juve, Thuyet giang phat phap mp3, Debo paycheck meme, Sound spatialization vst, Dwyck nice and smooth, Food truck race season 4...
Read more >Untitled
Stock xchng free stock photos, White hair treatment shampoo! ... Kayla murray instagram, Pijlsweerd wonen, Group n racing nsw, Enjoy group hotels resorts, ......
Read more >Untitled
Hp ms 7500 motherboard drivers, Master's apprentice tab, Peso de cerebros de animales, ... Malassezia furfur natural treatment, Calwell club raffles, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Of course he can be a collab here I thought he already was! I definitely don’t want to be anyone’s bottleneck just because I don’t have the cycles to work on this anymore 👍
The hard coded interceptor has already been removed to another repo. I just didnt remove it yet from miragejs as it would be a breaking change. But that is on the roadmap above, the 4th checkbox