@mcpc-tech/unplugin-dev-inspector-mcp 0.0.2-beta.35 → 0.0.2-beta.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -87162,6 +87162,16 @@ function setupInspectorMiddleware(middlewares, config) {
87162
87162
  let cachedCSS = null;
87163
87163
  let filesChecked = false;
87164
87164
  middlewares.use((req, res, next$1) => {
87165
+ if (req.url?.startsWith("/__inspector__")) {
87166
+ res.setHeader("Access-Control-Allow-Origin", "*");
87167
+ res.setHeader("Access-Control-Allow-Methods", "GET, OPTIONS");
87168
+ res.setHeader("Access-Control-Allow-Headers", "Content-Type");
87169
+ if (req.method === "OPTIONS") {
87170
+ res.statusCode = 204;
87171
+ res.end();
87172
+ return;
87173
+ }
87174
+ }
87165
87175
  if (!filesChecked) {
87166
87176
  cachedScript = getInspectorScript();
87167
87177
  cachedCSS = getInspectorCSS();
package/dist/index.js CHANGED
@@ -87154,6 +87154,16 @@ function setupInspectorMiddleware(middlewares, config) {
87154
87154
  let cachedCSS = null;
87155
87155
  let filesChecked = false;
87156
87156
  middlewares.use((req, res, next$1) => {
87157
+ if (req.url?.startsWith("/__inspector__")) {
87158
+ res.setHeader("Access-Control-Allow-Origin", "*");
87159
+ res.setHeader("Access-Control-Allow-Methods", "GET, OPTIONS");
87160
+ res.setHeader("Access-Control-Allow-Headers", "Content-Type");
87161
+ if (req.method === "OPTIONS") {
87162
+ res.statusCode = 204;
87163
+ res.end();
87164
+ return;
87165
+ }
87166
+ }
87157
87167
  if (!filesChecked) {
87158
87168
  cachedScript = getInspectorScript();
87159
87169
  cachedCSS = getInspectorCSS();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcpc-tech/unplugin-dev-inspector-mcp",
3
- "version": "0.0.2-beta.35",
3
+ "version": "0.0.2-beta.36",
4
4
  "description": "Universal dev inspector plugin for React/Vue - inspect component sources and API calls in any bundler",
5
5
  "type": "module",
6
6
  "license": "MIT",