Update checked-in dependencies
This commit is contained in:
parent
55ff016766
commit
313daefcef
1570 changed files with 4230 additions and 228668 deletions
22
node_modules/@mswjs/interceptors/lib/node/RemoteHttpInterceptor.js
generated
vendored
22
node_modules/@mswjs/interceptors/lib/node/RemoteHttpInterceptor.js
generated
vendored
|
|
@ -1,17 +1,17 @@
|
|||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunkMCB574K6js = require('./chunk-MCB574K6.js');
|
||||
var _chunkR6JVCM7Xjs = require('./chunk-R6JVCM7X.js');
|
||||
|
||||
|
||||
var _chunkRA7KLLRDjs = require('./chunk-RA7KLLRD.js');
|
||||
var _chunkZAIODWHAjs = require('./chunk-ZAIODWHA.js');
|
||||
require('./chunk-4YBV77DG.js');
|
||||
|
||||
|
||||
var _chunkR7MWIVYWjs = require('./chunk-R7MWIVYW.js');
|
||||
var _chunk4WG2AM2Tjs = require('./chunk-4WG2AM2T.js');
|
||||
require('./chunk-LK6DILFK.js');
|
||||
|
||||
|
||||
var _chunkK4I5GNXUjs = require('./chunk-K4I5GNXU.js');
|
||||
var _chunkYAIEISARjs = require('./chunk-YAIEISAR.js');
|
||||
require('./chunk-PFGO5BSM.js');
|
||||
require('./chunk-73NOP3T5.js');
|
||||
|
||||
|
|
@ -21,18 +21,18 @@ var _chunkC2JSMMHYjs = require('./chunk-C2JSMMHY.js');
|
|||
|
||||
|
||||
|
||||
var _chunkDLID3GDGjs = require('./chunk-DLID3GDG.js');
|
||||
var _chunkA7U44ARPjs = require('./chunk-A7U44ARP.js');
|
||||
require('./chunk-SMXZPJEA.js');
|
||||
|
||||
// src/RemoteHttpInterceptor.ts
|
||||
var RemoteHttpInterceptor = class extends _chunkMCB574K6js.BatchInterceptor {
|
||||
var RemoteHttpInterceptor = class extends _chunkR6JVCM7Xjs.BatchInterceptor {
|
||||
constructor() {
|
||||
super({
|
||||
name: "remote-interceptor",
|
||||
interceptors: [
|
||||
new (0, _chunkRA7KLLRDjs.ClientRequestInterceptor)(),
|
||||
new (0, _chunkR7MWIVYWjs.XMLHttpRequestInterceptor)(),
|
||||
new (0, _chunkK4I5GNXUjs.FetchInterceptor)()
|
||||
new (0, _chunkZAIODWHAjs.ClientRequestInterceptor)(),
|
||||
new (0, _chunk4WG2AM2Tjs.XMLHttpRequestInterceptor)(),
|
||||
new (0, _chunkYAIEISARjs.FetchInterceptor)()
|
||||
]
|
||||
});
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ var RemoteHttpInterceptor = class extends _chunkMCB574K6js.BatchInterceptor {
|
|||
const responseInit = JSON.parse(
|
||||
serializedResponse
|
||||
);
|
||||
const mockedResponse = new (0, _chunkDLID3GDGjs.FetchResponse)(responseInit.body, {
|
||||
const mockedResponse = new (0, _chunkA7U44ARPjs.FetchResponse)(responseInit.body, {
|
||||
url: request.url,
|
||||
status: responseInit.status,
|
||||
statusText: responseInit.statusText,
|
||||
|
|
@ -100,7 +100,7 @@ function requestReviver(key, value) {
|
|||
return value;
|
||||
}
|
||||
}
|
||||
var _RemoteHttpResolver = class extends _chunkDLID3GDGjs.Interceptor {
|
||||
var _RemoteHttpResolver = class extends _chunkA7U44ARPjs.Interceptor {
|
||||
constructor(options) {
|
||||
super(_RemoteHttpResolver.symbol);
|
||||
this.process = options.process;
|
||||
|
|
|
|||
10
node_modules/@mswjs/interceptors/lib/node/RemoteHttpInterceptor.mjs
generated
vendored
10
node_modules/@mswjs/interceptors/lib/node/RemoteHttpInterceptor.mjs
generated
vendored
|
|
@ -1,17 +1,17 @@
|
|||
import {
|
||||
BatchInterceptor
|
||||
} from "./chunk-TBU3WLO3.mjs";
|
||||
} from "./chunk-RC2XPCC4.mjs";
|
||||
import {
|
||||
ClientRequestInterceptor
|
||||
} from "./chunk-FHLAZ57F.mjs";
|
||||
} from "./chunk-GLGFOTGJ.mjs";
|
||||
import "./chunk-TJDMZZXE.mjs";
|
||||
import {
|
||||
XMLHttpRequestInterceptor
|
||||
} from "./chunk-3HLZLASJ.mjs";
|
||||
} from "./chunk-EADPZWWI.mjs";
|
||||
import "./chunk-6HYIRFX2.mjs";
|
||||
import {
|
||||
FetchInterceptor
|
||||
} from "./chunk-3TXENUZY.mjs";
|
||||
} from "./chunk-GL6JCI7E.mjs";
|
||||
import "./chunk-TX5GBTFY.mjs";
|
||||
import "./chunk-6YM4PLBI.mjs";
|
||||
import {
|
||||
|
|
@ -21,7 +21,7 @@ import {
|
|||
import {
|
||||
FetchResponse,
|
||||
Interceptor
|
||||
} from "./chunk-YM42IU6M.mjs";
|
||||
} from "./chunk-IHJSPMYM.mjs";
|
||||
import "./chunk-3GJB4JDF.mjs";
|
||||
|
||||
// src/RemoteHttpInterceptor.ts
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var _chunkC2JSMMHYjs = require('./chunk-C2JSMMHY.js');
|
|||
|
||||
|
||||
|
||||
var _chunkDLID3GDGjs = require('./chunk-DLID3GDG.js');
|
||||
var _chunkA7U44ARPjs = require('./chunk-A7U44ARP.js');
|
||||
|
||||
|
||||
var _chunkSMXZPJEAjs = require('./chunk-SMXZPJEA.js');
|
||||
|
|
@ -209,8 +209,8 @@ function parseJson(data) {
|
|||
|
||||
// src/interceptors/XMLHttpRequest/utils/createResponse.ts
|
||||
function createResponse(request, body) {
|
||||
const responseBodyOrNull = _chunkDLID3GDGjs.FetchResponse.isResponseWithBody(request.status) ? body : null;
|
||||
return new (0, _chunkDLID3GDGjs.FetchResponse)(responseBodyOrNull, {
|
||||
const responseBodyOrNull = _chunkA7U44ARPjs.FetchResponse.isResponseWithBody(request.status) ? body : null;
|
||||
return new (0, _chunkA7U44ARPjs.FetchResponse)(responseBodyOrNull, {
|
||||
url: request.responseURL,
|
||||
status: request.status,
|
||||
statusText: request.statusText,
|
||||
|
|
@ -256,7 +256,7 @@ var XMLHttpRequestController = class {
|
|||
this[kIsRequestHandled] = false;
|
||||
this.events = /* @__PURE__ */ new Map();
|
||||
this.uploadEvents = /* @__PURE__ */ new Map();
|
||||
this.requestId = _chunkDLID3GDGjs.createRequestId.call(void 0, );
|
||||
this.requestId = _chunkA7U44ARPjs.createRequestId.call(void 0, );
|
||||
this.requestHeaders = new Headers();
|
||||
this.responseBuffer = new Uint8Array();
|
||||
this.request = createProxy(initialRequest, {
|
||||
|
|
@ -338,7 +338,7 @@ var XMLHttpRequestController = class {
|
|||
);
|
||||
if (IS_NODE) {
|
||||
this.request.setRequestHeader(
|
||||
_chunkDLID3GDGjs.INTERNAL_REQUEST_ID_HEADER_NAME,
|
||||
_chunkA7U44ARPjs.INTERNAL_REQUEST_ID_HEADER_NAME,
|
||||
this.requestId
|
||||
);
|
||||
}
|
||||
|
|
@ -799,7 +799,7 @@ function createXMLHttpRequestProxy({
|
|||
}
|
||||
|
||||
// src/interceptors/XMLHttpRequest/index.ts
|
||||
var _XMLHttpRequestInterceptor = class extends _chunkDLID3GDGjs.Interceptor {
|
||||
var _XMLHttpRequestInterceptor = class extends _chunkA7U44ARPjs.Interceptor {
|
||||
constructor() {
|
||||
super(_XMLHttpRequestInterceptor.interceptorSymbol);
|
||||
}
|
||||
|
|
@ -845,4 +845,4 @@ XMLHttpRequestInterceptor.interceptorSymbol = Symbol("xhr");
|
|||
|
||||
|
||||
exports.XMLHttpRequestInterceptor = XMLHttpRequestInterceptor;
|
||||
//# sourceMappingURL=chunk-R7MWIVYW.js.map
|
||||
//# sourceMappingURL=chunk-4WG2AM2T.js.map
|
||||
|
|
@ -227,8 +227,9 @@ var _FetchResponse = class extends Response {
|
|||
const safeStatus = _FetchResponse.isConfigurableStatusCode(status) ? status : 200;
|
||||
const finalBody = _FetchResponse.isResponseWithBody(status) ? body : null;
|
||||
super(finalBody, {
|
||||
...init,
|
||||
status: safeStatus
|
||||
status: safeStatus,
|
||||
statusText: init.statusText,
|
||||
headers: init.headers
|
||||
});
|
||||
if (status !== safeStatus) {
|
||||
const state = getValueBySymbol("state", this);
|
||||
|
|
@ -264,4 +265,4 @@ FetchResponse.STATUS_CODES_WITH_REDIRECT = [301, 302, 303, 307, 308];
|
|||
|
||||
|
||||
exports.INTERNAL_REQUEST_ID_HEADER_NAME = INTERNAL_REQUEST_ID_HEADER_NAME; exports.getGlobalSymbol = getGlobalSymbol; exports.deleteGlobalSymbol = deleteGlobalSymbol; exports.InterceptorReadyState = InterceptorReadyState; exports.Interceptor = Interceptor; exports.createRequestId = createRequestId; exports.canParseUrl = canParseUrl; exports.FetchResponse = FetchResponse;
|
||||
//# sourceMappingURL=chunk-DLID3GDG.js.map
|
||||
//# sourceMappingURL=chunk-A7U44ARP.js.map
|
||||
1
node_modules/@mswjs/interceptors/lib/node/chunk-A7U44ARP.js.map
generated
vendored
Normal file
1
node_modules/@mswjs/interceptors/lib/node/chunk-A7U44ARP.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/@mswjs/interceptors/lib/node/chunk-DLID3GDG.js.map
generated
vendored
1
node_modules/@mswjs/interceptors/lib/node/chunk-DLID3GDG.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
|
@ -18,7 +18,7 @@ import {
|
|||
INTERNAL_REQUEST_ID_HEADER_NAME,
|
||||
Interceptor,
|
||||
createRequestId
|
||||
} from "./chunk-YM42IU6M.mjs";
|
||||
} from "./chunk-IHJSPMYM.mjs";
|
||||
import {
|
||||
setRawRequest
|
||||
} from "./chunk-3GJB4JDF.mjs";
|
||||
|
|
@ -845,4 +845,4 @@ XMLHttpRequestInterceptor.interceptorSymbol = Symbol("xhr");
|
|||
export {
|
||||
XMLHttpRequestInterceptor
|
||||
};
|
||||
//# sourceMappingURL=chunk-3HLZLASJ.mjs.map
|
||||
//# sourceMappingURL=chunk-EADPZWWI.mjs.map
|
||||
1
node_modules/@mswjs/interceptors/lib/node/chunk-FHLAZ57F.mjs.map
generated
vendored
1
node_modules/@mswjs/interceptors/lib/node/chunk-FHLAZ57F.mjs.map
generated
vendored
File diff suppressed because one or more lines are too long
|
|
@ -14,7 +14,7 @@ import {
|
|||
Interceptor,
|
||||
canParseUrl,
|
||||
createRequestId
|
||||
} from "./chunk-YM42IU6M.mjs";
|
||||
} from "./chunk-IHJSPMYM.mjs";
|
||||
import {
|
||||
setRawRequest
|
||||
} from "./chunk-3GJB4JDF.mjs";
|
||||
|
|
@ -305,4 +305,4 @@ FetchInterceptor.symbol = Symbol("fetch");
|
|||
export {
|
||||
FetchInterceptor
|
||||
};
|
||||
//# sourceMappingURL=chunk-3TXENUZY.mjs.map
|
||||
//# sourceMappingURL=chunk-GL6JCI7E.mjs.map
|
||||
|
|
@ -14,7 +14,7 @@ import {
|
|||
INTERNAL_REQUEST_ID_HEADER_NAME,
|
||||
Interceptor,
|
||||
createRequestId
|
||||
} from "./chunk-YM42IU6M.mjs";
|
||||
} from "./chunk-IHJSPMYM.mjs";
|
||||
import {
|
||||
setRawRequest
|
||||
} from "./chunk-3GJB4JDF.mjs";
|
||||
|
|
@ -439,6 +439,13 @@ var MockHttpSocket = class extends MockSocket {
|
|||
}
|
||||
const socket = this.createConnection();
|
||||
this.originalSocket = socket;
|
||||
if ("_handle" in socket) {
|
||||
Object.defineProperty(this, "_handle", {
|
||||
value: socket._handle,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
});
|
||||
}
|
||||
this.once("error", (error) => {
|
||||
socket.destroy(error);
|
||||
});
|
||||
|
|
@ -984,10 +991,30 @@ var _ClientRequestInterceptor = class extends Interceptor {
|
|||
};
|
||||
}
|
||||
setup() {
|
||||
const { get: originalGet, request: originalRequest } = http2;
|
||||
const {
|
||||
ClientRequest: OriginalClientRequest,
|
||||
get: originalGet,
|
||||
request: originalRequest
|
||||
} = http2;
|
||||
const { get: originalHttpsGet, request: originalHttpsRequest } = https2;
|
||||
const onRequest = this.onRequest.bind(this);
|
||||
const onResponse = this.onResponse.bind(this);
|
||||
http2.ClientRequest = new Proxy(http2.ClientRequest, {
|
||||
construct: (target, args) => {
|
||||
const [url, options, callback] = normalizeClientRequestArgs(
|
||||
"http:",
|
||||
args
|
||||
);
|
||||
const Agent2 = options.protocol === "https:" ? MockHttpsAgent : MockAgent;
|
||||
const mockAgent = new Agent2({
|
||||
customAgent: options.agent,
|
||||
onRequest,
|
||||
onResponse
|
||||
});
|
||||
options.agent = mockAgent;
|
||||
return Reflect.construct(target, [url, options, callback]);
|
||||
}
|
||||
});
|
||||
http2.request = new Proxy(http2.request, {
|
||||
apply: (target, thisArg, args) => {
|
||||
const [url, options, callback] = normalizeClientRequestArgs(
|
||||
|
|
@ -1050,6 +1077,7 @@ var _ClientRequestInterceptor = class extends Interceptor {
|
|||
});
|
||||
recordRawFetchHeaders();
|
||||
this.subscriptions.push(() => {
|
||||
http2.ClientRequest = OriginalClientRequest;
|
||||
http2.get = originalGet;
|
||||
http2.request = originalRequest;
|
||||
https2.get = originalHttpsGet;
|
||||
|
|
@ -1064,4 +1092,4 @@ ClientRequestInterceptor.symbol = Symbol("client-request-interceptor");
|
|||
export {
|
||||
ClientRequestInterceptor
|
||||
};
|
||||
//# sourceMappingURL=chunk-FHLAZ57F.mjs.map
|
||||
//# sourceMappingURL=chunk-GLGFOTGJ.mjs.map
|
||||
1
node_modules/@mswjs/interceptors/lib/node/chunk-GLGFOTGJ.mjs.map
generated
vendored
Normal file
1
node_modules/@mswjs/interceptors/lib/node/chunk-GLGFOTGJ.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -227,8 +227,9 @@ var _FetchResponse = class extends Response {
|
|||
const safeStatus = _FetchResponse.isConfigurableStatusCode(status) ? status : 200;
|
||||
const finalBody = _FetchResponse.isResponseWithBody(status) ? body : null;
|
||||
super(finalBody, {
|
||||
...init,
|
||||
status: safeStatus
|
||||
status: safeStatus,
|
||||
statusText: init.statusText,
|
||||
headers: init.headers
|
||||
});
|
||||
if (status !== safeStatus) {
|
||||
const state = getValueBySymbol("state", this);
|
||||
|
|
@ -264,4 +265,4 @@ export {
|
|||
canParseUrl,
|
||||
FetchResponse
|
||||
};
|
||||
//# sourceMappingURL=chunk-YM42IU6M.mjs.map
|
||||
//# sourceMappingURL=chunk-IHJSPMYM.mjs.map
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,9 +1,9 @@
|
|||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunkDLID3GDGjs = require('./chunk-DLID3GDG.js');
|
||||
var _chunkA7U44ARPjs = require('./chunk-A7U44ARP.js');
|
||||
|
||||
// src/BatchInterceptor.ts
|
||||
var BatchInterceptor = class extends _chunkDLID3GDGjs.Interceptor {
|
||||
var BatchInterceptor = class extends _chunkA7U44ARPjs.Interceptor {
|
||||
constructor(options) {
|
||||
BatchInterceptor.symbol = Symbol(options.name);
|
||||
super(BatchInterceptor.symbol);
|
||||
|
|
@ -48,4 +48,4 @@ var BatchInterceptor = class extends _chunkDLID3GDGjs.Interceptor {
|
|||
|
||||
|
||||
exports.BatchInterceptor = BatchInterceptor;
|
||||
//# sourceMappingURL=chunk-MCB574K6.js.map
|
||||
//# sourceMappingURL=chunk-R6JVCM7X.js.map
|
||||
1
node_modules/@mswjs/interceptors/lib/node/chunk-RA7KLLRD.js.map
generated
vendored
1
node_modules/@mswjs/interceptors/lib/node/chunk-RA7KLLRD.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
Interceptor
|
||||
} from "./chunk-YM42IU6M.mjs";
|
||||
} from "./chunk-IHJSPMYM.mjs";
|
||||
|
||||
// src/BatchInterceptor.ts
|
||||
var BatchInterceptor = class extends Interceptor {
|
||||
|
|
@ -48,4 +48,4 @@ var BatchInterceptor = class extends Interceptor {
|
|||
export {
|
||||
BatchInterceptor
|
||||
};
|
||||
//# sourceMappingURL=chunk-TBU3WLO3.mjs.map
|
||||
//# sourceMappingURL=chunk-RC2XPCC4.mjs.map
|
||||
|
|
@ -14,7 +14,7 @@ var _chunkC2JSMMHYjs = require('./chunk-C2JSMMHY.js');
|
|||
|
||||
|
||||
|
||||
var _chunkDLID3GDGjs = require('./chunk-DLID3GDG.js');
|
||||
var _chunkA7U44ARPjs = require('./chunk-A7U44ARP.js');
|
||||
|
||||
|
||||
var _chunkSMXZPJEAjs = require('./chunk-SMXZPJEA.js');
|
||||
|
|
@ -179,7 +179,7 @@ function decompressResponse(response) {
|
|||
}
|
||||
|
||||
// src/interceptors/fetch/index.ts
|
||||
var _FetchInterceptor = class extends _chunkDLID3GDGjs.Interceptor {
|
||||
var _FetchInterceptor = class extends _chunkA7U44ARPjs.Interceptor {
|
||||
constructor() {
|
||||
super(_FetchInterceptor.symbol);
|
||||
}
|
||||
|
|
@ -193,8 +193,8 @@ var _FetchInterceptor = class extends _chunkDLID3GDGjs.Interceptor {
|
|||
'Failed to patch the "fetch" module: already patched.'
|
||||
);
|
||||
globalThis.fetch = async (input, init) => {
|
||||
const requestId = _chunkDLID3GDGjs.createRequestId.call(void 0, );
|
||||
const resolvedInput = typeof input === "string" && typeof location !== "undefined" && !_chunkDLID3GDGjs.canParseUrl.call(void 0, input) ? new URL(input, location.href) : input;
|
||||
const requestId = _chunkA7U44ARPjs.createRequestId.call(void 0, );
|
||||
const resolvedInput = typeof input === "string" && typeof location !== "undefined" && !_chunkA7U44ARPjs.canParseUrl.call(void 0, input) ? new URL(input, location.href) : input;
|
||||
const request = new Request(resolvedInput, init);
|
||||
if (input instanceof Request) {
|
||||
_chunkSMXZPJEAjs.setRawRequest.call(void 0, request, input);
|
||||
|
|
@ -217,9 +217,9 @@ var _FetchInterceptor = class extends _chunkDLID3GDGjs.Interceptor {
|
|||
rawResponse
|
||||
});
|
||||
const decompressedStream = decompressResponse(rawResponse);
|
||||
const response = decompressedStream === null ? rawResponse : new (0, _chunkDLID3GDGjs.FetchResponse)(decompressedStream, rawResponse);
|
||||
_chunkDLID3GDGjs.FetchResponse.setUrl(request.url, response);
|
||||
if (_chunkDLID3GDGjs.FetchResponse.isRedirectResponse(response.status)) {
|
||||
const response = decompressedStream === null ? rawResponse : new (0, _chunkA7U44ARPjs.FetchResponse)(decompressedStream, rawResponse);
|
||||
_chunkA7U44ARPjs.FetchResponse.setUrl(request.url, response);
|
||||
if (_chunkA7U44ARPjs.FetchResponse.isRedirectResponse(response.status)) {
|
||||
if (request.redirect === "error") {
|
||||
responsePromise.reject(createNetworkError("unexpected redirect"));
|
||||
return;
|
||||
|
|
@ -305,4 +305,4 @@ FetchInterceptor.symbol = Symbol("fetch");
|
|||
|
||||
|
||||
exports.FetchInterceptor = FetchInterceptor;
|
||||
//# sourceMappingURL=chunk-K4I5GNXU.js.map
|
||||
//# sourceMappingURL=chunk-YAIEISAR.js.map
|
||||
|
|
@ -14,7 +14,7 @@ var _chunkC2JSMMHYjs = require('./chunk-C2JSMMHY.js');
|
|||
|
||||
|
||||
|
||||
var _chunkDLID3GDGjs = require('./chunk-DLID3GDG.js');
|
||||
var _chunkA7U44ARPjs = require('./chunk-A7U44ARP.js');
|
||||
|
||||
|
||||
var _chunkSMXZPJEAjs = require('./chunk-SMXZPJEA.js');
|
||||
|
|
@ -311,7 +311,7 @@ var MockHttpSocket = class extends MockSocket {
|
|||
this.shouldKeepAlive = shouldKeepAlive;
|
||||
const url = new URL(path, this.baseUrl);
|
||||
const method = ((_a = this.connectionOptions.method) == null ? void 0 : _a.toUpperCase()) || "GET";
|
||||
const headers = _chunkDLID3GDGjs.FetchResponse.parseRawHeaders(rawHeaders);
|
||||
const headers = _chunkA7U44ARPjs.FetchResponse.parseRawHeaders(rawHeaders);
|
||||
const canHaveBody = method !== "GET" && method !== "HEAD";
|
||||
if (url.username || url.password) {
|
||||
if (!headers.has("authorization")) {
|
||||
|
|
@ -330,7 +330,7 @@ var MockHttpSocket = class extends MockSocket {
|
|||
this.flushWriteBuffer();
|
||||
}
|
||||
});
|
||||
const requestId = _chunkDLID3GDGjs.createRequestId.call(void 0, );
|
||||
const requestId = _chunkA7U44ARPjs.createRequestId.call(void 0, );
|
||||
this.request = new Request(url, {
|
||||
method,
|
||||
headers,
|
||||
|
|
@ -342,7 +342,7 @@ var MockHttpSocket = class extends MockSocket {
|
|||
Reflect.set(this.request, kRequestId, requestId);
|
||||
_chunkSMXZPJEAjs.setRawRequest.call(void 0, this.request, Reflect.get(this, "_httpMessage"));
|
||||
_chunk4YBV77DGjs.setRawRequestBodyStream.call(void 0, this.request, this.requestStream);
|
||||
if (this.request.headers.has(_chunkDLID3GDGjs.INTERNAL_REQUEST_ID_HEADER_NAME)) {
|
||||
if (this.request.headers.has(_chunkA7U44ARPjs.INTERNAL_REQUEST_ID_HEADER_NAME)) {
|
||||
this.passthrough();
|
||||
return;
|
||||
}
|
||||
|
|
@ -353,8 +353,8 @@ var MockHttpSocket = class extends MockSocket {
|
|||
});
|
||||
};
|
||||
this.onResponseStart = (versionMajor, versionMinor, rawHeaders, method, url, status, statusText) => {
|
||||
const headers = _chunkDLID3GDGjs.FetchResponse.parseRawHeaders(rawHeaders);
|
||||
const response = new (0, _chunkDLID3GDGjs.FetchResponse)(
|
||||
const headers = _chunkA7U44ARPjs.FetchResponse.parseRawHeaders(rawHeaders);
|
||||
const response = new (0, _chunkA7U44ARPjs.FetchResponse)(
|
||||
/**
|
||||
* @note The Fetch API response instance exposed to the consumer
|
||||
* is created over the response stream of the HTTP parser. It is NOT
|
||||
|
|
@ -362,7 +362,7 @@ var MockHttpSocket = class extends MockSocket {
|
|||
* in response listener while the Socket instance delays the emission
|
||||
* of "end" and other events until those response listeners are finished.
|
||||
*/
|
||||
_chunkDLID3GDGjs.FetchResponse.isResponseWithBody(status) ? _stream.Readable.toWeb(
|
||||
_chunkA7U44ARPjs.FetchResponse.isResponseWithBody(status) ? _stream.Readable.toWeb(
|
||||
this.responseStream = new (0, _stream.Readable)({ read() {
|
||||
} })
|
||||
) : null,
|
||||
|
|
@ -377,8 +377,8 @@ var MockHttpSocket = class extends MockSocket {
|
|||
this.request,
|
||||
"Failed to handle a response: request does not exist"
|
||||
);
|
||||
_chunkDLID3GDGjs.FetchResponse.setUrl(this.request.url, response);
|
||||
if (this.request.headers.has(_chunkDLID3GDGjs.INTERNAL_REQUEST_ID_HEADER_NAME)) {
|
||||
_chunkA7U44ARPjs.FetchResponse.setUrl(this.request.url, response);
|
||||
if (this.request.headers.has(_chunkA7U44ARPjs.INTERNAL_REQUEST_ID_HEADER_NAME)) {
|
||||
return;
|
||||
}
|
||||
this.responseListenersPromise = this.onResponse({
|
||||
|
|
@ -439,6 +439,13 @@ var MockHttpSocket = class extends MockSocket {
|
|||
}
|
||||
const socket = this.createConnection();
|
||||
this.originalSocket = socket;
|
||||
if ("_handle" in socket) {
|
||||
Object.defineProperty(this, "_handle", {
|
||||
value: socket._handle,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
});
|
||||
}
|
||||
this.once("error", (error) => {
|
||||
socket.destroy(error);
|
||||
});
|
||||
|
|
@ -459,7 +466,7 @@ var MockHttpSocket = class extends MockSocket {
|
|||
);
|
||||
const rawRequestHeaders = getRawFetchHeaders(this.request.headers);
|
||||
const requestHeadersString = rawRequestHeaders.filter(([name]) => {
|
||||
return name.toLowerCase() !== _chunkDLID3GDGjs.INTERNAL_REQUEST_ID_HEADER_NAME;
|
||||
return name.toLowerCase() !== _chunkA7U44ARPjs.INTERNAL_REQUEST_ID_HEADER_NAME;
|
||||
}).map(([name, value]) => `${name}: ${value}`).join("\r\n");
|
||||
const headersChunk = `${chunkBeforeRequestHeaders}${requestHeadersString}${chunkAfterRequestHeaders}`;
|
||||
socket.write(headersChunk, encoding, callback);
|
||||
|
|
@ -939,7 +946,7 @@ function normalizeClientRequestArgs(defaultProtocol, args) {
|
|||
}
|
||||
|
||||
// src/interceptors/ClientRequest/index.ts
|
||||
var _ClientRequestInterceptor = class extends _chunkDLID3GDGjs.Interceptor {
|
||||
var _ClientRequestInterceptor = class extends _chunkA7U44ARPjs.Interceptor {
|
||||
constructor() {
|
||||
super(_ClientRequestInterceptor.symbol);
|
||||
this.onRequest = async ({
|
||||
|
|
@ -984,10 +991,30 @@ var _ClientRequestInterceptor = class extends _chunkDLID3GDGjs.Interceptor {
|
|||
};
|
||||
}
|
||||
setup() {
|
||||
const { get: originalGet, request: originalRequest } = _http2.default;
|
||||
const {
|
||||
ClientRequest: OriginalClientRequest,
|
||||
get: originalGet,
|
||||
request: originalRequest
|
||||
} = _http2.default;
|
||||
const { get: originalHttpsGet, request: originalHttpsRequest } = _https2.default;
|
||||
const onRequest = this.onRequest.bind(this);
|
||||
const onResponse = this.onResponse.bind(this);
|
||||
_http2.default.ClientRequest = new Proxy(_http2.default.ClientRequest, {
|
||||
construct: (target, args) => {
|
||||
const [url, options, callback] = normalizeClientRequestArgs(
|
||||
"http:",
|
||||
args
|
||||
);
|
||||
const Agent2 = options.protocol === "https:" ? MockHttpsAgent : MockAgent;
|
||||
const mockAgent = new Agent2({
|
||||
customAgent: options.agent,
|
||||
onRequest,
|
||||
onResponse
|
||||
});
|
||||
options.agent = mockAgent;
|
||||
return Reflect.construct(target, [url, options, callback]);
|
||||
}
|
||||
});
|
||||
_http2.default.request = new Proxy(_http2.default.request, {
|
||||
apply: (target, thisArg, args) => {
|
||||
const [url, options, callback] = normalizeClientRequestArgs(
|
||||
|
|
@ -1050,6 +1077,7 @@ var _ClientRequestInterceptor = class extends _chunkDLID3GDGjs.Interceptor {
|
|||
});
|
||||
recordRawFetchHeaders();
|
||||
this.subscriptions.push(() => {
|
||||
_http2.default.ClientRequest = OriginalClientRequest;
|
||||
_http2.default.get = originalGet;
|
||||
_http2.default.request = originalRequest;
|
||||
_https2.default.get = originalHttpsGet;
|
||||
|
|
@ -1064,4 +1092,4 @@ ClientRequestInterceptor.symbol = Symbol("client-request-interceptor");
|
|||
|
||||
|
||||
exports.ClientRequestInterceptor = ClientRequestInterceptor;
|
||||
//# sourceMappingURL=chunk-RA7KLLRD.js.map
|
||||
//# sourceMappingURL=chunk-ZAIODWHA.js.map
|
||||
1
node_modules/@mswjs/interceptors/lib/node/chunk-ZAIODWHA.js.map
generated
vendored
Normal file
1
node_modules/@mswjs/interceptors/lib/node/chunk-ZAIODWHA.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
6
node_modules/@mswjs/interceptors/lib/node/index.js
generated
vendored
6
node_modules/@mswjs/interceptors/lib/node/index.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunkMCB574K6js = require('./chunk-MCB574K6.js');
|
||||
var _chunkR6JVCM7Xjs = require('./chunk-R6JVCM7X.js');
|
||||
|
||||
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ var _chunk73NOP3T5js = require('./chunk-73NOP3T5.js');
|
|||
|
||||
|
||||
|
||||
var _chunkDLID3GDGjs = require('./chunk-DLID3GDG.js');
|
||||
var _chunkA7U44ARPjs = require('./chunk-A7U44ARP.js');
|
||||
|
||||
|
||||
var _chunkSMXZPJEAjs = require('./chunk-SMXZPJEA.js');
|
||||
|
|
@ -39,5 +39,5 @@ function getCleanUrl(url, isAbsolute = true) {
|
|||
|
||||
|
||||
|
||||
exports.BatchInterceptor = _chunkMCB574K6js.BatchInterceptor; exports.FetchResponse = _chunkDLID3GDGjs.FetchResponse; exports.INTERNAL_REQUEST_ID_HEADER_NAME = _chunkDLID3GDGjs.INTERNAL_REQUEST_ID_HEADER_NAME; exports.IS_PATCHED_MODULE = _chunk73NOP3T5js.IS_PATCHED_MODULE; exports.Interceptor = _chunkDLID3GDGjs.Interceptor; exports.InterceptorReadyState = _chunkDLID3GDGjs.InterceptorReadyState; exports.createRequestId = _chunkDLID3GDGjs.createRequestId; exports.decodeBuffer = _chunkLK6DILFKjs.decodeBuffer; exports.deleteGlobalSymbol = _chunkDLID3GDGjs.deleteGlobalSymbol; exports.encodeBuffer = _chunkLK6DILFKjs.encodeBuffer; exports.getCleanUrl = getCleanUrl; exports.getGlobalSymbol = _chunkDLID3GDGjs.getGlobalSymbol; exports.getRawRequest = _chunkSMXZPJEAjs.getRawRequest;
|
||||
exports.BatchInterceptor = _chunkR6JVCM7Xjs.BatchInterceptor; exports.FetchResponse = _chunkA7U44ARPjs.FetchResponse; exports.INTERNAL_REQUEST_ID_HEADER_NAME = _chunkA7U44ARPjs.INTERNAL_REQUEST_ID_HEADER_NAME; exports.IS_PATCHED_MODULE = _chunk73NOP3T5js.IS_PATCHED_MODULE; exports.Interceptor = _chunkA7U44ARPjs.Interceptor; exports.InterceptorReadyState = _chunkA7U44ARPjs.InterceptorReadyState; exports.createRequestId = _chunkA7U44ARPjs.createRequestId; exports.decodeBuffer = _chunkLK6DILFKjs.decodeBuffer; exports.deleteGlobalSymbol = _chunkA7U44ARPjs.deleteGlobalSymbol; exports.encodeBuffer = _chunkLK6DILFKjs.encodeBuffer; exports.getCleanUrl = getCleanUrl; exports.getGlobalSymbol = _chunkA7U44ARPjs.getGlobalSymbol; exports.getRawRequest = _chunkSMXZPJEAjs.getRawRequest;
|
||||
//# sourceMappingURL=index.js.map
|
||||
4
node_modules/@mswjs/interceptors/lib/node/index.mjs
generated
vendored
4
node_modules/@mswjs/interceptors/lib/node/index.mjs
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
BatchInterceptor
|
||||
} from "./chunk-TBU3WLO3.mjs";
|
||||
} from "./chunk-RC2XPCC4.mjs";
|
||||
import {
|
||||
decodeBuffer,
|
||||
encodeBuffer
|
||||
|
|
@ -16,7 +16,7 @@ import {
|
|||
createRequestId,
|
||||
deleteGlobalSymbol,
|
||||
getGlobalSymbol
|
||||
} from "./chunk-YM42IU6M.mjs";
|
||||
} from "./chunk-IHJSPMYM.mjs";
|
||||
import {
|
||||
getRawRequest
|
||||
} from "./chunk-3GJB4JDF.mjs";
|
||||
|
|
|
|||
6
node_modules/@mswjs/interceptors/lib/node/interceptors/ClientRequest/index.js
generated
vendored
6
node_modules/@mswjs/interceptors/lib/node/interceptors/ClientRequest/index.js
generated
vendored
|
|
@ -1,11 +1,11 @@
|
|||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunkRA7KLLRDjs = require('../../chunk-RA7KLLRD.js');
|
||||
var _chunkZAIODWHAjs = require('../../chunk-ZAIODWHA.js');
|
||||
require('../../chunk-4YBV77DG.js');
|
||||
require('../../chunk-C2JSMMHY.js');
|
||||
require('../../chunk-DLID3GDG.js');
|
||||
require('../../chunk-A7U44ARP.js');
|
||||
require('../../chunk-SMXZPJEA.js');
|
||||
|
||||
|
||||
exports.ClientRequestInterceptor = _chunkRA7KLLRDjs.ClientRequestInterceptor;
|
||||
exports.ClientRequestInterceptor = _chunkZAIODWHAjs.ClientRequestInterceptor;
|
||||
//# sourceMappingURL=index.js.map
|
||||
4
node_modules/@mswjs/interceptors/lib/node/interceptors/ClientRequest/index.mjs
generated
vendored
4
node_modules/@mswjs/interceptors/lib/node/interceptors/ClientRequest/index.mjs
generated
vendored
|
|
@ -1,9 +1,9 @@
|
|||
import {
|
||||
ClientRequestInterceptor
|
||||
} from "../../chunk-FHLAZ57F.mjs";
|
||||
} from "../../chunk-GLGFOTGJ.mjs";
|
||||
import "../../chunk-TJDMZZXE.mjs";
|
||||
import "../../chunk-LGXJ3UUF.mjs";
|
||||
import "../../chunk-YM42IU6M.mjs";
|
||||
import "../../chunk-IHJSPMYM.mjs";
|
||||
import "../../chunk-3GJB4JDF.mjs";
|
||||
export {
|
||||
ClientRequestInterceptor
|
||||
|
|
|
|||
6
node_modules/@mswjs/interceptors/lib/node/interceptors/XMLHttpRequest/index.js
generated
vendored
6
node_modules/@mswjs/interceptors/lib/node/interceptors/XMLHttpRequest/index.js
generated
vendored
|
|
@ -1,13 +1,13 @@
|
|||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunkR7MWIVYWjs = require('../../chunk-R7MWIVYW.js');
|
||||
var _chunk4WG2AM2Tjs = require('../../chunk-4WG2AM2T.js');
|
||||
require('../../chunk-LK6DILFK.js');
|
||||
require('../../chunk-PFGO5BSM.js');
|
||||
require('../../chunk-73NOP3T5.js');
|
||||
require('../../chunk-C2JSMMHY.js');
|
||||
require('../../chunk-DLID3GDG.js');
|
||||
require('../../chunk-A7U44ARP.js');
|
||||
require('../../chunk-SMXZPJEA.js');
|
||||
|
||||
|
||||
exports.XMLHttpRequestInterceptor = _chunkR7MWIVYWjs.XMLHttpRequestInterceptor;
|
||||
exports.XMLHttpRequestInterceptor = _chunk4WG2AM2Tjs.XMLHttpRequestInterceptor;
|
||||
//# sourceMappingURL=index.js.map
|
||||
4
node_modules/@mswjs/interceptors/lib/node/interceptors/XMLHttpRequest/index.mjs
generated
vendored
4
node_modules/@mswjs/interceptors/lib/node/interceptors/XMLHttpRequest/index.mjs
generated
vendored
|
|
@ -1,11 +1,11 @@
|
|||
import {
|
||||
XMLHttpRequestInterceptor
|
||||
} from "../../chunk-3HLZLASJ.mjs";
|
||||
} from "../../chunk-EADPZWWI.mjs";
|
||||
import "../../chunk-6HYIRFX2.mjs";
|
||||
import "../../chunk-TX5GBTFY.mjs";
|
||||
import "../../chunk-6YM4PLBI.mjs";
|
||||
import "../../chunk-LGXJ3UUF.mjs";
|
||||
import "../../chunk-YM42IU6M.mjs";
|
||||
import "../../chunk-IHJSPMYM.mjs";
|
||||
import "../../chunk-3GJB4JDF.mjs";
|
||||
export {
|
||||
XMLHttpRequestInterceptor
|
||||
|
|
|
|||
6
node_modules/@mswjs/interceptors/lib/node/interceptors/fetch/index.js
generated
vendored
6
node_modules/@mswjs/interceptors/lib/node/interceptors/fetch/index.js
generated
vendored
|
|
@ -1,12 +1,12 @@
|
|||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunkK4I5GNXUjs = require('../../chunk-K4I5GNXU.js');
|
||||
var _chunkYAIEISARjs = require('../../chunk-YAIEISAR.js');
|
||||
require('../../chunk-PFGO5BSM.js');
|
||||
require('../../chunk-73NOP3T5.js');
|
||||
require('../../chunk-C2JSMMHY.js');
|
||||
require('../../chunk-DLID3GDG.js');
|
||||
require('../../chunk-A7U44ARP.js');
|
||||
require('../../chunk-SMXZPJEA.js');
|
||||
|
||||
|
||||
exports.FetchInterceptor = _chunkK4I5GNXUjs.FetchInterceptor;
|
||||
exports.FetchInterceptor = _chunkYAIEISARjs.FetchInterceptor;
|
||||
//# sourceMappingURL=index.js.map
|
||||
4
node_modules/@mswjs/interceptors/lib/node/interceptors/fetch/index.mjs
generated
vendored
4
node_modules/@mswjs/interceptors/lib/node/interceptors/fetch/index.mjs
generated
vendored
|
|
@ -1,10 +1,10 @@
|
|||
import {
|
||||
FetchInterceptor
|
||||
} from "../../chunk-3TXENUZY.mjs";
|
||||
} from "../../chunk-GL6JCI7E.mjs";
|
||||
import "../../chunk-TX5GBTFY.mjs";
|
||||
import "../../chunk-6YM4PLBI.mjs";
|
||||
import "../../chunk-LGXJ3UUF.mjs";
|
||||
import "../../chunk-YM42IU6M.mjs";
|
||||
import "../../chunk-IHJSPMYM.mjs";
|
||||
import "../../chunk-3GJB4JDF.mjs";
|
||||
export {
|
||||
FetchInterceptor
|
||||
|
|
|
|||
14
node_modules/@mswjs/interceptors/lib/node/presets/node.js
generated
vendored
14
node_modules/@mswjs/interceptors/lib/node/presets/node.js
generated
vendored
|
|
@ -1,25 +1,25 @@
|
|||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
||||
|
||||
var _chunkRA7KLLRDjs = require('../chunk-RA7KLLRD.js');
|
||||
var _chunkZAIODWHAjs = require('../chunk-ZAIODWHA.js');
|
||||
require('../chunk-4YBV77DG.js');
|
||||
|
||||
|
||||
var _chunkR7MWIVYWjs = require('../chunk-R7MWIVYW.js');
|
||||
var _chunk4WG2AM2Tjs = require('../chunk-4WG2AM2T.js');
|
||||
require('../chunk-LK6DILFK.js');
|
||||
|
||||
|
||||
var _chunkK4I5GNXUjs = require('../chunk-K4I5GNXU.js');
|
||||
var _chunkYAIEISARjs = require('../chunk-YAIEISAR.js');
|
||||
require('../chunk-PFGO5BSM.js');
|
||||
require('../chunk-73NOP3T5.js');
|
||||
require('../chunk-C2JSMMHY.js');
|
||||
require('../chunk-DLID3GDG.js');
|
||||
require('../chunk-A7U44ARP.js');
|
||||
require('../chunk-SMXZPJEA.js');
|
||||
|
||||
// src/presets/node.ts
|
||||
var node_default = [
|
||||
new (0, _chunkRA7KLLRDjs.ClientRequestInterceptor)(),
|
||||
new (0, _chunkR7MWIVYWjs.XMLHttpRequestInterceptor)(),
|
||||
new (0, _chunkK4I5GNXUjs.FetchInterceptor)()
|
||||
new (0, _chunkZAIODWHAjs.ClientRequestInterceptor)(),
|
||||
new (0, _chunk4WG2AM2Tjs.XMLHttpRequestInterceptor)(),
|
||||
new (0, _chunkYAIEISARjs.FetchInterceptor)()
|
||||
];
|
||||
|
||||
|
||||
|
|
|
|||
8
node_modules/@mswjs/interceptors/lib/node/presets/node.mjs
generated
vendored
8
node_modules/@mswjs/interceptors/lib/node/presets/node.mjs
generated
vendored
|
|
@ -1,18 +1,18 @@
|
|||
import {
|
||||
ClientRequestInterceptor
|
||||
} from "../chunk-FHLAZ57F.mjs";
|
||||
} from "../chunk-GLGFOTGJ.mjs";
|
||||
import "../chunk-TJDMZZXE.mjs";
|
||||
import {
|
||||
XMLHttpRequestInterceptor
|
||||
} from "../chunk-3HLZLASJ.mjs";
|
||||
} from "../chunk-EADPZWWI.mjs";
|
||||
import "../chunk-6HYIRFX2.mjs";
|
||||
import {
|
||||
FetchInterceptor
|
||||
} from "../chunk-3TXENUZY.mjs";
|
||||
} from "../chunk-GL6JCI7E.mjs";
|
||||
import "../chunk-TX5GBTFY.mjs";
|
||||
import "../chunk-6YM4PLBI.mjs";
|
||||
import "../chunk-LGXJ3UUF.mjs";
|
||||
import "../chunk-YM42IU6M.mjs";
|
||||
import "../chunk-IHJSPMYM.mjs";
|
||||
import "../chunk-3GJB4JDF.mjs";
|
||||
|
||||
// src/presets/node.ts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue