msw 0.46.0 → 0.46.1
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/lib/iife/index.js +3892 -12748
- package/lib/iife/index.js.map +1 -1
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/lib/mockServiceWorker.js +1 -1
- package/lib/native/index.js +4 -2
- package/lib/native/index.mjs +4 -2
- package/lib/node/index.js +4 -2
- package/lib/node/index.js.map +1 -1
- package/lib/node/index.mjs +4 -2
- package/lib/node/index.mjs.map +1 -1
- package/package.json +2 -6
package/lib/node/index.mjs
CHANGED
|
@@ -138,6 +138,9 @@ var devUtils = {
|
|
|
138
138
|
// src/utils/request/onUnhandledRequest.ts
|
|
139
139
|
import getStringMatchScore from "js-levenshtein";
|
|
140
140
|
|
|
141
|
+
// src/utils/internal/parseGraphQLRequest.ts
|
|
142
|
+
import { parse } from "graphql";
|
|
143
|
+
|
|
141
144
|
// src/utils/request/getPublicUrlFromRequest.ts
|
|
142
145
|
var getPublicUrlFromRequest = (request) => {
|
|
143
146
|
return request.referrer.startsWith(request.url.origin) ? request.url.pathname : new URL(request.url.pathname, `${request.url.protocol}//${request.url.host}`).href;
|
|
@@ -165,8 +168,7 @@ function parseDocumentNode(node) {
|
|
|
165
168
|
}
|
|
166
169
|
function parseQuery(query) {
|
|
167
170
|
try {
|
|
168
|
-
const
|
|
169
|
-
const ast = parse3(query);
|
|
171
|
+
const ast = parse(query);
|
|
170
172
|
return parseDocumentNode(ast);
|
|
171
173
|
} catch (error2) {
|
|
172
174
|
return error2;
|