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/mockServiceWorker.js
CHANGED
package/lib/native/index.js
CHANGED
|
@@ -147,6 +147,9 @@ var devUtils = {
|
|
|
147
147
|
// src/utils/request/onUnhandledRequest.ts
|
|
148
148
|
var import_js_levenshtein = __toESM(require("js-levenshtein"));
|
|
149
149
|
|
|
150
|
+
// src/utils/internal/parseGraphQLRequest.ts
|
|
151
|
+
var import_graphql = require("graphql");
|
|
152
|
+
|
|
150
153
|
// src/utils/request/getPublicUrlFromRequest.ts
|
|
151
154
|
var getPublicUrlFromRequest = (request) => {
|
|
152
155
|
return request.referrer.startsWith(request.url.origin) ? request.url.pathname : new URL(request.url.pathname, `${request.url.protocol}//${request.url.host}`).href;
|
|
@@ -174,8 +177,7 @@ function parseDocumentNode(node) {
|
|
|
174
177
|
}
|
|
175
178
|
function parseQuery(query) {
|
|
176
179
|
try {
|
|
177
|
-
const
|
|
178
|
-
const ast = parse3(query);
|
|
180
|
+
const ast = (0, import_graphql.parse)(query);
|
|
179
181
|
return parseDocumentNode(ast);
|
|
180
182
|
} catch (error2) {
|
|
181
183
|
return error2;
|
package/lib/native/index.mjs
CHANGED
|
@@ -133,6 +133,9 @@ var devUtils = {
|
|
|
133
133
|
// src/utils/request/onUnhandledRequest.ts
|
|
134
134
|
import getStringMatchScore from "js-levenshtein";
|
|
135
135
|
|
|
136
|
+
// src/utils/internal/parseGraphQLRequest.ts
|
|
137
|
+
import { parse } from "graphql";
|
|
138
|
+
|
|
136
139
|
// src/utils/request/getPublicUrlFromRequest.ts
|
|
137
140
|
var getPublicUrlFromRequest = (request) => {
|
|
138
141
|
return request.referrer.startsWith(request.url.origin) ? request.url.pathname : new URL(request.url.pathname, `${request.url.protocol}//${request.url.host}`).href;
|
|
@@ -160,8 +163,7 @@ function parseDocumentNode(node) {
|
|
|
160
163
|
}
|
|
161
164
|
function parseQuery(query) {
|
|
162
165
|
try {
|
|
163
|
-
const
|
|
164
|
-
const ast = parse3(query);
|
|
166
|
+
const ast = parse(query);
|
|
165
167
|
return parseDocumentNode(ast);
|
|
166
168
|
} catch (error2) {
|
|
167
169
|
return error2;
|
package/lib/node/index.js
CHANGED
|
@@ -154,6 +154,9 @@ var devUtils = {
|
|
|
154
154
|
// src/utils/request/onUnhandledRequest.ts
|
|
155
155
|
var import_js_levenshtein = __toESM(require("js-levenshtein"));
|
|
156
156
|
|
|
157
|
+
// src/utils/internal/parseGraphQLRequest.ts
|
|
158
|
+
var import_graphql = require("graphql");
|
|
159
|
+
|
|
157
160
|
// src/utils/request/getPublicUrlFromRequest.ts
|
|
158
161
|
var getPublicUrlFromRequest = (request) => {
|
|
159
162
|
return request.referrer.startsWith(request.url.origin) ? request.url.pathname : new URL(request.url.pathname, `${request.url.protocol}//${request.url.host}`).href;
|
|
@@ -181,8 +184,7 @@ function parseDocumentNode(node) {
|
|
|
181
184
|
}
|
|
182
185
|
function parseQuery(query) {
|
|
183
186
|
try {
|
|
184
|
-
const
|
|
185
|
-
const ast = parse3(query);
|
|
187
|
+
const ast = (0, import_graphql.parse)(query);
|
|
186
188
|
return parseDocumentNode(ast);
|
|
187
189
|
} catch (error2) {
|
|
188
190
|
return error2;
|